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

:root {
  --bg: #05090d;
  --bg-mid: #0a0f14;
  --bg-deep: #121920;
  --surface-0: rgba(8, 12, 15, 0.92);
  --surface-1: rgba(12, 18, 23, 0.78);
  --surface-2: rgba(15, 22, 28, 0.9);
  --surface-3: rgba(22, 31, 38, 0.92);
  --chrome: #e6eff4;
  --steel: #aebfca;
  --accent: #90d7f6;
  --accent-strong: #d4f4ff;
  --accent-soft: rgba(144, 215, 246, 0.08);
  --accent-glow: rgba(144, 215, 246, 0.22);
  --line: rgba(210, 226, 235, 0.1);
  --line-strong: rgba(210, 226, 235, 0.2);
  --line-accent: rgba(144, 215, 246, 0.28);
  --text: #edf4f7;
  --text-soft: rgba(237, 244, 247, 0.76);
  --text-faint: rgba(237, 244, 247, 0.44);
  --shadow-strong: rgba(0, 0, 0, 0.46);
  --shadow-soft: rgba(1, 4, 6, 0.28);
  --success: #b9edff;
  --danger: #df8c88;
  --mono: "IBM Plex Mono", monospace;
  --display: "Space Grotesk", sans-serif;
  --body: "Space Grotesk", sans-serif;
  --corner-size: 30px;
  --panel-shadow:
    0 26px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  --focus: 0 0 0 1px rgba(212, 244, 255, 0.28), 0 0 0 4px rgba(144, 215, 246, 0.16);

  /* Theme-aware glow variables (overridden per theme below) */
  --glow-corner: rgba(144, 215, 246, 0.10);
  --glow-crown:  rgba(212, 244, 255, 0.10);
  --glow-base:   rgba(144, 215, 246, 0.08);
  --glow-sweep:  rgba(144, 215, 246, 0.045);
  --sweep-col:   rgba(212, 244, 255, 0.18);
  --hero-glow:   rgba(144, 215, 246, 0.12);
  --name-mid:    #d7e3ea;
  --name-end:    #91a9b7;
  --panel-top:    rgba(15, 22, 29, 0.86);
  --panel-bottom: rgba(7, 11, 15, 0.9);
  --panel-glint:  rgba(255, 255, 255, 0.05);
  --panel-edge:   rgba(210, 226, 235, 0.14);
  --panel-radius: 22px;
  --panel-shadow-deep: rgba(0, 0, 0, 0.3);
  --panel-shadow-glow: rgba(144, 215, 246, 0.08);
  --profile-glow: rgba(144, 215, 246, 0.18);
  --profile-grid: rgba(144, 215, 246, 0.1);
  --glass-blur: blur(16px);
  --glass-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 50%);
}

html {
  color-scheme: dark;
  background: var(--bg);
  transition: --accent 0.5s ease, filter 0.5s ease;
}

/* ━━━━━━━━  PHANTOM (default)  ━━━━━━━━ */
html[data-theme="phantom"] {
  --mono:          "IBM Plex Mono", monospace;
  --display:       "Orbitron", sans-serif;
  --body:          "Space Grotesk", sans-serif;
  --accent:        #00d4ff;
  --accent-strong: #a0eeff;
  --accent-soft:   rgba(0, 212, 255, 0.09);
  --accent-glow:   rgba(0, 212, 255, 0.30);
  --line-accent:   rgba(0, 212, 255, 0.38);
  --steel:         #68b8cc;
  --success:       #a0eeff;
  --focus: 0 0 0 1px rgba(0, 230, 255, 0.28), 0 0 0 4px rgba(0, 212, 255, 0.18);
  --glow-corner: rgba(0, 212, 255, 0.13);
  --glow-crown:  rgba(0, 240, 255, 0.11);
  --glow-base:   rgba(0, 212, 255, 0.09);
  --glow-sweep:  rgba(0, 212, 255, 0.055);
  --sweep-col:   rgba(0, 240, 255, 0.22);
  --hero-glow:   rgba(0, 212, 255, 0.15);
  --name-mid:    #88daed;
  --name-end:    #00d4ff;
  --panel-top:    rgba(10, 22, 29, 0.86);
  --panel-bottom: rgba(5, 11, 16, 0.92);
  --panel-glint:  rgba(120, 236, 255, 0.08);
  --panel-edge:   rgba(0, 212, 255, 0.22);
  --panel-shadow-glow: rgba(0, 212, 255, 0.12);
  --profile-glow: rgba(0, 212, 255, 0.18);
  --profile-grid: rgba(0, 212, 255, 0.12);
}

/* ━━━━━━━━  SOFT (rose / pink)  ━━━━━━━━ */
html[data-theme="soft"] {
  --mono:          "IBM Plex Mono", monospace;
  --display:       "Sora", sans-serif;
  --body:          "Sora", sans-serif;
  --accent:        #f472b6;
  --accent-strong: #fce7f3;
  --accent-soft:   rgba(244, 114, 182, 0.09);
  --accent-glow:   rgba(244, 114, 182, 0.30);
  --line-accent:   rgba(244, 114, 182, 0.38);
  --steel:         #cc96b8;
  --success:       #fce7f3;
  --focus: 0 0 0 1px rgba(255, 190, 220, 0.28), 0 0 0 4px rgba(244, 114, 182, 0.18);
  --glow-corner: rgba(244, 114, 182, 0.13);
  --glow-crown:  rgba(255, 200, 228, 0.11);
  --glow-base:   rgba(244, 114, 182, 0.09);
  --glow-sweep:  rgba(244, 114, 182, 0.055);
  --sweep-col:   rgba(255, 190, 220, 0.22);
  --hero-glow:   rgba(244, 114, 182, 0.15);
  --name-mid:    #f9c0de;
  --name-end:    #f472b6;
  --panel-top:    rgba(54, 18, 31, 0.8);
  --panel-bottom: rgba(20, 8, 14, 0.9);
  --panel-glint:  rgba(255, 201, 225, 0.08);
  --panel-edge:   rgba(244, 114, 182, 0.24);
  --panel-radius: 24px;
  --panel-shadow-glow: rgba(244, 114, 182, 0.14);
  --profile-glow: rgba(255, 176, 214, 0.22);
  --profile-grid: rgba(244, 114, 182, 0.14);
}

/* ━━━━━━━━  RESIDENT (emerald / toxic green)  ━━━━━━━━ */
html[data-theme="resident"] {
  --mono:          "IBM Plex Mono", monospace;
  --display:       "Oxanium", sans-serif;
  --body:          "Space Grotesk", sans-serif;
  --accent:        #00ff87;
  --accent-strong: #a0ffd4;
  --accent-soft:   rgba(0, 255, 135, 0.09);
  --accent-glow:   rgba(0, 255, 135, 0.30);
  --line-accent:   rgba(0, 255, 135, 0.38);
  --steel:         #60b888;
  --success:       #a0ffd4;
  --focus: 0 0 0 1px rgba(0, 255, 135, 0.28), 0 0 0 4px rgba(0, 255, 135, 0.18);
  --glow-corner: rgba(0, 255, 135, 0.13);
  --glow-crown:  rgba(80, 255, 160, 0.11);
  --glow-base:   rgba(0, 255, 135, 0.09);
  --glow-sweep:  rgba(0, 255, 135, 0.055);
  --sweep-col:   rgba(80, 255, 160, 0.22);
  --hero-glow:   rgba(0, 255, 135, 0.15);
  --name-mid:    #90ffc8;
  --name-end:    #00ff87;
  --panel-top:    rgba(9, 24, 17, 0.84);
  --panel-bottom: rgba(4, 10, 7, 0.92);
  --panel-glint:  rgba(140, 255, 196, 0.08);
  --panel-edge:   rgba(0, 255, 135, 0.24);
  --panel-radius: 18px;
  --panel-shadow-glow: rgba(0, 255, 135, 0.14);
  --profile-glow: rgba(0, 255, 135, 0.22);
  --profile-grid: rgba(0, 255, 135, 0.15);
}

/* ━━━━━━━━  CRIMSON (blood red)  ━━━━━━━━ */
html[data-theme="crimson"] {
  --mono:          "IBM Plex Mono", monospace;
  --display:       "Bricolage Grotesque", sans-serif;
  --body:          "Space Grotesk", sans-serif;
  --accent:        #ff2d55;
  --accent-strong: #ffb0be;
  --accent-soft:   rgba(255, 45, 85, 0.09);
  --accent-glow:   rgba(255, 45, 85, 0.30);
  --line-accent:   rgba(255, 45, 85, 0.38);
  --steel:         #cc7888;
  --success:       #ffb0be;
  --focus: 0 0 0 1px rgba(255, 80, 100, 0.28), 0 0 0 4px rgba(255, 45, 85, 0.18);
  --glow-corner: rgba(255, 45, 85, 0.13);
  --glow-crown:  rgba(255, 80, 100, 0.11);
  --glow-base:   rgba(255, 45, 85, 0.09);
  --glow-sweep:  rgba(255, 45, 85, 0.055);
  --sweep-col:   rgba(255, 80, 100, 0.22);
  --hero-glow:   rgba(255, 45, 85, 0.15);
  --name-mid:    #ffc0c8;
  --name-end:    #ff2d55;
  --panel-top:    rgba(38, 9, 17, 0.84);
  --panel-bottom: rgba(11, 4, 8, 0.92);
  --panel-glint:  rgba(255, 165, 185, 0.07);
  --panel-edge:   rgba(255, 45, 85, 0.24);
  --panel-radius: 18px;
  --panel-shadow-glow: rgba(255, 45, 85, 0.12);
  --profile-glow: rgba(255, 45, 85, 0.18);
  --profile-grid: rgba(255, 45, 85, 0.12);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 14% 16%, var(--glow-corner), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.04), transparent 18%),
    radial-gradient(circle at 52% 70%, rgba(255, 255, 255, 0.02), transparent 34%),
    linear-gradient(180deg, #05090d 0%, #060b10 30%, #070c11 58%, #05080c 100%);
  color: var(--text);
  font-family: var(--body);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  opacity: 0.7;
  background:
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(184, 205, 217, 0.045) 95px 96px),
    repeating-linear-gradient(0deg, transparent 0 95px, rgba(184, 205, 217, 0.034) 95px 96px),
    repeating-linear-gradient(135deg, transparent 0 165px, rgba(144, 215, 246, 0.035) 165px 166px),
    linear-gradient(118deg, transparent 0 39%, rgba(144, 215, 246, 0.05) 49%, transparent 58%);
  -webkit-mask: radial-gradient(circle at center, rgba(0, 0, 0, 0.92), transparent 88%);
  mask: radial-gradient(circle at center, rgba(0, 0, 0, 0.92), transparent 88%);
  transition: background 0.6s ease;
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 12%, var(--glow-crown), transparent 30%),
    radial-gradient(circle at 50% 80%, var(--glow-base), transparent 34%),
    linear-gradient(125deg, transparent 0%, var(--glow-sweep) 44%, transparent 62%);
  animation: bg-shift 14s ease-in-out infinite alternate;
}

body.cursor-mode {
  cursor: none;
}

body.cursor-active #cur-ring {
  width: 58px;
  height: 58px;
  border-color: rgba(212, 244, 255, 0.8);
  background: radial-gradient(circle at center, rgba(144, 215, 246, 0.13), rgba(144, 215, 246, 0.02) 58%, transparent 70%);
  box-shadow: 0 0 28px rgba(144, 215, 246, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.cursor-active #cur-dot {
  box-shadow:
    0 0 18px rgba(144, 215, 246, 0.48),
    0 0 36px rgba(144, 215, 246, 0.2);
}

a,
button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
#pl-progress-bar:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

::selection {
  background: rgba(144, 215, 246, 0.24);
  color: #fff;
}

