/* ── PROJECT SWITCH LOADING SCREEN ───────────────────────────── */
#project-switch-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(0, 163, 251, .12), transparent 34%),
    radial-gradient(circle at 50% 72%, rgba(224, 92, 53, .10), transparent 46%),
    rgba(3, 4, 7, .92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

#project-switch-splash.active {
  opacity: 1;
  pointer-events: auto;
}

.project-splash-stage {
  width: min(420px, 86vw);
  min-height: 280px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  border: 1px solid rgba(174, 184, 191, .24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.01)),
    rgba(10, 12, 16, .88);
  box-shadow:
    0 24px 72px rgba(0,0,0,.56),
    0 0 32px rgba(0,163,251,.12),
    inset 0 0 28px rgba(255,255,255,.025);
}

.project-splash-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.035);
  box-shadow: 0 0 22px rgba(255,255,255,.08);
}

.project-splash-mark img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  opacity: .96;
}

.project-splash-eq {
  height: 70px;
  display: flex;
  align-items: end;
  gap: 7px;
}

.project-splash-eq span {
  --bar-min: 18px;
  --bar-max: 64px;
  width: 9px;
  height: var(--bar-min);
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #ffb39e, #e05c35 52%, #35a152 100%);
  box-shadow: 0 0 12px rgba(224,92,53,.35);
  transform-origin: bottom;
  animation: project-splash-eq-rise var(--bar-speed, .82s) ease-in-out infinite alternate;
  animation-delay: var(--bar-delay, 0s);
  opacity: .88;
}

.project-splash-eq span:nth-child(1) { --bar-max: 38px; --bar-speed: .74s; --bar-delay: -.12s; }
.project-splash-eq span:nth-child(2) { --bar-max: 61px; --bar-speed: .91s; --bar-delay: -.38s; }
.project-splash-eq span:nth-child(3) { --bar-max: 44px; --bar-speed: .69s; --bar-delay: -.21s; }
.project-splash-eq span:nth-child(4) { --bar-max: 67px; --bar-speed: 1.04s; --bar-delay: -.57s; }
.project-splash-eq span:nth-child(5) { --bar-max: 51px; --bar-speed: .79s; --bar-delay: -.31s; }
.project-splash-eq span:nth-child(6) { --bar-max: 63px; --bar-speed: .96s; --bar-delay: -.66s; }
.project-splash-eq span:nth-child(7) { --bar-max: 35px; --bar-speed: .72s; --bar-delay: -.44s; }
.project-splash-eq span:nth-child(8) { --bar-max: 57px; --bar-speed: .88s; --bar-delay: -.18s; }

@keyframes project-splash-eq-rise {
  0% { height: var(--bar-min); filter: brightness(.82); }
  38% { height: calc((var(--bar-min) + var(--bar-max)) / 2); filter: brightness(1.08); }
  100% { height: var(--bar-max); filter: brightness(1.24); }
}

#project-switch-splash[data-splash-variant="eq"] .project-splash-eq-visual {
  display: grid;
}

#project-switch-splash[data-splash-variant="eq"] .project-splash-tape-visual {
  display: none;
}

#project-switch-splash[data-splash-variant^="tape"] .project-splash-eq-visual {
  display: none;
}

#project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-visual {
  display: grid;
}

.project-splash-visual {
  justify-items: center;
  align-items: center;
}

.project-splash-tape-stage {
  position: relative;
  width: min(330px, 72vw);
  aspect-ratio: 2.55 / 1;
  filter: drop-shadow(0 0 22px rgba(255,255,255,.08));
}

.project-splash-tape-front,
.project-splash-tape-wheel {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
}

.project-splash-tape-stage::before {
  content: none;
}
.project-splash-tape-front {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1000;
}

.project-splash-tape-wheel {
  width: var(--splash-wheel-size, 28%);
  height: var(--splash-wheel-size, 28%);
  object-fit: contain;
  z-index: 500;
  animation: project-splash-tape-spin 1.05s linear infinite;
  transform-origin: center center;
  opacity: .95;
}

.project-splash-tape-wheel-left {
  left: var(--splash-left-x, 25.5%);
  top: var(--splash-wheel-y, 31%);
}

