*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --orange: #e8966a;
  --cyan: #00e5ff;
  --gold: #ffd060;
  --green: #7dff4f;
  --void: #0a0506;
  --ff: "Barlow Condensed", sans-serif;
  --fm: "Share Tech Mono", monospace;
  /* Cinematic HUD tokens */
  --hud-bg: rgba(6, 3, 1, 0.72);
  --hud-border: rgba(255, 200, 100, 0.14);
  --hud-glow: rgba(255, 200, 80, 0.08);
  --glass: rgba(8, 4, 2, 0.65);
  --glass-b: rgba(255, 220, 120, 0.1);
  --scan-line: rgba(255, 255, 255, 0.015);
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0506;
}
/* Scanlines and grain removed — cause frame drops */
* {
  cursor: none !important;
}
#cur {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 220, 100, 0.85);
  border-radius: 50%;
  /* Use top-left 0,0 and translate3d for zero-lag GPU positioning */
  top: 0;
  left: 0;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  /* Only transition size/color — NOT position */
  transition:
    width 0.1s ease,
    height 0.1s ease,
    background 0.1s ease,
    border-color 0.1s ease;
  box-shadow: 0 0 8px rgba(255, 200, 60, 0.3);
}
#cur.big {
  width: 32px;
  height: 32px;
  background: rgba(255, 200, 60, 0.06);
  border-color: rgba(255, 200, 60, 0.6);
}
/* Crosshair dot in center */
#cur::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 3px;
  height: 3px;
  transform: translate(-50%, -50%);
  background: rgba(255, 220, 100, 0.7);
  border-radius: 50%;
}
canvas {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.48s cubic-bezier(0.4, 0, 0.2, 1);
}
#vig {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 88% 78% at 50% 50%,
    transparent 35%,
    rgba(10, 5, 0, 0.4) 100%
  );
}
#pp-glow {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 70% at 72% 50%,
    rgba(255, 200, 80, 0.07) 0%,
    transparent 68%
  );
  transition: background 1.4s ease;
}
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1a0e06;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease;
}
#loader.fade {
  opacity: 0;
  pointer-events: none;
}
#loader.gone {
  display: none;
}
.ld-name {
  font-family: var(--ff);
  font-size: clamp(52px, 11vw, 100px);
  font-weight: 900;
  letter-spacing: 10px;
  color: #fff;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 60px rgba(255, 150, 80, 0.5);
  animation: ldglow 2.2s ease-in-out infinite;
}
@keyframes ldglow {
  0%,
  100% {
    text-shadow: 0 0 40px rgba(255, 150, 80, 0.4);
  }
  50% {
    text-shadow:
      0 0 90px rgba(255, 180, 80, 0.8),
      0 0 140px rgba(255, 120, 60, 0.3);
  }
}
.ld-sub {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 6px;
  color: rgba(255, 200, 150, 0.35);
  margin-top: 12px;
  margin-bottom: 48px;
  text-align: center;
}
.ld-pw {
  width: min(320px, 68vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
#ld-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff9944, #ffcc44);
  box-shadow: 0 0 14px #ff9944;
  transition: width 0.35s ease;
}
#ld-msg {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(255, 180, 100, 0.45);
  margin-top: 14px;
  min-height: 14px;
  text-align: center;
}
#start-screen {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  /* Deep cinematic darkness — world barely visible at edges only */
  background: radial-gradient(
    ellipse 60% 55% at 50% 48%,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.82) 72%,
    rgba(0, 0, 0, 0.96) 100%
  );
}
#start-screen.gone {
  display: none;
}

/* Title area */
.ss-eyebrow {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 10px;
  color: rgba(255, 210, 80, 0.75);
  margin-bottom: 14px;
  animation: ssf 2.5s ease-in-out infinite;
  text-transform: uppercase;
}
.ss-click {
  font-family: var(--ff);
  font-size: clamp(48px, 8.5vw, 96px);
  font-weight: 900;
  letter-spacing: 14px;
  color: #fff;
  text-shadow:
    0 0 80px rgba(255, 200, 80, 0.35),
    0 0 140px rgba(255, 180, 60, 0.15),
    0 3px 0 rgba(0, 0, 0, 0.7);
  line-height: 0.95;
  user-select: none;
  text-transform: uppercase;
}
.ss-role {
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: 6px;
  color: rgba(255, 200, 100, 0.45);
  margin-top: 16px;
  margin-bottom: 0;
  text-transform: uppercase;
}
.ss-arrow {
  font-size: 20px;
  color: var(--gold);
  animation: ssf 1.6s 0.3s ease-in-out infinite;
  display: none;
}
@keyframes ssf {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
/* Horizontal rule lines */
.ss-rule {
  width: clamp(200px, 35vw, 380px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 200, 80, 0.5) 30%,
    rgba(255, 200, 80, 0.5) 70%,
    transparent
  );
  margin: 24px 0 28px;
  position: relative;
}
/* Diamond center on the rule line */
.ss-rule::before {
  content: "◆";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 7px;
  color: rgba(255, 200, 80, 0.8);
  background: transparent;
  line-height: 1;
}
.ss-hint {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 8px;
}
/* ── ENTER BUTTON — game UI style, not website CTA ─────────────────────
         Bruno Simon's portfolio uses minimal, purposeful button design.
         No wide background. No website feel. Clean lines, strong hover.        */
.ss-enter-btn {
  margin-top: 0;
  padding: 14px 48px;
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 7px;
  color: #fff;
  background: rgba(10, 6, 2, 0.7);
  border: 1px solid rgba(255, 200, 80, 0.55);
  border-radius: 1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  text-shadow: 0 0 20px rgba(255, 200, 80, 0.5);
  box-shadow:
    0 0 28px rgba(255, 200, 80, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  transition:
    background 0.22s,
    box-shadow 0.22s,
    transform 0.15s;
  animation: btn-breathe 2.8s ease-in-out 1.2s infinite;
  text-transform: uppercase;
}
@keyframes btn-breathe {
  0%,
  100% {
    box-shadow:
      0 0 28px rgba(255, 200, 80, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 200, 80, 0.55);
  }
  50% {
    box-shadow:
      0 0 48px rgba(255, 200, 80, 0.28),
      0 0 80px rgba(255, 160, 40, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 200, 80, 0.85);
  }
}
/* Corner accent marks — game UI detail */
.ss-enter-btn::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 12px;
  width: 6px;
  height: 6px;
  border-top: 1px solid rgba(255, 200, 80, 0.7);
  border-left: 1px solid rgba(255, 200, 80, 0.7);
}
.ss-enter-btn::after {
  content: "";
  position: absolute;
  bottom: 3px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-bottom: 1px solid rgba(255, 200, 80, 0.7);
  border-right: 1px solid rgba(255, 200, 80, 0.7);
}
.ss-enter-btn:hover {
  background: rgba(255, 200, 80, 0.12);
  border-color: rgba(255, 200, 80, 0.95);
  box-shadow:
    0 0 55px rgba(255, 200, 80, 0.35),
    0 0 100px rgba(255, 160, 40, 0.15);
  transform: translateY(-2px);
  animation: none;
  color: #fff;
}
.ss-enter-btn:active {
  transform: translateY(0) scale(0.97);
}
.ss-sub {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.18);
  margin-top: 14px;
}
#hud-tr {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 5px;
  transition:
    right 0.48s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s ease;
  opacity: 0;
}
#hud-tr.hud-visible {
  opacity: 1;
}
.hb {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 2px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 220, 120, 0.2);
  background: rgba(8, 5, 2, 0.88);
  color: rgba(255, 220, 120, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  border-radius: 1px;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  box-shadow:
    0 1px 0 rgba(255, 220, 120, 0.05) inset,
    0 2px 8px rgba(0, 0, 0, 0.5);
}
.hb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 220, 80, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.18s;
}
.hb:hover {
  border-color: rgba(255, 220, 120, 0.35);
  color: var(--gold);
  background: rgba(10, 5, 1, 0.85);
  box-shadow:
    0 0 16px rgba(255, 200, 80, 0.12),
    inset 0 0 8px rgba(255, 200, 80, 0.04);
}
.hb:hover::before {
  opacity: 1;
}
#weather-toast {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: rgba(10, 5, 0, 0.88);
  border: 1px solid rgba(255, 200, 100, 0.2);
  padding: 9px 22px;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(255, 200, 100, 0.8);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  border-radius: 3px;
}
#weather-toast.show {
  opacity: 1;
}
/* ── CINEMATIC PROXIMITY HUD ── */
/* ════════════════════════════════════════════════════════════════
         BUILDING NAMEPLATE CARD  (#prox)
         Positioned bottom-right so it never covers the car or the road
         ahead. The player always sees where they're going.
         ════════════════════════════════════════════════════════════════ */
#prox {
  position: fixed;
  bottom: 148px; /* above speed ring HUD                  */
  right: 24px; /* right edge — never blocks center view */
  left: auto; /* override any inherited left:50%       */
  z-index: 9000;
  width: 310px; /* compact — enough for name + 2 badges  */
  transform: translateY(20px) scale(0.95);
  background: rgba(6, 3, 1, 0.92);
  border: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.28);
  border-radius: 4px;
  padding: 0;
  opacity: 0;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(var(--nc-rgb, 0, 200, 255), 0.07),
    0 12px 40px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(var(--nc-rgb, 0, 200, 255), 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* ── SPRING ENTRANCE — rises from below on right side ── */
#prox.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: prox-spring 0.52s cubic-bezier(0.18, 1.6, 0.4, 1) forwards;
}
@keyframes prox-spring {
  0% {
    transform: translateY(22px) scale(0.93);
    opacity: 0;
  }
  55% {
    transform: translateY(-6px) scale(1.02);
    opacity: 1;
  }
  78% {
    transform: translateY(3px) scale(0.99);
  }
  100% {
    transform: translateY(0px) scale(1);
  }
}