/* ━━━━━━━━  CUSTOM SCROLLBAR  ━━━━━━━━ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 9, 13, 0.95);
  border-left: 1px solid rgba(210, 226, 235, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-glow);
  border-radius: 999px;
  border: 1px solid var(--line-accent);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-soft);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 100000;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-accent);
  border-radius: 16px;
  background: rgba(8, 12, 15, 0.95);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

#bg-canvas,
#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#bg-canvas {
  z-index: 1;
  pointer-events: none;
}

#matrix-canvas {
  z-index: 8;
  display: block;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
}

#matrix-canvas.show {
  opacity: 0.64;
  visibility: visible;
}

#vignette,
#scanlines,
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#vignette {
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 18%, rgba(5, 9, 13, 0.72) 63%, rgba(5, 9, 13, 0.96) 100%);
}

#scanlines {
  z-index: 2;
  opacity: 0.16;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(224, 238, 245, 0.04) 3px,
    rgba(224, 238, 245, 0.04) 4px
  );
}

#grain {
  z-index: 2;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px;
  animation: grain-anim 2.8s steps(1) infinite;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(144, 215, 246, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(5, 9, 13, 0.98), rgba(5, 9, 13, 1));
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#boot.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#boot-inner {
  width: min(520px, calc(100vw - 2rem));
  padding: 2rem 2.1rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(20, 28, 34, 0.88), rgba(9, 14, 18, 0.92)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 65%);
  box-shadow: var(--panel-shadow);
  position: relative;
  overflow: hidden;
}

#boot-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(102deg, transparent 0%, transparent 44%, rgba(212, 244, 255, 0.12) 50%, transparent 56%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(210, 226, 235, 0.03) 24px 25px);
  opacity: 0.55;
  pointer-events: none;
  transform: translateX(-120%);
  animation: panel-sweep 7.5s linear infinite;
}

#boot-logo {
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-strong);
  text-align: center;
  text-shadow: 0 0 24px rgba(144, 215, 246, 0.16);
  animation: boot-logo-glow 2.8s ease-in-out infinite alternate;
  position: relative;
  z-index: 1;
}

.boot-word {
  display: block;
  line-height: 1;
  font-variant-ligatures: none;
}

.boot-word-main {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4.8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}

.boot-logo-divider {
  width: min(220px, 52%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 244, 255, 0.62), transparent);
  box-shadow: 0 0 12px rgba(144, 215, 246, 0.18);
}

.boot-word-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--steel);
}

#boot-lines {
  min-height: 5.6rem;
  margin-bottom: 1.35rem;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  line-height: 1.9;
}

#boot-lines .bl-ok {
  color: var(--accent-strong);
}

#boot-bar {
  height: 2px;
  margin-bottom: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(210, 226, 235, 0.08);
}

#boot-progress {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(210, 226, 235, 0.65), rgba(144, 215, 246, 0.95));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.14s linear;
}

#boot-pct {
  color: var(--steel);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-align: right;
}

.corner {
  position: fixed;
  z-index: 12;
  width: var(--corner-size);
  height: var(--corner-size);
  pointer-events: none;
  animation: corner-in 0.8s ease 0.55s both;
}

#c-tl {
  top: 14px;
  left: 14px;
  border-top: 1px solid rgba(212, 244, 255, 0.32);
  border-left: 1px solid rgba(212, 244, 255, 0.32);
}

#c-tr {
  top: 14px;
  right: 14px;
  border-top: 1px solid rgba(212, 244, 255, 0.32);
  border-right: 1px solid rgba(212, 244, 255, 0.32);
}

#c-bl {
  bottom: 14px;
  left: 14px;
  border-bottom: 1px solid rgba(212, 244, 255, 0.32);
  border-left: 1px solid rgba(212, 244, 255, 0.32);
}

#c-br {
  right: 14px;
  bottom: 14px;
  border-right: 1px solid rgba(212, 244, 255, 0.32);
  border-bottom: 1px solid rgba(212, 244, 255, 0.32);
}

#cur-ring,
#cur-dot {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
}

#cur-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(144, 215, 246, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(144, 215, 246, 0.08), rgba(144, 215, 246, 0.01) 60%, transparent 68%);
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 18px rgba(144, 215, 246, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: width 0.16s ease, height 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#cur-ring::before,
#cur-ring::after,
#cur-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

#cur-ring::before {
  inset: 5px;
  border: 1px dashed rgba(212, 244, 255, 0.34);
  animation: cursor-spin 7s linear infinite;
}

#cur-ring::after {
  inset: -8px;
  border-radius: 50%;
  border-top: 1px solid rgba(212, 244, 255, 0.42);
  border-bottom: 1px solid rgba(144, 215, 246, 0.2);
  opacity: 0.9;
  animation: cursor-spin 4.8s linear infinite reverse;
}

#cur-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 12px rgba(144, 215, 246, 0.34);
}

#cur-dot::after {
  inset: -9px;
  border: 1px solid rgba(144, 215, 246, 0.24);
  animation: cursor-pulse 1.8s ease-out infinite;
}

#page {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

#status-bar {
  position: sticky;
  top: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 54px;
  margin: 1rem clamp(1rem, 2.2vw, 2.6rem) 0;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 24, 30, 0.92), rgba(9, 14, 18, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 42%);
  box-shadow: var(--panel-shadow);
  backdrop-filter: var(--glass-blur);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  isolation: isolate;
  overflow: hidden;
}

#status-bar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#status-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, transparent 42%, rgba(212, 244, 255, 0.18) 50%, transparent 58%, transparent 100%);
  opacity: 0.34;
  transform: translateX(-120%);
  animation: panel-sweep 10s linear infinite;
  pointer-events: none;
}

.sb-item {
  color: var(--text-faint);
}

.sb-item:first-child {
  color: var(--accent-strong);
}

.sb-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.38rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: led-pulse 3s ease-in-out infinite;
  vertical-align: middle;
}

#sb-clock {
  color: var(--chrome);
}

.sb-sep {
  color: rgba(210, 226, 235, 0.16);
}

.sb-fill {
  flex: 1;
}

.sb-brand {
  color: var(--steel);
  letter-spacing: 0.16em;
}

#theme-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.2rem clamp(1rem, 2.2vw, 2.6rem) 0;
  position: relative;
  z-index: 24;
}

#theme-switcher {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(17, 24, 30, 0.92), rgba(9, 14, 18, 0.88));
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: var(--glass-blur);
}

.theme-btn {
  background: transparent;
  color: var(--text-faint);
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.theme-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.theme-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 0 18px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid var(--line-accent);
}

#hero {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(620px, 1.52fr) minmax(320px, 0.9fr);
  gap: clamp(1.4rem, 2vw, 2.8rem);
  padding: 2.1rem clamp(1rem, 2.4vw, 2.8rem) 0;
  position: relative;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 2rem 29% 2.2rem;
  border-top: 1px solid rgba(210, 226, 235, 0.06);
  border-bottom: 1px solid rgba(210, 226, 235, 0.05);
  background:
    linear-gradient(90deg, transparent 0%, rgba(144, 215, 246, 0.06) 50%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(144, 215, 246, 0.04) 18%, transparent 42%, transparent 58%, rgba(144, 215, 246, 0.04) 82%, transparent 100%);
  opacity: 0.5;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 14% 30% 18%;
  border-radius: 44px;
  background:
    radial-gradient(circle at center, var(--hero-glow), transparent 40%),
    radial-gradient(circle at center, var(--accent-soft), transparent 62%);
  filter: blur(28px);
  opacity: 0.72;
  pointer-events: none;
}

#col-name,
#col-center,
#col-right {
  min-width: 0;
}

#col-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: clamp(1rem, 1.8vw, 2.2rem);
  border-right: 1px solid rgba(210, 226, 235, 0.08);
  animation: slide-left 0.7s ease 0.1s both;
}

#pre-label {
  margin-bottom: 0.8rem;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#name-giant {
  position: relative;
  line-height: 0.92;
}

.ng-row {
  display: block;
  width: fit-content;
  font-family: var(--display);
  font-size: clamp(3rem, 5.3vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, var(--name-mid) 38%, var(--name-end) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 100% 100%;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.12));
  animation: letter-drop 0.6s ease both, name-breathe 8s ease-in-out infinite;
}

.ng-row:nth-child(1) { animation-delay: 0.18s; }
.ng-row:nth-child(2) { animation-delay: 0.26s; }
.ng-row:nth-child(3) { animation-delay: 0.34s; }
.ng-row:nth-child(4) { animation-delay: 0.42s; }
.ng-row:nth-child(5) { animation-delay: 0.5s; }
.ng-row:nth-child(6) { animation-delay: 0.58s; }
.ng-row:nth-child(7) { animation-delay: 0.66s; }
.ng-row:nth-child(8) { animation-delay: 0.74s; }

#name-giant:hover .ng-row {
  background: linear-gradient(180deg, #ffffff 0%, var(--name-mid) 38%, var(--name-end) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  animation: name-glitch 0.4s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes name-glitch {
  0% { transform: translate(0); text-shadow: none; }
  20% { transform: translate(-2px, 2px); text-shadow: 2px 0 var(--accent), -2px 0 var(--danger); }
  40% { transform: translate(-2px, -2px); text-shadow: 2px 0 var(--danger), -2px 0 var(--accent); }
  60% { transform: translate(2px, 2px); text-shadow: -2px 0 var(--accent), 2px 0 var(--danger); }
  80% { transform: translate(2px, -2px); text-shadow: -2px 0 var(--danger), 2px 0 var(--accent); }
  100% { transform: translate(0); }
}

#name-giant::after {
  content: "";
  position: absolute;
  inset: -0.5rem -0.2rem;
  background: linear-gradient(115deg, transparent 0%, transparent 36%, rgba(212, 244, 255, 0.11) 49%, transparent 60%, transparent 100%);
  opacity: 0.5;
  mix-blend-mode: screen;
  transform: translateX(-120%);
  animation: panel-sweep 7s linear infinite;
  pointer-events: none;
}

#user-handle {
  width: fit-content;
  margin-top: 1.25rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(15, 21, 26, 0.8), rgba(7, 11, 14, 0.78)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 55%);
  color: var(--accent-strong);
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

#user-handle:hover,
#user-handle:focus-visible {
  transform: translateX(6px);
  border-color: var(--line-accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 0 16px rgba(144, 215, 246, 0.08);
  color: #fff;
}

.panel-kicker {
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#identity-panel,
#signal-strip,
#intel-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 23, 29, 0.86), rgba(8, 12, 15, 0.84)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 54%);
  box-shadow: var(--panel-shadow);
  isolation: isolate;
}

#identity-panel::after,
#signal-strip::after,
#intel-panel::after,
#stat-bars::after,
#skills::after,
#player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(102deg, transparent 0%, transparent 44%, var(--sweep-col) 50%, transparent 56%, transparent 100%);
  opacity: 0.34;
  transform: translateX(-120%);
  animation: panel-sweep 9s linear infinite;
  pointer-events: none;
}

#identity-panel {
  width: min(100%, 360px);
  margin-top: 1.35rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 24px;
  backdrop-filter: var(--glass-blur);
}

.identity-grid {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.9rem;
}

.identity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.58rem;
  border-bottom: 1px solid rgba(210, 226, 235, 0.08);
}

.identity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.identity-key,
.intel-key,
.sig-key {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-val,
.intel-val,
.sig-val {
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

#col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 clamp(0.5rem, 1.3vw, 1.4rem);
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  animation: fade-up 0.65s ease 0.2s both;
}

#av-zone {
  position: relative;
  width: min(100%, clamp(290px, 24vw, 360px));
  aspect-ratio: 20 / 23;
  flex-shrink: 0;
  transform: translateZ(40px);
  overflow: visible;
}

#av-zone::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(212, 244, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  filter: blur(18px);
  opacity: 0.68;
  pointer-events: none;
}

#av-zone::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(212, 244, 255, 0.09);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 48%),
    linear-gradient(180deg, rgba(144, 215, 246, 0.05), transparent 60%);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

#av-pulse,
#av-pulse2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  border-radius: 24px;
  clip-path: polygon(50% 0%, 96% 21%, 96% 79%, 50% 100%, 4% 79%, 4% 21%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

#av-pulse {
  border: 1px solid rgba(212, 244, 255, 0.14);
  animation: av-ring-pulse 4.4s ease-in-out infinite;
}

#av-pulse2 {
  border: 1px solid rgba(144, 215, 246, 0.12);
  animation: av-ring-pulse 4.4s ease-in-out 2.1s infinite;
}

#av-orbit {
  position: absolute;
  inset: -24px;
  border: 1px solid rgba(212, 244, 255, 0.14);
  border-radius: 32px;
  pointer-events: none;
}

#av-orbit::before,
#av-orbit::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  border: 1px dashed rgba(144, 215, 246, 0.18);
}

#av-orbit::before {
  animation: orbit-spin 14s linear infinite;
}

#av-orbit::after {
  inset: 22px;
  border-style: solid;
  border-color: rgba(212, 244, 255, 0.1);
  animation: orbit-spin 10s linear infinite reverse;
}

#av-hex {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.2));
  transform-origin: center;
}

#av-hex polygon {
  transition: stroke 0.6s ease;
}

#av-hex line {
  stroke-linecap: round;
  animation: svg-glint 4s ease-in-out infinite;
}

#av-hex line:nth-child(even) {
  animation-delay: 2s;
}

@keyframes svg-glint {
  0%, 100% { opacity: 0.3; stroke-width: 1px; }
  50% { opacity: 1; stroke-width: 2.5px; filter: drop-shadow(0 0 5px var(--accent-glow)); }
}

#av-hex image {
  opacity: 0.98;
}

#av-scan {
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 244, 255, 0.9), transparent);
  z-index: 5;
  opacity: 0.42;
  pointer-events: none;
  animation: av-scan 4.6s linear infinite;
}

#av-glitch {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent 28%, rgba(144, 215, 246, 0.06) 50%, transparent 72%);
  clip-path: polygon(50% 0%, 96% 21%, 96% 79%, 50% 100%, 4% 79%, 4% 21%);
  animation: av-glitch-move 7.5s ease-in-out infinite;
}

#av-zone.scan-burst::before {
  opacity: 1;
  filter: blur(26px);
}

#av-zone.scan-burst #av-hex {
  filter: drop-shadow(0 0 24px rgba(144, 215, 246, 0.32)) brightness(1.06);
}

#av-zone.scan-burst #av-scan {
  opacity: 0.95;
  animation-duration: 0.8s;
}

.av-badge {
  position: absolute;
  left: 50%;
  z-index: 7;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(210, 226, 235, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(14, 20, 25, 0.96), rgba(8, 12, 15, 0.92)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
}

.av-badge-top {
  top: -0.7rem;
}

.av-badge-bottom {
  bottom: -0.7rem;
}

#role-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 20px;
  width: min(100%, 30rem);
  max-width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(18, 25, 31, 0.85), rgba(10, 15, 19, 0.84)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 70%);
  color: var(--accent-strong);
  font-family: var(--body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateZ(26px);
  box-shadow: var(--panel-shadow);
}

#role-typed {
  display: inline-block;
  min-width: 14ch;
  text-align: left;
  white-space: nowrap;
}

#role-block.role-block-refresh {
  animation: role-block-refresh 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes role-block-refresh {
  0% {
    opacity: 0.52;
    transform: translateZ(26px) translateY(4px) scale(0.985);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateZ(26px) translateY(0) scale(1);
    filter: blur(0);
  }
}

#role-pre {
  margin-right: 0.2rem;
  color: var(--steel);
}

#role-cur {
  color: var(--accent-strong);
  animation: blink 0.8s step-end infinite;
}

#signal-strip {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 140px;
  gap: 0.68rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  border-radius: 24px;
  transform: translateZ(30px);
  backdrop-filter: var(--glass-blur);
}

.sig-item {
  min-width: 0;
  padding: 0.2rem 0.1rem;
}

.sig-val {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.7rem;
  text-align: left;
}

#signal-wave {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  min-height: 32px;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(210, 226, 235, 0.08);
}

#signal-wave span {
  display: block;
  min-height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent-soft));
  animation: signal-wave 1.8s ease-in-out infinite;
}

#signal-wave span:nth-child(3n) { animation-duration: 1.2s; }
#signal-wave span:nth-child(4n) { animation-duration: 1.5s; }
#signal-wave span:nth-child(5n) { animation-delay: 0.18s; }

#stat-bars {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(16, 23, 29, 0.84), rgba(9, 14, 18, 0.82)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 65%);
  box-shadow: var(--panel-shadow);
  transform: translateZ(24px);
  overflow: hidden;
  isolation: isolate;
}

#stat-bars::before {
  content: attr(data-metrics-label);
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.sbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sbar-label {
  width: 78px;
  flex-shrink: 0;
  color: var(--text-soft);
  font-family: var(--display);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.sbar-track {
  position: relative;
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.sbar-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 55%);
}

.sbar-fill {
  position: relative;
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  opacity: 0.42;
  transform: translateX(-120%);
  animation: panel-sweep 3.4s linear infinite;
}

.sbar-fill.overflow {
  width: 100% !important;
  background: linear-gradient(90deg, #ffffff, #d3f2ff, #90d7f6) !important;
  box-shadow: 0 0 24px rgba(144, 215, 246, 0.22) !important;
  transition: width 0.12s ease !important;
}

.sbar-val {
  width: 28px;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-align: right;
}

#skills {
  width: min(720px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 21, 26, 0.78), rgba(8, 12, 15, 0.8)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 62%);
  box-shadow: var(--panel-shadow);
  transform: translateZ(44px);
  overflow: hidden;
  isolation: isolate;
}

#skills::before {
  content: attr(data-stack-label);
  width: 100%;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
}

.sk {
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.sk:hover,
.sk:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  background: rgba(144, 215, 246, 0.07);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12), 0 0 12px rgba(144, 215, 246, 0.08);
}

.sk-m {
  color: var(--accent-strong);
  border-color: var(--line-accent);
}

#col-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.55rem;
  padding-left: clamp(1rem, 1.8vw, 2.1rem);
  border-left: 1px solid rgba(210, 226, 235, 0.08);
  animation: slide-right 0.7s ease 0.1s both;
}

#right-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 244, 255, 0.35), transparent);
  position: relative;
  overflow: hidden;
}

#right-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 244, 255, 0.8) 52%, transparent 100%);
  transform: translateX(-120%);
  animation: panel-sweep 6s linear infinite;
}

#intel-panel {
  padding: 1rem 1.05rem 1.08rem;
  border-radius: 24px;
  backdrop-filter: var(--glass-blur);
}

.intel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.72rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(210, 226, 235, 0.08);
}

.intel-val {
  max-width: 60%;
}

#socials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#socials::before {
  content: attr(data-social-label);
  display: block;
  margin-bottom: 0.45rem;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.soc-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.08rem 1.15rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(19, 27, 34, 0.92), rgba(9, 14, 18, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 54%);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--panel-shadow);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
  animation: fade-up 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.soc-link:nth-child(1) { animation-delay: 0.6s; }
.soc-link:nth-child(2) { animation-delay: 0.7s; }
.soc-link:nth-child(3) { animation-delay: 0.8s; }
.soc-link:nth-child(4) { animation-delay: 0.9s; }

.soc-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(144, 215, 246, 0.06), transparent 60%);
  opacity: 0.5;
  transform: translateX(-115%);
  transition: opacity 0.3s ease;
  animation: panel-sweep 8.5s linear infinite;
}

.soc-link::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-top: 1px solid rgba(212, 244, 255, 0.28);
  border-right: 1px solid rgba(212, 244, 255, 0.28);
  opacity: 0.6;
}

.soc-link:hover,
.soc-link:focus-visible {
  transform: translateX(8px);
  border-color: var(--line-accent);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px rgba(144, 215, 246, 0.08);
}

.soc-link:hover::before,
.soc-link:focus-visible::before {
  opacity: 0.9;
}

.sl-num,
.sl-icon,
.sl-label,
.sl-arrow {
  position: relative;
  z-index: 1;
}

.sl-num {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.sl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 244, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.02);
  color: var(--accent-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.sl-icon svg {
  width: 18px;
  height: 18px;
}

.soc-link:hover .sl-icon,
.soc-link:focus-visible .sl-icon {
  transform: translateY(-1px);
  border-color: var(--line-accent);
  background: rgba(144, 215, 246, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 18px rgba(144, 215, 246, 0.12);
  color: #fff;
}

.sl-label {
  flex: 1;
  color: var(--text-soft);
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.soc-link:hover .sl-label,
.soc-link:focus-visible .sl-label {
  color: #fff;
  letter-spacing: 0.12em;
}

.sl-arrow {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.soc-link:hover .sl-arrow,
.soc-link:focus-visible .sl-arrow {
  opacity: 1;
  transform: none;
  color: var(--accent-strong);
}

#player {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem 1rem;
  min-height: 88px;
  margin: 1rem clamp(1rem, 2.2vw, 2.6rem) 0;
  padding: 1.55rem 1.35rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(17, 24, 30, 0.94), rgba(8, 12, 16, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 56%);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px);
  animation: player-up 0.6s ease 0.7s both;
  overflow: hidden;
  isolation: isolate;
}

#player::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(144, 215, 246, 0.22), transparent);
  pointer-events: none;
}

#pl-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: min(280px, 100%);
  flex: 1 1 240px;
}

#pl-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  flex-shrink: 0;
}

.peq {
  width: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(212, 244, 255, 0.9), rgba(144, 215, 246, 0.18));
}

#pl-eq.on .peq {
  animation: peq-wave 0.52s ease-in-out infinite alternate;
}

#pl-eq.on .peq:nth-child(1) { animation-duration: 0.32s; animation-delay: 0s; }
#pl-eq.on .peq:nth-child(2) { animation-duration: 0.48s; animation-delay: 0.05s; }
#pl-eq.on .peq:nth-child(3) { animation-duration: 0.36s; animation-delay: 0.08s; }
#pl-eq.on .peq:nth-child(4) { animation-duration: 0.6s; animation-delay: 0.03s; }
#pl-eq.on .peq:nth-child(5) { animation-duration: 0.42s; animation-delay: 0.1s; }
#pl-eq.on .peq:nth-child(6) { animation-duration: 0.34s; animation-delay: 0.06s; }
#pl-eq.on .peq:nth-child(7) { animation-duration: 0.53s; animation-delay: 0.09s; }
#pl-eq.on .peq:nth-child(8) { animation-duration: 0.3s; animation-delay: 0.05s; }
#pl-eq.on .peq:nth-child(9) { animation-duration: 0.44s; animation-delay: 0.07s; }
#pl-eq.on .peq:nth-child(10) { animation-duration: 0.35s; animation-delay: 0.03s; }
#pl-eq.on .peq:nth-child(11) { animation-duration: 0.5s; animation-delay: 0.1s; }
#pl-eq.on .peq:nth-child(12) { animation-duration: 0.32s; animation-delay: 0.01s; }

#pl-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

#pl-track {
  color: var(--chrome);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

#pl-sub {
  color: var(--text-faint);
  font-family: var(--body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

#pl-state {
  color: var(--accent-strong);
}

#pl-progress-wrap {
  flex: 1 1 220px;
  min-width: min(100%, 200px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
}

#pl-progress-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

#pl-progress-bar::before {
  content: "";
  position: absolute;
  inset: -5px 0;
}

#pl-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(144, 215, 246, 0.96));
  box-shadow: 0 0 12px rgba(144, 215, 246, 0.18);
  transition: width 0.2s linear;
}

#pl-progress-head {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(144, 215, 246, 0.18);
  box-shadow: 0 0 14px rgba(144, 215, 246, 0.14);
  transform: translate(-50%, -50%);
  transition: left 0.2s linear;
}

#pl-times {
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

#pl-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: 0;
}

.plb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 46px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.02);
  color: var(--steel);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.plb:hover,
.plb:focus-visible {
  color: var(--text);
  border-color: var(--line-accent);
  background: rgba(144, 215, 246, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 16px rgba(144, 215, 246, 0.1);
  transform: translateY(-2px);
}

.plb:active {
  transform: translateY(0) scale(0.96);
}

.plb-main {
  min-width: 62px;
  color: var(--accent-strong);
}

.plb-main.on {
  border-color: var(--line-accent);
  background: rgba(144, 215, 246, 0.1);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 18px rgba(144, 215, 246, 0.14);
}

#pl-vol {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
}

#vol-slider {
  width: 96px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#vol-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(144, 215, 246, 0.14);
  box-shadow: 0 0 10px rgba(144, 215, 246, 0.12);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#vol-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(144, 215, 246, 0.14);
  box-shadow: 0 0 10px rgba(144, 215, 246, 0.12);
  cursor: pointer;
}

#ticker {
  margin: 0 clamp(1rem, 2.2vw, 2.6rem) 1rem;
  padding-inline: 1rem;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12, 18, 22, 0.92), rgba(7, 11, 14, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 54%);
  box-shadow: var(--panel-shadow);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 244, 255, 0.15) 50%, transparent 100%);
  opacity: 0.4;
  transform: translateX(-120%);
  animation: panel-sweep 12s linear infinite;
  pointer-events: none;
}

#ticker-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: ticker-scroll 42s linear infinite;
}

.td {
  color: rgba(210, 226, 235, 0.18);
}

#ops-deck {
  position: relative;
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 clamp(1rem, 2.2vw, 2.6rem) 2rem;
  padding: 1.25rem 0 0.35rem;
  --ops-accent: #90d7f6;
  --ops-accent-soft: rgba(144, 215, 246, 0.12);
  --ops-accent-strong: rgba(212, 244, 255, 0.94);
}

#ops-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

#ops-head-copy {
  max-width: 760px;
}

#ops-title {
  margin-top: 0.35rem;
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#ops-copy {
  margin-top: 0.72rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  max-width: 64ch;
}

#ops-head-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
}

.ops-stat,
.ms-meta-row {
  min-width: 118px;
  padding: 0.82rem 0.95rem;
  border: 1px solid rgba(210, 226, 235, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 22, 28, 0.9), rgba(8, 12, 15, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.ops-stat-key,
.ms-key {
  display: block;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ops-stat-val,
.ms-val {
  display: block;
  margin-top: 0.3rem;
  color: var(--ops-accent-strong);
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#ops-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.44fr) minmax(290px, 0.82fr);
  gap: 1rem;
  align-items: stretch;
}

.ops-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(210, 226, 235, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(17, 24, 30, 0.92), rgba(8, 12, 15, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 58%);
  box-shadow: var(--panel-shadow);
  isolation: isolate;
}

.ops-panel.panel-focus {
  border-color: rgba(144, 215, 246, 0.26);
  box-shadow: var(--panel-shadow), 0 0 32px rgba(144, 215, 246, 0.12);
}

.ops-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(104deg, transparent 0%, transparent 44%, rgba(212, 244, 255, 0.12) 50%, transparent 56%, transparent 100%),
    radial-gradient(circle at top right, var(--ops-accent-soft), transparent 28%);
  opacity: 0.48;
  transform: translateX(-120%);
  animation: panel-sweep 10s linear infinite;
  pointer-events: none;
}

#mission-selector-panel,
#ops-timeline-panel {
  padding: 1rem 1rem 1.05rem;
}

#mission-detail-panel {
  padding: 1.1rem 1.15rem 1.15rem;
  border-color: rgba(144, 215, 246, 0.18);
  box-shadow:
    var(--panel-shadow),
    0 0 0 1px rgba(144, 215, 246, 0.05),
    0 0 28px rgba(144, 215, 246, 0.08);
}

#mission-detail-panel.vault-ping {
  box-shadow:
    var(--panel-shadow),
    0 0 0 1px rgba(212, 244, 255, 0.12),
    0 0 40px rgba(144, 215, 246, 0.18);
}

#mission-radar {
  position: relative;
  min-height: 310px;
  margin-top: 0.85rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 26px;
  background:
    radial-gradient(circle at center, rgba(144, 215, 246, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

#mission-radar::before,
#mission-radar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#mission-radar::before {
  width: 76%;
  height: 76%;
  border: 1px dashed rgba(144, 215, 246, 0.18);
}

#mission-radar::after {
  width: 42%;
  height: 42%;
  border: 1px solid rgba(212, 244, 255, 0.14);
  box-shadow: 0 0 22px rgba(144, 215, 246, 0.08);
}

.mission-node {
  position: absolute;
  width: min(160px, 42%);
  padding: 0.82rem 0.86rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(18, 26, 32, 0.94), rgba(8, 12, 15, 0.92)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 56%);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.mission-node:hover,
.mission-node:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(144, 215, 246, 0.24);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22), 0 0 18px rgba(144, 215, 246, 0.1);
}

.mission-node.active {
  border-color: rgba(144, 215, 246, 0.3);
  background:
    linear-gradient(180deg, rgba(20, 30, 38, 0.96), rgba(8, 12, 15, 0.94)),
    linear-gradient(90deg, rgba(144, 215, 246, 0.08), transparent 62%);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.24), 0 0 24px rgba(144, 215, 246, 0.14);
}

.mission-node-pos-0 {
  top: 14%;
  left: 8%;
}

.mission-node-pos-1 {
  top: 16%;
  right: 8%;
}

.mission-node-pos-2 {
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
}

.mission-node-pos-2:hover,
.mission-node-pos-2:focus-visible,
.mission-node-pos-2.active {
  transform: translateX(-50%) translateY(-2px) scale(1.02);
}

.mission-node-call,
.service-code,
.vault-label {
  display: block;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mission-node-code,
.service-title {
  display: block;
  margin-top: 0.28rem;
  color: var(--ops-accent-strong);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-node-type,
.service-audience,
.ops-live-copy,
.vault-copy {
  display: block;
  margin-top: 0.32rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.45;
}

.mission-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(212, 244, 255, 0.16);
  background:
    radial-gradient(circle at center, rgba(144, 215, 246, 0.16), rgba(144, 215, 246, 0.02) 58%, transparent 72%);
  box-shadow: 0 0 32px rgba(144, 215, 246, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mission-core::before,
.mission-core::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(144, 215, 246, 0.18);
}

.mission-core::after {
  inset: 28px;
  border-style: solid;
  border-color: rgba(212, 244, 255, 0.14);
}

.mission-core-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

#mission-selector-meta {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.mission-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.42rem 0.74rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ops-accent-strong);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(144, 215, 246, 0.1);
  color: #fff;
  font-family: var(--display);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mission-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ops-accent);
  box-shadow: 0 0 12px rgba(144, 215, 246, 0.3);
}

.mission-detail-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mission-heading {
  margin-top: 0.9rem;
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.1vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-copy {
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.62;
}

.mission-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.mission-scope-item {
  padding: 0.78rem 0.84rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.mission-scope-key {
  display: block;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-scope-val {
  display: block;
  margin-top: 0.38rem;
  color: var(--ops-accent-strong);
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mission-chip {
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(210, 226, 235, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mission-section-title {
  margin-top: 1rem;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-points {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.72rem;
}

.mission-point {
  position: relative;
  padding-left: 1rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
}

.mission-point::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ops-accent);
  box-shadow: 0 0 10px rgba(144, 215, 246, 0.22);
}

.mission-actions,
.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.mission-action,
.service-action,
#vault-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.02);
  color: var(--ops-accent-strong);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

.mission-action:hover,
.mission-action:focus-visible,
.service-action:hover,
.service-action:focus-visible,
#vault-close:hover,
#vault-close:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(144, 215, 246, 0.3);
  background: rgba(144, 215, 246, 0.08);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18), 0 0 18px rgba(144, 215, 246, 0.1);
  color: #fff;
}

.mission-action-ghost {
  color: var(--text-soft);
}

#ops-log-live {
  padding: 0.95rem 0.95rem 1rem;
  margin-top: 0.82rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 26, 33, 0.92), rgba(8, 12, 15, 0.9)),
    linear-gradient(90deg, rgba(144, 215, 246, 0.06), transparent 60%);
}

.ops-live-label {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ops-live-title {
  margin-top: 0.4rem;
  color: var(--ops-accent-strong);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#ops-log-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.82rem;
}

.ops-log-item {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.24s ease, transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.ops-log-item.active {
  transform: translateX(4px);
  border-color: rgba(144, 215, 246, 0.22);
  background: rgba(144, 215, 246, 0.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12), 0 0 14px rgba(144, 215, 246, 0.08);
}

.ops-log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.ops-log-title {
  color: var(--chrome);
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ops-log-tag {
  color: var(--ops-accent-strong);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-log-copy {
  margin-top: 0.36rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.45;
}

#contract-board {
  padding: 1rem 1rem 1.05rem;
}

#service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.82rem;
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 26, 32, 0.92), rgba(8, 12, 15, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 58%);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, transparent 46%, rgba(212, 244, 255, 0.1) 50%, transparent 56%, transparent 100%);
  opacity: 0.42;
  transform: translateX(-120%);
  animation: panel-sweep 9s linear infinite;
  pointer-events: none;
}

.service-title {
  font-size: 0.76rem;
}

.service-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.service-item {
  position: relative;
  padding-left: 0.95rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.48;
}

.service-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ops-accent);
}

#intel-vault {
  padding: 1rem 1rem 1.05rem;
  border-color: rgba(144, 215, 246, 0.22);
}

#intel-vault[hidden] {
  display: none;
}

#vault-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

#vault-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.82rem;
}

.vault-card {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 26, 33, 0.92), rgba(8, 12, 15, 0.9)),
    linear-gradient(135deg, rgba(144, 215, 246, 0.04), transparent 58%);
}

.vault-copy {
  margin-top: 0.5rem;
}

.vault-snippet {
  display: block;
  margin-top: 0.65rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(210, 226, 235, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

#cli {
  position: fixed;
  right: 1.25rem;
  bottom: 6.15rem;
  z-index: 9000;
  width: min(560px, calc(100vw - 2rem));
  height: min(350px, 58vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 22, 28, 0.96), rgba(7, 11, 14, 0.96)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 56%);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: var(--glass-blur);
  opacity: 0;
  transform: translateY(320px);
  transition: transform 0.35s ease, opacity 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
}

#cli.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#cli-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(210, 226, 235, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--chrome);
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#cli-close {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.85rem;
}

#cli-output {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(144, 215, 246, 0.22) transparent;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.78;
}

.cli-line {
  color: var(--text-soft);
  white-space: pre-wrap;
}

.cli-ok { color: var(--accent-strong); }
.cli-err { color: var(--danger); }
.cli-info { color: var(--accent); }
.cli-dim { color: rgba(174, 191, 202, 0.62); }
.cli-hl { color: var(--chrome); }

#cli-input-line {
  display: flex;
  align-items: center;
  padding: 0.78rem 1rem;
  border-top: 1px solid rgba(210, 226, 235, 0.08);
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--mono);
  font-size: 0.68rem;
}

#cli-prompt {
  white-space: nowrap;
  color: var(--accent);
}

#cli-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--accent-strong);
}

#cli-input::placeholder {
  color: rgba(174, 191, 202, 0.32);
}

#konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(144, 215, 246, 0.1), transparent 28%),
    rgba(5, 9, 13, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#konami-overlay.show {
  opacity: 1;
  visibility: visible;
}

#konami-inner {
  padding: 2rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(19, 27, 34, 0.92), rgba(8, 12, 15, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 56%);
  box-shadow: var(--panel-shadow);
  text-align: center;
}

#konami-title {
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: kg 3s ease-in-out infinite;
}

#konami-sub {
  margin-top: 0.95rem;
  color: var(--steel);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#konami-msg {
  margin-top: 1rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

#toast {
  position: fixed;
  top: 3.8rem;
  right: 1.25rem;
  z-index: 99999;
  max-width: min(90vw, 420px);
  padding: 0.82rem 1rem;
  border: 1px solid var(--line-accent);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(14, 20, 25, 0.96), rgba(7, 11, 14, 0.95)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 60%);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.3), 0 0 18px rgba(144, 215, 246, 0.08);
  color: var(--accent-strong);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transform: translateX(120%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#toast.show {
  opacity: 1;
  transform: none;
}

#ctx-menu {
  position: fixed;
  z-index: 99997;
  min-width: 220px;
  padding: 0.42rem 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 22, 28, 0.97), rgba(8, 12, 15, 0.96)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 56%);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

#ctx-menu.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ctx-item {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.ctx-item:hover,
.ctx-item:focus-visible {
  background: rgba(144, 215, 246, 0.08);
  color: #fff;
  padding-left: 1.12rem;
}

.ctx-sep {
  height: 1px;
  margin: 0.2rem 0;
  background: rgba(210, 226, 235, 0.08);
}

.ctx-dim {
  color: rgba(223, 140, 136, 0.74);
}

.ctx-dim:hover,
.ctx-dim:focus-visible {
  color: #ffd3cf;
  background: rgba(223, 140, 136, 0.08);
}

#idle-warn {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9997;
  pointer-events: none;
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(144, 215, 246, 0.14);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#idle-warn.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: idle-pulse 2.4s ease-in-out infinite;
}

.spark {
  position: fixed;
  z-index: 9995;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--accent-strong);
  box-shadow: 0 0 12px rgba(144, 215, 246, 0.28);
  animation: spark-die 0.5s ease forwards;
}

@keyframes grain-anim {
  0% { background-position: 0 0; }
  25% { background-position: -16px 8px; }
  50% { background-position: 10px -12px; }
  75% { background-position: -8px 12px; }
  100% { background-position: 0 0; }
}

@keyframes bg-shift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -1.6%, 0) scale(1.03); }
}

@keyframes cursor-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes cursor-pulse {
  0% { opacity: 0.55; transform: scale(0.72); }
  70% { opacity: 0; transform: scale(1.38); }
  100% { opacity: 0; transform: scale(1.42); }
}

@keyframes boot-logo-glow {
  from { text-shadow: 0 0 16px rgba(144, 215, 246, 0.12); }
  to { text-shadow: 0 0 30px rgba(144, 215, 246, 0.24); }
}

@keyframes corner-in {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: none; }
}

@keyframes sbar-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: none; }
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.34; }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes letter-drop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes name-breathe {
  0%, 100% { filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.12)); }
  50% { filter: drop-shadow(0 12px 26px rgba(144, 215, 246, 0.16)); }
}

@keyframes av-ring-pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.38; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.14; }
  100% { transform: translate(-50%, -50%) scale(1.12); opacity: 0; }
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes av-scan {
  from { top: 14px; }
  to { top: calc(100% - 14px); }
}

@keyframes av-glitch-move {
  0%, 100% { transform: translateX(-110%); opacity: 0; }
  30% { opacity: 0.2; }
  50% { transform: translateX(200%); opacity: 0.55; }
  70% { opacity: 0.14; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes player-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-sweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@keyframes peq-wave {
  from { height: 3px; }
  to { height: 18px; }
}

@keyframes signal-wave {
  0%, 100% { height: 5px; opacity: 0.42; }
  50% { height: 26px; opacity: 1; }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes kg {
  0%, 100% { text-shadow: 0 0 18px rgba(144, 215, 246, 0.2); }
  50% { text-shadow: 0 0 30px rgba(212, 244, 255, 0.22); }
}

@keyframes idle-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes spark-die {
  to {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0);
  }
}

:root {
  --surface-0: rgba(7, 12, 18, 0.88);
  --surface-1: rgba(11, 17, 24, 0.8);
  --surface-2: rgba(13, 21, 30, 0.9);
  --surface-3: rgba(18, 28, 38, 0.94);
}

body {
  background:
    radial-gradient(circle at 14% 12%, rgba(144, 215, 246, 0.12), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 50% 56%, rgba(33, 75, 119, 0.16), transparent 38%),
    linear-gradient(135deg, #02060a 0%, #071019 34%, #050b12 65%, #02060a 100%);
}

body::before {
  opacity: 0.82;
  background:
    repeating-linear-gradient(90deg, transparent 0 104px, rgba(184, 205, 217, 0.045) 104px 105px),
    repeating-linear-gradient(0deg, transparent 0 104px, rgba(184, 205, 217, 0.032) 104px 105px),
    repeating-linear-gradient(135deg, transparent 0 175px, rgba(144, 215, 246, 0.045) 175px 176px),
    linear-gradient(118deg, transparent 0 37%, rgba(144, 215, 246, 0.06) 49%, transparent 60%);
}

body::after {
  background:
    radial-gradient(circle at 50% 10%, var(--glow-crown), transparent 32%),
    radial-gradient(circle at 52% 64%, rgba(144, 215, 246, 0.08), transparent 24%),
    radial-gradient(circle at 50% 82%, var(--glow-base), transparent 34%),
    linear-gradient(125deg, transparent 0%, var(--glow-sweep) 44%, transparent 62%);
}

#page {
  max-width: 1980px;
  padding-bottom: 1.8rem;
}

#status-bar,
#theme-switcher,
#identity-panel,
#signal-strip,
#intel-panel,
#stat-bars,
#skills,
#player,
.soc-link,
.ops-panel,
.ops-stat,
.ms-meta-row {
  border-color: rgba(210, 226, 235, 0.14);
}

#status-bar {
  margin-top: 1.2rem;
  background:
    linear-gradient(180deg, rgba(15, 22, 29, 0.94), rgba(7, 11, 15, 0.92)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 44%);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
}

#theme-dock {
  margin-top: 1.45rem;
}

#theme-switcher {
  padding: 0.42rem;
  background:
    linear-gradient(180deg, rgba(15, 22, 28, 0.92), rgba(9, 14, 18, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
  backdrop-filter: blur(24px);
}

.theme-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.61rem;
}

#theme-manifest {
  position: relative;
  z-index: 22;
  display: grid;
  gap: 0.95rem;
  width: calc(100% - clamp(2rem, 4.4vw, 5.2rem));
  margin: 1rem auto 0;
  padding: 1.1rem 1.25rem 1.15rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 22, 29, 0.9), rgba(7, 11, 15, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  overflow: hidden;
  isolation: isolate;
}

#theme-manifest::before,
#theme-manifest::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#theme-manifest::before {
  background: linear-gradient(104deg, transparent 0%, transparent 42%, rgba(212, 244, 255, 0.15) 50%, transparent 58%, transparent 100%);
  opacity: 0.46;
  transform: translateX(-120%);
  animation: panel-sweep 9s linear infinite;
}

#theme-manifest::after {
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-accent), transparent);
  opacity: 0.8;
}

#theme-manifest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

#theme-mode {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#theme-title {
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#theme-copy {
  max-width: 72ch;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.7;
}

#theme-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.theme-perk {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 0.78rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#hero {
  grid-template-columns: minmax(280px, 0.92fr) minmax(720px, 1.6fr) minmax(320px, 1fr);
  gap: clamp(1.5rem, 2vw, 2.5rem);
  align-items: stretch;
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
  min-height: clamp(660px, calc(100svh - 470px), 820px);
}

#hero::before {
  inset: 1.25rem 15% 1.8rem;
  border-top-color: rgba(210, 226, 235, 0.08);
  border-bottom-color: rgba(210, 226, 235, 0.07);
  background:
    linear-gradient(90deg, transparent 0%, rgba(144, 215, 246, 0.08) 50%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(144, 215, 246, 0.05) 18%, transparent 44%, transparent 56%, rgba(144, 215, 246, 0.05) 82%, transparent 100%);
  opacity: 0.72;
}

#hero::after {
  inset: 7% 16% 10%;
  background:
    radial-gradient(circle at center, rgba(144, 215, 246, 0.16), transparent 28%),
    radial-gradient(circle at center, var(--accent-soft), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 60%);
  filter: blur(42px);
  opacity: 0.92;
}

#col-name,
#col-right {
  justify-content: flex-start;
  min-height: 100%;
  padding-top: 1.2rem;
  padding-bottom: 1rem;
}

#pre-label {
  margin-bottom: 1rem;
}

#name-giant {
  line-height: 0.88;
}

.ng-row {
  font-size: clamp(3.55rem, 5.7vw, 6.1rem);
  letter-spacing: 0.04em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.2));
}

#user-handle {
  margin-top: 1.4rem;
}

#profile-copy {
  max-width: 31ch;
  margin-top: 1rem;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.7;
}

#identity-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 390px;
  margin-top: 1rem;
}

.identity-flag {
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.025);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#identity-panel {
  width: min(100%, 420px);
  margin-top: clamp(1.4rem, 4vh, 3.4rem);
  background:
    linear-gradient(180deg, rgba(16, 24, 32, 0.92), rgba(8, 12, 16, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%);
}

#col-center {
  min-height: 100%;
  justify-content: flex-start;
  gap: 1rem;
  padding-top: 0.4rem;
  padding-bottom: 1rem;
}

#av-zone {
  width: min(100%, clamp(360px, 30vw, 460px));
}

#av-zone::before {
  inset: -34px;
  border-radius: 40px;
  background:
    radial-gradient(circle at top, rgba(212, 244, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 65%, rgba(144, 215, 246, 0.12), transparent 38%);
  filter: blur(26px);
}

#av-zone::after {
  inset: -18px;
  border-radius: 34px;
  border-color: rgba(212, 244, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

#av-img-portrait {
  position: absolute;
  top: 6%;
  left: 6%;
  width: 88%;
  height: 88%;
  z-index: 1;
  object-fit: cover;
  object-position: center top;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  filter: saturate(0.96) contrast(1.08) brightness(0.92);
}

#av-hex {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

#role-block {
  margin-top: 0.25rem;
  padding: 1rem 1.3rem;
  background:
    linear-gradient(180deg, rgba(18, 25, 31, 0.9), rgba(10, 15, 19, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 70%);
}

#hero-copy {
  max-width: 48ch;
  color: var(--text-soft);
  text-align: center;
  font-family: var(--body);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.75;
}

#hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
}

#signal-strip {
  width: 100%;
  margin-top: clamp(1.2rem, 3.6vh, 2.8rem);
}

#stat-bars,
#skills {
  width: 100%;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(150px, 9.6vw, 184px);
  min-height: 48px;
  padding: 0.8rem 1.15rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

#hero-terminal-trigger {
  white-space: nowrap;
}

.hero-action:hover,
.hero-action:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  background: var(--accent-glow);
  box-shadow: 0 0 24px var(--accent-glow);
  color: #fff;
  animation: btn-glitch 0.3s ease infinite;
}

@keyframes btn-glitch {
  0% { transform: translateY(-2px) skew(0deg); }
  25% { transform: translateY(-2px) skew(-3deg); }
  75% { transform: translateY(-2px) skew(3deg); }
  100% { transform: translateY(-2px) skew(0deg); }
}

.hero-action-primary {
  border-color: var(--line-accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    rgba(144, 215, 246, 0.08);
  color: var(--accent-strong);
  box-shadow: 0 0 18px rgba(144, 215, 246, 0.1);
}

body.mission-control-page #page {
  max-width: 1640px;
}

#mc-shell {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 1.8rem clamp(1rem, 2.2vw, 2.6rem) 0;
}

#mc-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.95rem;
  padding: 1.3rem 1.35rem 1.4rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(16, 24, 32, 0.92), rgba(7, 11, 16, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%);
  box-shadow:
    0 28px 54px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#mc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(104deg, transparent 0%, transparent 42%, rgba(212, 244, 255, 0.14) 50%, transparent 58%, transparent 100%),
    radial-gradient(circle at top right, rgba(144, 215, 246, 0.1), transparent 28%);
  opacity: 0.52;
  transform: translateX(-120%);
  animation: panel-sweep 8.4s linear infinite;
  pointer-events: none;
}

#mc-title {
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-transform: uppercase;
}

#mc-copy {
  max-width: 74ch;
  color: var(--text-soft);
  font-family: var(--body);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.72;
}

#mc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

body.mission-control-page #ops-deck {
  margin: 0;
  padding-top: 0;
}

body.mission-control-page #ticker {
  margin-top: 1.3rem;
}

html[data-theme="soft"] #theme-manifest {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(44, 17, 31, 0.9), rgba(14, 9, 16, 0.88)),
    linear-gradient(90deg, rgba(255, 220, 235, 0.08), transparent 62%);
  box-shadow:
    0 28px 60px rgba(44, 10, 26, 0.25),
    0 0 32px rgba(244, 114, 182, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="soft"] #theme-manifest::after {
  height: 100%;
  inset: 0;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 200, 228, 0.12), transparent 26%),
    radial-gradient(circle at 86% 78%, rgba(244, 114, 182, 0.1), transparent 24%);
  opacity: 1;
}

html[data-theme="soft"] #role-block,
html[data-theme="soft"] .hero-action,
html[data-theme="soft"] .theme-perk {
  border-radius: 999px;
}

html[data-theme="soft"] #av-zone::after {
  border-color: rgba(255, 210, 228, 0.16);
  box-shadow: 0 28px 70px rgba(31, 10, 21, 0.26), 0 0 22px rgba(244, 114, 182, 0.12);
}

html[data-theme="soft"] #signal-strip::after,
html[data-theme="soft"] #identity-panel::after,
html[data-theme="soft"] #intel-panel::after {
  opacity: 0.44;
}

html[data-theme="phantom"] #theme-manifest {
  border-radius: 0;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

html[data-theme="phantom"] #theme-mode,
html[data-theme="phantom"] #role-block,
html[data-theme="phantom"] .hero-action {
  border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

html[data-theme="phantom"] .theme-perk {
  border-radius: 999px 999px 999px 0;
}

html[data-theme="phantom"] #theme-manifest::after {
  height: 1px;
  inset: auto 0 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.85) 50%, transparent 100%);
}

html[data-theme="resident"] #theme-manifest {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(10, 23, 14, 0.92), rgba(6, 10, 8, 0.9)),
    repeating-linear-gradient(-45deg, rgba(0, 255, 135, 0.05) 0 12px, transparent 12px 24px);
}

html[data-theme="resident"] #theme-manifest::before {
  background:
    linear-gradient(104deg, transparent 0%, transparent 42%, rgba(160, 255, 212, 0.12) 50%, transparent 58%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0, 255, 135, 0.05) 22px 23px);
}

html[data-theme="resident"] #theme-mode,
html[data-theme="resident"] #role-block,
html[data-theme="resident"] .hero-action,
html[data-theme="resident"] .theme-perk,
html[data-theme="resident"] #signal-strip,
html[data-theme="resident"] #identity-panel,
html[data-theme="resident"] #intel-panel {
  border-radius: 14px;
}

html[data-theme="resident"] #av-zone::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 48%),
    linear-gradient(180deg, rgba(0, 255, 135, 0.05), transparent 60%),
    repeating-linear-gradient(135deg, rgba(0, 255, 135, 0.035) 0 10px, transparent 10px 20px);
}

#signal-strip,
#stat-bars,
#skills,
#intel-panel,
#player,
.soc-link,
.ops-panel {
  background:
    linear-gradient(180deg, rgba(16, 24, 32, 0.92), rgba(7, 11, 16, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%);
  box-shadow:
    0 28px 54px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#col-right {
  gap: 1.2rem;
}

#socials {
  width: 100%;
  margin-top: clamp(1rem, 3.4vh, 2.4rem);
}

#right-divider {
  margin-bottom: 0.2rem;
  opacity: 0.75;
}

#player {
  margin-top: 1.2rem;
  padding: 2.05rem 1.5rem 1.1rem;
  border-radius: 26px;
}

#ops-deck {
  margin-top: 1.3rem;
  padding-top: 0.45rem;
}

#ops-head {
  align-items: flex-end;
  gap: 1.25rem;
}

#ops-head-copy {
  max-width: 840px;
}

#ops-title {
  max-width: 18ch;
  line-height: 1.08;
}

#ops-copy {
  line-height: 1.72;
}

.ops-stat,
.ms-meta-row {
  border-color: rgba(210, 226, 235, 0.12);
  background:
    linear-gradient(180deg, rgba(17, 25, 33, 0.9), rgba(8, 12, 16, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
}

#mission-selector-panel,
#ops-timeline-panel,
#contract-board,
#intel-vault {
  padding: 1.1rem 1.1rem 1.15rem;
}

#mission-detail-panel {
  min-height: 100%;
}

#service-grid {
  gap: 1rem;
}

.service-card {
  min-height: 100%;
}

#vault-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

#ticker {
  margin-top: 1.2rem;
}

@media (min-width: 1180px) {
  html,
  body {
    height: 100%;
  }

  body[data-page="home"] {
    overflow: hidden;
  }

  body[data-page="home"] #page {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    padding: 0.75rem 1rem 5.8rem;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 0.55rem;
  }

  body[data-page="home"] #status-bar,
  body[data-page="home"] #theme-dock,
  body[data-page="home"] #theme-manifest,
  body[data-page="home"] #hero {
    width: 100%;
    margin: 0;
  }

  body[data-page="home"] #status-bar,
  body[data-page="home"] #theme-switcher,
  body[data-page="home"] #theme-manifest,
  body[data-page="home"] #identity-panel,
  body[data-page="home"] #signal-strip,
  body[data-page="home"] #intel-panel,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills,
  body[data-page="home"] .soc-link,
  body[data-page="home"] #player {
    border-color: var(--panel-edge);
    border-radius: var(--panel-radius);
    background:
      linear-gradient(180deg, var(--panel-top), var(--panel-bottom)),
      linear-gradient(120deg, var(--panel-glint), transparent 62%);
    box-shadow:
      0 24px 56px var(--panel-shadow-deep),
      0 0 24px var(--panel-shadow-glow),
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      inset 0 -1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(26px);
  }

  body[data-page="home"] #status-bar {
    position: relative;
    top: 0;
    min-height: 38px;
    padding: 0.42rem 0.95rem;
    border-radius: 14px;
    font-size: 0.52rem;
    letter-spacing: 0.14em;
  }

  body[data-page="home"] #theme-dock {
    display: flex;
    justify-content: center;
    margin-top: 0.05rem;
  }

  body[data-page="home"] #theme-switcher {
    padding: 0.24rem;
    border-radius: 999px;
  }

  body[data-page="home"] .theme-btn {
    min-width: 82px;
    padding: 0.38rem 0.78rem;
    font-size: 0.5rem;
  }

  body[data-page="home"] #theme-manifest {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto;
    grid-template-areas:
      "copy head"
      "perks head";
    align-items: end;
    gap: 0.55rem 1rem;
    padding: 0.8rem 1.2rem 0.85rem;
    min-height: auto;
    overflow: hidden;
  }

  body[data-page="home"] #theme-manifest-head {
    grid-area: head;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.45rem;
  }

  body[data-page="home"] #theme-mode {
    min-height: 30px;
    padding: 0.36rem 0.72rem;
    font-size: 0.52rem;
  }

  body[data-page="home"] #theme-title {
    font-size: clamp(1.7rem, 2.3vw, 2.4rem);
    letter-spacing: 0.06em;
    line-height: 0.94;
    text-align: right;
  }

  body[data-page="home"] #theme-copy {
    grid-area: copy;
    max-width: 68ch;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  body[data-page="home"] #theme-perks {
    grid-area: perks;
    gap: 0.45rem;
  }

  body[data-page="home"] .theme-perk {
    min-height: 30px;
    padding: 0.28rem 0.58rem;
    font-size: 0.48rem;
  }

  body[data-page="home"] #hero {
    height: 100%;
    min-height: 0;
    padding: 0.2rem 0 0;
    gap: 1.1rem;
    grid-template-columns: minmax(210px, 0.72fr) minmax(clamp(380px, 34vw, 520px), 1.26fr) minmax(260px, 0.82fr);
    align-items: stretch;
  }

  body[data-page="home"] #hero::before {
    inset: 0 30% 0.9rem 12%;
    border-top-color: rgba(210, 226, 235, 0.05);
    border-bottom-color: rgba(210, 226, 235, 0.04);
    opacity: 0.6;
  }

  body[data-page="home"] #hero::after {
    inset: 6% 18% 4%;
    background:
      radial-gradient(circle at 32% 26%, var(--profile-glow), transparent 16%),
      radial-gradient(circle at center, var(--hero-glow), transparent 38%),
      radial-gradient(circle at 70% 68%, rgba(255, 255, 255, 0.04), transparent 24%);
    filter: blur(38px);
    opacity: 0.78;
  }

  body[data-page="home"] #col-name,
  body[data-page="home"] #col-center,
  body[data-page="home"] #col-right {
    min-height: 0;
    padding-top: 0.4rem;
    padding-bottom: 0.2rem;
  }

  body[data-page="home"] #col-name {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    border-right: 1px solid rgba(210, 226, 235, 0.08);
  }

  body[data-page="home"] #pre-label {
    margin-bottom: 0.55rem;
    font-size: 0.54rem;
  }

  body[data-page="home"] #name-giant {
    line-height: 0.8;
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(3.4rem, 6vh, 6.1rem);
    letter-spacing: 0.03em;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.9rem;
    padding: 0.72rem 1rem;
    font-size: 0.8rem;
  }

  body[data-page="home"] #profile-copy {
    max-width: 24ch;
    margin-top: 0.9rem;
    font-size: 0.82rem;
    line-height: 1.62;
  }

  body[data-page="home"] #identity-flags {
    gap: 0.35rem;
    margin-top: 0.85rem;
  }

  body[data-page="home"] .identity-flag {
    padding: 0.28rem 0.54rem;
    font-size: 0.46rem;
  }

  body[data-page="home"] #identity-panel {
    width: 100%;
    margin-top: auto;
    padding: 0.9rem 1rem 0.95rem;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.42rem;
    margin-top: 0.65rem;
  }

  body[data-page="home"] .identity-item {
    padding-bottom: 0.42rem;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.54rem;
  }

  body[data-page="home"] #col-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding-inline: 0.65rem;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(270px, 18vw, 360px));
  }

  body[data-page="home"] #av-zone::before {
    inset: -30px;
    border-radius: 34px;
    background:
      radial-gradient(circle at 48% 16%, var(--profile-glow), transparent 36%),
      radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.04), transparent 28%);
    filter: blur(26px);
    opacity: 0.95;
  }

  body[data-page="home"] #av-zone::after {
    inset: -16px;
    border-radius: 32px;
    border-color: rgba(210, 226, 235, 0.1);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 48%),
      linear-gradient(180deg, var(--profile-grid), transparent 62%);
    box-shadow: 0 30px 68px rgba(0, 0, 0, 0.28);
  }

  body[data-page="home"] #av-orbit {
    inset: -30px;
  }

  body[data-page="home"] #role-block {
    min-height: 40px;
    padding: 0.7rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  body[data-page="home"] #hero-copy {
    max-width: 38ch;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  body[data-page="home"] #hero-actions {
    gap: 0.55rem;
  }

  body[data-page="home"] .hero-action {
    min-height: 42px;
    padding: 0.62rem 1rem;
    font-size: 0.52rem;
    border-radius: 14px;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills {
    width: min(100%, 560px);
  }

  body[data-page="home"] #signal-strip {
    margin-top: 0.2rem;
    padding: 0.86rem 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 108px;
    gap: 0.5rem;
  }

  body[data-page="home"] .sig-key {
    font-size: 0.48rem;
  }

  body[data-page="home"] .sig-val {
    font-size: 0.66rem;
  }

  body[data-page="home"] #signal-wave {
    gap: 0.22rem;
    min-height: 24px;
    padding-left: 0.65rem;
  }

  body[data-page="home"] #signal-wave span {
    width: 4px;
  }

  body[data-page="home"] #stat-bars {
    gap: 0.46rem;
    padding: 0.95rem 1rem 1rem;
  }

  body[data-page="home"] #stat-bars::before,
  body[data-page="home"] #skills::before,
  body[data-page="home"] #socials::before {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  body[data-page="home"] .sbar {
    gap: 0.55rem;
  }

  body[data-page="home"] .sbar-label {
    width: 92px;
    font-size: 0.48rem;
  }

  body[data-page="home"] .sbar-val {
    font-size: 0.56rem;
  }

  body[data-page="home"] #skills {
    gap: 0.38rem;
    padding: 0.9rem 1rem 0.95rem;
  }

  body[data-page="home"] .sk {
    padding: 0.28rem 0.56rem;
    font-size: 0.5rem;
  }

  body[data-page="home"] #col-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.95rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(210, 226, 235, 0.08);
  }

  body[data-page="home"] #right-divider {
    margin-bottom: 0.15rem;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.9rem 1rem 0.95rem;
  }

  body[data-page="home"] .intel-row {
    margin-top: 0.52rem;
    padding-top: 0.52rem;
  }

  body[data-page="home"] .intel-key,
  body[data-page="home"] .intel-val {
    font-size: 0.56rem;
  }

  body[data-page="home"] #socials {
    width: 100%;
    gap: 0.55rem;
    margin-top: 0.55rem;
  }

  body[data-page="home"] #socials::before {
    margin-bottom: 0.15rem;
  }

  body[data-page="home"] .soc-link {
    padding: 0.92rem 1rem;
    font-size: 0.68rem;
  }

  body[data-page="home"] .sl-num {
    font-size: 0.52rem;
  }

  body[data-page="home"] .sl-icon {
    width: 40px;
    height: 40px;
  }

  body[data-page="home"] .sl-icon svg {
    width: 16px;
    height: 16px;
  }

  body[data-page="home"] #player {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 0.9rem;
    z-index: 26;
    min-height: 64px;
    margin: 0;
    padding: 1.2rem 1rem 0.72rem;
  }

  body[data-page="home"] #player::before {
    top: 0.48rem;
    left: 1rem;
    font-size: 0.46rem;
  }

  body[data-page="home"] #pl-left {
    min-width: 230px;
    gap: 0.7rem;
  }

  body[data-page="home"] #pl-track {
    font-size: 0.62rem;
  }

  body[data-page="home"] #pl-sub {
    font-size: 0.54rem;
  }

  body[data-page="home"] .plb {
    min-width: 40px;
    min-height: 38px;
    padding: 0.42rem 0.66rem;
    font-size: 0.6rem;
    border-radius: 12px;
  }

  body[data-page="home"] .plb-main {
    min-width: 52px;
  }

  body[data-page="home"] #vol-slider {
    width: 82px;
  }

  body[data-page="home"] #ticker {
    display: none;
  }
}

@media (min-width: 1180px) {
  html[data-theme="soft"] body[data-page="home"] #hero::after {
    background:
      radial-gradient(circle at 6% 32%, rgba(255, 176, 214, 0.24), transparent 14%),
      radial-gradient(circle at center, rgba(244, 114, 182, 0.18), transparent 42%),
      radial-gradient(circle at 72% 18%, rgba(255, 218, 235, 0.12), transparent 18%);
  }

  html[data-theme="soft"] body[data-page="home"] #theme-manifest,
  html[data-theme="soft"] body[data-page="home"] #signal-strip,
  html[data-theme="soft"] body[data-page="home"] #stat-bars,
  html[data-theme="soft"] body[data-page="home"] #skills,
  html[data-theme="soft"] body[data-page="home"] #intel-panel,
  html[data-theme="soft"] body[data-page="home"] .soc-link,
  html[data-theme="soft"] body[data-page="home"] #player {
    box-shadow:
      0 26px 58px rgba(33, 10, 19, 0.34),
      0 0 28px rgba(244, 114, 182, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  html[data-theme="soft"] body[data-page="home"] .ng-row {
    letter-spacing: 0.01em;
  }

  html[data-theme="phantom"] body[data-page="home"] #theme-manifest::before {
    opacity: 0.68;
  }

  html[data-theme="phantom"] body[data-page="home"] #role-block,
  html[data-theme="phantom"] body[data-page="home"] .hero-action {
    text-transform: uppercase;
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.1);
  }

  html[data-theme="resident"] body[data-page="home"] #theme-manifest,
  html[data-theme="resident"] body[data-page="home"] #signal-strip,
  html[data-theme="resident"] body[data-page="home"] #stat-bars,
  html[data-theme="resident"] body[data-page="home"] #skills,
  html[data-theme="resident"] body[data-page="home"] #intel-panel,
  html[data-theme="resident"] body[data-page="home"] .soc-link,
  html[data-theme="resident"] body[data-page="home"] #player {
    background:
      linear-gradient(180deg, var(--panel-top), var(--panel-bottom)),
      linear-gradient(120deg, var(--panel-glint), transparent 62%),
      repeating-linear-gradient(135deg, rgba(0, 255, 135, 0.05) 0 14px, transparent 14px 28px);
  }

  html[data-theme="resident"] body[data-page="home"] #theme-mode,
  html[data-theme="resident"] body[data-page="home"] .theme-perk,
  html[data-theme="resident"] body[data-page="home"] .hero-action {
    border-radius: 10px;
  }

  html[data-theme="crimson"] body[data-page="home"] #theme-manifest,
  html[data-theme="crimson"] body[data-page="home"] #signal-strip,
  html[data-theme="crimson"] body[data-page="home"] #stat-bars,
  html[data-theme="crimson"] body[data-page="home"] #skills,
  html[data-theme="crimson"] body[data-page="home"] #intel-panel,
  html[data-theme="crimson"] body[data-page="home"] .soc-link,
  html[data-theme="crimson"] body[data-page="home"] #player {
    box-shadow:
      0 26px 56px rgba(20, 3, 9, 0.38),
      0 0 26px rgba(255, 45, 85, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  html[data-theme="crimson"] body[data-page="home"] #hero::before {
    background:
      linear-gradient(90deg, transparent 0%, rgba(255, 45, 85, 0.09) 50%, transparent 100%),
      linear-gradient(180deg, transparent 0%, rgba(255, 45, 85, 0.05) 18%, transparent 42%, transparent 58%, rgba(255, 45, 85, 0.05) 82%, transparent 100%);
  }
}

@media (max-width: 1240px) {
  body {
    overflow-y: auto;
  }

  #hero {
    grid-template-columns: minmax(230px, 0.76fr) minmax(0, 1.24fr);
    row-gap: 1.8rem;
    min-height: auto;
  }

  #col-name,
  #col-right {
    padding-top: 1.2rem;
  }

  #col-right {
    grid-column: 1 / -1;
    padding-top: 1.4rem;
    padding-left: 0;
    border-top: 1px solid rgba(210, 226, 235, 0.08);
    border-left: 0;
  }

  #socials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #signal-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #signal-wave {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    padding-left: 0;
    border-top: 1px solid rgba(210, 226, 235, 0.08);
    border-left: 0;
  }

  #socials::before {
    grid-column: 1 / -1;
  }

  #player {
    flex-wrap: wrap;
  }

  #pl-progress-wrap {
    order: 4;
    flex-basis: 100%;
  }

  #ops-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #ops-head-stats {
    justify-content: flex-start;
  }

  #ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mission-detail-panel {
    grid-column: span 2;
  }

  #ops-title {
    max-width: none;
  }

  #service-grid,
  #vault-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .corner {
    display: none;
  }

  #theme-dock {
    margin-inline: 0.75rem;
  }

  #status-bar,
  #player,
  #ticker,
  #ops-deck {
    margin-inline: 0.75rem;
  }

  #status-bar {
    top: 8px;
    flex-wrap: wrap;
    row-gap: 0.35rem;
    padding-inline: 0.95rem;
    font-size: 0.54rem;
  }

  #theme-switcher {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #theme-switcher::-webkit-scrollbar {
    display: none;
  }

  .theme-btn {
    min-width: 86px;
  }

  #theme-manifest {
    width: auto;
    margin-inline: 0.75rem;
    padding: 0.95rem 1rem 1rem;
    border-radius: 20px;
  }

  #theme-manifest-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #theme-copy {
    font-size: 0.82rem;
  }

  #mc-shell {
    padding: 1.2rem 0.75rem 0;
  }

  #mc-title {
    font-size: clamp(1.3rem, 8vw, 2rem);
  }

  #mc-copy {
    font-size: 0.82rem;
  }

  #mc-actions {
    width: 100%;
  }

  #hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
    padding: 1.25rem 0.95rem 0;
  }

  #hero::before,
  #hero::after {
    display: none;
  }

  #col-name,
  #col-center,
  #col-right {
    border: 0;
    padding: 0;
    min-height: 0;
  }

  #col-name {
    align-items: center;
    text-align: center;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(210, 226, 235, 0.08);
  }

  #profile-copy,
  #hero-copy {
    max-width: 100%;
    text-align: center;
  }

  #identity-flags,
  #hero-actions {
    justify-content: center;
  }

  #name-giant {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.12rem 0.24rem;
    line-height: 1;
    max-width: min(100%, 320px);
  }

  .ng-row {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }

  #user-handle {
    margin-inline: auto;
  }

  #identity-flags {
    width: min(100%, 420px);
  }

  #identity-panel {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  #col-center {
    padding: 0;
  }

  #av-zone {
    width: min(220px, 64vw);
  }

  #hero-copy {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .av-badge {
    font-size: 0.48rem;
    letter-spacing: 0.12em;
  }

  #signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .sig-item:last-of-type {
    grid-column: 1 / -1;
  }

  #signal-wave {
    min-height: 26px;
  }

  #col-right {
    padding-top: 1.1rem;
    border-top: 1px solid rgba(210, 226, 235, 0.08);
  }

  #socials {
    grid-template-columns: 1fr;
  }

  .soc-link {
    font-size: 0.7rem;
  }

  #intel-panel {
    padding: 0.95rem 1rem 1rem;
  }

  #socials,
  #intel-panel {
    width: 100%;
  }

  #identity-panel,
  #signal-strip,
  #socials {
    margin-top: 0;
  }

  #player {
    gap: 0.75rem;
    padding: 1.35rem 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  #pl-left,
  #pl-controls,
  #pl-vol {
    flex-basis: auto;
    width: 100%;
  }

  #pl-left {
    min-width: 0;
    order: 1;
  }

  #pl-progress-wrap {
    order: 2;
    flex: 1 1 auto;
  }

  #pl-text,
  #pl-progress-wrap,
  #pl-vol {
    width: 100%;
    min-width: 0;
  }

  #pl-track {
    font-size: 0.78rem;
  }

  #pl-sub {
    font-size: 0.58rem;
  }

  #pl-controls {
    order: 3;
    margin-left: 0;
    justify-content: center;
  }

  #pl-vol {
    order: 4;
    margin-left: 0;
    justify-content: center;
  }

  #ticker {
    height: 32px;
  }

  #ops-deck {
    gap: 0.85rem;
    padding-top: 0.95rem;
  }

  #ops-title {
    font-size: clamp(1.15rem, 7vw, 1.65rem);
  }

  #ops-copy {
    font-size: 0.8rem;
  }

  #hero-actions {
    width: 100%;
  }

  .hero-action {
    width: 100%;
  }

  #mc-actions .hero-action {
    width: 100%;
  }

  #ops-head-stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .ops-stat,
  .ms-meta-row {
    min-width: 0;
    flex: 1 1 140px;
    width: 100%;
  }

  #ops-grid {
    grid-template-columns: 1fr;
  }

  #mission-detail-panel {
    grid-column: auto;
  }

  #mission-radar {
    min-height: 340px;
  }

  .mission-node {
    width: min(140px, 44%);
  }

  .mission-node-pos-0 {
    top: 9%;
    left: 5%;
  }

  .mission-node-pos-1 {
    top: 10%;
    right: 5%;
  }

  .mission-node-pos-2 {
    bottom: 10%;
  }

  .mission-detail-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .mission-scope-grid,
  #service-grid,
  #vault-grid {
    grid-template-columns: 1fr;
  }

  .mission-actions,
  .service-actions {
    flex-direction: column;
  }

  .mission-action,
  .service-action,
  #vault-close {
    width: 100%;
  }

  #vault-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #vault-actions {
    width: 100%;
    justify-content: flex-start;
  }

  #cli {
    right: 0.75rem;
    bottom: 5.05rem;
    width: calc(100vw - 1.5rem);
    height: min(320px, 52vh);
  }

  #toast {
    top: auto;
    right: 0.75rem;
    bottom: 5.1rem;
  }
}

@media (pointer: coarse), (hover: none) {
  body {
    overflow-y: auto;
  }

  #cur-ring,
  #cur-dot {
    display: none;
  }

  .sk,
  .soc-link,
  .plb,
  #user-handle,
  #vol-slider,
  .ctx-item {
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #grain,
  #scanlines {
    opacity: 0.01;
  }

  #ticker-inner {
    animation: none;
  }
}

/* ═══════════════════════  MICRO HUD DETAILS  ═══════════════════════ */

