:root {
  color-scheme: dark;
  --void: #020412;
  --deep: #050d29;
  --space-800: #09133d;
  --royal: #1256ec;
  --blue: #306bff;
  --blue-glow: #548eff;
  --ice: #e2eeff;
  --magenta: #ff1ca8;
  --pink: #ff85e5;
  --magenta-glow: #ff4fd8;
  --orchid: #a93dff;
  --white: #f8faff;
  --muted: #94a6d4;
  --dim: #5c6f9e;
  --glass-bg: rgba(6, 14, 40, 0.58);
  --glass-border: rgba(148, 180, 255, 0.18);
  --cinema-zoom: 1;
  --cinema-tilt: 0deg;
  --trias-accent-a: #ff4fd8;
  --trias-accent-b: #3b82ff;
  --trias-glow-a: rgba(255, 40, 185, 0.45);
  --trias-border: rgba(145, 185, 255, 0.25);
  --trias-orb-top: #1c3aa6;
  --trias-orb-bottom: #050d2b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background: var(--void); }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--void);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }
[hidden] { display: none !important; }

/* Cosmos Main Viewport Container */
.cosmos-app {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: radial-gradient(ellipse at 48% 46%, #111e57 0%, #060d2c 32%, #020619 65%, #01030e 100%);
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 51% 48%, transparent 16%, rgba(4, 6, 24, 0.08) 38%, rgba(1, 3, 13, 0.82) 94%),
    radial-gradient(circle at 14% 28%, rgba(255, 28, 168, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 86% 72%, rgba(27, 94, 255, 0.14) 0%, transparent 48%);
}

/* Header */
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(18px, 4vw, 56px) 0;
  position: relative;
  z-index: 5;
}

.brand {
  font-size: clamp(22px, 2.7vw, 36px);
  letter-spacing: 0.16em;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.brand strong {
  background: linear-gradient(120deg, #ff4fd8, #ff1ca8 60%, #b82aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 28, 168, 0.55));
}

.brand small {
  display: block;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.28em;
  margin-top: 10px;
  color: var(--blue-glow);
}

.edition {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  color: #cadcff;
  text-align: right;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(14, 26, 68, 0.45);
  border: 1px solid rgba(135, 175, 255, 0.18);
  backdrop-filter: blur(12px);
}

.tiny-star { color: var(--magenta-glow); margin-right: 4px; }

/* Central Experience Stage */
.experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8px 16px 0;
  flex: 1;
  min-height: 520px;
}

.headlines {
  z-index: 4;
  pointer-events: none;
  max-width: 760px;
  margin-bottom: 4px;
}

.overline {
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.38em;
  font-weight: 800;
  color: var(--magenta-glow);
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(32px, 4.6vw, 68px);
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-wrap: balance;
  text-shadow: 0 8px 44px rgba(0, 0, 0, 0.7);
}

h1 em {
  font-style: normal;
  background: linear-gradient(110deg, #ffffff 8%, #b8d4ff 48%, #ffaae8 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.summary {
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--muted);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.55;
  text-wrap: balance;
}

/* The Hero Portal Area */
.hero-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
  z-index: 3;
}

.portal-column {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.portal-control {
  border: 0;
  padding: 14px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  border-radius: 60px;
  position: relative;
  max-width: 100%;
}

.portal-frame {
  display: block;
  position: relative;
  width: min(42vh, 46vw, 395px);
  width: min(42svh, 46vw, 395px);
  min-width: 195px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 0 26px rgba(255, 28, 168, 0.35)) drop-shadow(0 0 55px rgba(27, 94, 255, 0.3));
  transition: filter 0.38s ease, transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-control:hover .portal-frame {
  transform: scale(1.035);
  filter: drop-shadow(0 0 38px rgba(255, 28, 168, 0.65)) drop-shadow(0 0 70px rgba(27, 94, 255, 0.5));
}

.portal-control:active .portal-frame { transform: scale(0.97); }

/* Outer Magenta Orbital Ring: STRICT CLOCKWISE ↻ */
.outer-arc, .orbit-track {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  border-radius: 50%;
  transform-origin: 50% 50%;
}

.outer-arc-one {
  inset: 0;
  background: conic-gradient(
    from -15deg,
    transparent 0 12deg,
    #ff1ca8 20deg,
    #ff8ae3 45deg,
    transparent 62deg 78deg,
    #b82aff 105deg,
    transparent 135deg 158deg,
    #ff1ca8 174deg,
    #ff85e5 210deg,
    transparent 238deg 270deg,
    #ad21ec 295deg,
    #ff85e4 334deg,
    transparent 350deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 7px));
  animation: spinClockwise 24s linear infinite;
  filter: drop-shadow(0 0 14px #ff1ca8);
}

.outer-arc-two {
  inset: 12px;
  background: conic-gradient(
    from 85deg,
    transparent 0 40deg,
    #ff2bcb 64deg,
    transparent 92deg 145deg,
    #a03bff 172deg,
    #ff4cde 195deg,
    transparent 232deg 290deg,
    #ff56cf 315deg,
    transparent 346deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 2px));
  animation: spinClockwise 18s linear infinite reverse;
  opacity: 0.72;
}

.orbit-track-outer {
  inset: 22px;
  border: 1px dashed rgba(255, 86, 216, 0.45);
  animation: spinClockwise 20s linear infinite;
}

.orbit-track-outer i {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff8add;
  box-shadow: 0 0 14px 4px rgba(255, 49, 209, 0.7);
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-track-outer i:nth-child(2) { top: 50%; left: 100%; width: 4px; height: 4px; }
.orbit-track-outer i:nth-child(3) { top: 100%; left: 50%; width: 5px; height: 5px; }

/* Inner Blue Cosmos Track: STRICT COUNTER-CLOCKWISE ↺ */
.orbit-track-inner {
  inset: 30px;
  border: 1px dashed rgba(84, 142, 255, 0.45);
  animation: spinCounterClockwise 26s linear infinite;
}

.orbit-track-inner i {
  position: absolute;
  display: block;
  background: #80a9ff;
  box-shadow: 0 0 12px #316aff;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.orbit-track-inner i:nth-child(2) { top: 50%; left: 0; width: 3px; height: 3px; }

/* The Central Universe Disc */
.universe-disc {
  position: absolute;
  inset: 36px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(89, 137, 255, 0.55);
  box-shadow:
    inset 0 0 26px rgba(63, 92, 239, 0.65),
    inset 0 0 85px rgba(1, 10, 64, 0.85),
    0 0 40px rgba(34, 94, 228, 0.3);
  background: radial-gradient(circle at 42% 42%, #1a4cd2 0%, #0c185a 42%, #020619 84%);
}

#universe {
  position: absolute;
  inset: -11%;
  width: 122%;
  height: 122%;
  animation: spinCounterClockwise 80s linear infinite;
  transform-origin: 50% 50%;
  pointer-events: none;
}

.core-glow {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(110, 157, 255, 0.6) 8%, rgba(35, 106, 225, 0.28) 28%, transparent 68%);
  animation: coreBreath 3.6s ease-in-out infinite;
}

.portal-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(22px, 3.8vw, 42px);
  text-shadow: 0 0 20px #fff, 0 0 30px var(--magenta-glow);
  mix-blend-mode: screen;
  opacity: 0.82;
}

.portal-label {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.22em;
  color: #ffe0f6;
  text-shadow: 0 0 16px rgba(255, 28, 168, 0.7);
  max-width: 250px;
  line-height: 1.5;
  text-transform: uppercase;
}

.portal-meta {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.28em;
  font-weight: 750;
  margin: 5px 0 3px;
  text-transform: uppercase;
}

@keyframes spinClockwise { to { transform: rotate(360deg); } }
@keyframes spinCounterClockwise { to { transform: rotate(-360deg); } }
@keyframes coreBreath {
  0%, 100% { opacity: 0.65; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes discPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 28, 168, 0.28), inset 0 0 18px rgba(20, 91, 234, 0.45); }
  50% { box-shadow: 0 0 34px rgba(255, 28, 168, 0.65), inset 0 0 25px rgba(33, 106, 251, 0.7); }
}