/* ── COLORED LEFT BAR — draws down from top on show ── */
.px-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: rgba(var(--nc-rgb, 0, 200, 255), 1);
  box-shadow: 0 0 10px rgba(var(--nc-rgb, 0, 200, 255), 0.8);
  transition: none;
  border-radius: 2px 0 0 2px;
}
#prox.show .px-bar {
  height: 100%;
  transition: height 0.45s ease 0.06s;
}

/* ── TOP ROW — system label + pulse dot ── */
.px-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 0 16px;
}
.px-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(var(--nc-rgb, 0, 200, 255), 1);
  box-shadow: 0 0 8px rgba(var(--nc-rgb, 0, 200, 255), 0.9);
  animation: dot-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dot-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}
.px-sys {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 4px;
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.65);
}

/* ── MAIN ROW — icon + name + sub + metrics ── */
.px-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 10px 16px;
}
.px-icon-wrap {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(var(--nc-rgb, 0, 200, 255), 0.7));
  animation: icon-pop 0.45s cubic-bezier(0.18, 1.8, 0.4, 1) 0.06s both;
}
@keyframes icon-pop {
  0% {
    transform: scale(0.3) rotate(-18deg);
    opacity: 0;
  }
  65% {
    transform: scale(1.3) rotate(4deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
#prox:not(.show) .px-icon-wrap {
  animation: none;
}

.px-info {
  flex: 1;
  min-width: 0;
}

.px-name {
  font-family: var(--ff);
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(var(--nc-rgb, 0, 200, 255), 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.px-sub {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.px-metrics {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.px-met {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.8);
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.09);
  border: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.2);
  padding: 2px 7px;
  border-radius: 2px;
}
.px-met strong {
  color: rgba(var(--nc-rgb, 0, 200, 255), 1);
  font-family: var(--ff);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin-right: 3px;
}

/* ── FOOT ROW — enter button + hint ── */
.px-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  gap: 12px;
}
.px-hint {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.22);
  flex: 1;
  text-align: right;
}

/* ── ENTER BUTTON ── */
.px-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 4px;
  padding: 9px 18px;
  border: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.6);
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.08);
  color: rgba(var(--nc-rgb, 0, 200, 255), 1);
  border-radius: 2px;
  flex-shrink: 0;
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.1s;
  text-shadow: 0 0 10px rgba(var(--nc-rgb, 0, 200, 255), 0.6);
  box-shadow:
    0 0 14px rgba(var(--nc-rgb, 0, 200, 255), 0.12),
    inset 0 0 8px rgba(var(--nc-rgb, 0, 200, 255), 0.05);
  position: relative;
  overflow: hidden;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.px-btn-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.15);
  border: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.4);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.9);
  line-height: 1;
}
.px-btn-txt {
  letter-spacing: 4px;
}

/* Hide keyboard hint on touch devices */
.is-touch .px-btn-key {
  display: none;
}
.is-touch .px-btn-txt {
  letter-spacing: 5px;
}

.px-btn:hover {
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.18);
  box-shadow: 0 0 28px rgba(var(--nc-rgb, 0, 200, 255), 0.3);
  transform: translateY(-1px);
}
.px-btn:active,
.px-btn:focus-visible {
  transform: scale(0.96);
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.25);
  outline: none;
}

/* ── MOBILE OVERRIDES ── */
@media (max-width: 640px) {
  /* ROOT CAUSE FIX: The desktop rule uses left:50% + translateX(-50%).
           On mobile we need left:12px with NO translateX offset.
           Every positioning property needs !important here because duplicate
           rules later in the file can override a media query at equal specificity. */
  #prox {
    bottom: 168px !important;
    top: auto !important;
    left: 12px !important;
    right: auto !important;
    width: auto !important;
    max-width: 58vw !important;
    /* Key: NO translateX(-50%) — card is left-anchored, not center */
    transform: translateY(16px) scale(0.95) !important;
    border-radius: 8px !important;
  }
  #prox.show {
    /* Override the desktop .show rule which adds translateX(-50%) */
    transform: translateY(0) scale(1) !important;
    animation: prox-spring-mobile 0.44s cubic-bezier(0.18, 1.6, 0.4, 1) forwards !important;
  }
  @keyframes prox-spring-mobile {
    0% {
      transform: translateY(20px) scale(0.9);
      opacity: 0;
    }
    60% {
      transform: translateY(-4px) scale(1.02);
      opacity: 1;
    }
    100% {
      transform: translateY(0) scale(1);
    }
  }
  /* Hide footer completely — mob-enter circle button handles entry */
  .px-foot {
    display: none !important;
  }
  /* Hide metrics badges — keep only name + icon */
  .px-metrics {
    display: none !important;
  }
  /* Trim padding so card is slim */
  .px-top {
    padding: 7px 12px 0 13px !important;
  }
  .px-main {
    padding: 6px 12px 8px 13px !important;
    gap: 9px !important;
  }
  .px-hint {
    display: none !important;
  }
  /* Smaller icon so card stays compact */
  .px-icon-wrap {
    font-size: 24px !important;
  }
  .px-name {
    font-size: 15px !important;
    letter-spacing: 1px !important;
  }
  .px-sub {
    font-size: 6.5px !important;
    letter-spacing: 2px !important;
  }
  .px-sys {
    font-size: 6px !important;
    letter-spacing: 3px !important;
  }
  .px-dot {
    width: 5px !important;
    height: 5px !important;
  }
}

/* Landscape phone — bottom-left, extra compact */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  #prox {
    bottom: 12px !important;
    top: auto !important;
    left: 12px !important;
    right: auto !important;
    max-width: 45vw !important;
    transform: translateY(16px) scale(0.95) !important;
  }
  #prox.show {
    transform: translateY(0) scale(1) !important;
    animation: prox-spring-mobile 0.44s cubic-bezier(0.18, 1.6, 0.4, 1) forwards !important;
  }
  .px-foot {
    display: none !important;
  }
  .px-metrics {
    display: none !important;
  }
  .px-top {
    padding: 5px 10px 0 11px !important;
  }
  .px-main {
    padding: 5px 10px 6px 11px !important;
  }
}
#side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  width: min(500px, 52vw);
  /* clip-path handles open/close — NO transform or opacity here */
  pointer-events: none;
  filter: drop-shadow(-20px 0 40px rgba(0, 0, 0, 0.6));
}
#side-panel.open {
  /* clip-path handles reveal — keep pointer-events */
  pointer-events: all;
}
body.panel-open canvas {
  transform: translateX(calc(-min(250px, 26vw)));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
body.panel-open #hud-tr {
  right: calc(min(500px, 52vw) + 14px);
}
body.panel-open #prox {
  display: none !important;
}
#sp-inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(8, 4, 2, 0.97) 0%,
    rgba(4, 2, 0, 0.99) 60%,
    rgba(6, 3, 1, 0.97) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid rgba(255, 200, 80, 0.12);
  overflow: hidden;
}
/* panel scan removed for performance */
#sp-inner::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cyan),
    rgba(0, 221, 255, 0.3),
    transparent
  );
}
#side-panel.open #sp-inner {
  animation: pscan 0.45s ease;
}
@keyframes pscan {
  from {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}
#sp-head {
  position: sticky;
  top: 2px;
  z-index: 10;
  background: rgba(12, 7, 2, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#sp-lbl {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 4px;
  color: rgba(255, 200, 100, 0.5);
}
#sp-x {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 22px;
  line-height: 1;
  transition: color 0.15s;
}
#sp-x:hover {
  color: #fff;
}
#sp-body {
  padding: 0 22px 32px;
}
.p-badge {
  display: inline-block;
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  padding: 5px 12px;
  border: 1px solid;
  border-radius: 2px;
  margin-top: 22px;
  margin-bottom: 8px;
}
.p-line {
  height: 2px;
  margin: 8px 0 16px;
}
.p-num {
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 5px;
}
.p-name {
  font-family: var(--ff);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}
.p-sub {
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}
.p-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  margin-bottom: 18px;
}
.p-stat.op {
  color: #3dff88;
}
.p-stat.ac {
  color: var(--gold);
}
.sdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: sdp 1.8s ease-in-out infinite;
}
@keyframes sdp {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.mets {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.met {
  min-width: 60px;
}
.mv {
  font-family: var(--ff);
  font-size: 30px;
  font-weight: 900;
  display: block;
  line-height: 1;
}
.ml {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}
.sl {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 4px;
  margin-bottom: 10px;
}
.story {
  font-family: "Barlow", sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}
.out-box {
  border-left: 2px solid;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.out-l {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 5px;
}
.out-t {
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}
.conn-box {
  margin-bottom: 14px;
}
.conn-l {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
}
.conn-i {
  display: flex;
  gap: 8px;
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 5px;
  line-height: 1.5;
}
.ttags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}
.ttag {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 2px;
  padding: 4px 9px;
  border: 1px solid;
  border-radius: 2px;
}
.eng-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s;
}
.eng-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
}
.arr {
  display: inline-block;
  transition: transform 0.2s;
}
.eng-dep {
  display: none;
  padding: 10px 0 4px;
}
.eng-dep.vis {
  display: block;
}
.rej-item {
  border-left: 1px solid rgba(255, 100, 100, 0.25);
  padding: 7px 12px;
  margin-bottom: 6px;
}
.rej-w {
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 130, 100, 0.75);
}
.rej-r {
  font-family: "Barlow", sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.ed-sect {
  margin-bottom: 16px;
}
.ed-lbl {
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.28);
  margin-bottom: 8px;
}
.ed-txt {
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}
.ed-txt code {
  font-family: var(--fm);
  font-size: 11px;
  color: #7dff4f;
  background: rgba(125, 255, 79, 0.08);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: pre-wrap;
}
#journey {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(10, 5, 2, 0.96);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
#journey.open {
  transform: translateY(0);
  pointer-events: all;
}
#jb-x {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.15s;
}
#jb-x:hover {
  color: #fff;
}
.jb-hd {
  font-family: var(--ff);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: 6px;
  color: #fff;
  margin-bottom: 4px;
}
.jb-sh {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.28);
  margin-bottom: 32px;
}
#jb-slide {
  width: min(560px, 90vw);
}
.jb-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 28px 32px;
  min-height: 160px;
}
.jb-year {
  font-family: var(--ff);
  font-size: 48px;
  font-weight: 900;
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}
.jb-ttl {
  font-family: var(--ff);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 6px;
}
.jb-stl {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 14px;
}
.jb-bdy {
  font-family: "Barlow", sans-serif;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}