/* Panel kicker prefix symbol */
.panel-kicker::before {
  content: '▸ ';
  opacity: 0.45;
  font-size: 0.8em;
}

/* Identity / intel / signal key prefix */
.identity-key::before, .intel-key::before, .sig-key::before {
  content: '◦ ';
  opacity: 0.4;
  font-size: 0.85em;
}

/* ── REC indicator ── */
.sb-rec {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.rec-dot {
  width: 5px; height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: rec-blink 1.4s ease-in-out infinite;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.18; }
}

/* ── Live hex counter ── */
#sb-hex {
  font-size: 0.57rem;
  letter-spacing: 0.07em;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}

#sb-coords { font-variant-numeric: tabular-nums; }

/* ── HUD corner brackets ── */
.hud-c { position: absolute; width: 20px; height: 20px; z-index: 10; pointer-events: none; transition: border-color 0.5s ease; }
.hud-c-tl { top: 6px;    left: 6px;   border-top:    1.5px solid var(--accent); border-left:  1.5px solid var(--accent); opacity: 0.55; }
.hud-c-tr { top: 6px;    right: 6px;  border-top:    1.5px solid var(--accent); border-right: 1.5px solid var(--accent); opacity: 0.55; }
.hud-c-bl { bottom: 6px; left: 6px;   border-bottom: 1.5px solid var(--accent); border-left:  1.5px solid var(--accent); opacity: 0.55; }
.hud-c-br { bottom: 6px; right: 6px;  border-bottom: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); opacity: 0.55; }