/* Stage Controls: STRICT Circular Buttons with Text Below */
.stage-controls {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(18px, 3.2vw, 38px);
  padding: 12px 8px 6px;
  min-height: 98px;
  max-width: 720px;
}

.orbit-action {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 11px;
  color: var(--ice);
  width: clamp(86px, 11vw, 108px);
  min-width: 0;
  padding: 2px;
  outline: none;
}

.orbit-action .action-disc {
  width: clamp(68px, 8.5vw, 88px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #1c3aa6 0%, #09174e 65%, #040c2b 100%);
  border: 2px solid rgba(255, 42, 186, 0.68);
  box-shadow: inset 0 4px 18px rgba(88, 139, 255, 0.35), 0 0 24px rgba(210, 49, 160, 0.3);
  animation: discPulse 3.8s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.orbit-action .action-disc::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(251, 59, 186, 0.42);
  animation: spinClockwise 18s linear infinite;
  transition: border-color 0.25s;
}

.orbit-action:hover .action-disc {
  transform: scale(1.08);
  border-color: #ff4fd8;
  filter: brightness(1.22);
}

.orbit-action:hover .action-disc::before { border-color: #fff; }
.orbit-action:active .action-disc { transform: scale(0.94); }

.action-disc .glyph {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1;
  color: #d8e8ff;
  text-shadow: 0 0 16px rgba(118, 167, 255, 0.85);
}

.action-label {
  font-size: 10px;
  letter-spacing: 0.13em;
  line-height: 1.45;
  font-weight: 800;
  text-align: center;
  max-width: 106px;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.2s;
}

.orbit-action:hover .action-label { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.4); }

.stage-status {
  margin: 10px 0 14px;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 800;
  color: #9bb8f8;
  line-height: 1.5;
  min-height: 20px;
  text-transform: uppercase;
}

/* V15 Twin-Soul Resonance Connection Capsule */
.connection-panel {
  position: relative;
  z-index: 5;
  max-width: 680px;
  width: calc(100% - 32px);
  margin: 12px auto 28px;
  padding: 18px 24px 16px;
  text-align: center;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(6, 15, 48, 0.65), rgba(26, 9, 44, 0.65));
  border: 1px solid rgba(150, 185, 255, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.52), inset 0 0 30px rgba(255, 28, 168, 0.08);
}