#jb-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}
.jb-arr {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: all 0.18s;
}
.jb-arr:hover:not(:disabled) {
  border-color: #fff;
  color: #fff;
}
.jb-arr:disabled {
  opacity: 0.22;
}
#jb-ctr {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-bottom: 6px;
}
#jb-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.jb-dot-wrap {
  background: none;
  border: none;
}
.jb-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s;
}
.jb-dot.on {
  background: #fff;
}
#ob {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 5, 2, 0.82);
  border: 1px solid rgba(0, 221, 255, 0.35);
  color: var(--cyan);
  font-size: 22px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  position: relative; /* needed for ::before beacon ring */
  overflow: visible !important;
}
#ob:hover {
  background: rgba(0, 221, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 221, 255, 0.25);
}
#op {
  position: fixed;
  bottom: 82px;
  right: 24px;
  z-index: 400;
  width: min(340px, 88vw);
  background: rgba(10, 5, 2, 0.95);
  border: 1px solid rgba(0, 221, 255, 0.18);
  backdrop-filter: blur(14px);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  border-radius: 6px;
  overflow: hidden;
}
#op.open {
  transform: none;
  opacity: 1;
  pointer-events: all;
}
.oh {
  padding: 11px 15px;
  border-bottom: 1px solid rgba(0, 221, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(0, 221, 255, 0.55);
}
#ox {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 16px;
  transition: color 0.15s;
}
#ox:hover {
  color: #fff;
}
#om {
  max-height: 210px;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.om {
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  line-height: 1.55;
}
.om.u {
  background: rgba(255, 200, 100, 0.07);
  color: rgba(255, 220, 160, 0.85);
  text-align: right;
  border: 1px solid rgba(255, 200, 100, 0.1);
}
.om.b {
  color: rgba(150, 200, 230, 0.82);
  border: 1px solid rgba(0, 221, 255, 0.08);
  background: rgba(0, 221, 255, 0.025);
}
.om.t {
  color: rgba(0, 221, 255, 0.25);
  font-style: italic;
}
.or {
  display: flex;
  border-top: 1px solid rgba(0, 221, 255, 0.08);
}
#oi {
  flex: 1;
  background: transparent;
  border: none;
  color: #c8dff0;
  font-family: var(--fm);
  font-size: 10px;
  padding: 9px 12px;
  outline: none;
}
#oi::placeholder {
  color: rgba(0, 221, 255, 0.18);
}
#os {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(0, 221, 255, 0.1);
  color: var(--cyan);
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 2px;
  padding: 0 12px;
  transition: background 0.2s;
}
#os:hover {
  background: rgba(0, 221, 255, 0.08);
}
#contact {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex; /* always flex — visibility gates it */
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 2, 0.94);
  backdrop-filter: blur(28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.32s;
}
#contact.vis {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}
.cc {
  text-align: center;
  padding: 52px 68px;
  position: relative;
  background: rgba(10, 5, 2, 0.9);
  border: 1px solid rgba(0, 221, 255, 0.2);
  clip-path: polygon(
    20px 0,
    100% 0,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    0 100%,
    0 20px
  );
}
.cc::before,
.cc::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
}
.cc::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}
.cc::after {
  bottom: 0;
  right: 0;
  border-bottom: 1px solid #ff9944;
  border-right: 1px solid #ff9944;
}
.ccl {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.3);
}
.ccl:hover {
  color: #fff;
}
.cu {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 6px;
  color: rgba(0, 221, 255, 0.4);
  margin-bottom: 22px;
}
.cn {
  font-family: var(--ff);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  margin-bottom: 4px;
}
.cco {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(255, 200, 100, 0.6);
  margin-bottom: 3px;
}
.crr {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 28px;
}
.cls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cl {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Barlow", sans-serif;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.18s;
}
.cl:hover {
  color: #fff;
}
.cll {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(0, 221, 255, 0.6);
  min-width: 62px;
  text-align: right;
}
#minimap {
  position: fixed;
  bottom: 118px;
  right: 24px;
  z-index: 400;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 80, 0.18);
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 200, 80, 0.06),
    inset 0 0 20px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}
#minimap.hud-visible {
  opacity: 1;
}
#mm-lbl {
  font-family: var(--fm);
  font-size: 6.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  margin-bottom: 3px;
}
#mm-canvas {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}
#mm-visited {
  display: none;
}
#ctrl-hint {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(255, 220, 120, 0.55);
  pointer-events: none;
  line-height: 2;
  background: rgba(6, 3, 1, 0.75);
  padding: 10px 14px;
  border-radius: 1px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 200, 80, 0.1);
  border-left: 2px solid rgba(255, 200, 80, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.6s ease 1s;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
#ctrl-hint.hud-visible {
  opacity: 1;
}
.ck {
  background: rgba(255, 200, 80, 0.12);
  border: 1px solid rgba(255, 200, 80, 0.35);
  color: rgba(255, 220, 120, 0.9);
  padding: 1px 6px;
  border-radius: 1px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1px;
}
#grip-hud {
  position: fixed;
  bottom: 175px;
  right: 24px;
  z-index: 200;
  display: none;
  align-items: center;
  gap: 7px;
  font-family: var(--fm);
  font-size: 7.5px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(10, 5, 2, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 7px 12px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
#grip-hud.show {
  display: flex;
}
#grip-hud.warn {
  color: #ff9950;
  border-color: rgba(255, 153, 80, 0.35);
}
#grip-hud.danger {
  color: #ff4444;
  border-color: rgba(255, 68, 68, 0.4);
}
#grip-bar-wrap {
  width: 42px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
#grip-bar {
  height: 100%;
  width: 100%;
  background: #3dff88;
  border-radius: 2px;
  transition:
    width 0.4s,
    background 0.4s;
}
#mode-chip {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 3px;
  padding: 5px 12px;
  border: 1px solid;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  background: rgba(10, 5, 2, 0.5);
}
#mode-chip.recruiter {
  color: var(--gold);
  border-color: rgba(255, 204, 68, 0.35);
}
#mode-chip.engineer {
  color: var(--cyan);
  border-color: rgba(0, 221, 255, 0.35);
}
#joy-zone {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50vw;
  height: 44vh;
  z-index: 500;
  display: none;
  touch-action: none;
}
#joy-outer {
  position: absolute;
  bottom: 28px;
  left: 28px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 5, 2, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
#joy-inner {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 150, 80, 0.35);
  border: 2px solid rgba(255, 150, 80, 0.65);
  box-shadow: 0 0 18px rgba(255, 150, 80, 0.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.08s;
}
#mob-enter {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  display: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 221, 255, 0.15);
  border: 2px solid rgba(0, 221, 255, 0.5);
  color: var(--cyan);
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.12s,
    background 0.2s,
    border-color 0.2s;
}
#mob-enter:active {
  transform: scale(0.92);
}
#mob-enter.vis {
  display: flex;
  animation: mob-enter-pop 0.4s cubic-bezier(0.18, 1.6, 0.4, 1) both;
}
@keyframes mob-enter-pop {
  from {
    transform: scale(0.5) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}
.mob-enter-lbl {
  font-size: 9px;
  opacity: 0.5;
}
#portrait-lock {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #1a0e06;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#portrait-lock.show {
  display: flex;
}
.pl-icon {
  font-size: 48px;
  animation: plrot 2s ease-in-out infinite;
}
@keyframes plrot {
  0%,
  100% {
    transform: rotate(0);
  }
  40%,
  60% {
    transform: rotate(90deg);
  }
}
.pl-msg {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  line-height: 1.8;
}
@media (max-width: 640px) {
  #side-panel {
    width: 100vw !important;
  }
  body.panel-open canvas {
    transform: none !important;
    filter: brightness(0.35);
    transition: filter 0.4s ease;
  }
  #ctrl-hint,
  #minimap {
    display: none;
  }
}
::-webkit-scrollbar {
  width: 4px;
}
.panel-section-h {
  font-family: var(--fm);
  letter-spacing: 4px;
  font-size: 9px;
  color: var(--nc);
  text-shadow:
    0 0 8px var(--nc),
    0 1px 0 rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 5px;
  margin: 18px 0 8px;
}
/* Entrance animation keyframe */
/* panelRise disabled — replaced by clip-path wipe + stagger-in system */
@keyframes panelRise {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}
#side-panel.open .sp-body {
  /* animation removed — stagger-in handles per-child reveal */
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}
/* ── GAME HUD — speed + gear indicator ── */
/* ── CINEMATIC GAME HUD ── */
#game-hud {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 450;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.8s ease 0.5s; /* fade in after game starts */
}
#game-hud.hud-visible {
  opacity: 1;
}