/* ── Avatar targeting crosshair ── */
#av-target {
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px;
  transform: translate(-50%, -50%);
  z-index: 8; pointer-events: none;
}
#av-target span { position: absolute; background: var(--accent); transition: background 0.5s ease; }
#av-target span:nth-child(1) {
  top: 50%; left: 0; right: 0; height: 1px;
  transform: translateY(-50%); opacity: 0;
  animation: crosshair-fade 4s ease-in-out infinite;
}
#av-target span:nth-child(2) {
  left: 50%; top: 0; bottom: 0; width: 1px;
  transform: translateX(-50%); opacity: 0;
  animation: crosshair-fade 4s ease-in-out 2s infinite;
}
@keyframes crosshair-fade {
  0%, 100% { opacity: 0; }
  40%, 60%  { opacity: 0.42; }
}

/* ── TARGET LOCK scan label ── */
#av-scan-label {
  position: absolute; top: -2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.48rem; font-weight: 700;
  letter-spacing: 0.24em; text-indent: 0.24em;
  color: var(--accent); opacity: 0; white-space: nowrap; pointer-events: none;
  animation: target-label 7s ease-in-out infinite;
  transition: color 0.5s ease;
}
@keyframes target-label {
  0%, 25%, 100% { opacity: 0; transform: translateX(-50%) translateY(3px); }
  42%, 62%      { opacity: 0.6; transform: translateX(-50%) translateY(0px); }
}

/* ── Identity item hover accent dot ── */
.identity-item { position: relative; }
.identity-item::after {
  content: ''; position: absolute;
  right: -5px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); opacity: 0;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: opacity 0.25s ease;
}
.identity-item:hover::after { opacity: 0.8; }

/* ── Stat bar value subtle pulse ── */
@keyframes val-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.sbar-val { animation: val-pulse 4s ease-in-out infinite; }

/* ── Improved name glow (override existing keyframe) ── */
@keyframes name-breathe {
  0%, 100% { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.14)); }
  50% { filter: drop-shadow(0 0 22px var(--accent-glow)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.12)); }
}

/* ── Typewriter role cursor stronger glow ── */
#role-cur { text-shadow: 0 0 14px var(--accent-glow); color: var(--accent); }

/* ── Role prefix glow ── */
#role-pre { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); opacity: 0.8; }

/* ── Social link corner bracket → theme-aware ── */
.soc-link::after {
  content: ""; position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-top: 1px solid var(--line-accent);
  border-right: 1px solid var(--line-accent);
  opacity: 0; transition: opacity 0.3s ease;
}
.soc-link:hover::after, .soc-link:focus-visible::after { opacity: 0.7; }

/* ── Skill badge enhanced accent glow on hover ── */
.sk:hover, .sk:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--line-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14), 0 0 18px var(--accent-glow);
}

/* ── @a handle hover underline ── */
#user-handle { position: relative; overflow: hidden; }
#user-handle::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transform: scaleX(0);
  transition: opacity 0.3s ease, transform 0.4s ease;
}
#user-handle:hover::after { opacity: 0.7; transform: scaleX(1); }

/* ── Intel value flicker animation ── */
@keyframes intel-flash {
  0%, 80%, 100% { opacity: 1; }
  88%, 95%      { opacity: 0.35; }
}
.intel-val { animation: intel-flash 7s ease-in-out infinite; }

/* ── Inset corner marks on key panels ── */
#intel-panel, #identity-panel, #signal-strip, #stat-bars, #skills {
  box-shadow:
    var(--panel-shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    inset 6px 6px 0 -5px var(--accent),
    inset -6px -6px 0 -5px var(--accent);
}

/* ═══════════════════════  SHORT-VIEWPORT FIX (≤ 960px tall)  ═══════════════════════ */
/* Targets typical 1366×768 / 1440×900 laptops where 100svh is limited               */

@media (min-width: 1180px) and (max-height: 960px) {
  body[data-page="home"] #theme-manifest {
    display: none; /* hidden on short viewports to free up vertical space */
  }

  body[data-page="home"] #page {
    padding: 0.5rem 1rem 5rem;
    gap: 0.35rem;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body[data-page="home"] #theme-copy {
    font-size: 0.78rem;
    line-height: 1.42;
  }

  body[data-page="home"] #theme-title {
    font-size: clamp(1.25rem, 2vw, 1.85rem);
  }

  body[data-page="home"] .theme-perk {
    min-height: 26px;
    padding: 0.22rem 0.5rem;
    font-size: 0.44rem;
  }

  body[data-page="home"] #hero {
    gap: 0.8rem;
    padding-top: 0.1rem;
    grid-template-columns: minmax(190px, 0.72fr) minmax(clamp(320px, 32vw, 480px), 1.26fr) minmax(240px, 0.82fr);
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(2.8rem, 5vh, 5.2rem);
    letter-spacing: 0.02em;
  }

  body[data-page="home"] #name-giant {
    line-height: 0.78;
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.6rem;
    padding: 0.58rem 0.85rem;
    font-size: 0.74rem;
  }

  body[data-page="home"] #profile-copy {
    margin-top: 0.65rem;
    font-size: 0.76rem;
    line-height: 1.52;
    max-width: 22ch;
  }

  body[data-page="home"] #identity-flags {
    margin-top: 0.6rem;
    gap: 0.28rem;
  }

  body[data-page="home"] .identity-flag {
    padding: 0.22rem 0.46rem;
    font-size: 0.42rem;
  }

  body[data-page="home"] #identity-panel {
    margin-top: auto;
    padding: 0.72rem 0.9rem 0.75rem;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.32rem;
    margin-top: 0.5rem;
  }

  body[data-page="home"] .identity-item {
    padding-bottom: 0.32rem;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.5rem;
  }

  body[data-page="home"] #col-center {
    gap: 0.55rem;
    padding-inline: 0.5rem;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(220px, 16vw, 300px));
  }

  body[data-page="home"] #role-block {
    min-height: 34px;
    padding: 0.55rem 0.85rem;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  body[data-page="home"] #hero-copy {
    max-width: 34ch;
    font-size: 0.78rem;
    line-height: 1.42;
  }

  body[data-page="home"] #hero-actions {
    gap: 0.4rem;
  }

  body[data-page="home"] .hero-action {
    min-height: 36px;
    padding: 0.5rem 0.85rem;
    font-size: 0.48rem;
    border-radius: 12px;
  }

  body[data-page="home"] #signal-strip {
    margin-top: 0.15rem;
    padding: 0.68rem 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 90px;
    gap: 0.4rem;
  }

  body[data-page="home"] .sig-key {
    font-size: 0.44rem;
  }

  body[data-page="home"] .sig-val {
    font-size: 0.6rem;
  }

  body[data-page="home"] #stat-bars {
    gap: 0.36rem;
    padding: 0.78rem 0.9rem 0.82rem;
  }

  body[data-page="home"] .sbar-label {
    width: 80px;
    font-size: 0.44rem;
  }

  body[data-page="home"] .sbar-val {
    font-size: 0.5rem;
  }

  body[data-page="home"] #skills {
    gap: 0.3rem;
    padding: 0.72rem 0.9rem 0.78rem;
  }

  body[data-page="home"] .sk {
    padding: 0.22rem 0.48rem;
    font-size: 0.46rem;
  }

  body[data-page="home"] #col-right {
    gap: 0.75rem;
    padding-left: 0.85rem;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.72rem 0.9rem 0.75rem;
  }

  body[data-page="home"] .intel-row {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
  }

  body[data-page="home"] .intel-key,
  body[data-page="home"] .intel-val {
    font-size: 0.5rem;
  }

  body[data-page="home"] #socials {
    gap: 0.42rem;
    margin-top: 0.4rem;
  }

  body[data-page="home"] .soc-link {
    padding: 0.72rem 0.85rem;
    font-size: 0.62rem;
  }

  body[data-page="home"] .sl-icon {
    width: 34px;
    height: 34px;
  }

  body[data-page="home"] .sl-icon svg {
    width: 14px;
    height: 14px;
  }

  body[data-page="home"] #player {
    bottom: 0.65rem;
    left: 0.85rem;
    right: 0.85rem;
    min-height: 54px;
    padding: 1rem 0.95rem 0.58rem;
  }

  body[data-page="home"] #player::before {
    top: 0.38rem;
    font-size: 0.42rem;
  }

  body[data-page="home"] #pl-left {
    min-width: 200px;
    gap: 0.55rem;
  }

  body[data-page="home"] #pl-track {
    font-size: 0.58rem;
  }

  body[data-page="home"] #pl-sub {
    font-size: 0.5rem;
  }

  body[data-page="home"] .plb {
    min-width: 36px;
    min-height: 34px;
    padding: 0.36rem 0.58rem;
    font-size: 0.56rem;
    border-radius: 10px;
  }

  body[data-page="home"] .plb-main {
    min-width: 46px;
  }

  body[data-page="home"] #vol-slider {
    width: 72px;
  }
}

/* Extra-short screens ≤ 800px tall — hide non-essential decorations */
@media (min-width: 1180px) and (max-height: 800px) {
  body[data-page="home"] #page {
    padding: 0.4rem 1rem 5rem;
    gap: 0.3rem;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body[data-page="home"] #theme-manifest {
    display: none;
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(2.4rem, 4.4vh, 4.4rem);
  }

  body[data-page="home"] #name-giant {
    line-height: 0.74;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(180px, 14vw, 260px));
  }

  body[data-page="home"] #hero-copy {
    font-size: 0.72rem;
    max-width: 30ch;
  }

  body[data-page="home"] #col-center {
    gap: 0.4rem;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #skills {
    display: none;
  }

  /* Compress col-right to fit all 4 social links */
  body[data-page="home"] #col-right {
    gap: 0.55rem;
    overflow: hidden;
    justify-content: flex-start;
  }

  body[data-page="home"] #socials {
    gap: 0.3rem;
    margin-top: 0.3rem;
    flex: 1;
    min-height: 0;
  }

  body[data-page="home"] .soc-link {
    padding: 0.58rem 0.78rem;
    font-size: 0.58rem;
  }

  body[data-page="home"] .sl-icon {
    width: 30px;
    height: 30px;
  }

  body[data-page="home"] .sl-icon svg {
    width: 12px;
    height: 12px;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.6rem 0.85rem 0.65rem;
  }

  body[data-page="home"] .intel-row {
    margin-top: 0.3rem;
    padding-top: 0.3rem;
  }

  body[data-page="home"] #right-divider {
    display: none;
  }

  /* Compress left column too */
  body[data-page="home"] #user-handle {
    margin-top: 0.5rem;
    padding: 0.5rem 0.78rem;
    font-size: 0.7rem;
  }

  body[data-page="home"] #profile-copy {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.45;
  }

  body[data-page="home"] #identity-flags {
    margin-top: 0.45rem;
  }

  body[data-page="home"] #identity-panel {
    padding: 0.6rem 0.85rem 0.65rem;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.25rem;
    margin-top: 0.4rem;
  }

  body[data-page="home"] #stat-bars {
    padding: 0.65rem 0.85rem 0.7rem;
    gap: 0.3rem;
  }

  body[data-page="home"] #pre-label {
    margin-bottom: 0.5rem;
  }
}

/* ==============================================================
   THEME SPECIFIC DETAILS & EFFECTS
============================================================== */

/* -- SOFT THEME -- */
html[data-theme="soft"] .spark-soft {
  background: transparent;
  width: auto;
  height: auto;
  box-shadow: none;
  font-size: 14px;
  color: var(--accent-strong);
  text-shadow: 0 0 10px var(--accent-glow);
  animation: spark-float 0.5s ease-out forwards;
}

@keyframes spark-float {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  100% { transform: translateY(-30px) scale(1.2); opacity: 0; }
}

html[data-theme="soft"] #av-zone {
  animation: soft-bounce 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes soft-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

html[data-theme="soft"] #pl-eq.on .peq {
  animation: eq-flow 1.5s ease-in-out infinite alternate;
}
@keyframes eq-flow {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* -- RESIDENT THEME -- */
html[data-theme="resident"] .spark-resident {
  background: transparent;
  width: auto;
  height: auto;
  box-shadow: none;
  font-size: 10px;
  letter-spacing: -1px;
  font-weight: 700;
  color: #00ff87;
  text-shadow: 0 0 8px #00ff87;
  font-family: var(--mono);
  animation: spark-fall 0.4s ease-in forwards;
}

@keyframes spark-fall {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(30px); opacity: 0; }
}

html[data-theme="resident"] #av-target,
html[data-theme="resident"] #hero-role,
html[data-theme="resident"] #sb-state {
  animation: resident-pulse 3s infinite;
}

@keyframes resident-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--accent-glow); }
  50% { opacity: 0.4; text-shadow: 0 0 20px var(--accent-strong); color: #fff; }
}

html[data-theme="resident"] body::before {
  animation: grain-anim 0.2s steps(2) infinite, crt-flicker 0.15s infinite;
}
@keyframes crt-flicker {
  0% { opacity: 0.75; }
  50% { opacity: 0.65; }
  100% { opacity: 0.7; }
}

/* -- CRIMSON THEME -- */
html[data-theme="crimson"] .spark-crimson {
  background: transparent;
  width: auto;
  height: auto;
  box-shadow: none;
  font-size: 16px;
  color: #ff2d55;
  font-family: var(--mono);
  font-weight: bold;
  animation: spark-slash 0.3s ease-out forwards;
}

@keyframes spark-slash {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(15px, -15px) scale(0.5); opacity: 0; }
}

html[data-theme="crimson"] #hero {
  animation: crimson-heartbeat 2s ease-in-out infinite;
}

@keyframes crimson-heartbeat {
  0%, 100% { box-shadow: inset 0 0 0px transparent; }
  15% { box-shadow: inset 0 0 80px rgba(255, 45, 85, 0.08); }
  30% { box-shadow: inset 0 0 0px transparent; }
  45% { box-shadow: inset 0 0 120px rgba(255, 45, 85, 0.12); }
}

html[data-theme="crimson"] .nh-btn:hover,
html[data-theme="crimson"] .sk:hover {
  text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(255,0,0,0.4);
  transition: all 0.1s;
}

/* -- PHANTOM THEME -- */
html[data-theme="phantom"] .spark-phantom {
  background: #fff;
  box-shadow: 0 0 15px 3px #00d4ff;
}

html[data-theme="phantom"] .ng-row {
  animation: phantom-glitch 5s infinite;
}

@keyframes phantom-glitch {
  0%, 96%, 100% { transform: translate(0); text-shadow: none; }
  97% { transform: translate(-2px, 1px); text-shadow: 3px 0 #00d4ff, -3px 0 #df8c88; }
  98% { transform: translate(2px, -1px); text-shadow: -3px 0 #00d4ff, 3px 0 #df8c88; }
  99% { transform: translate(0); text-shadow: none; }
}

html[data-theme="phantom"] #pl-eq.on .peq {
  animation: eq-sharp 0.3s steps(3) infinite alternate;
}
@keyframes eq-sharp {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* ==============================================================
   SAFE METAMORPHOSIS (TRANSFORMS, FILTERS & GEOMETRY)
============================================================== */

/* ---------- 🩸 CRIMSON THEME (Asymmetric Brutalism) ---------- */
/* Utilize perfectly flat and crisp Brutalism without rendering-destructive skew transformations */
html[data-theme="crimson"] .panel,
html[data-theme="crimson"] #col-left,
html[data-theme="crimson"] #col-right {
  border-radius: 0 !important;
  border: 4px solid #ff2d55 !important;
  background: #050001 !important;
  box-shadow: 15px 15px 0px #801020 !important;
}

html[data-theme="crimson"] #av-zone {
  border-radius: 0 !important;
  border: 4px solid #ff2d55 !important;
  box-shadow: 10px 10px 0px #ff2d55 !important;
}
html[data-theme="crimson"] #av-img-portrait {
  border-radius: 0 !important;
  clip-path: none !important;
}

html[data-theme="crimson"] .nh-btn,
html[data-theme="crimson"] .sk,
html[data-theme="crimson"] .theme-btn {
  border-radius: 0 !important;
  border: 3px solid #ff2d55 !important;
  background: #000 !important;
  color: #ff2d55 !important;
  font-weight: 900 !important;
  box-shadow: 5px 5px 0px #ff2d55 !important;
  transition: all 0.1s !important;
}
html[data-theme="crimson"] .nh-btn:hover {
  transform: translate(5px, 5px) !important;
  box-shadow: 0px 0px 0px #ff2d55 !important;
  background: #ff2d55 !important;
  color: #000 !important;
}

html[data-theme="crimson"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 90%, rgba(255, 45, 85, 0.1) 0%, transparent 60%) !important;
  pointer-events: none;
  z-index: -1;
}


/* ---------- ☣️ RESIDENT THEME (Terminal / DOS Logic) ---------- */
html[data-theme="resident"] * {
  font-family: var(--mono) !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

html[data-theme="resident"] .panel,
html[data-theme="resident"] #col-left,
html[data-theme="resident"] #col-right {
  background: #000 !important;
  border: 1px dashed #00ff87 !important;
  padding: 1rem !important; /* standardize */
}

/* Hide the decorative HUD elements but KEEP the avatar photo */
html[data-theme="resident"] #av-hex, 
html[data-theme="resident"] #av-target,
html[data-theme="resident"] .av-badge-top,
html[data-theme="resident"] .av-badge-bottom {
  display: none !important;
}

html[data-theme="resident"] #av-zone {
  border: 2px dashed #00ff87 !important;
  background: #000 !important;
  clip-path: none !important;
  border-radius: 0 !important;
}

/* Make the photo look like a green terminal broadcast */
html[data-theme="resident"] #av-img-portrait {
  border-radius: 0 !important;
  clip-path: none !important;
  filter: grayscale(1) sepia(1) hue-rotate(80deg) contrast(1.8) opacity(0.8) !important;
  mix-blend-mode: screen !important;
}

html[data-theme="resident"] .nh-btn,
html[data-theme="resident"] .sk,
html[data-theme="resident"] .theme-btn {
  background: #000 !important;
  border: 1px solid #00ff87 !important;
  color: #00ff87 !important;
}

html[data-theme="resident"] body::before {
  background: none !important;
}
html[data-theme="resident"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 135, 0.04) 2px, rgba(0, 255, 135, 0.04) 4px) !important;
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 999;
}


/* ---------- 🌸 SOFT THEME (Neumorphic Hologlass) ---------- */
html[data-theme="soft"] .panel,
html[data-theme="soft"] #col-left,
html[data-theme="soft"] #col-right {
  border-radius: 60px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)) !important;
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.3), -10px -10px 40px rgba(244, 114, 182, 0.08), inset 2px 2px 8px rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px) !important;
}

html[data-theme="soft"] #av-zone {
  border-radius: 50% !important;
  clip-path: none !important;
  border: 6px solid rgba(244, 114, 182, 0.4) !important;
  box-shadow: 0 0 60px rgba(244, 114, 182, 0.5) !important;
  z-index: 10;
}
html[data-theme="soft"] #av-img-portrait {
  border-radius: 50% !important;
  clip-path: none !important;
}
html[data-theme="soft"] #av-target, html[data-theme="soft"] .av-badge-top, html[data-theme="soft"] .av-badge-bottom {
  display: none !important;
}

html[data-theme="soft"] .nh-btn,
html[data-theme="soft"] .sk,
html[data-theme="soft"] .theme-btn {
  border-radius: 40px !important;
  background: rgba(244, 114, 182, 0.1) !important;
  border: 1px solid rgba(255, 190, 220, 0.2) !important;
  transition: all 0.3s ease !important;
}
html[data-theme="soft"] .nh-btn:hover {
  background: rgba(244, 114, 182, 0.3) !important;
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.6) !important;
  transform: scale(1.05) !important;
}