.connection-overline {
  font-size: 10px;
  letter-spacing: 0.26em;
  font-weight: 850;
  color: var(--magenta-glow);
  margin: 2px 0 8px;
  text-transform: uppercase;
}

.connection-message {
  font-size: 13px;
  line-height: 1.6;
  color: #e0ebff;
  max-width: 560px;
  margin: 0 auto 10px;
}

/* Live Resonance Waveform */
.twin-resonance-track {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  height: 24px;
}

.resonance-wave {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wave-bar {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ff4fd8, #548eff);
  animation: wavePulse 1.3s ease-in-out infinite;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; height: 24px; }
.wave-bar:nth-child(4) { animation-delay: 0.15s; height: 16px; }
.wave-bar:nth-child(5) { animation-delay: 0.35s; height: 20px; }

@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

.connection-status-dots {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px auto;
  color: #a8bbe9;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.connection-status-dots span {
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(37, 68, 125, 0.35);
  border: 1px solid rgba(126, 164, 255, 0.22);
  transition: all 0.3s;
}

.connection-status-dots span.connected {
  color: #c4edff;
  border-color: rgba(122, 208, 255, 0.7);
  box-shadow: 0 0 14px rgba(84, 142, 255, 0.35);
}

.connection-status-dots span.ready {
  color: #ffd2f7;
  border-color: rgba(255, 79, 216, 0.75);
  box-shadow: 0 0 16px rgba(255, 28, 168, 0.4);
}

.connection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  align-items: flex-start;
  margin: 12px 0;
}