/* Speed ring — larger, more impactful */
#spd-ring {
  width: 82px;
  height: 82px;
  position: relative;
  filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.25));
}
#spd-ring svg {
  width: 82px;
  height: 82px;
  transform: rotate(-135deg);
}
#spd-ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}
#spd-ring .fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transition:
    stroke-dashoffset 0.08s ease,
    stroke 0.2s ease;
  filter: drop-shadow(0 0 6px currentColor);
}
/* Outer glow ring */
#spd-ring .glow-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.15;
  r: 36;
}
#spd-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--ff);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 0 0 10px rgba(255, 200, 80, 0.4);
}
#spd-num span {
  font-size: 6px;
  font-family: var(--fm);
  letter-spacing: 3px;
  color: rgba(255, 200, 80, 0.5);
  margin-top: 3px;
}
/* Gear + weather in a single row */
#hud-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
#gear-badge {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 4px;
  color: var(--gold);
  opacity: 0.7;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  padding: 3px 8px;
  border-radius: 2px;
  text-align: right;
}
#weather-badge {
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  padding: 3px 8px;
  border-radius: 2px;
  text-align: right;
}
@media (max-width: 640px) {
  #game-hud {
    bottom: 90px;
    right: 12px;
  }
  #spd-ring {
    width: 60px;
    height: 60px;
  }
  #spd-ring svg {
    width: 60px;
    height: 60px;
  }
  #spd-num {
    font-size: 16px;
  }
}
/* ── CINEMATIC BLOOM OVERLAY ── */
#city-bloom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: rgba(255, 220, 120, 0);
  transition: background 0.25s ease;
  /* mix-blend-mode: screen removed — causes cursor lag via compositing */
}
@keyframes bloomFlash {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  15% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
.bloom-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  animation: bloomFlash 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
/* Speed vignette — always-on subtle vignette + speed boost */
#speed-vignette {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background: radial-gradient(
    ellipse 72% 68% at 50% 50%,
    transparent 0%,
    transparent 35%,
    rgba(0, 0, 0, 0.28) 70%,
    rgba(0, 0, 0, 0.55) 100%
  );
  transition: background 0.12s ease;
}
#city-canvas {
  will-change: transform;
  /* Improve cursor response — don't intercept events when overlays are on top */
}
/* cursor optimization — ensure cursor is always responsive */
* {
  cursor: inherit;
}
body {
  cursor: default;
}
button,
[onclick],
a,
.px-btn,
.hb,
#fullmap-canvas,
#ss-enter-btn {
  cursor: pointer;
}
/* ── NARRATIVE GUIDE LABEL smooth transitions ── */
#guide-bar {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  pointer-events: none;
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 6px;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(255, 210, 60, 0.8),
    0 0 40px rgba(255, 200, 60, 0.3);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
  background: rgba(6, 3, 1, 0.6);
  border: 1px solid rgba(255, 200, 60, 0.15);
  padding: 9px 22px;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
/* ── BRUNO SIMON STYLE MAP ── */
#fullmap {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: #050c14;
  display: flex; /* always flex — visibility gates it */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.97);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.35s;
}
#fullmap.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: scale(1);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* Map container — centered, fills viewport */
#fullmap-wrap {
  position: relative;
  width: min(92vw, 92vh);
  height: min(92vw, 92vh);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 200, 80, 0.06),
    0 0 80px rgba(0, 30, 80, 0.8);
}
#fullmap-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  cursor: crosshair;
}

/* Top HUD bar */
#fm-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(5, 12, 20, 0.9) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}
#fm-title {
  font-family: var(--ff);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(255, 220, 100, 0.8);
  text-shadow: 0 0 20px rgba(255, 200, 60, 0.4);
}
#fm-count {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 4px;
  color: rgba(255, 200, 80, 0.5);
}

/* Close button — corner */
#fullmap-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(5, 12, 20, 0.7);
  border: 1px solid rgba(255, 200, 80, 0.15);
  border-radius: 2px;
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(255, 220, 100, 0.45);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s;
  z-index: 10;
  pointer-events: auto;
}
#fullmap-close:hover {
  color: var(--gold);
  border-color: rgba(255, 200, 80, 0.4);
  background: rgba(10, 20, 30, 0.9);
}

/* Tooltip on hover */
#fm-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  padding: 8px 14px;
  background: rgba(5, 12, 20, 0.94);
  border: 1px solid rgba(255, 220, 100, 0.2);
  border-radius: 3px;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 2px;
  color: #fff;
  white-space: nowrap;
  display: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
#fm-tooltip .ft-name {
  font-family: var(--ff);
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 3px;
}
#fm-tooltip .ft-hint {
  color: rgba(255, 200, 80, 0.5);
  font-size: 7px;
  letter-spacing: 3px;
  margin-top: 4px;
}

/* Bottom bar */
#fm-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: linear-gradient(0deg, rgba(5, 12, 20, 0.9) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: none;
  z-index: 2;
}
.fm-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fm);
  font-size: 7px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.3);
}
.fm-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
#fullmap-legend,
#fullmap-vc {
  display: none;
} /* replaced by canvas tooltips */

/* ═══════════════════════════════════════════════════════════════
         GAME FEEL LAYER — all additions below
         ═══════════════════════════════════════════════════════════════ */

/* ── SPEED STREAKS ─────────────────────────────────────────────
         10 horizontal motion lines. JS sets opacity + translateX each
         frame via inline style — no CSS animation dependency.           */
#speed-streaks {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.streak {
  position: absolute;
  left: 0;
  height: 1.5px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 230, 160, 0.55) 35%,
    rgba(255, 210, 120, 0.7) 70%,
    transparent 100%
  );
  border-radius: 2px;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateX(110%);
}
/* Individual streak vertical positions + widths — asymmetric = natural */
.streak.s1 {
  top: 14%;
  width: 38%;
}
.streak.s2 {
  top: 22%;
  width: 62%;
}
.streak.s3 {
  top: 31%;
  width: 45%;
}
.streak.s4 {
  top: 38%;
  width: 78%;
}
.streak.s5 {
  top: 46%;
  width: 55%;
}
.streak.s6 {
  top: 54%;
  width: 72%;
}
.streak.s7 {
  top: 61%;
  width: 40%;
}
.streak.s8 {
  top: 68%;
  width: 66%;
}
.streak.s9 {
  top: 76%;
  width: 30%;
}
.streak.s10 {
  top: 82%;
  width: 52%;
}

/* ── COLLISION HIT FLASH ──────────────────────────────────────── */
#hit-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: rgba(255, 200, 80, 0);
  transition: background 0.04s ease;
}
#hit-flash.pop {
  background: rgba(255, 200, 80, 0.28);
  transition: background 0.04s ease;
}
#hit-flash.fade {
  background: rgba(255, 200, 80, 0);
  transition: background 0.32s ease;
}

/* ── STOP EXHALE RING ─────────────────────────────────────────── */
#exhale-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin-top: -60px;
  margin-left: -60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 200, 100, 0);
  pointer-events: none;
  z-index: 6;
  transform: scale(0.2);
  opacity: 0;
  transition: none;
}
#exhale-ring.exhale {
  animation: exhale-expand 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes exhale-expand {
  0% {
    transform: scale(0.4);
    opacity: 0.55;
    border-color: rgba(255, 200, 100, 0.55);
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
    border-color: rgba(255, 200, 100, 0);
  }
}

/* ── PROXIMITY NOTIFICATION — icon pop + bar draw (non-conflicting additions) ── */
/* Icon POP on entry — scales up then snaps to size */
#prox.show .px-icon {
  animation: icon-pop 0.45s cubic-bezier(0.18, 1.8, 0.4, 1) 0.08s both;
}
@keyframes icon-pop {
  0% {
    transform: scale(0.4) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.35) rotate(5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
/* Left accent bar DRAWS in from top to bottom */
#prox.show::before {
  animation: bar-draw 0.38s ease 0.05s both;
}
@keyframes bar-draw {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0% 0);
  }
}
/* Building color tint floods the card background */
#prox.tinted {
  background: linear-gradient(
    135deg,
    rgba(var(--nc-rgb, 0, 200, 255), 0.12) 0%,
    rgba(8, 4, 1, 0.92) 60%
  );
}

/* ── SIDE PANEL — CINEMATIC WIPE ENTRANCE ────────────────────────
         Panel wipes open left-to-right. Content sections stagger in.    */
#side-panel {
  /* override existing translateX slide with clip-path wipe */
  transform: none !important;
  opacity: 1 !important;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
#side-panel.open {
  clip-path: inset(0 0% 0 0);
  pointer-events: all;
}
/* Header typewriter: #sp-lbl text appears char by char via JS */
#sp-lbl {
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  transition: max-width 0.45s steps(16, end) 0.15s;
}
#side-panel.open #sp-lbl {
  max-width: 280px;
}
/* Colored left-edge reveal bar */
#sp-inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0%;
  background: var(--nc, #00e5ff);
  box-shadow: 0 0 12px var(--nc, #00e5ff);
  transition: height 0.5s ease 0.1s;
  z-index: 20;
}
#side-panel.open #sp-inner::after {
  height: 100%;
}
/* Content children stagger in — JS adds .sp-ready class after wipe */
#sp-body > * {
  opacity: 0;
  transform: translateX(14px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
#sp-body.stagger-in > *:nth-child(1) {
  transition-delay: 0.28s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(2) {
  transition-delay: 0.35s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(3) {
  transition-delay: 0.42s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(4) {
  transition-delay: 0.49s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(5) {
  transition-delay: 0.55s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(6) {
  transition-delay: 0.61s;
  opacity: 1;
  transform: none;
}
#sp-body.stagger-in > *:nth-child(n + 7) {
  transition-delay: 0.67s;
  opacity: 1;
  transform: none;
}

/* ── HEARTBEAT ORB — world pulse ring, faint DOM circle ──────────
         The 3D ring is in Three.js. This adds a matching CSS halo at the
         center of the viewport that breathes every 4 seconds.            */
#heartbeat-halo {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#heartbeat-halo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 200, 100, 0);
  box-shadow: 0 0 0 0px rgba(255, 200, 100, 0);
  animation: city-heartbeat 4s ease-in-out infinite;
}
@keyframes city-heartbeat {
  0% {
    box-shadow: 0 0 0 0px rgba(255, 200, 100, 0);
  }
  8% {
    box-shadow: 0 0 0 12px rgba(255, 200, 100, 0.18);
  }
  20% {
    box-shadow: 0 0 0 60px rgba(255, 200, 100, 0.06);
  }
  40% {
    box-shadow: 0 0 0 120px rgba(255, 200, 100, 0.02);
  }
  100% {
    box-shadow: 0 0 0 200px rgba(255, 200, 100, 0);
  }
}

/* ═══════════════════════════════════════════════════════════════════
         UI FEEL LAYER — animations, depth, feedback
         All overrides are surgical: only animation/shadow/transition props.
         Layout, font-size, color and positioning are intentionally untouched.
         ═══════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────
         1. HUD BUTTON STRIP — staggered entry + deeper hover
         Each .hb arrives from above with a spring overshoot. Stagger is
         handled via nth-child so all 4 buttons feel like a cascade, not
         a wall. Without this they all appear simultaneously as a flat row.
         ────────────────────────────────────────────────────────────────── */
#hud-tr .hb {
  opacity: 0;
  transform: translateY(-10px) scale(0.92);
  /* Entry state — overridden by .hud-visible below */
}
#hud-tr.hud-visible .hb {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.38s cubic-bezier(0.18, 1.4, 0.4, 1),
    transform 0.38s cubic-bezier(0.18, 1.4, 0.4, 1),
    border-color 0.22s,
    color 0.22s,
    background 0.22s,
    box-shadow 0.22s;
}
/* Stagger: each button 55ms later than previous */
#hud-tr.hud-visible .hb:nth-child(1) {
  transition-delay: 0.05s;
}
#hud-tr.hud-visible .hb:nth-child(2) {
  transition-delay: 0.11s;
}
#hud-tr.hud-visible .hb:nth-child(3) {
  transition-delay: 0.17s;
}
#hud-tr.hud-visible .hb:nth-child(4) {
  transition-delay: 0.23s;
}
#hud-tr.hud-visible .hb:nth-child(5) {
  transition-delay: 0.29s;
}