/* ---------- 🦾 PHANTOM THEME (Cyberpunk Deep Cut) ---------- */
html[data-theme="phantom"] .panel,
html[data-theme="phantom"] .nh-btn,
html[data-theme="phantom"] #av-zone {
  border-radius: 0 !important;
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px) !important;
  border: none !important;
  border-left: 2px solid #00d4ff !important;
  border-right: 2px solid #00d4ff !important;
  background: rgba(0, 20, 30, 0.4) !important;
  backdrop-filter: hue-rotate(90deg) contrast(1.2) !important;
}

html[data-theme="phantom"] #av-img-portrait {
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px) !important;
}

html[data-theme="phantom"] body::before {
  mix-blend-mode: color-dodge !important;
  opacity: 0.8 !important;
}

/* =========================================
   POLISH & RESPONSIVENESS OVERRIDES
========================================= */

/* Execution Metrics Layout Fix */
.sbar-track {
  padding-right: 2px; /* Slight padding to avoid overflowing past 100% boundary */
}

/* AV Hex / Image Positioning Alignment */
#av-zone {
  display: block;
}
#av-hex {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#av-img-portrait {
  position: absolute;
  top: 6%;
  left: 6%;
  width: 88%;
  height: 88%;
  z-index: 1;
  object-fit: cover;
  object-position: center top;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

/* Audio Player Polish */
#pl-vol {
  margin-right: 1.5rem; /* Stop volume slider from touching the right edge */
}
#pl-eq {
  gap: 3px;
}
.peq {
  width: 5px;
  height: min(100%, 14px); /* Bigger equalizers */
}

/* Status Bar Typography */
#status-bar {
  font-size: 0.68rem; /* Make status bar slightly larger for readability */
}

/* Terminal Glow Reduction */
#cli {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* SOVOLYUB Name Font Polish */
.ng-row {
  /* Enforce main display font consistently */
  font-family: var(--display) !important;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  #hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  #hero::before, #hero::after {
    display: none; /* Hide complex background sweeps on mobile */
  }

  #col-name {
    border-right: none;
    border-bottom: 1px solid rgba(210, 226, 235, 0.08);
    padding-right: 0;
    padding-bottom: 2rem;
  }
  
  #col-center {
    padding: 2rem 0;
  }
  
  #col-right {
    border-left: none;
    padding-left: 0;
    padding-top: 1rem;
  }
  
  #signal-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  #signal-wave {
    display: none; /* Hide wave on small screens to save space */
  }
}

@media (max-width: 768px) {
  .ng-row {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }

  #status-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.58rem;
  }
  
  #status-bar .sb-fill, #status-bar .sb-sep {
    display: none;
  }
  
  #player {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    align-items: flex-start;
  }
  
  #pl-progress-wrap {
    width: 100%;
  }
  
  #pl-controls {
    align-self: center;
  }
  
  #pl-vol {
    display: none; /* Hide volume on mobile */
  }
}

/* ==============================================================
   PREMIUM STYLE PASS
============================================================== */

#theme-signature {
  position: relative;
  z-index: 14;
  overflow: hidden;
  display: grid;
  gap: 0.9rem;
  margin: 0 clamp(1rem, 2.2vw, 2.6rem) 0.75rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(16, 24, 31, 0.93), rgba(7, 11, 16, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 58%);
  box-shadow:
    0 28px 58px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#theme-signature::before,
#theme-signature::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#theme-signature::before {
  background:
    linear-gradient(104deg, transparent 0%, transparent 42%, rgba(212, 244, 255, 0.14) 50%, transparent 58%, transparent 100%),
    radial-gradient(circle at top right, var(--accent-soft), transparent 28%);
  opacity: 0.46;
  transform: translateX(-120%);
  animation: panel-sweep 11s linear infinite;
}

#theme-signature::after {
  background:
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.05), transparent 20%),
    radial-gradient(circle at 12% 88%, var(--accent-soft), transparent 26%);
  opacity: 0.85;
}

#theme-signature-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

#theme-signature-kicker {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#theme-signature-title {
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.72rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#theme-signature-copy {
  position: relative;
  z-index: 1;
  max-width: 72ch;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.7;
}

#theme-signature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.theme-signature-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 168px;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(210, 226, 235, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 26, 32, 0.94), rgba(7, 11, 15, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 62%);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.theme-signature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210, 226, 235, 0.2);
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 30px var(--accent-soft);
}

.theme-signature-label {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.theme-signature-value {
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(0.95rem, 1.8vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.08;
}

.theme-signature-note {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.6;
}

#mc-theme-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mc-theme-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.46rem 0.82rem;
  border: 1px solid rgba(210, 226, 235, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.theme-surface-refresh {
  animation: theme-surface-refresh 0.72s ease;
}

@keyframes theme-surface-refresh {
  0% {
    opacity: 0.65;
    transform: translateY(12px);
    filter: saturate(0.82) blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: none;
  }
}

@keyframes resident-scan {
  0% {
    transform: translateY(-140%);
  }
  100% {
    transform: translateY(260%);
  }
}

@keyframes resident-target-scan {
  0% {
    top: 18%;
  }
  100% {
    top: 82%;
  }
}

html[data-theme] #theme-manifest,
html[data-theme] #theme-signature,
html[data-theme] #identity-panel,
html[data-theme] #signal-strip,
html[data-theme] #stat-bars,
html[data-theme] #skills,
html[data-theme] #intel-panel,
html[data-theme] .soc-link,
html[data-theme] #player,
html[data-theme] #mc-hero,
html[data-theme] .ops-panel,
html[data-theme] .service-card,
html[data-theme] .ops-stat,
html[data-theme] .ms-meta-row {
  transition:
    background 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease,
    transform 220ms ease,
    clip-path 320ms ease,
    border-radius 320ms ease;
}

html[data-theme="soft"] body {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 186, 219, 0.16), transparent 22%),
    radial-gradient(circle at 84% 16%, rgba(255, 216, 184, 0.1), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(244, 114, 182, 0.1), transparent 30%),
    linear-gradient(180deg, #140a12 0%, #110910 42%, #09050b 100%);
}

html[data-theme="soft"] body::before {
  opacity: 0.68;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.06), transparent 12%),
    repeating-linear-gradient(90deg, transparent 0 128px, rgba(255, 255, 255, 0.025) 128px 129px),
    linear-gradient(118deg, transparent 0 36%, rgba(255, 196, 226, 0.08) 52%, transparent 66%);
}

html[data-theme="soft"] #theme-manifest,
html[data-theme="soft"] #theme-signature,
html[data-theme="soft"] #identity-panel,
html[data-theme="soft"] #signal-strip,
html[data-theme="soft"] #stat-bars,
html[data-theme="soft"] #skills,
html[data-theme="soft"] #intel-panel,
html[data-theme="soft"] .soc-link,
html[data-theme="soft"] #player,
html[data-theme="soft"] #mc-hero,
html[data-theme="soft"] .ops-panel,
html[data-theme="soft"] .service-card,
html[data-theme="soft"] .ops-stat,
html[data-theme="soft"] .ms-meta-row {
  border-radius: 32px !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  background:
    linear-gradient(180deg, rgba(49, 19, 33, 0.84), rgba(18, 9, 15, 0.92)) !important;
  box-shadow:
    0 22px 56px rgba(8, 3, 6, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 0 40px rgba(244, 114, 182, 0.06) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}

html[data-theme="soft"] #theme-signature {
  border-radius: 38px !important;
}

html[data-theme="soft"] #theme-signature-grid {
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

html[data-theme="soft"] .theme-signature-card {
  border-radius: 30px !important;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04) 42%, rgba(255, 181, 221, 0.08) 100%) !important;
  box-shadow:
    0 18px 34px rgba(11, 5, 8, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03) !important;
}

html[data-theme="soft"] .theme-signature-card::before {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -18px;
  width: 116px;
  height: 116px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 72%);
  filter: blur(4px);
}

html[data-theme="soft"] .theme-signature-card:hover {
  transform: translateY(-6px) scale(1.01);
}

html[data-theme="soft"] .hero-action,
html[data-theme="soft"] .theme-btn,
html[data-theme="soft"] .mc-theme-badge {
  border-radius: 999px !important;
}

html[data-theme="soft"] #av-zone {
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.2), rgba(244, 114, 182, 0.1) 56%, rgba(13, 8, 10, 0.86) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 28px 56px rgba(244, 114, 182, 0.18),
    0 0 84px rgba(244, 114, 182, 0.14) !important;
}

html[data-theme="phantom"] body {
  background:
    radial-gradient(circle at 14% 16%, rgba(0, 212, 255, 0.14), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(162, 236, 255, 0.08), transparent 18%),
    radial-gradient(circle at 52% 72%, rgba(0, 212, 255, 0.06), transparent 30%),
    linear-gradient(180deg, #04080d 0%, #050a10 42%, #02050a 100%);
}

html[data-theme="phantom"] body::before {
  opacity: 0.78;
  background:
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(0, 212, 255, 0.05) 95px 96px),
    repeating-linear-gradient(0deg, transparent 0 95px, rgba(174, 220, 240, 0.03) 95px 96px),
    linear-gradient(135deg, transparent 0 44%, rgba(0, 212, 255, 0.08) 52%, transparent 62%);
}

html[data-theme="phantom"] #theme-manifest,
html[data-theme="phantom"] #theme-signature,
html[data-theme="phantom"] #identity-panel,
html[data-theme="phantom"] #signal-strip,
html[data-theme="phantom"] #stat-bars,
html[data-theme="phantom"] #skills,
html[data-theme="phantom"] #intel-panel,
html[data-theme="phantom"] .soc-link,
html[data-theme="phantom"] #player,
html[data-theme="phantom"] #mc-hero,
html[data-theme="phantom"] .ops-panel,
html[data-theme="phantom"] .service-card,
html[data-theme="phantom"] .ops-stat,
html[data-theme="phantom"] .ms-meta-row {
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(7, 17, 24, 0.94), rgba(4, 8, 12, 0.96)) !important;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(194, 248, 255, 0.06),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02),
    0 0 48px rgba(0, 212, 255, 0.07) !important;
}

html[data-theme="phantom"] #theme-manifest,
html[data-theme="phantom"] #theme-signature,
html[data-theme="phantom"] .theme-signature-card,
html[data-theme="phantom"] #mc-hero,
html[data-theme="phantom"] .ops-panel,
html[data-theme="phantom"] .service-card {
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px) !important;
}

html[data-theme="phantom"] #theme-signature-grid {
  grid-template-columns: 1.35fr 0.9fr 0.9fr;
}

html[data-theme="phantom"] .theme-signature-card {
  border-left: 1px solid rgba(0, 212, 255, 0.34) !important;
  border-right: 1px solid rgba(0, 212, 255, 0.22) !important;
}

html[data-theme="phantom"] .theme-signature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(102deg, transparent 0 42%, rgba(162, 236, 255, 0.12) 50%, transparent 58%);
  transform: translateX(-120%);
  animation: panel-sweep 8s linear infinite;
}

html[data-theme="phantom"] .mc-theme-badge {
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border-radius: 0 !important;
}

html[data-theme="phantom"] .hero-action,
html[data-theme="phantom"] .theme-btn {
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.16), 0 0 32px rgba(0, 212, 255, 0.08) !important;
}

html[data-theme="resident"] body {
  background:
    radial-gradient(circle at 16% 14%, rgba(0, 255, 135, 0.1), transparent 20%),
    radial-gradient(circle at 84% 16%, rgba(120, 255, 180, 0.05), transparent 18%),
    linear-gradient(180deg, #040805 0%, #020502 42%, #010301 100%);
}

html[data-theme="resident"] body::before {
  opacity: 0.48 !important;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 255, 135, 0.04) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 120px, rgba(0, 255, 135, 0.02) 120px 121px) !important;
}

html[data-theme="resident"] #theme-manifest,
html[data-theme="resident"] #theme-signature,
html[data-theme="resident"] #identity-panel,
html[data-theme="resident"] #signal-strip,
html[data-theme="resident"] #stat-bars,
html[data-theme="resident"] #skills,
html[data-theme="resident"] #intel-panel,
html[data-theme="resident"] .soc-link,
html[data-theme="resident"] #player,
html[data-theme="resident"] #mc-hero,
html[data-theme="resident"] .ops-panel,
html[data-theme="resident"] .service-card,
html[data-theme="resident"] .ops-stat,
html[data-theme="resident"] .ms-meta-row {
  border: 1px solid rgba(0, 255, 135, 0.24) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(2, 10, 6, 0.96), rgba(1, 4, 2, 0.97)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 135, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="resident"] #theme-signature {
  border-radius: 18px !important;
}

html[data-theme="resident"] #theme-signature::before {
  background: none;
  transform: none;
  opacity: 1;
  animation: none;
}

html[data-theme="resident"] #theme-signature::after {
  background:
    linear-gradient(180deg, rgba(0, 255, 135, 0.08), transparent 12%),
    radial-gradient(circle at 12% 88%, rgba(0, 255, 135, 0.08), transparent 28%);
}

html[data-theme="resident"] .theme-signature-card {
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(2, 8, 5, 0.98), rgba(0, 3, 2, 0.96)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 135, 0.12),
    0 0 0 1px rgba(0, 255, 135, 0.04) !important;
}

html[data-theme="resident"] .theme-signature-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -60%;
  height: 58%;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 135, 0.14), transparent);
  animation: resident-scan 5.6s linear infinite;
}

html[data-theme="resident"] .theme-signature-label,
html[data-theme="resident"] .theme-signature-value,
html[data-theme="resident"] .theme-signature-note,
html[data-theme="resident"] .mc-theme-badge {
  font-family: var(--mono) !important;
  letter-spacing: 0.16em;
}

html[data-theme="resident"] .mc-theme-badge {
  border-radius: 4px !important;
  background: #000 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 135, 0.12) !important;
}

html[data-theme="resident"] #av-zone {
  border: 1px solid rgba(0, 255, 135, 0.28) !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(3, 10, 6, 0.92)) !important;
  box-shadow:
    0 0 0 1px rgba(0, 255, 135, 0.08),
    inset 0 0 0 1px rgba(0, 255, 135, 0.08) !important;
}

html[data-theme="resident"] #av-zone::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(0, 255, 135, 0.14);
  pointer-events: none;
}

html[data-theme="resident"] #av-zone::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 22%;
  height: 1px;
  background: rgba(160, 255, 212, 0.75);
  box-shadow: 0 0 14px rgba(0, 255, 135, 0.4);
  animation: resident-target-scan 3.2s linear infinite;
  opacity: 0.88;
}

html[data-theme="crimson"] body {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 70, 110, 0.12), transparent 20%),
    radial-gradient(circle at 82% 16%, rgba(255, 188, 200, 0.06), transparent 18%),
    radial-gradient(circle at 50% 82%, rgba(255, 45, 85, 0.08), transparent 28%),
    linear-gradient(180deg, #110306 0%, #090204 42%, #040102 100%);
}

html[data-theme="crimson"] body::before {
  opacity: 0.7;
  background:
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(255, 45, 85, 0.04) 140px 141px),
    linear-gradient(135deg, transparent 0 42%, rgba(255, 45, 85, 0.09) 52%, transparent 62%);
}

html[data-theme="crimson"] #theme-manifest,
html[data-theme="crimson"] #theme-signature,
html[data-theme="crimson"] #identity-panel,
html[data-theme="crimson"] #signal-strip,
html[data-theme="crimson"] #stat-bars,
html[data-theme="crimson"] #skills,
html[data-theme="crimson"] #intel-panel,
html[data-theme="crimson"] .soc-link,
html[data-theme="crimson"] #player,
html[data-theme="crimson"] #mc-hero,
html[data-theme="crimson"] .ops-panel,
html[data-theme="crimson"] .service-card,
html[data-theme="crimson"] .ops-stat,
html[data-theme="crimson"] .ms-meta-row {
  border: 1px solid rgba(255, 45, 85, 0.24) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(22, 6, 10, 0.94), rgba(7, 2, 4, 0.97)) !important;
  box-shadow:
    12px 12px 0 rgba(76, 11, 23, 0.55),
    0 24px 50px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="crimson"] #theme-signature {
  border-radius: 22px 22px 22px 48px !important;
}

html[data-theme="crimson"] #theme-signature-grid {
  grid-template-columns: 1.12fr 1fr 0.96fr;
}

html[data-theme="crimson"] .theme-signature-card {
  border-radius: 16px 16px 16px 40px !important;
  background: linear-gradient(180deg, rgba(18, 5, 9, 0.96), rgba(6, 2, 4, 0.98)) !important;
  box-shadow:
    10px 10px 0 rgba(84, 15, 28, 0.5),
    0 0 0 1px rgba(255, 45, 85, 0.08) !important;
}

html[data-theme="crimson"] .theme-signature-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(255, 45, 85, 0.16), rgba(30, 6, 12, 0.98)) !important;
}

html[data-theme="crimson"] .theme-signature-card:hover {
  transform: translate(-4px, -4px);
}

html[data-theme="crimson"] .hero-action,
html[data-theme="crimson"] .theme-btn {
  border-radius: 14px !important;
  box-shadow: 6px 6px 0 rgba(99, 17, 33, 0.45) !important;
}

html[data-theme="crimson"] .mc-theme-badge {
  border-radius: 999px 999px 999px 6px !important;
  background: rgba(255, 45, 85, 0.12) !important;
}

html[data-theme="crimson"] #av-zone {
  border-radius: 18px 18px 18px 48px !important;
  box-shadow:
    14px 14px 0 rgba(91, 14, 31, 0.5),
    0 0 64px rgba(255, 45, 85, 0.14) !important;
}

html[data-theme="crimson"] #av-img-portrait {
  filter: saturate(1.02) contrast(1.08) brightness(0.94);
}

@media (max-width: 1080px) {
  #theme-signature-grid,
  html[data-theme="soft"] #theme-signature-grid,
  html[data-theme="phantom"] #theme-signature-grid,
  html[data-theme="crimson"] #theme-signature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  #theme-signature {
    margin: 0 0.75rem 0.7rem;
    padding: 1rem;
  }

  #theme-signature-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #theme-signature-copy {
    font-size: 0.84rem;
  }

  #theme-signature-grid,
  html[data-theme="soft"] #theme-signature-grid,
  html[data-theme="phantom"] #theme-signature-grid,
  html[data-theme="resident"] #theme-signature-grid,
  html[data-theme="crimson"] #theme-signature-grid {
    grid-template-columns: 1fr !important;
  }

  .theme-signature-card {
    min-height: auto;
  }

  #mc-theme-badges {
    gap: 0.45rem;
  }
}

/* =========================================
   FULLHD + AUDIO-REACTIVE FINAL PASS
========================================= */

:root {
  --audio-bass: 0.08;
  --audio-mid: 0.06;
  --audio-treble: 0.05;
  --audio-energy: 0.07;
  --audio-beat: 0.06;
  --audio-wave: 0.05;
}

.sl-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
}

.sl-copy .sl-label {
  flex: initial;
}

.sl-meta {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#theme-feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 0.65rem;
  width: min(100%, 560px);
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 22, 29, 0.9), rgba(7, 11, 15, 0.88)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 58%);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.24),
    0 0 calc(18px + var(--audio-energy) * 38px) rgba(144, 215, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
  transform: translateZ(26px);
}

#theme-feature::before,
#theme-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#theme-feature::before {
  background:
    linear-gradient(104deg, transparent 0%, transparent 42%, rgba(212, 244, 255, calc(0.08 + var(--audio-energy) * 0.1)) 50%, transparent 58%, transparent 100%);
  opacity: 0.6;
  transform: translateX(-120%);
  animation: panel-sweep 9s linear infinite;
}

#theme-feature::after {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.06), transparent 18%),
    radial-gradient(circle at 86% 84%, var(--accent-soft), transparent 24%);
  opacity: calc(0.5 + var(--audio-wave) * 0.5);
}

#theme-feature-head,
#theme-signature-head {
  position: relative;
  z-index: 1;
}

#theme-feature-kicker {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#theme-feature-title {
  display: block;
  margin-top: 0.22rem;
  color: var(--chrome);
  font-family: var(--display);
  font-size: clamp(1rem, 1.5vw, 1.32rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#theme-feature-copy {
  position: relative;
  z-index: 1;
  max-width: 42ch;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.6;
}

#theme-feature-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theme-feature-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.34rem 0.65rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#theme-feature-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.theme-feature-orb,
.theme-feature-line,
.theme-feature-pulse {
  position: absolute;
  pointer-events: none;
}

.theme-feature-orb {
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.58), rgba(144, 215, 246, 0.18) 48%, transparent 72%);
  filter: blur(2px);
  opacity: calc(0.42 + var(--audio-energy) * 0.36);
}

.theme-feature-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 244, 255, calc(0.22 + var(--audio-wave) * 0.34)), transparent);
}

.theme-feature-pulse {
  width: calc(120px + var(--audio-beat) * 48px);
  height: calc(120px + var(--audio-beat) * 48px);
  right: -18px;
  top: -26px;
  border: 1px solid rgba(212, 244, 255, 0.12);
  border-radius: 26px;
  opacity: calc(0.2 + var(--audio-wave) * 0.36);
}

.orb-1 {
  top: 12%;
  right: 16%;
  width: 42px;
  height: 42px;
}

.orb-2 {
  right: 6%;
  bottom: 16%;
  width: 22px;
  height: 22px;
}

.orb-3 {
  left: 12%;
  bottom: 12%;
  width: 18px;
  height: 18px;
}

.line-1 {
  left: 54%;
  right: 10%;
  top: 32%;
}

.line-2 {
  left: 40%;
  right: 18%;
  bottom: 24%;
}

#av-theme-layer {
  position: absolute;
  inset: -18px;
  z-index: 6;
  pointer-events: none;
}

.av-theme-ring,
.av-theme-node,
.av-theme-beam,
#av-theme-mark {
  position: absolute;
}

.av-theme-ring {
  inset: 8%;
  border: 1px solid rgba(212, 244, 255, 0.12);
  border-radius: 28px;
  opacity: calc(0.24 + var(--audio-energy) * 0.28);
}

.av-theme-ring-b {
  inset: 2%;
  opacity: calc(0.16 + var(--audio-beat) * 0.18);
}

.av-theme-node {
  width: calc(10px + var(--audio-wave) * 5px);
  height: calc(10px + var(--audio-wave) * 5px);
  border-radius: 999px;
  background: rgba(212, 244, 255, 0.34);
  box-shadow: 0 0 calc(8px + var(--audio-energy) * 18px) rgba(212, 244, 255, 0.24);
}

.av-theme-node-1 { top: 8%; left: 16%; }
.av-theme-node-2 { top: 22%; right: 8%; }
.av-theme-node-3 { right: 14%; bottom: 16%; }
.av-theme-node-4 { left: 12%; bottom: 12%; }

.av-theme-beam {
  left: 12%;
  right: 12%;
  top: 48%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 244, 255, calc(0.2 + var(--audio-beat) * 0.28)), transparent);
  opacity: calc(0.24 + var(--audio-wave) * 0.32);
}

#av-theme-mark {
  top: 6%;
  right: 6%;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.25rem 0.52rem;
  border: 1px solid rgba(212, 244, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 10, 14, 0.72);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="home"] #theme-feature,
body[data-page="home"] #signal-strip,
body[data-page="home"] #player,
body[data-page="home"] #intel-panel,
body[data-page="home"] #identity-panel,
body[data-page="home"] .soc-link,
body[data-page="home"] #theme-signature {
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.24),
    0 0 calc(14px + var(--audio-energy) * 36px) rgba(144, 215, 246, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-page="home"] #signal-strip,
body[data-page="home"] #player,
body[data-page="home"] #theme-feature {
  transform: translateZ(26px);
}

body[data-page="home"] #theme-signature {
  margin: 0.95rem clamp(1rem, 2.2vw, 2.6rem) 0.75rem;
}

html[data-theme="soft"] #theme-feature,
html[data-theme="soft"] #theme-feature .theme-feature-tag {
  border-radius: 28px !important;
}

html[data-theme="soft"] #theme-feature {
  background:
    linear-gradient(180deg, rgba(53, 20, 34, 0.88), rgba(20, 10, 15, 0.92)) !important;
}

html[data-theme="soft"] #theme-feature::after {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 218, 235, 0.18), transparent 20%),
    radial-gradient(circle at 88% 84%, rgba(244, 114, 182, 0.16), transparent 24%);
}

html[data-theme="soft"] .theme-feature-orb {
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.72), rgba(255, 186, 220, 0.28) 44%, transparent 74%);
  border-radius: 999px;
}

html[data-theme="soft"] .theme-feature-line {
  background: linear-gradient(90deg, transparent, rgba(255, 220, 235, calc(0.22 + var(--audio-wave) * 0.36)), transparent);
}

html[data-theme="soft"] .theme-feature-pulse {
  border-radius: 999px;
  border-style: dashed;
}

html[data-theme="soft"] .av-theme-ring {
  border-radius: 999px;
  border-style: dashed;
  border-color: rgba(255, 220, 235, 0.22);
}

html[data-theme="soft"] .av-theme-beam {
  display: none;
}

html[data-theme="soft"] .av-theme-node {
  background: transparent;
  box-shadow: none;
}

html[data-theme="soft"] .av-theme-node::before {
  content: "❤";
  position: absolute;
  inset: 0;
  color: rgba(255, 216, 231, 0.88);
  font-size: calc(10px + var(--audio-wave) * 8px);
  text-shadow: 0 0 calc(10px + var(--audio-energy) * 20px) rgba(255, 183, 213, 0.42);
}

html[data-theme="soft"] .av-theme-node-2::before,
html[data-theme="soft"] .av-theme-node-4::before {
  content: "✦";
}

html[data-theme="soft"] #av-theme-mark {
  border-radius: 999px;
  background: rgba(77, 27, 47, 0.8);
}

html[data-theme="phantom"] #theme-feature,
html[data-theme="phantom"] .theme-feature-tag {
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

html[data-theme="phantom"] #theme-feature {
  background:
    linear-gradient(180deg, rgba(7, 17, 24, 0.94), rgba(4, 8, 12, 0.96)) !important;
}

html[data-theme="phantom"] .theme-feature-orb {
  background: linear-gradient(135deg, rgba(166, 237, 255, 0.42), rgba(0, 212, 255, 0.08));
  transform: rotate(18deg);
  border-radius: 6px;
}

html[data-theme="phantom"] .theme-feature-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, calc(0.34 + var(--audio-wave) * 0.38)), transparent);
}

html[data-theme="phantom"] .theme-feature-pulse,
html[data-theme="phantom"] .av-theme-ring {
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

html[data-theme="phantom"] .av-theme-node {
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.56);
}