.project-splash-tape-wheel-right {
  left: var(--splash-right-x, 57.5%);
  top: var(--splash-wheel-y, 31%);
  animation-duration: .92s;
}

#project-switch-splash[data-splash-variant="tape2"] .project-splash-tape-stage {
  --splash-wheel-size: 31%;
  --splash-left-x: 23.5%;
  --splash-right-x: 59%;
  --splash-wheel-y: 24%;
}

@keyframes project-splash-tape-spin {
  from { transform: scale(var(--splash-wheel-scale, 1)) rotate(0deg); }
  to { transform: scale(var(--splash-wheel-scale, 1)) rotate(360deg); }
}

#project-splash-text {
  color: var(--text2);
  font-family: "NV Bitcount Single", "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
}

/* Restore monitor switch splash geometry for active monitor markup */
main#right.Workspace.Bx #project-switch-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

main#right.Workspace.Bx #project-switch-splash .project-splash-stage {
  position: relative;
  width: 720px;
  height: 420px;
  min-height: 420px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="eq"] .project-splash-eq-visual,
main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-visual {
  display: block;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="eq"] .project-splash-tape-visual,
main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-eq-visual {
  display: none;
}

main#right.Workspace.Bx .project-splash-mark {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: none;
  z-index: 3;
}

main#right.Workspace.Bx .project-splash-mark img {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(0,0,0,.55));
}

main#right.Workspace.Bx .project-splash-eq {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  width: 640px;
  height: 250px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  z-index: 1;
}

main#right.Workspace.Bx .project-splash-eq span {
  width: 42px;
  height: 120px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to top, transparent 0px, transparent 20px, #0b0b0b 20px, #0b0b0b 24px),
    linear-gradient(to top, #18ff3a 0%, #18ff3a 42%, #76ff1f 42%, #76ff1f 62%, #d9ff1c 62%, #d9ff1c 80%, #ffb300 80%, #ffb300 93%, #ff4d00 93%, #ff4d00 100%);
  box-shadow: 0 0 10px rgba(50,255,80,.14);
  animation: projectSplashEqPulse .78s infinite ease-in-out;
  transform-origin: bottom center;
}

main#right.Workspace.Bx .project-splash-eq span:nth-child(1){animation-duration:.72s;animation-delay:-.08s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(2){animation-duration:.61s;animation-delay:-.31s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(3){animation-duration:.87s;animation-delay:-.17s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(4){animation-duration:.68s;animation-delay:-.44s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(5){animation-duration:.79s;animation-delay:-.25s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(6){animation-duration:.58s;animation-delay:-.12s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(7){animation-duration:.92s;animation-delay:-.39s;}
main#right.Workspace.Bx .project-splash-eq span:nth-child(8){animation-duration:.66s;animation-delay:-.22s;}

main#right.Workspace.Bx .project-splash-tape-stage {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 240px;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at center, transparent 58%, rgba(2,2,3,.32) 72%, rgba(2,2,3,.84) 100%);
  box-shadow: inset 0 0 34px rgba(2,2,3,.96);
}

main#right.Workspace.Bx .project-splash-tape-wheel {
  width: 120px;
  height: 120px;
  animation: project-splash-tape-spin .85s linear infinite;
  --splash-wheel-scale: 1;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="tape1"] .project-splash-tape-wheel {
  animation: project-splash-tape-spin .85s linear infinite;
}

main#right.Workspace.Bx .project-splash-tape-wheel-left {
  left: 42px;
  top: 60px;
}

main#right.Workspace.Bx .project-splash-tape-wheel-right {
  left: auto;
  right: 42px;
  top: 60px;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="tape2"] .project-splash-tape-stage {
  width: 380px;
  height: 252px;
  overflow: hidden;
  border: 0;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at center, transparent 58%, rgba(2,2,3,.32) 72%, rgba(2,2,3,.84) 100%);
  box-shadow: inset 0 0 34px rgba(2,2,3,.96);
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="tape2"] .project-splash-tape-wheel-left {
  left: 64px;
  top: 78px;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant="tape2"] .project-splash-tape-wheel-right {
  right: 64px;
  top: 78px;
}