/* Hover: lift + glow + shine sweep */
.hb:hover {
  transform: translateY(-2px) scale(1.04) !important;
  border-color: rgba(255, 220, 120, 0.42) !important;
  color: var(--gold) !important;
  background: rgba(12, 6, 1, 0.9) !important;
  box-shadow:
    0 0 18px rgba(255, 200, 80, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(255, 200, 80, 0.05) !important;
}
.hb:active {
  transform: translateY(0px) scale(0.97) !important;
  transition-duration: 0.08s !important;
}
/* Sweep shine that travels left→right on hover */
.hb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 25%,
    rgba(255, 220, 100, 0.1) 50%,
    transparent 75%
  );
  transform: translateX(-100%);
  transition: transform 0.45s ease;
  pointer-events: none;
}
.hb:hover::after {
  transform: translateX(100%);
}

/* ──────────────────────────────────────────────────────────────────
         2. WEATHER TOAST — spring entrance from top
         Was: pure opacity fade (zero spatial movement).
         Now: drops down with spring overshoot, making it feel like it
         physically arrives from above the HUD rather than fading into view.
         ────────────────────────────────────────────────────────────────── */
#weather-toast {
  transform: translateX(-50%) translateY(-14px) scale(0.94);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.18, 1.5, 0.4, 1);
}
#weather-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ──────────────────────────────────────────────────────────────────
         3. ORACLE BUTTON (#ob) — idle beacon pulse
         The oracle button now emits a slow expanding ring every 3 seconds,
         like a sonar ping or a beacon light. This communicates "this button
         does something interesting" without text or labels.
         ────────────────────────────────────────────────────────────────── */
#ob {
  transition:
    transform 0.18s cubic-bezier(0.18, 1.4, 0.4, 1),
    background 0.2s,
    box-shadow 0.2s !important;
}
#ob::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 221, 255, 0.5);
  animation: ob-beacon 3s ease-out infinite;
  pointer-events: none;
}
@keyframes ob-beacon {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  60% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
#ob:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 0 24px rgba(0, 221, 255, 0.35) !important;
}
#ob:active {
  transform: scale(0.94) !important;
}

/* ──────────────────────────────────────────────────────────────────
         4. ORACLE PANEL (#op) — richer glass + spring-tighter entrance
         Deepens the glass effect with stronger backdrop + inner glow line.
         The spring overshoot (scale goes to 1.02 before settling to 1)
         makes the panel feel like it has physical weight.
         ────────────────────────────────────────────────────────────────── */
#op {
  backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(0, 221, 255, 0.22) !important;
  box-shadow:
    0 2px 0 rgba(0, 221, 255, 0.12) inset,
    0 -1px 0 rgba(0, 0, 0, 0.5) inset,
    0 16px 48px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 221, 255, 0.04) !important;
  transform: translateY(18px) scale(0.94) !important;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.18, 1.35, 0.4, 1) !important;
}
#op.open {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
}

/* ──────────────────────────────────────────────────────────────────
         5. ORACLE MESSAGES — slide-in per message
         Each .om gets a spring entry. JS adds the .om-enter class when
         a message is created; the class triggers the keyframe then removes
         itself. This makes each message feel like it arrives, not renders.
         ────────────────────────────────────────────────────────────────── */
.om {
  transition:
    background 0.2s,
    border-color 0.2s;
}
.om.om-enter {
  animation: om-arrive 0.38s cubic-bezier(0.18, 1.4, 0.4, 1) both;
}
@keyframes om-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#os:hover {
  background: rgba(0, 221, 255, 0.1) !important;
}
#os:active {
  transform: scale(0.96);
}

/* ──────────────────────────────────────────────────────────────────
         6. CONTACT MODAL (.cc card) — scale spring entry
         The .cc card inside #contact springs from scale(0.88) to 1 with
         overshoot. Delayed slightly so the background fade leads the card.
         .cl links lift on hover instead of just changing color.
         ────────────────────────────────────────────────────────────────── */
#contact.vis .cc {
  animation: cc-spring 0.45s cubic-bezier(0.18, 1.5, 0.4, 1) 0.06s both;
}
@keyframes cc-spring {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.ccl {
  transition:
    color 0.15s,
    transform 0.15s !important;
}
.ccl:hover {
  color: #fff !important;
  transform: scale(1.15) rotate(5deg) !important;
}
.cl {
  transition:
    color 0.18s,
    transform 0.18s !important;
  transform: translateX(0);
}
.cl:hover {
  color: #fff !important;
  transform: translateX(4px) !important;
}
/* Stagger contact links so they arrive sequentially */
#contact.vis .cl:nth-child(1) {
  animation: cl-in 0.35s 0.15s both;
}
#contact.vis .cl:nth-child(2) {
  animation: cl-in 0.35s 0.21s both;
}
#contact.vis .cl:nth-child(3) {
  animation: cl-in 0.35s 0.27s both;
}
#contact.vis .cl:nth-child(4) {
  animation: cl-in 0.35s 0.33s both;
}
@keyframes cl-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ──────────────────────────────────────────────────────────────────
         7. JOURNEY PANEL — card slide + nav feedback
         .jb-card gets a lateral slide when navigating (JS adds .slide-left
         / .slide-right). Arrow buttons translate on hover — they lean into
         their direction. Dots spring-scale when becoming active.
         ────────────────────────────────────────────────────────────────── */
#journey {
  transition: transform 0.48s cubic-bezier(0.18, 1.2, 0.4, 1) !important;
}
.jb-card {
  transition:
    transform 0.3s cubic-bezier(0.18, 1.4, 0.4, 1),
    opacity 0.28s ease !important;
}
.jb-card.slide-out-left {
  transform: translateX(-28px);
  opacity: 0;
}
.jb-card.slide-out-right {
  transform: translateX(28px);
  opacity: 0;
}
.jb-card.slide-in-left {
  animation: jcard-left 0.38s cubic-bezier(0.18, 1.4, 0.4, 1) both;
}
.jb-card.slide-in-right {
  animation: jcard-right 0.38s cubic-bezier(0.18, 1.4, 0.4, 1) both;
}
@keyframes jcard-left {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes jcard-right {
  from {
    transform: translateX(-24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Arrow buttons — lean into their direction on hover */
.jb-arr {
  transition: all 0.18s cubic-bezier(0.18, 1.4, 0.4, 1) !important;
}
#jb-p:hover:not(:disabled) {
  transform: translateX(-3px) scale(1.1) !important;
}
#jb-n:hover:not(:disabled) {
  transform: translateX(3px) scale(1.1) !important;
}
.jb-arr:active:not(:disabled) {
  transform: scale(0.88) !important;
}

/* Dot spring — active dot pops up with scale overshoot */
.jb-dot {
  transition:
    background 0.22s,
    transform 0.28s cubic-bezier(0.18, 1.8, 0.4, 1) !important;
}
.jb-dot.on {
  transform: scale(1.5) !important;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5) !important;
}
.jb-dot-wrap:hover .jb-dot:not(.on) {
  transform: scale(1.25) !important;
  background: rgba(255, 255, 255, 0.4) !important;
}

/* ──────────────────────────────────────────────────────────────────
         8. KEYBOARD KEY BADGES (.ck) — glint sweep every 4 seconds
         The key badges in #ctrl-hint cycle through a subtle shine sweep.
         Makes them feel like actual physical keys catching overhead light.
         ────────────────────────────────────────────────────────────────── */
.ck {
  position: relative;
  overflow: hidden;
  transition:
    background 0.2s,
    border-color 0.2s !important;
}
.ck::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 70%
  );
  animation: ck-glint 4s ease-in-out infinite;
  transform: translateX(-120%);
}
@keyframes ck-glint {
  0%,
  70% {
    transform: translateX(-120%);
  }
  85% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

/* ──────────────────────────────────────────────────────────────────
         9. CTRL HINT — scan-line reveal via opacity only
         (clip-path is reserved for the corner cut shape)
         ────────────────────────────────────────────────────────────────── */
#ctrl-hint {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.1s !important;
}
#ctrl-hint.hud-visible {
  opacity: 1 !important;
}

/* ──────────────────────────────────────────────────────────────────
         10. MINIMAP — living rotate ring + entry spring
         The minimap gains a slowly rotating outer ring (pure CSS via
         ::after) that communicates "this is a live radar, not a static map."
         Entry springs from scale(0.7) with overshoot.
         ────────────────────────────────────────────────────────────────── */