.invite-row {
  max-width: 520px;
  margin: 14px auto 0;
  text-align: left;
}

.invite-row label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.invite-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 10, 32, 0.75);
  border: 1px solid rgba(135, 175, 255, 0.22);
  border-radius: 100px;
  padding: 4px 6px 4px 14px;
}

.invite-capsule input {
  flex: 1;
  min-width: 0;
  height: 38px;
  background: transparent;
  border: none;
  color: #e2eeff;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}

.copy-round {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #ff1ca8, #1b5eff);
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.copy-round:hover {
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(255, 28, 168, 0.6);
}

.connection-privacy {
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
  margin: 12px auto 0;
}

/* Cinematic Tension HUD */
.cinema-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  position: relative;
  z-index: 5;
}

.cinema-chapter {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--magenta-glow);
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 28, 168, 0.7);
}

.cinema-step-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cinema-step-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(84, 142, 255, 0.25);
  border: 1px solid rgba(113, 128, 200, 0.4);
  transition: all 0.3s;
}

.cinema-step-dots i.done {
  background: var(--magenta-glow);
  border-color: #ffd5f3;
  box-shadow: 0 0 10px var(--magenta-glow);
}

.cinema-step-dots i.current {
  background: #fff;
  border-color: var(--magenta-glow);
  transform: scale(1.6);
  box-shadow: 0 0 16px #ff4fd8;
}

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

/* Footer & Floating Acoustic Dock */
.footer {
  padding: 8px 14px max(16px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
}

.music-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.music-overline {
  font-size: 9px;
  letter-spacing: 0.24em;
  font-weight: 800;
  color: var(--dim);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.sound-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #415278;
  transition: background 0.25s, box-shadow 0.25s;
}

.sound-led.on {
  background: var(--magenta-glow);
  box-shadow: 0 0 12px var(--magenta-glow);
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.8vw, 36px);
  align-items: flex-start;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(5, 12, 38, 0.55);
  border: 1px solid rgba(135, 175, 255, 0.16);
  backdrop-filter: blur(16px);
}

.music-disc {
  border: 0;
  background: transparent;
  color: #aebcec;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  position: relative;
  min-width: 65px;
  max-width: 95px;
  padding: 0;
  outline: none;
}

.music-icon {
  display: grid;
  place-items: center;
  width: clamp(44px, 5.5vw, 56px);
  height: clamp(44px, 5.5vw, 56px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #162b70 0%, #080f33 80%);
  border: 1px solid rgba(135, 175, 255, 0.25);
  box-shadow: inset 0 0 14px rgba(28, 74, 170, 0.4);
  position: relative;
  font-size: 18px;
  color: #cfb7ff;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.music-disc .music-icon::before {
  position: absolute;
  content: '';
  inset: -4px;
  border: 1px dotted rgba(229, 64, 195, 0.35);
  border-radius: 50%;
}

.music-disc:hover .music-icon {
  transform: scale(1.1);
  border-color: var(--magenta-glow);
  box-shadow: 0 0 18px rgba(255, 28, 168, 0.45);
}

.music-disc.active .music-icon {
  background: radial-gradient(circle at 35% 30%, #2955e6 0%, #120a55 90%);
  border-color: #ff4fd8;
  box-shadow: 0 0 20px rgba(255, 28, 168, 0.7);
}

.music-disc.active .music-icon::before {
  border-color: #ff85e5;
  animation: spinClockwise 7s linear infinite;
}

.music-disc .music-icon.greek-icon { font-size: clamp(24px, 3.2vw, 32px); color: #f7dbff; }

.greek-symbol {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(241, 80, 231, 0.65));
}

.disc-label {
  display: block;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--dim);
  text-align: center;
  white-space: normal;
  max-width: 94px;
  text-transform: uppercase;
}

.music-disc.active .disc-label { color: var(--magenta-glow); }

.audio-note { font-size: 9px; color: var(--dim); margin: 8px 0 0; text-align: center; }
.disclaimer {
  font-size: 8px;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: var(--dim);
  text-align: center;
  margin: 0;
  text-transform: uppercase;
}

/* Flash & Cinematic Stages */
.cinema-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(115, 151, 255, 0.94) 19%, rgba(236, 69, 212, 0.58) 36%, transparent 72%);
  z-index: 7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}