html[data-theme="phantom"] .av-theme-beam {
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, calc(0.28 + var(--audio-beat) * 0.42)), transparent);
}

html[data-theme="phantom"] #av-theme-mark {
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

html[data-theme="resident"] #theme-feature,
html[data-theme="resident"] #theme-feature .theme-feature-tag {
  border-radius: 14px !important;
}

html[data-theme="resident"] #theme-feature {
  background:
    linear-gradient(180deg, rgba(2, 9, 5, 0.96), rgba(1, 4, 2, 0.97)) !important;
}

html[data-theme="resident"] #theme-feature::before {
  background:
    repeating-linear-gradient(180deg, rgba(0, 255, 135, 0.04) 0 1px, transparent 1px 4px),
    linear-gradient(104deg, transparent 0%, transparent 42%, rgba(170, 255, 219, 0.06) 50%, transparent 58%, transparent 100%);
}

html[data-theme="resident"] .theme-feature-line,
html[data-theme="resident"] .av-theme-beam {
  background: linear-gradient(90deg, transparent, rgba(170, 255, 219, calc(0.28 + var(--audio-beat) * 0.42)), transparent);
}

html[data-theme="resident"] .theme-feature-pulse,
html[data-theme="resident"] .av-theme-ring,
html[data-theme="resident"] #av-theme-mark {
  border-radius: 10px;
}

html[data-theme="resident"] .av-theme-node {
  border-radius: 0;
  background: rgba(160, 255, 212, 0.36);
}

html[data-theme="resident"] #av-theme-mark {
  background: rgba(0, 0, 0, 0.82);
  border-color: rgba(160, 255, 212, 0.2);
}

html[data-theme="crimson"] #theme-feature,
html[data-theme="crimson"] .theme-feature-tag {
  border-radius: 18px 18px 18px 36px !important;
}

html[data-theme="crimson"] #theme-feature {
  background:
    linear-gradient(180deg, rgba(22, 6, 10, 0.94), rgba(7, 2, 4, 0.97)) !important;
  box-shadow:
    12px 12px 0 rgba(76, 11, 23, 0.45),
    0 24px 50px rgba(0, 0, 0, 0.32),
    0 0 calc(14px + var(--audio-energy) * 32px) rgba(255, 45, 85, 0.08) !important;
}

html[data-theme="crimson"] .theme-feature-orb {
  background: radial-gradient(circle at 35% 35%, rgba(255, 180, 196, 0.42), rgba(255, 45, 85, 0.18) 44%, transparent 76%);
}

html[data-theme="crimson"] .theme-feature-line,
html[data-theme="crimson"] .av-theme-beam {
  background: linear-gradient(90deg, transparent, rgba(255, 98, 128, calc(0.26 + var(--audio-wave) * 0.38)), transparent);
}

html[data-theme="crimson"] .theme-feature-pulse,
html[data-theme="crimson"] .av-theme-ring {
  border-radius: 18px 18px 18px 40px;
}

html[data-theme="crimson"] .av-theme-node {
  background: rgba(255, 98, 128, 0.42);
}

html[data-theme="crimson"] #av-theme-mark {
  border-radius: 10px 10px 10px 24px;
  background: rgba(31, 5, 11, 0.84);
}

@media (min-width: 1600px) and (max-height: 1080px) {
  body[data-page="home"] #status-bar {
    margin-top: 0.75rem;
    min-height: 34px;
    padding: 0.38rem 0.92rem;
  }

  body[data-page="home"] #theme-dock {
    margin: 0.55rem clamp(1rem, 2vw, 2.2rem) 0;
  }

  body[data-page="home"] #theme-switcher {
    padding: 0.28rem;
  }

  body[data-page="home"] #theme-manifest {
    gap: 0.58rem;
    width: calc(100% - clamp(2rem, 4vw, 4.4rem));
    margin: 0.55rem auto 0;
    padding: 0.78rem 0.95rem 0.84rem;
  }

  body[data-page="home"] #theme-copy {
    max-width: 62ch;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  body[data-page="home"] #hero {
    min-height: clamp(530px, calc(100svh - 325px), 650px);
    padding: 0.8rem clamp(1rem, 2vw, 2.2rem) 0;
    gap: 1rem;
    grid-template-columns: minmax(250px, 0.82fr) minmax(520px, 1.22fr) minmax(290px, 0.92fr);
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(3.05rem, 4.25vw, 5.1rem);
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.9rem;
  }

  body[data-page="home"] #profile-copy {
    max-width: 31ch;
    margin-top: 0.68rem;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  body[data-page="home"] #identity-flags {
    margin-top: 0.55rem;
    gap: 0.35rem;
  }

  body[data-page="home"] #identity-panel {
    width: min(100%, 338px);
    margin-top: 0.72rem;
    padding: 0.8rem 0.85rem;
  }

  body[data-page="home"] #col-center {
    gap: 0.72rem;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(290px, 22vw, 360px));
  }

  body[data-page="home"] #hero-copy {
    max-width: 35ch;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  body[data-page="home"] #theme-feature {
    padding: 0.78rem 0.9rem 0.85rem;
    gap: 0.55rem;
  }

  body[data-page="home"] #theme-feature-copy {
    font-size: 0.8rem;
  }

  body[data-page="home"] #signal-strip {
    margin-top: 0.12rem;
    padding: 0.78rem 0.9rem;
    gap: 0.55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 122px;
  }

  body[data-page="home"] #stat-bars {
    padding: 0.82rem 0.95rem 0.9rem;
    gap: 0.55rem;
  }

  body[data-page="home"] #skills {
    padding: 0.82rem 0.92rem 0.9rem;
    gap: 0.4rem;
  }

  body[data-page="home"] #col-right {
    gap: 0.72rem;
    padding-left: 0.9rem;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.78rem 0.9rem 0.85rem;
  }

  body[data-page="home"] #socials {
    gap: 0.45rem;
    margin-top: 0.45rem;
  }

  body[data-page="home"] .soc-link {
    padding: 0.78rem 0.92rem;
  }

  body[data-page="home"] .sl-meta {
    font-size: 0.5rem;
  }

  body[data-page="home"] #player {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    min-height: 70px;
    margin: 0.8rem clamp(1rem, 2vw, 2.2rem) 0;
    padding: 1.28rem 1rem 0.78rem;
  }

  body[data-page="home"] #theme-signature {
    margin: 0.9rem clamp(1rem, 2vw, 2.2rem) 0.75rem;
    padding: 0.95rem 1rem 1rem;
  }

  body[data-page="home"] #theme-signature-grid {
    gap: 0.7rem;
  }

  body[data-page="home"] .theme-signature-card {
    min-height: 148px;
  }
}

@media (max-width: 900px) {
  #theme-feature {
    width: 100%;
  }

  .sl-meta {
    font-size: 0.48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #theme-feature::before,
  .theme-feature-orb,
  .theme-feature-line,
  .theme-feature-pulse,
  .av-theme-ring,
  .av-theme-node,
  .av-theme-beam {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 1280px) and (max-height: 1100px) {
  html[data-theme] body[data-page="home"] #col-right {
    align-self: start !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    gap: 0.55rem !important;
    padding: 0 0 0 0.8rem !important;
    background: transparent !important;
    border: none !important;
    border-left: 1px solid rgba(210, 226, 235, 0.08) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body[data-page="home"] #hero {
    grid-template-columns: minmax(190px, 0.68fr) minmax(420px, 1.02fr) minmax(280px, 0.9fr) !important;
    align-items: start !important;
    min-height: clamp(440px, calc(100svh - 350px), 560px) !important;
    gap: 0.85rem !important;
    padding: 0.45rem 0.85rem 0 !important;
    overflow: hidden !important;
  }

  body[data-page="home"] #col-name,
  body[data-page="home"] #col-center,
  body[data-page="home"] #col-right {
    min-height: auto !important;
    padding-top: 0.1rem !important;
    padding-bottom: 0 !important;
    align-self: start !important;
  }

  body[data-page="home"] #col-name {
    justify-content: flex-start !important;
    gap: 0 !important;
  }

  body[data-page="home"] #pre-label {
    margin-bottom: 0.35rem !important;
    font-size: 0.5rem !important;
  }

  body[data-page="home"] #name-giant {
    line-height: 0.72 !important;
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(2.45rem, 3.85vw, 4.7rem) !important;
    letter-spacing: 0.02em !important;
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.5rem !important;
    padding: 0.5rem 0.72rem !important;
    font-size: 0.7rem !important;
  }

  body[data-page="home"] #profile-copy {
    max-width: 22ch !important;
    margin-top: 0.42rem !important;
    font-size: 0.72rem !important;
    line-height: 1.42 !important;
  }

  body[data-page="home"] #identity-flags {
    display: none !important;
  }

  body[data-page="home"] #identity-panel {
    width: min(100%, 280px) !important;
    margin-top: 0.42rem !important;
    padding: 0.62rem 0.72rem 0.68rem !important;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.22rem !important;
    margin-top: 0.42rem !important;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.5rem !important;
  }

  body[data-page="home"] #col-center {
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    padding-inline: 0.3rem !important;
    overflow: hidden !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(250px, 18vw, 320px)) !important;
  }

  body[data-page="home"] #role-block {
    min-height: 34px !important;
    margin-top: 0 !important;
    padding: 0.54rem 0.82rem !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.08em !important;
  }

  body[data-page="home"] #hero-copy {
    max-width: 32ch !important;
    font-size: 0.76rem !important;
    line-height: 1.42 !important;
  }

  body[data-page="home"] #theme-feature {
    width: min(100%, 430px) !important;
    padding: 0.56rem 0.72rem 0.62rem !important;
    gap: 0.34rem !important;
  }

  body[data-page="home"] #theme-feature-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.6rem !important;
  }

  body[data-page="home"] #theme-feature-kicker {
    font-size: 0.48rem !important;
    letter-spacing: 0.16em !important;
  }

  body[data-page="home"] #theme-feature-title {
    margin-top: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
  }

  body[data-page="home"] #theme-feature-copy {
    display: none !important;
  }

  body[data-page="home"] #theme-feature-tags {
    gap: 0.32rem !important;
  }

  body[data-page="home"] .theme-feature-tag {
    min-height: 24px !important;
    padding: 0.18rem 0.48rem !important;
    font-size: 0.44rem !important;
    letter-spacing: 0.08em !important;
  }

  body[data-page="home"] #hero-actions {
    gap: 0.35rem !important;
  }

  body[data-page="home"] .hero-action {
    min-height: 36px !important;
    padding: 0.48rem 0.78rem !important;
    font-size: 0.46rem !important;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills {
    display: none !important;
  }

  body[data-page="home"] #socials::before {
    font-size: 0.46rem !important;
  }

  body[data-page="home"] #right-divider {
    display: none !important;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.62rem 0.72rem 0.68rem !important;
  }

  body[data-page="home"] .intel-row {
    margin-top: 0.28rem !important;
    padding-top: 0.28rem !important;
  }

  body[data-page="home"] .intel-key,
  body[data-page="home"] .intel-val {
    font-size: 0.48rem !important;
  }

  body[data-page="home"] #socials {
    margin-top: 0 !important;
    gap: 0.32rem !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 52px !important;
    padding: 0.54rem 0.68rem !important;
  }

  body[data-page="home"] .sl-num,
  body[data-page="home"] .sl-meta {
    font-size: 0.46rem !important;
  }

  body[data-page="home"] .sl-icon {
    width: 32px !important;
    height: 32px !important;
  }

  body[data-page="home"] .sl-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  body[data-page="home"] #theme-signature {
    margin: 0.55rem 0.85rem 0.5rem !important;
    padding: 0.72rem 0.8rem 0.8rem !important;
  }

  body[data-page="home"] #theme-signature-copy {
    font-size: 0.74rem !important;
    line-height: 1.45 !important;
  }

  body[data-page="home"] #theme-signature-grid {
    gap: 0.55rem !important;
  }

  body[data-page="home"] .theme-signature-card {
    min-height: 112px !important;
    padding: 0.68rem 0.74rem !important;
  }

  body[data-page="home"] #player {
    margin: 0.5rem 0.85rem 0 !important;
    min-height: 56px !important;
    padding: 0.92rem 0.82rem 0.62rem !important;
  }

  body[data-page="home"] #pl-left {
    min-width: 220px !important;
  }
}

body[data-page="home"] #theme-signature {
  display: none !important;
}

@media (min-width: 1180px) and (max-height: 980px) {
  body[data-page="home"] #page {
    height: 100dvh !important;
    padding: 0.52rem 0.85rem 0.42rem !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    gap: 0.24rem !important;
  }

  body[data-page="home"] #status-bar {
    margin: 0.55rem clamp(0.85rem, 1.8vw, 2rem) 0 !important;
    min-height: 34px !important;
    padding: 0.36rem 0.82rem !important;
    font-size: 0.5rem !important;
  }

  body[data-page="home"] #theme-dock {
    margin: 0.38rem clamp(0.85rem, 1.8vw, 2rem) 0 !important;
  }

  body[data-page="home"] #theme-switcher {
    padding: 0.22rem !important;
  }

  body[data-page="home"] .theme-btn {
    padding: 0.34rem 0.76rem !important;
    font-size: 0.5rem !important;
  }

  body[data-page="home"] #theme-manifest {
    display: none !important;
  }

  body[data-page="home"] #ticker {
    display: none !important;
  }

  body[data-page="home"] #hero {
    grid-template-columns: minmax(170px, 0.52fr) minmax(340px, 0.98fr) minmax(250px, 0.74fr) !important;
    align-items: start !important;
    min-height: min(430px, calc(100svh - 150px)) !important;
    gap: 0.65rem !important;
    padding: 0.18rem 0.85rem 0 !important;
    overflow: hidden !important;
  }

  body[data-page="home"] #col-name,
  body[data-page="home"] #col-center,
  body[data-page="home"] #col-right {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    align-self: start !important;
  }

  body[data-page="home"] #col-name {
    justify-content: flex-start !important;
    gap: 0.18rem !important;
    padding-right: 0.72rem !important;
  }

  body[data-page="home"] #pre-label {
    margin-bottom: 0.28rem !important;
    font-size: 0.46rem !important;
  }

  body[data-page="home"] #name-giant {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, max-content)) !important;
    align-content: start !important;
    column-gap: 0.18rem !important;
    row-gap: 0 !important;
    line-height: 0.74 !important;
    max-width: 100% !important;
  }

  body[data-page="home"] .ng-row {
    width: auto !important;
    font-size: clamp(2.15rem, 3.1vw, 3.7rem) !important;
    letter-spacing: 0.02em !important;
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.34rem !important;
    padding: 0.42rem 0.62rem !important;
    font-size: 0.6rem !important;
  }

  body[data-page="home"] #profile-copy {
    max-width: 21ch !important;
    margin-top: 0.34rem !important;
    font-size: 0.66rem !important;
    line-height: 1.36 !important;
  }

  body[data-page="home"] #identity-flags {
    display: none !important;
  }

  body[data-page="home"] #identity-panel {
    width: min(100%, 238px) !important;
    margin-top: 0.34rem !important;
    padding: 0.5rem 0.58rem 0.54rem !important;
    border-radius: 18px !important;
  }

  body[data-page="home"] .identity-grid {
    margin-top: 0.36rem !important;
    gap: 0.18rem !important;
  }

  body[data-page="home"] .identity-item {
    padding-bottom: 0.18rem !important;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.42rem !important;
  }

  body[data-page="home"] #col-center {
    justify-content: flex-start !important;
    gap: 0.34rem !important;
    padding-inline: 0.18rem !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(180px, 14vw, 248px)) !important;
  }

  body[data-page="home"] #role-block {
    min-height: 28px !important;
    padding: 0.38rem 0.64rem !important;
    font-size: 0.5rem !important;
    letter-spacing: 0.08em !important;
  }

  body[data-page="home"] #hero-copy {
    max-width: 28ch !important;
    font-size: 0.66rem !important;
    line-height: 1.32 !important;
  }

  body[data-page="home"] #theme-feature {
    width: min(100%, 336px) !important;
    padding: 0.42rem 0.56rem 0.5rem !important;
    gap: 0.26rem !important;
    border-radius: 18px !important;
  }

  body[data-page="home"] #theme-feature-head {
    gap: 0.4rem !important;
  }

  body[data-page="home"] #theme-feature-kicker {
    font-size: 0.42rem !important;
  }

  body[data-page="home"] #theme-feature-title {
    font-size: 0.58rem !important;
    line-height: 1.05 !important;
  }

  body[data-page="home"] #theme-feature-copy {
    display: none !important;
  }

  body[data-page="home"] #theme-feature-tags {
    gap: 0.24rem !important;
  }

  body[data-page="home"] .theme-feature-tag {
    min-height: 20px !important;
    padding: 0.14rem 0.38rem !important;
    font-size: 0.38rem !important;
    letter-spacing: 0.06em !important;
  }

  body[data-page="home"] #hero-actions {
    gap: 0.28rem !important;
  }

  body[data-page="home"] .hero-action {
    min-height: 32px !important;
    padding: 0.36rem 0.66rem !important;
    font-size: 0.42rem !important;
    border-radius: 13px !important;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills,
  body[data-page="home"] #intel-panel,
  body[data-page="home"] #right-divider {
    display: none !important;
  }

  body[data-page="home"] #col-right {
    justify-content: flex-start !important;
    gap: 0.2rem !important;
    padding-left: 0.74rem !important;
  }

  body[data-page="home"] #socials {
    margin-top: 0 !important;
    gap: 0.26rem !important;
  }

  body[data-page="home"] #socials::before {
    display: none !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 44px !important;
    padding: 0.42rem 0.56rem !important;
    border-radius: 18px !important;
    gap: 0.68rem !important;
  }

  body[data-page="home"] .sl-num,
  body[data-page="home"] .sl-label,
  body[data-page="home"] .sl-meta {
    font-size: 0.42rem !important;
  }

  body[data-page="home"] .sl-icon {
    width: 28px !important;
    height: 28px !important;
  }

  body[data-page="home"] .sl-icon svg {
    width: 11px !important;
    height: 11px !important;
  }

  body[data-page="home"] .sl-arrow {
    display: none !important;
  }

  body[data-page="home"] #player {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 20 !important;
    margin: 0.38rem 0.85rem 0.5rem !important;
    min-height: 50px !important;
    padding: 0.7rem 0.78rem 0.48rem !important;
    border-radius: 18px !important;
  }

  body[data-page="home"] #player::before {
    top: 0.45rem !important;
    left: 0.8rem !important;
    font-size: 0.42rem !important;
  }

  body[data-page="home"] #pl-left {
    min-width: 180px !important;
    gap: 0.54rem !important;
  }

  body[data-page="home"] #pl-track {
    font-size: 0.56rem !important;
  }

  body[data-page="home"] #pl-sub,
  body[data-page="home"] #pl-times {
    font-size: 0.42rem !important;
  }

  body[data-page="home"] #pl-controls {
    gap: 0.34rem !important;
  }

  body[data-page="home"] .plb {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.66rem !important;
  }
}

@media (min-width: 1180px) and (max-height: 820px) {
  body[data-page="home"] #page {
    height: 100dvh !important;
    padding: 0.26rem 0.75rem 0.34rem !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 0.16rem !important;
  }

  body[data-page="home"] #status-bar {
    display: none !important;
  }

  body[data-page="home"] #theme-dock {
    margin-top: 0.28rem !important;
  }

  body[data-page="home"] #hero {
    grid-template-columns: minmax(150px, 0.46fr) minmax(300px, 0.92fr) minmax(220px, 0.68fr) !important;
    min-height: min(340px, calc(100svh - 116px)) !important;
    gap: 0.45rem !important;
    padding-top: 0.08rem !important;
  }

  body[data-page="home"] #col-name {
    justify-content: flex-start !important;
    gap: 0.12rem !important;
  }

  body[data-page="home"] #name-giant {
    display: block !important;
    line-height: 0.7 !important;
  }

  body[data-page="home"] .ng-row {
    display: block !important;
    width: fit-content !important;
    font-size: clamp(1.72rem, 2.2vw, 2.7rem) !important;
  }

  body[data-page="home"] #profile-copy {
    max-width: 18ch !important;
    font-size: 0.6rem !important;
  }

  body[data-page="home"] #identity-panel {
    display: none !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(148px, 11vw, 210px)) !important;
  }

  body[data-page="home"] #hero-copy {
    font-size: 0.6rem !important;
    max-width: 26ch !important;
  }

  body[data-page="home"] #theme-feature {
    width: min(100%, 300px) !important;
  }

  body[data-page="home"] #theme-feature-tags {
    gap: 0.18rem !important;
  }

  body[data-page="home"] .theme-feature-tag {
    font-size: 0.34rem !important;
    padding-inline: 0.3rem !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 40px !important;
    padding: 0.34rem 0.48rem !important;
  }

  body[data-page="home"] #player {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 20 !important;
    margin-top: 0.28rem !important;
    min-height: 44px !important;
    padding-top: 0.62rem !important;
  }

  body[data-page="home"] #ticker {
    display: none !important;
  }
}

/* ==============================================================
   LUXURY POLISH PASS
============================================================== */

#theme-dock::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(38vw, 520px);
  height: 26px;
  border-radius: 999px;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 68%);
  transform: translate(-50%, -50%);
  filter: blur(18px);
  opacity: 0.82;
  pointer-events: none;
}

#theme-switcher {
  position: relative;
  overflow: visible;
}

#theme-switcher::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -14px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 72%);
  filter: blur(14px);
  opacity: calc(0.32 + var(--audio-energy) * 0.44);
  pointer-events: none;
}

.theme-btn {
  position: relative;
  overflow: hidden;
}

.theme-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
  transform: translate(-50%, 7px) scale(0.5);
  opacity: 0;
  box-shadow: 0 0 14px var(--accent-glow);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.theme-btn.is-active::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

#theme-manifest {
  grid-template-columns: minmax(0, 1.18fr) minmax(240px, 0.82fr);
  grid-template-areas:
    "head head"
    "copy stats"
    "perks stats";
  column-gap: 1.1rem;
  row-gap: 0.88rem;
}

#theme-manifest-head {
  grid-area: head;
}

#theme-copy {
  grid-area: copy;
  max-width: 64ch;
}

#theme-perks {
  grid-area: perks;
  align-self: start;
}

#theme-stats {
  grid-area: stats;
  display: grid;
  gap: 0.52rem;
  align-self: stretch;
}

.theme-stat {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.3rem;
  padding: 0.72rem 0.8rem 0.78rem;
  border: 1px solid rgba(210, 226, 235, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 24, 31, 0.86), rgba(8, 12, 16, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 34px rgba(0, 0, 0, 0.16);
}

.theme-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%, transparent 100%);
  opacity: 0.4;
  transform: translateX(-120%);
  animation: panel-sweep 10.5s linear infinite;
  pointer-events: none;
}

.theme-stat-label {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-stat-value {
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soc-link {
  backdrop-filter: blur(22px);
}

.soc-link::before {
  opacity: 0.58;
  animation-duration: 7.6s;
}

.soc-link:hover,
.soc-link:focus-visible {
  transform: translateX(10px);
}

.sl-copy {
  gap: 0.14rem;
}

.sl-meta {
  opacity: 0.82;
  transition: color 0.26s ease, letter-spacing 0.26s ease, opacity 0.26s ease;
}

.soc-link:hover .sl-meta,
.soc-link:focus-visible .sl-meta {
  color: var(--accent-strong);
  letter-spacing: 0.1em;
  opacity: 1;
}

.sl-icon {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.soc-link:hover .sl-icon,
.soc-link:focus-visible .sl-icon {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 20px var(--accent-glow);
  border-color: var(--line-accent);
}

#player {
  --track-progress: 0;
}

#player[data-state="playing"] {
  border-color: var(--line-accent);
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.28),
    0 0 calc(18px + var(--audio-energy) * 38px) var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#player[data-state="preview"] {
  border-color: rgba(210, 226, 235, 0.18);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.24),
    0 0 14px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#pl-text {
  gap: 0.18rem;
}

#pl-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.03);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#player[data-state="playing"] #pl-chip {
  box-shadow: 0 0 16px var(--accent-glow);
}

#player[data-state="preview"] #pl-chip {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
}

#pl-track {
  letter-spacing: 0.09em;
}

#pl-sub {
  letter-spacing: 0.08em;
}

#pl-state {
  letter-spacing: 0.1em;
}

#pl-progress-bar {
  height: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

#pl-progress-fill {
  box-shadow:
    0 0 16px var(--accent-glow),
    0 0 calc(12px + var(--audio-energy) * 18px) var(--accent-glow);
}

#pl-progress-head {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.04),
    0 0 18px var(--accent-glow);
}

#mc-hero {
  backdrop-filter: blur(24px);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

#ops-deck::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-accent), transparent);
  opacity: 0.72;
  pointer-events: none;
}

@media (max-width: 1240px) {
  #theme-manifest {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "copy"
      "perks"
      "stats";
  }

  #theme-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #theme-stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1180px) and (max-height: 980px) {
  body[data-page="home"] #pl-chip,
  body[data-page="home"] #theme-stats {
    display: none !important;
  }
}

@media (min-width: 1180px) and (max-height: 820px) {
  body[data-page="home"] #pl-chip,
  body[data-page="home"] #theme-stats {
    display: none !important;
  }
}

/* ==============================================================
   FINAL MICRO-POLISH
============================================================== */