#minimap {
  transition:
    opacity 0.5s ease 1.2s,
    transform 0.5s cubic-bezier(0.18, 1.5, 0.4, 1) 1.2s !important;
  transform: scale(0.7);
}
#minimap.hud-visible {
  opacity: 1 !important;
  transform: scale(1) !important;
}
#minimap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(255, 200, 80, 0.35);
  border-right-color: rgba(255, 200, 80, 0.12);
  animation: mm-spin 6s linear infinite;
  pointer-events: none;
}
@keyframes mm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ──────────────────────────────────────────────────────────────────
         11. SPEED RING HUD (#game-hud) — entry spring
         HUD drops in from below with spring overshoot on game start.
         ────────────────────────────────────────────────────────────────── */
#game-hud {
  transform: translateY(20px) scale(0.9);
  transition:
    opacity 0.6s ease 0.4s,
    transform 0.6s cubic-bezier(0.18, 1.4, 0.4, 1) 0.4s !important;
}
#game-hud.hud-visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* ──────────────────────────────────────────────────────────────────
         12. SIDE PANEL — deepened glass + sp-head hover on close button
         sp-inner gets stronger backdrop + inner top highlight bar.
         sp-x (close button) gets a rotation on hover — communicates "press
         me to close" without tooltip.
         ────────────────────────────────────────────────────────────────── */
#sp-inner {
  backdrop-filter: blur(24px) saturate(200%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.6) inset,
    -8px 0 40px rgba(0, 0, 0, 0.5) !important;
}
#sp-x {
  transition:
    color 0.15s,
    transform 0.2s cubic-bezier(0.18, 1.4, 0.4, 1) !important;
}
#sp-x:hover {
  color: #fff !important;
  transform: rotate(90deg) scale(1.2) !important;
}
#sp-x:active {
  transform: rotate(90deg) scale(0.9) !important;
}

/* ──────────────────────────────────────────────────────────────────
         13. FULLMAP CLOSE BUTTON — spin-on-hover
         ────────────────────────────────────────────────────────────────── */
#fullmap-close {
  transition: all 0.2s cubic-bezier(0.18, 1.4, 0.4, 1) !important;
}
#fullmap-close:hover {
  transform: rotate(90deg) scale(1.15) !important;
  color: #fff !important;
}

/* ──────────────────────────────────────────────────────────────────
         14. START SCREEN — text elements stagger in on load
         Each element of the start screen enters with a stagger so the
         screen builds up progressively. Previously all elements appeared
         simultaneously as one static block.
         ────────────────────────────────────────────────────────────────── */
.ss-eyebrow {
  animation: ss-rise 0.6s cubic-bezier(0.18, 1.4, 0.4, 1) 0.1s both;
}
.ss-click {
  animation: ss-rise 0.7s cubic-bezier(0.18, 1.4, 0.4, 1) 0.18s both;
}
.ss-role {
  animation: ss-rise 0.5s cubic-bezier(0.18, 1.4, 0.4, 1) 0.32s both;
}
.ss-rule {
  animation: ss-rise 0.45s ease 0.42s both;
}
.ss-sub {
  animation: ss-rise 0.45s ease 0.6s both;
}
.ss-hint {
  animation: ss-rise 0.4s ease 0.68s both;
}
@keyframes ss-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Enter button: rise in, then hand off to btn-breathe — no ssf opacity flicker */
.ss-enter-btn {
  animation:
    ss-rise 0.55s cubic-bezier(0.18, 1.5, 0.4, 1) 0.5s both,
    btn-breathe 2.8s ease-in-out 1.8s infinite !important;
}

/* ──────────────────────────────────────────────────────────────────
         15. GUIDE BAR — pulse glow
         The narrative guide bar at the bottom gets a slow text-shadow
         pulse, making it feel like a glowing inscription rather than
         a label.
         ────────────────────────────────────────────────────────────────── */
#guide-bar {
  animation: guide-pulse 2.8s ease-in-out infinite !important;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
@keyframes guide-pulse {
  0%,
  100% {
    text-shadow:
      0 0 16px rgba(255, 210, 60, 0.6),
      0 0 32px rgba(255, 200, 60, 0.2);
  }
  50% {
    text-shadow:
      0 0 28px rgba(255, 220, 60, 1),
      0 0 56px rgba(255, 200, 60, 0.45),
      0 0 90px rgba(255, 180, 40, 0.15);
  }
}

/* ═══════════════════════════════════════════════════════════════════
         CINEMATIC WORLD LAYER — Noise, Shockwave, Vignette enhancements
         ═══════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────
         SCREEN NOISE — SVG fractalNoise turbulence, zero assets, zero JS.
         Tiled 256×256 SVG with feTurbulence creates organic film-grain.
         opacity 0.038 + mix-blend-mode overlay adds texture without color.
         Disabled on touch devices (battery / GPU budget).
         WHY: Perfect digital rendering reads as fake. Grain says "filmed."
         ────────────────────────────────────────────────────────────────── */
#noise-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  will-change: opacity;
}
/* Disable on touch to preserve GPU budget */
.is-touch #noise-layer {
  display: none;
}

/* ──────────────────────────────────────────────────────────────────
         ENTRY SHOCKWAVE — radial burst from screen center on building entry.
         Triggered by JS adding .fire class. CSS custom property --nc-rgb
         makes it match the building's color.
         WHY: The bloom (flat fill) tells eyes "something changed."
              The shockwave (radial expansion) tells eyes "I crossed a threshold."
              Two different signals — one for brightness, one for space.
         ────────────────────────────────────────────────────────────────── */
#shockwave {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9500;
  opacity: 0;
}
#shockwave.fire {
  animation: shockwave-burst 0.75s cubic-bezier(0.12, 0.8, 0.2, 1) forwards;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--sw-rgb, 255, 200, 80), 0.4) 0%,
    rgba(var(--sw-rgb, 255, 200, 80), 0.12) 40%,
    transparent 72%
  );
}
@keyframes shockwave-burst {
  0% {
    width: 0vmax;
    height: 0vmax;
    opacity: 1;
  }
  35% {
    opacity: 0.85;
  }
  100% {
    width: 220vmax;
    height: 220vmax;
    opacity: 0;
  }
}

/* ──────────────────────────────────────────────────────────────────
         ENHANCED SPEED VIGNETTE — dynamic color tint at high speed.
         At low speed: black edges (atmospheric depth).
         At high speed: JS sets --vignette-color so edges become deep amber
         making the screen feel like it's burning through air.
         WHY: Black vignette = cinema. Amber vignette = velocity.
              Different colors communicate different information.
         ────────────────────────────────────────────────────────────────── */
:root {
  --vignette-color: 0, 0, 0; /* JS overrides this at speed */
  --vignette-inner: 35%;
  --vignette-opacity: 0.52;
}
#speed-vignette {
  background: radial-gradient(
    ellipse 72% 68% at 50% 50%,
    transparent 0%,
    transparent var(--vignette-inner),
    rgba(var(--vignette-color), 0.3) 68%,
    rgba(var(--vignette-color), var(--vignette-opacity)) 100%
  ) !important;
  transition: background 0.18s ease !important;
}

/* ──────────────────────────────────────────────────────────────────
         ENHANCED CITY BLOOM — radial iris (not flat fill)
         Instead of flooding the entire screen with flat color, a radial
         gradient blooms from center, making it feel like the world is
         actually emitting light rather than a color overlay.
         ────────────────────────────────────────────────────────────────── */
#city-bloom {
  background: radial-gradient(
    ellipse 55% 50% at 50% 55%,
    rgba(255, 220, 120, 0) 0%,
    rgba(255, 220, 120, 0) 100%
  ) !important;
  transition: background 0.08s ease !important;
}

/* ──────────────────────────────────────────────────────────────────
         ALWAYS-ON CINEMATIC VIGNETTE — base layer (independent of speed)
         The #vig element gives constant depth regardless of movement.
         Enhanced to be slightly more pronounced than original.
         ────────────────────────────────────────────────────────────────── */
#vig {
  background: radial-gradient(
    ellipse 90% 80% at 50% 50%,
    transparent 30%,
    rgba(6, 3, 0, 0.28) 62%,
    rgba(4, 2, 0, 0.55) 100%
  ) !important;
}

/* ──────────────────────────────────────────────────────────────────
         MOB-ENTER BUTTON — hide when prox card is visible on mobile.
         The compact prox card no longer has an enter button in its footer,
         so mob-enter must always be visible when a building is in proximity.
         Already handled by show/hide in JS — just ensure z-index is clear.
         ────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #mob-enter {
    bottom: 24px !important; /* sits at bottom-right, not overlapping card */
    right: 24px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
         UI DETAILING LAYER — makes every component feel crafted, not generated
         Pure CSS with two tiny JS hooks (number count-up, line reveal).
         Every rule here adds texture, depth, or motion to existing elements.
         Nothing is redesigned — only detailed.
         ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. PANEL BACKGROUND — subtle circuit grid texture ──────────────────
         Bruno Simon's world has texture everywhere: wood grain, stone, grass.
         The panel should feel like it's made of something too — not just a
         dark glass rectangle. An SVG grid at 3% opacity adds that "manufactured
         surface" quality without any visual noise at normal reading distance.   */
#sp-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255, 200, 80, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 200, 80, 1) 1px, transparent 1px);
  background-size: 32px 32px;
}
/* Ensure content renders above the grid */
#sp-body,
#sp-head {
  position: relative;
  z-index: 1;
}

/* ── 2. PANEL HEADER — terminal coordinate detail ───────────────────────
         Bruno's signage has decorative corner brackets that mark "this is a
         system." The sp-head gets pseudo-element corner brackets + a scan
         line that travels right when the panel opens. The coordinates feel
         like a game's HUD data readout.                                         */