.cinema-flash.flash { opacity: 0.88; }

.suspense-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, transparent 4%, rgba(1, 1, 14, 0.86) 85%);
  transition: opacity 1.25s ease;
}

.cosmos-app[data-phase="false-end"] .suspense-vignette { opacity: 0.83; }
.cosmos-app[data-phase="false-end"] .portal-frame { filter: brightness(0.26) drop-shadow(0 0 3px #7c2581) !important; transform: scale(0.95); }
.cosmos-app[data-phase="false-end"] .outer-arc-one,
.cosmos-app[data-phase="false-end"] .outer-arc-two { animation-play-state: paused; }

.cosmos-app[data-phase="ready"] .portal-frame {
  filter: drop-shadow(0 0 40px rgba(255, 34, 191, 0.85)) drop-shadow(0 0 50px rgba(35, 90, 255, 0.6));
}

.cosmos-app[data-beat="hush"] .suspense-vignette { opacity: 1; transition: opacity 0.24s ease; }
.cosmos-app[data-beat="hush"] .portal-frame { filter: brightness(0.32) !important; transform: scale(0.88); }
.cosmos-app[data-beat="hush"] .outer-arc-one,
.cosmos-app[data-beat="hush"] .outer-arc-two,
.cosmos-app[data-beat="hush"] .orbit-track { animation-play-state: paused; }

.cosmos-app[data-phase="finale"] .portal-frame {
  transform: scale(var(--cinema-zoom)) rotate(var(--cinema-tilt));
  transition: filter 0.35s ease, transform 0.22s ease-out;
  filter: drop-shadow(0 0 42px rgba(250, 51, 184, 0.65)) drop-shadow(0 0 70px rgba(41, 112, 255, 0.6));
}

.cosmos-app[data-beat="impact"] .portal-frame {
  filter: drop-shadow(0 0 65px rgba(249, 111, 202, 0.85)) drop-shadow(0 0 75px rgba(77, 131, 255, 0.88));
}

.cosmos-app[data-beat="rebirth"] .portal-frame {
  filter: drop-shadow(0 0 45px rgba(252, 74, 201, 0.65)) drop-shadow(0 0 70px rgba(55, 118, 255, 0.75));
}

.cosmos-app[data-phase="afterglow"] .outer-arc-one { animation-duration: 45s; }

/* Responsive Rules */
@media (max-width: 700px) {
  .header { padding: 16px 16px 2px; }
  .edition { font-size: 8px; padding: 4px 10px; }
  .edition-suffix { display: none; }
  .portal-frame { width: min(36svh, 60vw, 290px); }
  .connection-panel { width: calc(100% - 20px); padding: 14px 14px 12px; }
  .music-controls { gap: 10px; padding: 6px 12px; }
}

@media (max-width: 390px) {
  .brand { font-size: 24px; }
  .portal-frame { min-width: 185px; width: min(34svh, 58vw, 240px); }
  .orbit-action { width: 84px; }
  .orbit-action .action-disc { width: 66px; }
  .action-label { font-size: 9px; }
  .music-disc { min-width: 60px; }
  .disc-label { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .outer-arc-one, .outer-arc-two, .orbit-track, .universe-disc #universe,
  .core-glow, .orbit-action .action-disc, .orbit-action .action-disc::before,
  .music-disc.active .music-icon::before { animation: none !important; }
  .portal-frame, .action-disc, .music-icon { transition: none !important; }
}