@media (min-width: 1600px) and (max-height: 1080px) {
  body[data-page="home"] #theme-manifest {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "copy head"
      "perks stats" !important;
    align-items: center !important;
    column-gap: 0.9rem !important;
    row-gap: 0.48rem !important;
    padding: 0.66rem 0.92rem 0.72rem !important;
  }

  body[data-page="home"] #theme-manifest-head {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.55rem !important;
  }

  body[data-page="home"] #theme-title {
    font-size: clamp(1.38rem, 1.9vw, 2rem) !important;
    line-height: 0.94 !important;
  }

  body[data-page="home"] #theme-copy {
    max-width: 54ch !important;
    font-size: 0.72rem !important;
    line-height: 1.38 !important;
  }

  body[data-page="home"] #theme-perks {
    gap: 0.3rem !important;
  }

  body[data-page="home"] #theme-stats {
    grid-template-columns: repeat(3, minmax(116px, 1fr)) !important;
    gap: 0.36rem !important;
  }

  body[data-page="home"] .theme-stat {
    min-height: 0 !important;
    padding: 0.46rem 0.58rem 0.5rem !important;
  }

  body[data-page="home"] .theme-stat-label {
    font-size: 0.46rem !important;
    letter-spacing: 0.1em !important;
  }

  body[data-page="home"] .theme-stat-value {
    font-size: 0.62rem !important;
  }

  body[data-page="home"] #hero {
    grid-template-columns: minmax(220px, 0.74fr) minmax(380px, 1.02fr) minmax(265px, 0.86fr) !important;
    min-height: clamp(420px, calc(100svh - 326px), 520px) !important;
    gap: 0.7rem !important;
    overflow: hidden !important;
  }

  body[data-page="home"] #col-name,
  body[data-page="home"] #col-center,
  body[data-page="home"] #col-right {
    overflow: hidden !important;
  }

  body[data-page="home"] #profile-copy {
    max-width: 24ch !important;
    margin-top: 0.34rem !important;
    font-size: 0.66rem !important;
    line-height: 1.34 !important;
  }

  body[data-page="home"] #identity-panel {
    width: min(100%, 248px) !important;
    margin-top: 0.26rem !important;
    padding: 0.5rem 0.6rem 0.56rem !important;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.18rem !important;
    margin-top: 0.3rem !important;
  }

  body[data-page="home"] .identity-item {
    padding-bottom: 0.22rem !important;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.46rem !important;
  }

  body[data-page="home"] #hero-copy {
    max-width: 30ch !important;
    font-size: 0.72rem !important;
    line-height: 1.34 !important;
  }

  body[data-page="home"] #theme-feature {
    width: min(100%, 392px) !important;
    padding: 0.5rem 0.66rem 0.56rem !important;
    gap: 0.3rem !important;
  }

  body[data-page="home"] #theme-feature-title {
    font-size: 0.66rem !important;
  }

  body[data-page="home"] #theme-feature-copy {
    display: none !important;
  }

  body[data-page="home"] #theme-feature-tags {
    gap: 0.26rem !important;
  }

  body[data-page="home"] .theme-feature-tag {
    min-height: 22px !important;
    padding: 0.14rem 0.42rem !important;
    font-size: 0.4rem !important;
  }

  body[data-page="home"] #hero-actions {
    gap: 0.28rem !important;
  }

  body[data-page="home"] .hero-action {
    min-height: 34px !important;
    padding: 0.42rem 0.7rem !important;
    font-size: 0.44rem !important;
  }

  body[data-page="home"] #player {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 20 !important;
    margin: 0.38rem 0.85rem 0 !important;
    min-height: 58px !important;
    padding: 0.84rem 0.82rem 0.56rem !important;
  }

  body[data-page="home"] #pl-left {
    min-width: 210px !important;
  }
}

/* ==============================================================
   RESPONSIVE OVERHAUL (Fixed Mobile/Small Screen Layout)
   ============================================================== */

@media (max-width: 1200px) {
  #page {
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
  }

  /* Global Order Configuration */
  #status-bar { order: 1 !important; }
  #theme-dock { order: 2 !important; }
  #hero { order: 3 !important; }
  #theme-manifest { order: 4 !important; }
  #player { order: 5 !important; }
  #ticker { order: 6 !important; }

  #hero {
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem !important;
    gap: 1.5rem !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Hero Internal Order */
  #col-center { order: 1 !important; } /* Avatar First */
  #col-name { order: 2 !important; }   /* Name Second */
  #col-right { order: 3 !important; }  /* Socials Third */

  #theme-manifest {
    padding: 1.5rem 1rem !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.2rem !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
  }

  body[data-page="home"] #hero {
    display: flex !important;
    flex-direction: column !important;
  }

  #col-name, #col-center, #col-right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    text-align: center !important;
    align-items: center !important;
  }

  #av-zone {
    margin: 0 auto 1rem !important;
    width: min(280px, 75vw) !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
  }

  #av-img-portrait {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #name-giant {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    font-size: clamp(1.2rem, 10vw, 3.4rem) !important;
    height: auto !important;
    text-align: center !important;
    white-space: nowrap !important;
    margin: 0.5rem 0 1rem !important;
  }

  #pre-label {
    margin-bottom: 0.4rem !important;
  }

  #status-bar {
    margin: 0.5rem !important;
    padding: 0.5rem !important;
    flex-wrap: wrap !important;
    height: auto !important;
    justify-content: center !important;
    gap: 0.4rem !important;
  }

  .sb-sep, .sb-brand, #sb-coords, #sb-hex, .sb-fill {
    display: none !important;
  }

  #theme-dock {
    margin: 0.5rem 0 !important;
    width: 100% !important;
  }

  #theme-switcher {
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 95% !important;
    max-width: 420px !important;
    gap: 0.4rem !important;
  }

  .theme-btn {
    flex: 1 1 40% !important;
    font-size: 0.52rem !important;
    padding: 0.5rem !important;
  }

  #player {
    position: static !important;
    margin: 1rem !important;
    padding: 1.2rem !important;
  }

  #pl-controls {
    gap: 1.2rem !important;
  }

  #socials {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .soc-link {
    width: 100% !important;
    justify-content: center !important;
    transform: none !important;
  }
}

@media (max-width: 500px) {
  #theme-manifest-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.3rem !important;
  }

  #theme-stats {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ==============================================================
   FINAL DESKTOP REBALANCE
   ============================================================== */

@media (min-width: 1201px) {
  body[data-page="home"] {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body[data-page="home"] #page,
  body.mission-control-page #page {
    width: min(100%, 1840px) !important;
    max-width: 1840px !important;
    min-height: 100vh !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  body[data-page="home"] #page {
    padding: clamp(0.9rem, 1.3vw, 1.2rem) clamp(1rem, 1.9vw, 1.9rem) clamp(1.3rem, 2vw, 2rem) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(0.72rem, 1vw, 1rem) !important;
  }

  body[data-page="home"] #status-bar,
  body[data-page="home"] #theme-dock,
  body[data-page="home"] #theme-manifest,
  body[data-page="home"] #hero,
  body[data-page="home"] #player,
  body[data-page="home"] #ticker {
    width: 100% !important;
    margin: 0 !important;
  }

  body[data-page="home"] #status-bar {
    display: flex !important;
    position: sticky !important;
    top: clamp(0.55rem, 0.9vw, 0.85rem) !important;
    min-height: 44px !important;
    padding: 0.56rem 1rem !important;
    z-index: 32 !important;
  }

  body[data-page="home"] #theme-dock {
    margin-top: 0.15rem !important;
  }

  body[data-page="home"] #theme-manifest {
    display: grid !important;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.92fr) !important;
    grid-template-areas:
      "copy head"
      "perks stats" !important;
    align-items: start !important;
    gap: 0.72rem 1.1rem !important;
    padding: 1rem 1.2rem 1.05rem !important;
  }

  body[data-page="home"] #theme-manifest-head {
    grid-area: head !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 0.45rem !important;
    text-align: right !important;
  }

  body[data-page="home"] #theme-mode {
    min-height: 32px !important;
    padding: 0.4rem 0.76rem !important;
    font-size: 0.54rem !important;
  }

  body[data-page="home"] #theme-title {
    font-size: clamp(1.9rem, 2.25vw, 2.7rem) !important;
    line-height: 0.95 !important;
  }

  body[data-page="home"] #theme-copy {
    display: block !important;
    grid-area: copy !important;
    max-width: 62ch !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
  }

  body[data-page="home"] #theme-perks {
    display: flex !important;
    grid-area: perks !important;
    gap: 0.42rem !important;
  }

  body[data-page="home"] .theme-perk {
    min-height: 32px !important;
    padding: 0.28rem 0.62rem !important;
    font-size: 0.48rem !important;
  }

  body[data-page="home"] #theme-stats {
    display: grid !important;
    grid-area: stats !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.52rem !important;
    align-self: stretch !important;
  }

  body[data-page="home"] .theme-stat {
    min-height: 0 !important;
    padding: 0.72rem 0.8rem 0.78rem !important;
  }

  body[data-page="home"] #hero {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0.4rem 0 0 !important;
    grid-template-columns: minmax(280px, 0.86fr) minmax(520px, 1.36fr) minmax(340px, 1fr) !important;
    gap: clamp(1rem, 1.55vw, 1.7rem) !important;
    align-items: start !important;
    overflow: visible !important;
  }

  body[data-page="home"] #hero::before {
    inset: 0.65rem 24% 1rem 10% !important;
    opacity: 0.54 !important;
  }

  body[data-page="home"] #hero::after {
    inset: 4% 16% 8% !important;
    filter: blur(36px) !important;
    opacity: 0.74 !important;
  }

  body[data-page="home"] #col-name,
  body[data-page="home"] #col-center,
  body[data-page="home"] #col-right {
    min-height: 0 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  body[data-page="home"] #col-name {
    justify-content: flex-start !important;
    gap: 0.8rem !important;
    padding-right: clamp(0.85rem, 1.3vw, 1.2rem) !important;
  }

  body[data-page="home"] #pre-label {
    margin-bottom: 0.5rem !important;
    font-size: 0.56rem !important;
  }

  body[data-page="home"] #name-giant {
    line-height: 0.8 !important;
  }

  body[data-page="home"] .ng-row {
    width: fit-content !important;
    font-size: clamp(3.1rem, 4.25vw, 5.3rem) !important;
    letter-spacing: 0.025em !important;
  }

  body[data-page="home"] #user-handle {
    margin-top: 0.2rem !important;
    padding: 0.72rem 0.98rem !important;
    font-size: 0.8rem !important;
  }

  body[data-page="home"] #profile-copy {
    display: block !important;
    max-width: 26ch !important;
    margin-top: 0.18rem !important;
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
  }

  body[data-page="home"] #identity-flags {
    display: flex !important;
    max-width: none !important;
    margin-top: 0.12rem !important;
    gap: 0.38rem !important;
  }

  body[data-page="home"] .identity-flag {
    font-size: 0.46rem !important;
  }

  body[data-page="home"] #identity-panel {
    display: block !important;
    width: 100% !important;
    margin-top: 0.42rem !important;
    padding: 0.86rem 0.98rem 0.92rem !important;
  }

  body[data-page="home"] .identity-grid {
    gap: 0.4rem !important;
    margin-top: 0.58rem !important;
  }

  body[data-page="home"] .identity-key,
  body[data-page="home"] .identity-val {
    font-size: 0.54rem !important;
  }

  body[data-page="home"] #col-center {
    justify-content: flex-start !important;
    gap: 0.95rem !important;
    padding-inline: clamp(0.3rem, 0.8vw, 0.85rem) !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(320px, 23vw, 410px)) !important;
    margin-top: 0.15rem !important;
  }

  body[data-page="home"] #role-block {
    min-height: 40px !important;
    padding: 0.72rem 1rem !important;
    font-size: 0.72rem !important;
  }

  body[data-page="home"] #hero-copy {
    display: block !important;
    max-width: 44ch !important;
    font-size: 0.92rem !important;
    line-height: 1.52 !important;
  }

  body[data-page="home"] #theme-feature {
    width: 100% !important;
    max-width: 780px !important;
    padding: 0.84rem 0.96rem 0.92rem !important;
    gap: 0.54rem !important;
  }

  body[data-page="home"] #theme-feature-copy {
    display: block !important;
    max-width: 54ch !important;
    font-size: 0.8rem !important;
    line-height: 1.48 !important;
  }

  body[data-page="home"] #theme-feature-tags {
    gap: 0.34rem !important;
  }

  body[data-page="home"] .theme-feature-tag {
    min-height: 24px !important;
    font-size: 0.43rem !important;
  }

  body[data-page="home"] #hero-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 0.55rem !important;
  }

  body[data-page="home"] .hero-action {
    min-height: 42px !important;
    padding: 0.62rem 1rem !important;
    font-size: 0.5rem !important;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills {
    width: 100% !important;
    max-width: 780px !important;
  }

  body[data-page="home"] #signal-strip {
    padding: 0.96rem 1.08rem !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 132px !important;
    gap: 0.58rem !important;
  }

  body[data-page="home"] .sig-key {
    font-size: 0.48rem !important;
  }

  body[data-page="home"] .sig-val {
    font-size: 0.7rem !important;
  }

  body[data-page="home"] #signal-wave {
    min-height: 28px !important;
    gap: 0.24rem !important;
    padding-left: 0.68rem !important;
  }

  body[data-page="home"] #stat-bars {
    gap: 0.52rem !important;
    padding: 0.98rem 1.08rem 1.04rem !important;
  }

  body[data-page="home"] #skills {
    justify-content: flex-start !important;
    padding: 0.98rem 1.08rem 1.04rem !important;
    gap: 0.42rem !important;
  }

  body[data-page="home"] #skills::before {
    text-align: left !important;
  }

  body[data-page="home"] .sk {
    font-size: 0.52rem !important;
  }

  body[data-page="home"] #col-right {
    justify-content: flex-start !important;
    gap: 1rem !important;
    padding-left: clamp(0.85rem, 1.25vw, 1.25rem) !important;
  }

  body[data-page="home"] #right-divider {
    margin-bottom: 0.24rem !important;
  }

  body[data-page="home"] #intel-panel {
    padding: 0.98rem 1.05rem 1.02rem !important;
  }

  body[data-page="home"] .intel-key,
  body[data-page="home"] .intel-val {
    font-size: 0.58rem !important;
  }

  body[data-page="home"] .intel-val {
    max-width: 68% !important;
  }

  body[data-page="home"] #socials {
    display: grid !important;
    width: 100% !important;
    margin-top: 0.12rem !important;
    gap: 0.72rem !important;
  }

  body[data-page="home"] #socials::before {
    text-align: left !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 84px !important;
    padding: 0.98rem 1rem !important;
  }

  body[data-page="home"] .sl-arrow {
    display: block !important;
    opacity: 0.52 !important;
    transform: none !important;
  }

  body[data-page="home"] .soc-link:hover .sl-arrow,
  body[data-page="home"] .soc-link:focus-visible .sl-arrow {
    opacity: 1 !important;
  }

  body[data-page="home"] #player {
    display: flex !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    min-height: 82px !important;
    margin-top: 0.9rem !important;
    padding: 1.28rem 1.18rem 0.86rem !important;
    gap: 0.8rem 1.08rem !important;
    z-index: 22 !important;
  }

  body[data-page="home"] #pl-left {
    flex: 0 1 300px !important;
    min-width: 260px !important;
    gap: 0.72rem !important;
  }

  body[data-page="home"] #pl-chip {
    display: inline-flex !important;
  }

  body[data-page="home"] #pl-progress-wrap {
    flex: 1 1 420px !important;
    min-width: 300px !important;
  }

  body[data-page="home"] #pl-controls {
    gap: 0.52rem !important;
  }

  body[data-page="home"] #pl-vol {
    margin-left: 0 !important;
  }

  body[data-page="home"] #vol-slider {
    width: 116px !important;
  }

  body[data-page="home"] #ticker {
    display: flex !important;
    margin-top: 0.72rem !important;
  }

  body.mission-control-page #theme-manifest {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr) !important;
    grid-template-areas:
      "copy head"
      "perks stats" !important;
    align-items: start !important;
    gap: 0.68rem 1rem !important;
    padding: 0.98rem 1.18rem 1.02rem !important;
  }

  body.mission-control-page #theme-manifest-head {
    grid-area: head !important;
    align-items: flex-end !important;
    text-align: right !important;
  }

  body.mission-control-page #theme-copy {
    grid-area: copy !important;
    max-width: 60ch !important;
    font-size: 0.88rem !important;
  }

  body.mission-control-page #theme-perks {
    grid-area: perks !important;
  }

  body.mission-control-page #theme-stats {
    display: grid !important;
    grid-area: stats !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.48rem !important;
  }

  body.mission-control-page #mc-shell {
    gap: 1.15rem !important;
    padding: 1.45rem clamp(1rem, 1.9vw, 1.8rem) 0 !important;
  }

  body.mission-control-page #mc-hero {
    padding: 1.18rem 1.22rem 1.28rem !important;
  }

  body.mission-control-page #mc-title {
    max-width: 18ch !important;
    font-size: clamp(2rem, 2.5vw, 3rem) !important;
  }

  body.mission-control-page #mc-copy {
    max-width: 70ch !important;
    font-size: 0.94rem !important;
    line-height: 1.66 !important;
  }

  body.mission-control-page #ops-head {
    align-items: end !important;
    gap: 1rem !important;
  }

  body.mission-control-page #ops-grid {
    grid-template-columns: minmax(300px, 0.85fr) minmax(520px, 1.38fr) minmax(320px, 0.92fr) !important;
    gap: 1.05rem !important;
  }

  body.mission-control-page #mission-selector-panel,
  body.mission-control-page #ops-timeline-panel,
  body.mission-control-page #contract-board,
  body.mission-control-page #intel-vault {
    padding: 1.08rem 1.08rem 1.12rem !important;
  }

  body.mission-control-page #service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
}

@media (min-width: 1201px) and (max-height: 1120px) {
  body[data-page="home"] #theme-manifest {
    padding: 0.9rem 1.12rem 0.96rem !important;
  }

  body[data-page="home"] .ng-row {
    font-size: clamp(2.95rem, 4vw, 5rem) !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(300px, 21vw, 380px)) !important;
  }

  body[data-page="home"] #theme-feature {
    padding: 0.74rem 0.88rem 0.8rem !important;
  }

  body[data-page="home"] #theme-feature-copy {
    font-size: 0.76rem !important;
  }

  body[data-page="home"] #player {
    min-height: 76px !important;
    padding: 1.14rem 1.08rem 0.8rem !important;
  }
}

@media (min-width: 2200px) {
  body[data-page="home"] #page,
  body.mission-control-page #page {
    max-width: 2060px !important;
  }

  body[data-page="home"] #theme-manifest {
    grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.95fr) !important;
    padding: 1.08rem 1.32rem 1.12rem !important;
  }

  body[data-page="home"] #theme-title {
    font-size: clamp(2.1rem, 2vw, 3rem) !important;
  }

  body[data-page="home"] #hero {
    grid-template-columns: minmax(320px, 0.88fr) minmax(620px, 1.55fr) minmax(390px, 1.04fr) !important;
    gap: clamp(1.2rem, 1.7vw, 2rem) !important;
  }

  body[data-page="home"] #av-zone {
    width: min(100%, clamp(380px, 21vw, 470px)) !important;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills,
  body[data-page="home"] #theme-feature {
    max-width: 860px !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 92px !important;
  }

  body.mission-control-page #ops-grid {
    grid-template-columns: minmax(320px, 0.88fr) minmax(680px, 1.5fr) minmax(360px, 0.98fr) !important;
  }
}

/* ==============================================================
   FINAL THEME REFINEMENT + PERFORMANCE TUNE
   ============================================================== */

html[data-theme] .panel-kicker,
html[data-theme] #theme-copy,
html[data-theme] #hero-copy,
html[data-theme] #mc-copy,
html[data-theme] #ops-copy {
  transition:
    color 220ms ease,
    letter-spacing 220ms ease,
    text-shadow 220ms ease;
}

html[data-theme] #status-bar,
html[data-theme] #theme-switcher,
html[data-theme] .theme-btn,
html[data-theme] .hero-action,
html[data-theme] .theme-feature-tag,
html[data-theme] .mc-theme-badge {
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms ease,
    color 180ms ease;
}

html[data-theme] #theme-title,
html[data-theme] #mc-title {
  transition:
    color 220ms ease,
    text-shadow 220ms ease,
    filter 220ms ease,
    letter-spacing 220ms ease;
}

html[data-theme] #av-zone {
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    border-radius 220ms ease,
    transform 220ms ease;
}

html[data-theme] #av-img-portrait {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  mix-blend-mode: normal !important;
}

html[data-theme="soft"] #status-bar,
html[data-theme="soft"] #theme-switcher {
  background: linear-gradient(180deg, rgba(58, 25, 40, 0.9), rgba(25, 12, 18, 0.9)) !important;
  box-shadow:
    0 18px 40px rgba(18, 7, 12, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="soft"] #status-bar,
html[data-theme="soft"] #theme-switcher {
  border-color: rgba(255, 215, 231, 0.12) !important;
}

html[data-theme="soft"] .theme-btn,
html[data-theme="soft"] .hero-action,
html[data-theme="soft"] .theme-feature-tag,
html[data-theme="soft"] .mc-theme-badge {
  background: linear-gradient(180deg, rgba(255, 245, 250, 0.09), rgba(244, 114, 182, 0.04)) !important;
  border-color: rgba(255, 219, 235, 0.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 20px rgba(26, 8, 15, 0.16) !important;
}

html[data-theme="soft"] .theme-btn.is-active,
html[data-theme="soft"] .hero-action-primary {
  background: linear-gradient(180deg, rgba(255, 236, 246, 0.16), rgba(244, 114, 182, 0.08)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 24px rgba(34, 10, 21, 0.2) !important;
}

html[data-theme="soft"] #theme-title,
html[data-theme="soft"] #mc-title {
  color: #ffe7f3 !important;
  text-shadow: 0 10px 24px rgba(244, 114, 182, 0.16) !important;
  letter-spacing: 0.02em !important;
  filter: none !important;
}

html[data-theme="soft"] .panel-kicker {
  color: rgba(255, 220, 235, 0.78) !important;
}

html[data-theme="soft"] #theme-manifest,
html[data-theme="soft"] #theme-feature,
html[data-theme="soft"] #player,
html[data-theme="soft"] #mc-hero,
html[data-theme="soft"] .ops-panel,
html[data-theme="soft"] .service-card {
  background: linear-gradient(180deg, rgba(53, 22, 36, 0.9), rgba(20, 10, 16, 0.94)) !important;
  border-color: rgba(255, 225, 239, 0.14) !important;
  box-shadow:
    0 20px 44px rgba(16, 5, 11, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="soft"] #theme-manifest::before,
html[data-theme="soft"] #theme-feature::before,
html[data-theme="soft"] #mc-hero::before,
html[data-theme="soft"] .ops-panel::before,
html[data-theme="soft"] .service-card::before {
  opacity: 0.42 !important;
}

html[data-theme="soft"] .soc-link {
  background: linear-gradient(180deg, rgba(58, 22, 38, 0.9), rgba(23, 10, 17, 0.92)) !important;
  border-color: rgba(255, 225, 239, 0.12) !important;
}

html[data-theme="soft"] .soc-link::before {
  opacity: 0.5 !important;
}

html[data-theme="soft"] .soc-link::after {
  opacity: 0.34;
}

html[data-theme="soft"] #av-zone {
  animation: none !important;
  clip-path: none !important;
  border-radius: 28px !important;
  border: 1px solid rgba(255, 218, 234, 0.2) !important;
  box-shadow:
    0 20px 48px rgba(244, 114, 182, 0.18) !important;
}

html[data-theme="soft"] #av-img-portrait {
  clip-path: none !important;
  border-radius: 22px !important;
  filter: saturate(1.02) brightness(0.96) !important;
}

html[data-theme="phantom"] #status-bar,
html[data-theme="phantom"] #theme-switcher {
  background: linear-gradient(180deg, rgba(4, 15, 22, 0.96), rgba(2, 7, 11, 0.96)) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(0, 212, 255, 0.1) !important;
}

html[data-theme="phantom"] #status-bar,
html[data-theme="phantom"] #theme-switcher {
  border-color: rgba(0, 212, 255, 0.16) !important;
}

html[data-theme="phantom"] .theme-btn,
html[data-theme="phantom"] .hero-action,
html[data-theme="phantom"] .theme-feature-tag,
html[data-theme="phantom"] .mc-theme-badge {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.07), rgba(4, 15, 22, 0.96)) !important;
  border-color: rgba(0, 212, 255, 0.18) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 212, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="phantom"] .theme-btn:hover,
html[data-theme="phantom"] .hero-action:hover,
html[data-theme="phantom"] .hero-action:focus-visible {
  transform: translateY(-1px) !important;
}

html[data-theme="phantom"] .theme-btn.is-active,
html[data-theme="phantom"] .hero-action-primary {
  background: linear-gradient(180deg, rgba(120, 236, 255, 0.14), rgba(4, 16, 24, 0.98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(162, 236, 255, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="phantom"] #theme-title,
html[data-theme="phantom"] #mc-title {
  color: #e9fbff !important;
  text-shadow:
    0 0 14px rgba(0, 212, 255, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.24) !important;
  filter: none !important;
}

html[data-theme="phantom"] .panel-kicker {
  color: rgba(120, 236, 255, 0.72) !important;
}

html[data-theme="phantom"] #theme-manifest,
html[data-theme="phantom"] #theme-feature,
html[data-theme="phantom"] #player,
html[data-theme="phantom"] #mc-hero,
html[data-theme="phantom"] .ops-panel,
html[data-theme="phantom"] .service-card {
  background: linear-gradient(180deg, rgba(4, 14, 20, 0.96), rgba(2, 7, 11, 0.98)) !important;
  border-color: rgba(0, 212, 255, 0.2) !important;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(194, 248, 255, 0.08) !important;
}

html[data-theme="phantom"] #theme-manifest::before,
html[data-theme="phantom"] #theme-feature::before,
html[data-theme="phantom"] #mc-hero::before,
html[data-theme="phantom"] .ops-panel::before,
html[data-theme="phantom"] .service-card::before {
  opacity: 0.46 !important;
}

html[data-theme="phantom"] .soc-link {
  background: linear-gradient(180deg, rgba(4, 13, 19, 0.96), rgba(2, 7, 11, 0.98)) !important;
  border-color: rgba(0, 212, 255, 0.18) !important;
}

html[data-theme="phantom"] .soc-link::before {
  opacity: 0.46 !important;
}

html[data-theme="phantom"] .soc-link::after {
  box-shadow: none;
}

html[data-theme="phantom"] #av-zone {
  background: rgba(1, 18, 27, 0.58) !important;
  backdrop-filter: none !important;
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.12) !important;
}

html[data-theme="phantom"] #av-img-portrait {
  filter: saturate(0.98) contrast(1.06) brightness(0.94) !important;
}

html[data-theme="resident"] #status-bar,
html[data-theme="resident"] #theme-switcher {
  background: linear-gradient(180deg, rgba(0, 8, 4, 0.98), rgba(0, 3, 2, 0.98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 135, 0.1),
    0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="resident"] #status-bar,