#sp-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}
/* Scan line that sweeps across header on panel open */
#sp-head::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 60%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--nc-rgb, 0, 200, 255), 0.07),
    transparent
  );
  transition: left 0.55s ease 0.1s;
}
#side-panel.open #sp-head::after {
  left: 150%;
}

/* Terminal-style coordinate label under the system file label */
#sp-lbl::after {
  content: attr(data-coord);
  display: block;
  font-size: 6px;
  letter-spacing: 2px;
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.3);
  margin-top: 2px;
}

/* ── 3. P-LINE — draws itself left to right ─────────────────────────────
         Currently the gradient line just appears. A left-to-right scaleX
         reveal makes it feel like the system is marking the section boundary
         in real time — like a progress bar completing.                          */
.p-line {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.2s !important;
}
#sp-body.stagger-in .p-line {
  transform: scaleX(1) !important;
}

/* ── 4. METRIC BLOCKS — glass cards with building-color surface ──────────
         Currently .met is just floating text. Adding a subtle glass card
         behind each metric block gives the numbers a surface to sit on —
         they feel measured and displayed, not just printed.
         The colored top border at 2px is the key detail: it anchors each
         metric to the building's identity.                                      */
.met {
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.05) !important;
  border: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.12) !important;
  border-top: 2px solid rgba(var(--nc-rgb, 0, 200, 255), 0.5) !important;
  border-radius: 2px !important;
  padding: 10px 14px 8px !important;
  min-width: 72px !important;
  position: relative !important;
  overflow: hidden !important;
}
/* Number count-up illusion — blur-to-sharp on stagger-in */
.mv {
  filter: blur(6px);
  opacity: 0;
  transition:
    filter 0.45s ease,
    opacity 0.35s ease !important;
}
#sp-body.stagger-in .mv {
  filter: blur(0) !important;
  opacity: 1 !important;
  transition-delay: 0.38s !important;
}
/* Metric card shimmer sweep */
.met::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(var(--nc-rgb, 0, 200, 255), 0.06) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
#sp-body.stagger-in .met::after {
  transform: translateX(100%) !important;
  transition-delay: 0.55s !important;
}

/* ── 5. STATUS DOT — pulse ring ─────────────────────────────────────────
         The .sdot currently just blinks. Adding an outer ring that expands
         and fades gives it the "vital sign" quality — like a heartrate monitor
         rather than a blinking cursor.                                           */
.p-stat {
  position: relative;
}
.sdot {
  position: relative !important;
  z-index: 1 !important;
}
.sdot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  animation: sdot-ring 1.8s ease-out infinite;
}
@keyframes sdot-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  70% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ── 6. TECH TAGS — glint sweep + building color ─────────────────────────
         Currently .ttag is a flat box with a border. Three details transform it:
         1. Subtle background gradient tinted with building color
         2. A glint sweep on hover
         3. A stagger-in blur-to-sharp for the whole tag group                   */
.ttag {
  position: relative;
  overflow: hidden;
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.06) !important;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.15s !important;
  opacity: 0;
  transform: translateY(4px);
}
#sp-body.stagger-in .ttag {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease !important;
}
/* Stagger each tag 40ms apart */
#sp-body.stagger-in .ttags .ttag:nth-child(1) {
  transition-delay: 0.62s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(2) {
  transition-delay: 0.66s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(3) {
  transition-delay: 0.7s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(4) {
  transition-delay: 0.74s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(5) {
  transition-delay: 0.78s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(6) {
  transition-delay: 0.82s !important;
}
#sp-body.stagger-in .ttags .ttag:nth-child(n + 7) {
  transition-delay: 0.86s !important;
}

.ttag:hover {
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.14) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(var(--nc-rgb, 0, 200, 255), 0.15) !important;
}
/* Glint sweep on hover */
.ttag::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  transition: transform 0.4s ease;
}
.ttag:hover::after {
  transform: translateX(120%);
}

/* ── 7. OUTCOME BOX — glow border reveal ────────────────────────────────
         .out-box currently has a left border that just sits there.
         On stagger-in the border "wakes up": height grows from 0 to 100%
         and the box background fades in. The left border pulse makes it feel
         like a data terminal highlighting the key output.                        */
.out-box {
  position: relative;
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.04) !important;
  border-left: none !important; /* replace static border with animated one */
  padding: 12px 14px 12px 18px !important;
  overflow: hidden;
}
.out-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0%;
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.8);
  box-shadow: 0 0 8px rgba(var(--nc-rgb, 0, 200, 255), 0.5);
  transition: height 0.4s ease 0.5s;
}
#sp-body.stagger-in .out-box::before {
  height: 100% !important;
}
.out-l {
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.55) !important;
}

/* ── 8. CONNECTS BOX — icon arrows with building color ──────────────────
         The → arrow in .conn-i is plain text. Adding a color that matches
         the building makes each connection arrow feel intentional.               */
.conn-i > span:first-child {
  color: rgba(var(--nc-rgb, 0, 200, 255), 1) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  flex-shrink: 0 !important;
  text-shadow: 0 0 8px rgba(var(--nc-rgb, 0, 200, 255), 0.5) !important;
}
.conn-l {
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.45) !important;
}

/* ── 9. STORY SECTION — scan reveal + subtle depth ──────────────────────
         The .story text currently appears as a block of text.
         Adding a section-separator before .sl with an animated line,
         and a reveal clip-path on the story block itself gives the
         impression that the system is streaming content to you.                 */
.sl {
  position: relative;
  padding-left: 10px !important;
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease !important;
}
#sp-body.stagger-in .sl {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition-delay: 0.44s !important;
}
/* Left tick mark — matches Bruno's section markers */
.sl::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.7);
  box-shadow: 0 0 6px rgba(var(--nc-rgb, 0, 200, 255), 0.6);
}
.story {
  line-height: 1.85 !important;
  color: rgba(255, 255, 255, 0.68) !important;
  border-left: 1px solid rgba(var(--nc-rgb, 0, 200, 255), 0.08) !important;
  padding-left: 12px !important;
  margin-left: 2px !important;
}
/* Key term emphasis (existing <em> tags) get the building color */
.story em {
  color: rgba(var(--nc-rgb, 0, 200, 255), 0.95) !important;
  font-style: normal !important;
  font-weight: 600 !important;
}

/* ── 10. P-NAME — large title depth ────────────────────────────────────
         The 28px building name is the most important text in the panel.
         Adding a subtle colored text-shadow makes it feel lit from behind —
         like it's been painted in the building's light.                          */
.p-name {
  text-shadow:
    0 0 20px rgba(var(--nc-rgb, 0, 200, 255), 0.25),
    0 2px 4px rgba(0, 0, 0, 0.8) !important;
  letter-spacing: 2px !important;
}

/* ── 11. P-BADGE — corner-cut + animated reveal ────────────────────────
         The badge (e.g. "SSO · JWT RS256 · PASSKEY") currently just appears.
         A clip-path corner cut on top-right matches the industrial/game aesthetic.
         The badge scans in from left on stagger-in.                              */
.p-badge {
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  ) !important;
  animation: none !important;
  opacity: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  ) !important;
  transform: translateX(-8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease !important;
}
#sp-body.stagger-in .p-badge {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition-delay: 0.18s !important;
}

/* ── 12. SCROLLBAR TRACK — building color accent ───────────────────────
         The panel scrolls but the scrollbar is generic.
         Matching it to the building's glow color makes even scrolling feel
         like part of the system.                                                 */
#sp-body::-webkit-scrollbar {
  width: 3px;
}
#sp-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
#sp-body::-webkit-scrollbar-thumb {
  background: rgba(var(--nc-rgb, 0, 200, 255), 0.4);
  border-radius: 2px;
}
/* Fade mask at bottom of scrollable area — content fades into darkness */
#sp-body {
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 85%,
    transparent 100%
  ) !important;
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 85%,
    transparent 100%
  ) !important;
}

/* ── 13. SPEED RING HUD — depth layers ─────────────────────────────────
         The speed ring is already good but the number text is plain white.
         Adding a subtle color shift matching speed state and a stronger
         background for the ring container makes it feel more embedded.          */
#spd-ring {
  filter: drop-shadow(0 0 14px rgba(255, 200, 80, 0.3)) !important;
}
#spd-num {
  text-shadow: 0 0 12px rgba(255, 200, 80, 0.5) !important;
}
#spd-num span {
  text-shadow: none !important;
}

/* ── 14. WEATHER / GEAR BADGE — glass depth ────────────────────────────
         Small HUD badges get a stronger glass surface and a top-edge highlight
         that makes them feel like raised physical components.                    */
#weather-badge,
#gear-badge {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.4) inset,
    0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* ── 15. HUD TOOLBAR (.hb) — corner-cut clip-path + bottom glow ─────────
         Bruno's UI elements have strong geometric definition.
         Adding a corner cut and a bottom-edge glow line to .hb buttons
         makes them read as physical toggles, not web buttons.                   */
.hb {
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 -2px 0 rgba(255, 200, 80, 0.08) inset !important;
}
.hb:hover {
  box-shadow:
    0 0 18px rgba(255, 200, 80, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 -2px 0 rgba(255, 200, 80, 0.2) inset !important;
}

/* ── 16. MINIMAP — radar sweep ────────────────────────────────────────────
         Adds a rotating radar sweep line inside the minimap.
         Only visible once .hud-visible — CSS only.                               */
#minimap {
  position: relative !important;
}
#minimap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(var(--gold-rgb, 255, 208, 96), 0.12) 355deg,
    rgba(var(--gold-rgb, 255, 208, 96), 0.06) 360deg
  );
  animation: radar-sweep 3s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes radar-sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── 17. PROXIMITY CARD — stronger building identity ───────────────────
         Add a top-edge scan line in the building color on the prox card.
         It sweeps in from left when the card shows — reinforcing the entry
         of a new building into awareness.                                        */
#prox::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--nc-rgb, 0, 200, 255), 0.9) 30%,
    rgba(var(--nc-rgb, 0, 200, 255), 0.5) 70%,
    transparent
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease 0.06s;
}
#prox.show::after {
  transform: scaleX(1);
}