main#right.Workspace.Bx #project-splash-text {
  position: absolute;
  bottom: 18px;
  width: 100%;
  font-size: 12px;
  color: var(--text2);
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 4;
}

/* Verbatim tape splash tuner output */
main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-stage {
  width: 720px;
  height: 420px;
  min-height: 420px;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-stage {
  width: 360px;
  height: 184px;
  aspect-ratio: auto;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(1);
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.08), transparent 34%),
    radial-gradient(ellipse at center, transparent 58%, rgba(2,2,3,.32) 72%, rgba(2,2,3,0.84) 100%);
  box-shadow: inset 0 0 34px rgba(2,2,3,.96), 0 0 18px rgba(255,255,255,.12);
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-front {
  inset: auto;
  height: auto;
  width: 360px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-wheel {
  width: 120px;
  height: 120px;
  animation: project-splash-tape-spin 0.85s linear infinite;
  opacity: 0.95;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-wheel-left {
  left: -21px;
  top: 30px;
}

main#right.Workspace.Bx #project-switch-splash[data-splash-variant^="tape"] .project-splash-tape-wheel-right {
  left: auto;
  right: -16px;
  top: 30px;
}

main#right.Workspace.Bx #project-splash-text {
  bottom: auto;
  top: 88%;
  transform: translateY(-50%);
}

/* Visualizer-only back image reference for future release tuner:
   back width 360px; x 50%; y 50%; opacity 0.62;
*/

@keyframes projectSplashEqPulse { 0%,100%{height:96px} 38%{height:278px} 68%{height:148px} }

/* Active workspace project banner retarget */
main#right.Workspace.Bx > #project-info.Project.Cx,
main#right.Workspace.Bx > .Project.Cx#project-info {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--project-accent-border, var(--border));
  background:
    radial-gradient(circle at 12% 20%, var(--active-project-dark, rgba(224,92,53,.18)), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(255,255,255,.055), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.14)),
    var(--bg1);
  box-shadow:
    inset 0 -1px 0 rgba(255,255,255,.035),
    0 0 26px color-mix(in srgb, var(--project-accent-border, rgba(224,92,53,.48)) 42%, transparent);
}

main#right.Workspace.Bx > #project-info.Project.Cx::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  transform: translateX(-100%);
  animation: projectBannerSheen 7s ease-in-out infinite;
}

main#right.Workspace.Bx > #project-info.Project.Cx > #project-title.Header.Dx {
  position: relative;
  z-index: 1;
  color: var(--active-project-light, var(--text));
  text-shadow: 0 0 15px color-mix(in srgb, var(--project-accent-border, rgba(224,92,53,.48)) 76%, transparent);
}

main#right.Workspace.Bx > #project-info.Project.Cx > #project-summary.Summary.Dx,
main#right.Workspace.Bx > #project-info.Project.Cx > #project-carousel.Selection.Dx {
  position: relative;
  z-index: 1;
}

@keyframes projectBannerSheen {
  0%,78%,100% { transform: translateX(-100%); opacity: 0; }
  86% { opacity: .38; }
  94% { transform: translateX(100%); opacity: 0; }
}

/* ── LAUNCH GATE / PROJECT SELECT ─────────────────────────────── */

.launch-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(circle at 50% 18%, rgba(30, 46, 60, .24), transparent 42%),
    linear-gradient(180deg, #050507 0%, #09090c 48%, #050507 100%);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: auto;
}

.launch-gate[hidden] {
  display: none !important;
}

.launch-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 28px clamp(18px, 4vw, 58px);
  gap: 28px;
}

.launch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.launch-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.launch-logo {
  width: 190px;
  max-width: 34vw;
  object-fit: contain;
}

.launch-title {
  font-size: 16px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
}

.launch-subtitle {
  margin-top: 5px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text3);
  text-transform: uppercase;
}

.launch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.launch-link-btn {
  color: var(--text2);
  border: 1px solid rgba(86, 86, 108, .42);
  background: rgba(255, 255, 255, .025);
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: 1px;
}

.launch-link-btn:hover {
  color: var(--text);
  border-color: var(--project-accent-border, var(--accent));
}

.launch-panel {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  align-self: start;
}

.launch-panel[hidden] {
  display: none !important;
}