html[data-theme="resident"] #theme-switcher {
  border-color: rgba(0, 255, 135, 0.14) !important;
}

html[data-theme="resident"] .theme-btn,
html[data-theme="resident"] .hero-action,
html[data-theme="resident"] .theme-feature-tag,
html[data-theme="resident"] .mc-theme-badge {
  background: linear-gradient(180deg, rgba(0, 255, 135, 0.05), rgba(0, 0, 0, 0.92)) !important;
  border-color: rgba(0, 255, 135, 0.2) !important;
  border-radius: 6px !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 135, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="resident"] .theme-btn.is-active,
html[data-theme="resident"] .hero-action-primary {
  box-shadow:
    inset 0 0 0 1px rgba(160, 255, 212, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="resident"] #theme-title,
html[data-theme="resident"] #mc-title {
  color: #d8ffe8 !important;
  text-shadow:
    0 0 12px rgba(0, 255, 135, 0.1),
    0 10px 20px rgba(0, 0, 0, 0.22) !important;
  letter-spacing: 0.08em !important;
}

html[data-theme="resident"] .panel-kicker,
html[data-theme="resident"] .sl-meta,
html[data-theme="resident"] .ops-stat-key,
html[data-theme="resident"] .ms-key {
  font-family: var(--mono) !important;
}

html[data-theme="resident"] #theme-manifest,
html[data-theme="resident"] #theme-feature,
html[data-theme="resident"] #player,
html[data-theme="resident"] #mc-hero,
html[data-theme="resident"] .ops-panel,
html[data-theme="resident"] .service-card {
  background: linear-gradient(180deg, rgba(0, 8, 4, 0.98), rgba(0, 3, 2, 0.98)) !important;
  border-color: rgba(0, 255, 135, 0.2) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 135, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="resident"] #theme-manifest::before,
html[data-theme="resident"] #theme-feature::before,
html[data-theme="resident"] #mc-hero::before,
html[data-theme="resident"] .ops-panel::before,
html[data-theme="resident"] .service-card::before {
  opacity: 0.38 !important;
}

html[data-theme="resident"] .soc-link {
  background: linear-gradient(180deg, rgba(0, 8, 4, 0.98), rgba(0, 3, 2, 0.98)) !important;
}

html[data-theme="resident"] .soc-link::before {
  opacity: 0.42 !important;
}

html[data-theme="resident"] .soc-link::after {
  opacity: 0.38;
}

html[data-theme="resident"] #av-zone {
  clip-path: none !important;
  border-radius: 18px !important;
  border: 1px solid rgba(0, 255, 135, 0.22) !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 255, 135, 0.08) !important;
}

html[data-theme="resident"] #av-zone::after {
  opacity: 0.56 !important;
}

html[data-theme="resident"] #av-img-portrait {
  clip-path: none !important;
  border-radius: 12px !important;
  filter: grayscale(0.45) sepia(0.28) hue-rotate(56deg) contrast(1.18) brightness(0.9) !important;
}

html[data-theme="crimson"] #status-bar,
html[data-theme="crimson"] #theme-switcher {
  background: linear-gradient(180deg, rgba(26, 6, 11, 0.96), rgba(8, 2, 4, 0.98)) !important;
  box-shadow:
    8px 8px 0 rgba(83, 14, 29, 0.3),
    0 16px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 200, 210, 0.08) !important;
}

html[data-theme="crimson"] .theme-btn,
html[data-theme="crimson"] .hero-action,
html[data-theme="crimson"] .theme-feature-tag,
html[data-theme="crimson"] .mc-theme-badge {
  background: linear-gradient(180deg, rgba(255, 45, 85, 0.08), rgba(18, 5, 9, 0.96)) !important;
  border-color: rgba(255, 98, 128, 0.2) !important;
  box-shadow:
    5px 5px 0 rgba(84, 15, 28, 0.32),
    0 12px 24px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="crimson"] .theme-btn.is-active,
html[data-theme="crimson"] .hero-action-primary {
  background: linear-gradient(180deg, rgba(255, 180, 196, 0.12), rgba(26, 7, 12, 0.98)) !important;
  box-shadow:
    6px 6px 0 rgba(99, 17, 33, 0.38),
    0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="crimson"] #theme-title,
html[data-theme="crimson"] #mc-title {
  color: #ffe4ea !important;
  text-shadow: 0 12px 24px rgba(255, 45, 85, 0.16) !important;
  filter: none !important;
}

html[data-theme="crimson"] .panel-kicker {
  color: rgba(255, 180, 196, 0.74) !important;
}

html[data-theme="crimson"] #theme-manifest,
html[data-theme="crimson"] #theme-feature,
html[data-theme="crimson"] #player,
html[data-theme="crimson"] #mc-hero,
html[data-theme="crimson"] .ops-panel,
html[data-theme="crimson"] .service-card {
  background: linear-gradient(180deg, rgba(20, 5, 9, 0.98), rgba(6, 2, 4, 0.99)) !important;
  border-color: rgba(255, 98, 128, 0.18) !important;
  box-shadow:
    10px 10px 0 rgba(81, 13, 27, 0.34),
    0 20px 40px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="crimson"] #theme-manifest::before,
html[data-theme="crimson"] #theme-feature::before,
html[data-theme="crimson"] #mc-hero::before,
html[data-theme="crimson"] .ops-panel::before,
html[data-theme="crimson"] .service-card::before {
  opacity: 0.42 !important;
}

html[data-theme="crimson"] .soc-link {
  background: linear-gradient(180deg, rgba(18, 5, 9, 0.98), rgba(6, 2, 4, 0.99)) !important;
}

html[data-theme="crimson"] .soc-link::before {
  opacity: 0.42 !important;
}

html[data-theme="crimson"] .soc-link::after {
  opacity: 0.42;
}

html[data-theme="crimson"] #av-zone {
  box-shadow:
    8px 8px 0 rgba(91, 14, 31, 0.34),
    0 18px 38px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="crimson"] #av-img-portrait {
  clip-path: none !important;
  border-radius: 14px 14px 14px 28px !important;
  filter: saturate(1.04) contrast(1.08) brightness(0.94) !important;
}

body.lite-fx::after {
  animation: none !important;
  filter: none !important;
  opacity: 0.3 !important;
}

body.lite-fx #bg-canvas {
  opacity: 0.72;
}

body.lite-fx #av-pulse,
body.lite-fx #av-pulse2,
body.lite-fx #av-theme-layer,
body.lite-fx #av-target,
body.lite-fx #av-scan-label {
  display: none !important;
}

body.lite-fx #av-orbit::before,
body.lite-fx #av-orbit::after,
body.lite-fx #signal-wave span {
  animation: none !important;
}

body.lite-fx #status-bar,
body.lite-fx #theme-switcher,
body.lite-fx #theme-manifest,
body.lite-fx #theme-feature,
body.lite-fx #player,
body.lite-fx #mc-hero,
body.lite-fx .ops-panel,
body.lite-fx .service-card,
body.lite-fx .soc-link {
  backdrop-filter: blur(10px) !important;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.lite-fx #theme-manifest::before,
body.lite-fx #theme-feature::before,
body.lite-fx #player::after,
body.lite-fx #mc-hero::before,
body.lite-fx .ops-panel::before,
body.lite-fx .service-card::before,
body.lite-fx .soc-link::before,
body.lite-fx .soc-link::after {
  opacity: 0.22 !important;
}

/* ==============================================================
   FINAL LUXURY POLISH PASS
   ============================================================== */

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  scrollbar-gutter: stable both-edges;
}

#theme-title,
#mc-title,
#ops-title,
#theme-feature-title,
.mission-heading {
  text-wrap: balance;
}

#theme-copy,
#hero-copy,
#profile-copy,
#mc-copy,
#ops-copy,
#theme-feature-copy,
.mission-copy,
.ops-log-copy,
.service-item {
  text-wrap: pretty;
}

#theme-manifest,
#theme-feature,
#identity-panel,
#signal-strip,
#intel-panel,
#stat-bars,
#skills,
#player,
#mc-hero,
.ops-panel,
.service-card,
.soc-link,
.ops-stat,
.ms-meta-row {
  border-color: rgba(210, 226, 235, 0.12);
}

.hero-action,
.mission-action,
.service-action,
#vault-close,
.soc-link,
.service-card,
.ops-log-item,
.mission-node {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.hero-action:hover,
.hero-action:focus-visible {
  animation: none !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), 0 0 18px rgba(144, 215, 246, 0.08);
}

.soc-link:hover,
.soc-link:focus-visible,
.service-card:hover,
.service-card:focus-within,
.ops-log-item:hover,
.mission-node:hover,
.mission-node:focus-visible {
  transform: translateY(-3px);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.service-list {
  flex: 1 1 auto;
}

.service-actions {
  margin-top: auto;
  padding-top: 0.2rem;
}

#ticker {
  border-color: rgba(210, 226, 235, 0.12);
}

#ticker-inner {
  animation-duration: 54s;
}

#mc-hero::after {
  content: "";
  position: absolute;
  inset: auto -6% -22% auto;
  width: min(36vw, 420px);
  height: min(36vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(144, 215, 246, 0.1), transparent 68%);
  pointer-events: none;
  opacity: 0.46;
}

#ops-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  align-items: end;
}

#ops-head-stats {
  align-content: start;
}

@media (min-width: 1201px) {
  body[data-page="home"] #theme-manifest {
    gap: 0.82rem 1.2rem !important;
    padding: 1.04rem 1.24rem 1.08rem !important;
  }

  body[data-page="home"] #theme-copy {
    max-width: 58ch !important;
  }

  body[data-page="home"] #col-name {
    gap: 0.88rem !important;
  }

  body[data-page="home"] #col-center {
    gap: 1.02rem !important;
  }

  body[data-page="home"] #col-right {
    gap: 0.92rem !important;
  }

  body[data-page="home"] #theme-feature {
    max-width: 760px !important;
    padding: 0.92rem 1rem 0.98rem !important;
  }

  body[data-page="home"] #signal-strip,
  body[data-page="home"] #stat-bars,
  body[data-page="home"] #skills {
    max-width: 760px !important;
  }

  body[data-page="home"] #socials {
    gap: 0.62rem !important;
  }

  body[data-page="home"] .soc-link {
    min-height: 80px !important;
  }

  body.mission-control-page #mc-hero {
    grid-template-columns: minmax(0, 1.14fr) minmax(280px, 0.86fr);
    grid-template-areas:
      "kicker badges"
      "title badges"
      "copy actions";
    align-items: start;
    gap: 0.9rem 1.1rem !important;
    min-height: 0;
  }

  body.mission-control-page #mc-kicker {
    grid-area: kicker;
    align-self: end;
  }

  body.mission-control-page #mc-title {
    grid-area: title;
    max-width: 14ch !important;
  }

  body.mission-control-page #mc-copy {
    grid-area: copy;
    max-width: 58ch !important;
    margin-top: 0;
  }

  body.mission-control-page #mc-theme-badges {
    grid-area: badges;
    justify-content: flex-end;
    align-self: start;
    margin-left: auto;
    max-width: 360px;
  }

  body.mission-control-page #mc-actions {
    grid-area: actions;
    justify-content: flex-end;
    align-self: end;
  }

  body.mission-control-page #mc-actions .hero-action {
    min-width: 168px;
  }

  body.mission-control-page #ops-head {
    gap: 1.1rem !important;
  }

  body.mission-control-page #ops-copy {
    max-width: 58ch;
  }

  body.mission-control-page #service-grid {
    gap: 1.05rem !important;
  }
}

@supports (content-visibility: auto) {
  body[data-page="home"] #player,
  body[data-page="home"] #ticker,
  body.mission-control-page #ops-deck,
  body.mission-control-page #ticker {
    content-visibility: auto;
    contain-intrinsic-size: 720px;
  }

  body.mission-control-page #mission-selector-panel,
  body.mission-control-page #mission-detail-panel,
  body.mission-control-page #ops-timeline-panel,
  body.mission-control-page #contract-board,
  body.mission-control-page #intel-vault {
    content-visibility: auto;
    contain-intrinsic-size: 560px;
  }
}

body.lite-fx #status-bar::after,
body.lite-fx #identity-panel::after,
body.lite-fx #signal-strip::after,
body.lite-fx #intel-panel::after,
body.lite-fx #stat-bars::after,
body.lite-fx #skills::after,
body.lite-fx #ticker::before,
body.lite-fx #ticker-inner,
body.lite-fx .ops-panel::before,
body.lite-fx .service-card::before,
body.lite-fx .mission-node,
body.lite-fx .ops-log-item,
body.lite-fx .hero-action {
  animation: none !important;
}

body.lite-fx .hero-action:hover,
body.lite-fx .hero-action:focus-visible,
body.lite-fx .soc-link:hover,
body.lite-fx .soc-link:focus-visible,
body.lite-fx .service-card:hover,
body.lite-fx .service-card:focus-within,
body.lite-fx .ops-log-item:hover {
  transform: none !important;
}

/* =========================================
   FINAL AUDIO SYNC PASS
========================================= */

:root {
  --audio-rhythm: 0.05;
  --audio-accent: 0.05;
  --audio-bar: 0.04;
  --audio-phrase: 0.03;
}

#signal-wave span,
#pl-eq .peq,
#pl-chip,
#pl-progress-head,
#theme-feature .theme-feature-tag,
.mc-theme-badge,
.ops-stat,
.mission-node.active,
#theme-manifest,
#mc-hero {
  transition:
    transform 180ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 240ms ease,
    opacity 180ms ease,
    filter 220ms ease;
}

#signal-wave span,
#pl-eq .peq {
  transform-origin: 50% 100%;
}

#signal-wave span {
  box-shadow: 0 0 calc(5px + var(--audio-accent) * 9px) var(--accent-glow);
}

#pl-chip {
  transform: translateY(calc(var(--audio-rhythm) * -1px));
  box-shadow:
    0 0 calc(12px + var(--audio-accent) * 18px) var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, calc(0.08 + var(--audio-accent) * 0.1));
}

#pl-progress-head {
  transform: translate(-50%, calc(-50% - var(--audio-rhythm) * 1.2px)) scale(calc(1 + var(--audio-accent) * 0.14));
}

#theme-feature .theme-feature-tag,
.mc-theme-badge,
.ops-stat {
  box-shadow: 0 0 calc(8px + var(--audio-accent) * 14px) rgba(255, 255, 255, 0.04);
}

#theme-manifest::before,
#theme-feature::before {
  animation-duration: calc(9s - var(--audio-rhythm) * 2.2s);
}

#theme-manifest {
  border-color: rgba(210, 226, 235, calc(0.12 + var(--audio-bar) * 0.14));
}

#mc-hero::after {
  opacity: calc(0.4 + var(--audio-phrase) * 0.26);
  transform: scale(calc(1 + var(--audio-bar) * 0.12));
}

.mission-node.active {
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.24),
    0 0 calc(22px + var(--audio-bar) * 20px) var(--accent-glow);
}

body.audio-hit #pl-chip,
body.audio-hit #pl-progress-head,
body.audio-hit #signal-wave span,
body.audio-hit #pl-eq .peq {
  opacity: 1;
}

body.audio-hit #theme-feature {
  transform: translateZ(26px) scale(1.008);
}

body.audio-hit #player {
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.28),
    0 0 calc(16px + var(--audio-rhythm) * 18px) var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.audio-bar-hit #theme-manifest,
body.audio-bar-hit #mc-hero {
  box-shadow:
    0 26px 62px rgba(0, 0, 0, 0.28),
    0 0 calc(20px + var(--audio-bar) * 26px) var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.audio-phrase-hit #theme-feature .theme-feature-tag,
body.audio-phrase-hit .mc-theme-badge,
body.audio-phrase-hit .ops-stat {
  transform: translateY(-2px);
}

body[data-style-name="soft"] #signal-wave span,
body[data-style-name="soft"] #pl-eq .peq {
  background: linear-gradient(180deg, rgba(255, 244, 249, 0.96), rgba(244, 114, 182, 0.24));
  box-shadow: 0 0 calc(6px + var(--audio-accent) * 10px) rgba(255, 188, 215, 0.28);
}

body[data-style-name="soft"].audio-hit #theme-feature {
  box-shadow:
    0 24px 58px rgba(33, 10, 19, 0.28),
    0 0 calc(20px + var(--audio-rhythm) * 24px) rgba(255, 182, 212, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-style-name="soft"].audio-phrase-hit .mc-theme-badge,
body[data-style-name="soft"].audio-phrase-hit #theme-feature .theme-feature-tag {
  box-shadow:
    0 0 calc(14px + var(--audio-phrase) * 22px) rgba(255, 184, 214, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-style-name="phantom"] #signal-wave span,
body[data-style-name="phantom"] #pl-eq .peq {
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(196, 248, 255, 0.95), rgba(0, 212, 255, 0.18));
  box-shadow: 0 0 calc(6px + var(--audio-accent) * 12px) rgba(0, 212, 255, 0.24);
}

body[data-style-name="phantom"].audio-hit #theme-manifest::before,
body[data-style-name="phantom"].audio-hit #theme-feature::before {
  opacity: 0.82;
}

body[data-style-name="phantom"].audio-bar-hit #mc-hero,
body[data-style-name="phantom"].audio-bar-hit #theme-manifest {
  box-shadow:
    0 26px 62px rgba(0, 0, 0, 0.36),
    0 0 calc(18px + var(--audio-bar) * 28px) rgba(0, 212, 255, 0.16),
    inset 0 1px 0 rgba(194, 248, 255, 0.06);
}

body[data-style-name="resident"] #signal-wave span,
body[data-style-name="resident"] #pl-eq .peq {
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(201, 255, 226, 0.94), rgba(0, 255, 135, 0.16));
  box-shadow: 0 0 calc(6px + var(--audio-accent) * 10px) rgba(0, 255, 135, 0.22);
}

body[data-style-name="resident"].audio-bar-hit #theme-manifest::before,
body[data-style-name="resident"].audio-bar-hit #theme-feature::before,
body[data-style-name="resident"].audio-bar-hit #mc-hero::before {
  opacity: 0.72 !important;
}

body[data-style-name="resident"].audio-phrase-hit .mission-node.active,
body[data-style-name="resident"].audio-phrase-hit .ops-stat {
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.26),
    0 0 calc(18px + var(--audio-phrase) * 24px) rgba(0, 255, 135, 0.16);
}

body[data-style-name="crimson"] #signal-wave span,
body[data-style-name="crimson"] #pl-eq .peq {
  background: linear-gradient(180deg, rgba(255, 216, 224, 0.95), rgba(255, 45, 85, 0.18));
  box-shadow: 0 0 calc(6px + var(--audio-accent) * 12px) rgba(255, 80, 114, 0.24);
}

body[data-style-name="crimson"].audio-hit #player,
body[data-style-name="crimson"].audio-hit #theme-feature {
  box-shadow:
    10px 10px 0 rgba(91, 14, 31, 0.46),
    0 24px 52px rgba(0, 0, 0, 0.34),
    0 0 calc(18px + var(--audio-rhythm) * 26px) rgba(255, 45, 85, 0.16) !important;
}

body[data-style-name="crimson"].audio-phrase-hit #mc-hero::after {
  opacity: 0.92;
  transform: scale(calc(1.04 + var(--audio-phrase) * 0.16));
}

body.lite-fx #signal-wave span,
body.lite-fx #pl-eq .peq,
body.lite-fx #pl-chip,
body.lite-fx #pl-progress-head,
body.lite-fx .mc-theme-badge,
body.lite-fx .ops-stat {
  transition-duration: 120ms;
}

body.lite-fx.audio-hit #theme-feature {
  transform: translateZ(20px) scale(1.004);
}

/* =========================================
   FINAL THEME MEANING + DEVICE PASS
========================================= */

#theme-atlas {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: clamp(0.9rem, 1.9vw, 1.28rem);
  width: min(100%, 1180px);
  margin: clamp(0.68rem, 1.8vw, 1.02rem) auto 0;
  padding: clamp(0.95rem, 1.8vw, 1.22rem);
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(12, 18, 23, 0.9), rgba(7, 11, 15, 0.92));
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  overflow: clip;
  isolation: isolate;
}

#theme-atlas::before,
#theme-atlas::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

#theme-atlas::before {
  inset: -20% auto auto 58%;
  width: min(36vw, 420px);
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 72%);
  filter: blur(22px);
  opacity: 0.88;
}

#theme-atlas::after {
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 26%);
  mix-blend-mode: screen;
  opacity: 0.5;
}

#theme-atlas-main,
#theme-trail {
  position: relative;
  z-index: 1;
}

#theme-atlas-main {
  display: grid;
  align-content: start;
  gap: 0.72rem;
  min-width: 0;
}

#theme-atlas-kicker,
#theme-trail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  font: 700 0.72rem/1 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel);
}

#theme-atlas-kicker::before,
#theme-trail-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.02), 0 0 18px var(--accent-glow);
}

#theme-atlas-title {
  max-width: 24ch;
  font: 700 clamp(1.16rem, 1.3vw + 0.86rem, 1.58rem)/1.08 var(--display);
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

#theme-atlas-copy,
#theme-trail-copy {
  max-width: 62ch;
  font: 500 clamp(0.88rem, 0.32vw + 0.8rem, 0.98rem)/1.6 var(--body);
  color: var(--text-soft);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

#theme-atlas-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.theme-atlas-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.46rem 0.72rem;
  border: 1px solid rgba(210, 226, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font: 600 0.72rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  white-space: nowrap;
}

#theme-trail {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: clamp(0.84rem, 1.5vw, 1rem);
  min-width: 0;
  border: 1px solid rgba(210, 226, 235, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 36%),
    rgba(9, 13, 17, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#theme-trail-count {
  font: 700 clamp(0.92rem, 0.6vw + 0.78rem, 1.06rem)/1.15 var(--display);
  letter-spacing: 0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

#theme-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 46px;
  padding: 0.82rem 1rem;
  border: 1px solid rgba(210, 226, 235, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font: 700 0.78rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

#theme-next:hover,
#theme-next:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 20px var(--accent-glow);
  outline: none;
}

.theme-btn.is-unseen::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02), 0 0 14px var(--accent-glow);
  opacity: 0.92;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-btn.is-active.is-unseen::before {
  opacity: 0;
  transform: scale(0.72);
}

body[data-theme-trail="complete"] #theme-trail {
  border-color: rgba(210, 226, 235, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 28px rgba(255, 255, 255, 0.03);
}

body[data-theme-trail="complete"] #theme-next {
  color: var(--accent-strong);
}

html[data-theme="soft"] #theme-atlas {
  background:
    linear-gradient(145deg, rgba(255, 232, 242, 0.085), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(52, 19, 31, 0.88), rgba(18, 8, 13, 0.92));
  border-color: rgba(255, 196, 220, 0.16);
}

html[data-theme="soft"] #theme-trail,
html[data-theme="soft"] .theme-atlas-tag {
  background-color: rgba(255, 235, 244, 0.05);
  border-color: rgba(255, 194, 220, 0.18);
}

html[data-theme="phantom"] #theme-atlas {
  background:
    linear-gradient(145deg, rgba(160, 238, 255, 0.06), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(8, 20, 27, 0.9), rgba(4, 10, 15, 0.94));
  border-color: rgba(0, 212, 255, 0.2);
}

html[data-theme="phantom"] #theme-trail,
html[data-theme="phantom"] .theme-atlas-tag {
  background-color: rgba(160, 238, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.16);
}

html[data-theme="resident"] #theme-atlas {
  background:
    linear-gradient(145deg, rgba(160, 255, 212, 0.06), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(8, 22, 15, 0.9), rgba(3, 9, 6, 0.94));
  border-color: rgba(0, 255, 135, 0.18);
}

html[data-theme="resident"] #theme-trail,
html[data-theme="resident"] .theme-atlas-tag {
  background-color: rgba(160, 255, 212, 0.035);
  border-color: rgba(0, 255, 135, 0.16);
}

html[data-theme="resident"] #theme-atlas-title,
html[data-theme="resident"] #theme-atlas-copy,
html[data-theme="resident"] #theme-trail-count,
html[data-theme="resident"] #theme-trail-copy {
  font-family: var(--body) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

html[data-theme="crimson"] #theme-atlas {
  background:
    linear-gradient(145deg, rgba(255, 176, 190, 0.07), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(40, 9, 15, 0.9), rgba(13, 4, 6, 0.95));
  border-color: rgba(255, 45, 85, 0.2);
}

html[data-theme="crimson"] #theme-trail,
html[data-theme="crimson"] .theme-atlas-tag {
  background-color: rgba(255, 176, 190, 0.04);
  border-color: rgba(255, 45, 85, 0.16);
}

body.lite-fx #theme-atlas::before,
body.lite-fx #theme-atlas::after {
  opacity: 0.28;
  filter: none;
}

body.lite-fx #theme-next,
body.lite-fx #theme-trail,
body.lite-fx .theme-atlas-tag {
  box-shadow: none;
}

@media (max-width: 1180px) {
  #theme-atlas {
    grid-template-columns: minmax(0, 1fr);
  }

  #theme-trail {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  #theme-trail-copy {
    max-width: none;
  }

  #theme-next {
    justify-self: end;
  }
}

@media (max-width: 960px) {
  #theme-atlas {
    gap: 0.88rem;
    padding: 0.92rem;
  }

  #theme-trail {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.62rem;
  }

  #theme-next {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 640px) {
  #theme-atlas {
    padding: 0.84rem;
    border-radius: 18px;
  }

  #theme-atlas-title {
    max-width: none;
    font-size: 1.04rem;
  }

  #theme-atlas-copy,
  #theme-trail-copy {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  #theme-atlas-tags {
    gap: 0.42rem;
  }

  .theme-atlas-tag {
    min-height: 29px;
    padding: 0.38rem 0.58rem;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  #theme-trail-count {
    font-size: 0.86rem;
  }

  #theme-next {
    min-height: 42px;
    padding-inline: 0.84rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .theme-btn.is-unseen::before {
    top: 7px;
    right: 8px;
  }
}

@media (max-height: 820px) and (min-width: 900px) {
  #theme-atlas {
    margin-top: 0.62rem;
    padding-block: 0.84rem;
  }

  #theme-atlas-title {
    font-size: clamp(1.05rem, 1vw + 0.8rem, 1.34rem);
  }

  #theme-atlas-copy,
  #theme-trail-copy {
    font-size: 0.86rem;
  }
}