/* ── 18. GUIDE BAR — stronger presence ──────────────────────────────────
         The narrative bar at bottom gets a stronger bottom border matching
         Bruno's styled labeling — a colored underline that pulses.               */
#guide-bar {
  border-bottom: 1px solid rgba(255, 210, 60, 0.2) !important;
  border-top: none !important;
}

/* ── 19. CONTACT CARD — corner bracket detailing ───────────────────────
         The .cc contact modal card has CSS-drawn corner brackets.
         These already exist but are faint — boosting them adds the
         "engineering drawing / blueprint" quality that makes cards feel real.    */
.cc::before {
  width: 24px !important;
  height: 24px !important;
  border-width: 1.5px !important;
  border-top-color: rgba(0, 221, 255, 0.9) !important;
  border-left-color: rgba(0, 221, 255, 0.9) !important;
}
.cc::after {
  width: 24px !important;
  height: 24px !important;
  border-width: 1.5px !important;
  border-bottom-color: rgba(255, 153, 68, 0.9) !important;
  border-right-color: rgba(255, 153, 68, 0.9) !important;
}

/* ── 20. JOURNEY CARD — year number depth ──────────────────────────────
         The large .jb-year number gets a colored text-shadow that matches
         the card's accent color (set inline by JS). Makes it feel like a
         3D embossed number rather than flat text.                                */
.jb-year {
  text-shadow:
    0 0 30px currentColor,
    0 2px 0 rgba(0, 0, 0, 0.6) !important;
  opacity: 0.95 !important;
}
.jb-card {
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(255, 255, 255, 0.03) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
         FINAL POLISH LAYER — every remaining static element upgraded
         ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. MODE CHIP — active pulse ────────────────────────────────────────
         The RECRUITER/ENGINEER chip currently just sits there.
         A slow box-shadow pulse makes it feel like an active system indicator
         — it's broadcasting your mode, not just labelling it.                   */
#mode-chip {
  animation: chip-pulse 3s ease-in-out infinite !important;
  letter-spacing: 4px !important;
  font-size: 7.5px !important;
}
#mode-chip.recruiter {
  animation: chip-pulse-gold 3s ease-in-out infinite !important;
}
@keyframes chip-pulse-gold {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 204, 68, 0.1);
  }
  50% {
    box-shadow:
      0 0 18px rgba(255, 204, 68, 0.35),
      0 0 32px rgba(255, 180, 40, 0.1);
  }
}
#mode-chip.engineer {
  animation: chip-pulse-cyan 3s ease-in-out infinite !important;
}
@keyframes chip-pulse-cyan {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(0, 221, 255, 0.1);
  }
  50% {
    box-shadow:
      0 0 18px rgba(0, 221, 255, 0.35),
      0 0 32px rgba(0, 200, 255, 0.1);
  }
}

/* ── 2. PANEL — p-num system number ─────────────────────────────────────
         // SYSTEM 01 is currently 8.5px at 25% opacity — invisible.
         Raising it to a readable size with the building color makes it read
         as a record identifier, not a footnote.                                  */
.p-num {
  font-size: 9px !important;
  letter-spacing: 5px !important;
  color: rgba(var(--nc-rgb, 255, 200, 80), 0.5) !important;
  margin-bottom: 4px !important;
  font-family: var(--fm) !important;
}

/* ── 3. PANEL — p-name title sizing and depth ───────────────────────────
         28px at 1440px wide is fine. At 1200px it reads small.
         Clamping it larger at minimum makes the name dominate the panel
         as it should — this is the most important text in the entire UI.         */
.p-name {
  font-size: clamp(26px, 3.2vw, 36px) !important;
  letter-spacing: 3px !important;
  line-height: 1 !important;
  margin-bottom: 8px !important;
}

/* ── 4. PANEL — p-sub subtitle treatment ───────────────────────────────
         Currently just pale text. Making it all-caps with tighter spacing and
         a subtle glow gives it the "system descriptor" quality.                  */
.p-sub {
  font-size: 7.5px !important;
  letter-spacing: 4px !important;
  color: rgba(var(--nc-rgb, 255, 200, 80), 0.45) !important;
  margin-bottom: 16px !important;
  text-transform: uppercase !important;
}

/* ── 5. PANEL — metric numbers larger ──────────────────────────────────
         30px numbers are hard to read at the panel width.
         Making them 36px with stronger glow and the metric label more distinct
         transforms a text block into an actual data display.                     */
.mv {
  font-size: 36px !important;
  line-height: 0.95 !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
}
.ml {
  font-size: 7px !important;
  letter-spacing: 3px !important;
  color: rgba(255, 255, 255, 0.32) !important;
  margin-top: 3px !important;
  text-transform: uppercase !important;
}

/* ── 6. PANEL — story text readability ─────────────────────────────────
         Dense 13.5px with 1.7 line height feels like reading documentation.
         Increasing to 14px with 1.9 line height makes it feel like a brief.     */
.story {
  font-size: 14px !important;
  line-height: 1.9 !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ── 7. PANEL — section labels (MISSION LOG etc.) ───────────────────────
         Currently 8px mono all-caps. Making them slightly larger with more
         letter-spacing gives each section a strong header anchor.               */
.sl {
  font-size: 8.5px !important;
  letter-spacing: 5px !important;
  margin-bottom: 12px !important;
  margin-top: 4px !important;
}

/* ── 8. PANEL — outcome and connect boxes ───────────────────────────────
         These have plain text with minimal styling. Adding a subtle background
         tint and increasing text clarity makes them feel like flagged records.   */
.out-t,
.ed-txt {
  font-size: 13.5px !important;
  line-height: 1.75 !important;
  color: rgba(255, 255, 255, 0.75) !important;
}
.conn-i {
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: rgba(255, 255, 255, 0.65) !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

/* ── 9. SPEED RING — number contrast ────────────────────────────────────
         The `0` inside the ring is the same dim white as the track.
         Making it pure white with a stronger shadow makes it readable at
         any speed, especially when the ring is near-empty.                       */
#spd-num {
  font-size: 24px !important;
  color: #fff !important;
  text-shadow:
    0 0 16px rgba(255, 200, 80, 0.6),
    0 1px 0 rgba(0, 0, 0, 0.8) !important;
}
#spd-num span {
  font-size: 7px !important;
  letter-spacing: 4px !important;
  color: rgba(255, 200, 80, 0.6) !important;
}

/* ── 10. GEAR + WEATHER BADGE — more readable ───────────────────────────
         They read as metadata, not labels. Larger letter-spacing and slightly
         stronger color makes them purposeful.                                    */
#gear-badge,
#weather-badge {
  letter-spacing: 3px !important;
  font-size: 7.5px !important;
  color: rgba(255, 200, 80, 0.7) !important;
  border-color: rgba(255, 200, 80, 0.18) !important;
}
#weather-badge {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* ── 11. HB BUTTONS — text label style ─────────────────────────────────
         Now that they're text codes instead of emoji, they need tighter
         spacing and slightly smaller to fit as a row.                            */
.hb {
  font-size: 7.5px !important;
  letter-spacing: 2.5px !important;
  padding: 6px 11px !important;
  text-transform: uppercase !important;
}

/* ── 12. PANEL CLOSE BUTTON — clearer ──────────────────────────────────
         The × is 22px but nearly invisible at 40% opacity.
         Making it a proper close indicator with border.                          */
#sp-x {
  font-size: 16px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: all 0.18s !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
#sp-x:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: rotate(90deg) scale(1.1) !important;
}

/* ── 13. ENG-TOGGLE — accordion feel ────────────────────────────────────
         The "WHAT I REJECTED" accordion header is too plain.
         A colored left border on hover makes it interactive.                     */
.eng-toggle {
  color: rgba(var(--nc-rgb, 255, 200, 80), 0.45) !important;
  font-size: 8px !important;
  letter-spacing: 3px !important;
  padding: 12px 0 !important;
  border-top: 1px solid rgba(var(--nc-rgb, 255, 200, 80), 0.08) !important;
  border-bottom: none !important;
  transition:
    color 0.18s,
    padding-left 0.18s !important;
}
.eng-toggle:hover {
  color: rgba(var(--nc-rgb, 255, 200, 80), 0.9) !important;
  padding-left: 6px !important;
}

/* ── 14. PANEL SCROLLBAR — match panel width ────────────────────────────
         The 3px scrollbar is correct but #sp-inner is overflow:hidden.
         The scrollable area is #sp-body — ensure it scrolls.                    */
#sp-body {
  overflow-y: auto !important;
  max-height: calc(100vh - 60px) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(var(--nc-rgb, 255, 200, 80), 0.35) rgba(0, 0, 0, 0.2) !important;
}

/* ── 15. PROX CARD — p-name larger ─────────────────────────────────────
         At 15px (mobile) or 22px (desktop) the building name in the prox card
         is correct but the font-weight could be heavier for instant readability. */
.px-name {
  font-weight: 900 !important;
  letter-spacing: 2px !important;
}

/* ── 16. WEATHER TOAST — game terminal style ────────────────────────────
         Currently just fades opacity. Adding a slide + clip-path reveal makes
         it feel like a system notification.                                      */
#weather-toast {
  font-size: 8px !important;
  letter-spacing: 5px !important;
  border-left: 2px solid rgba(255, 200, 80, 0.5) !important;
  border-radius: 0 2px 2px 0 !important;
  padding: 10px 18px 10px 14px !important;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%) !important;
}

/* ── 17. START SCREEN — eyebrow letter-spacing tighter ─────────────────
         INTERACTIVE PORTFOLIO · 2024 with 10px letter-spacing can overflow
         on smaller screens. Clamping it keeps it elegant.                        */
.ss-eyebrow {
  font-size: clamp(7px, 1.2vw, 10px) !important;
  letter-spacing: clamp(4px, 1vw, 10px) !important;
}