.launch-message-card {
  width: min(760px, 92vw);
  margin: 8vh auto 0;
  padding: 32px;
  border-radius: 16px;
  background: rgba(18, 18, 24, .92);
  border: 1px solid rgba(86, 86, 108, .56);
  box-shadow: 0 0 0 1px rgba(255,255,255,.025), 0 26px 70px rgba(0,0,0,.42);
  text-align: center;
}

.launch-message-card h1,
.launch-select-head h1 {
  margin: 0 0 12px;
  font-size: 21px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
}

.launch-message-card p,
.launch-select-head p {
  margin: 0 0 12px;
  color: var(--text2);
  line-height: 1.45;
}

.launch-muted {
  color: var(--text3) !important;
}

.launch-create-row,
.launch-create-inline {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.launch-create-inline {
  grid-template-columns: minmax(180px, 340px) auto auto;
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid rgba(86, 86, 108, .42);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.launch-input {
  min-height: 38px;
  padding: 8px 12px;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid rgba(86, 86, 108, .62);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.launch-input:focus {
  outline: none;
  border-color: var(--accent);
}

.launch-primary-btn,
.launch-secondary-btn,
.launch-system-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-ui);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.launch-primary-btn {
  color: #f8f8ff;
  border: 1px solid var(--project-accent-border, var(--accent));
  background: rgba(224, 92, 53, .18);
}

.launch-primary-btn:hover {
  background: rgba(224, 92, 53, .28);
}

.launch-secondary-btn {
  color: var(--text2);
  border: 1px solid rgba(86, 86, 108, .52);
  background: rgba(255, 255, 255, .025);
}

.launch-system-btn {
  color: #d7ecff;
  border: 1px solid rgba(0, 163, 251, .58);
  background: rgba(0, 70, 120, .22);
}

.launch-error {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--accent2);
  font-size: 13px;
}

.launch-select-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 24px;
}

.launch-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.launch-project-card {
  --card-primary: var(--accent);
  --card-dark: rgba(224, 92, 53, .16);
  --card-light: rgba(255, 134, 96, .92);

  position: relative;
  min-height: 126px;
  padding: 20px 22px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.08)),
    var(--card-dark);
  border: 1px solid color-mix(in srgb, var(--card-primary) 72%, #000 28%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.025),
    0 0 22px color-mix(in srgb, var(--card-primary) 22%, transparent),
    inset 0 0 16px rgba(255,255,255,.025);
  color: var(--text2);
  text-align: left;
  overflow: hidden;
}

.launch-project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 20%, color-mix(in srgb, var(--card-primary) 26%, transparent), transparent 42%);
  pointer-events: none;
}

.launch-project-card:hover {
  transform: translateY(-1px);
  border-color: var(--card-light);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.03),
    0 0 28px color-mix(in srgb, var(--card-primary) 34%, transparent);
}

.launch-project-card-title {
  position: relative;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--card-light);
  margin-bottom: 12px;
  font-weight: 700;
}

.launch-project-card-summary {
  position: relative;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text2);
  min-height: 34px;
}

.launch-project-card-meta {
  position: relative;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text3);
}

.launch-project-card[data-color="1"] {
  --card-primary: #e05c35;
  --card-dark: rgba(224, 92, 53, .19);
  --card-light: #ffb39e;
}

.launch-project-card[data-color="2"] {
  --card-primary: #c9db00;
  --card-dark: rgba(180, 190, 0, .18);
  --card-light: #efff7a;
}

.launch-project-card[data-color="3"] {
  --card-primary: #00a3fb;
  --card-dark: rgba(0, 130, 190, .20);
  --card-light: #a8e7ff;
}

.launch-project-card[data-color="4"] {
  --card-primary: #35a152;
  --card-dark: rgba(35, 130, 60, .20);
  --card-light: #a4f0b8;
}

.launch-backstage-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(86, 86, 108, .38);
  color: var(--text3);
  font-size: 13px;
}

body.launch-active #left,
body.launch-active #right {
  filter: grayscale(.4) brightness(.56);
  pointer-events: none;
  user-select: none;
}

body.launch-active #launch-gate {
  pointer-events: auto;
}
