/* Black carries the scene; violet light gives each main picture its own depth. */
[data-atmosphere] { position: relative; isolation: isolate; }
.atmosphere-plane { position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; overflow: hidden; --field-background: radial-gradient(ellipse 38% 62% at var(--field-x,75%) var(--field-y,52%), #5734775c, #20112d3d 58%, transparent 100%); }
.atmosphere-plane:before { content: ''; position: absolute; inset: 0; background: var(--field-background); mask-image: linear-gradient(transparent,#000 8%,#000 92%,transparent); }
.atmosphere-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.atmosphere-plane[data-motion=offscreen]:before { animation-play-state: paused; }
.atmosphere-pulse { position: absolute; width: 24px; height: 24px; margin: -12px; border: 1px solid #c3a5e48c; border-radius: 50%; pointer-events: none; animation: field-pulse .9s ease-out forwards; }
@keyframes field-pulse { from { opacity: .65; transform: scale(1); } to { opacity: 0; transform: scale(6); } }
[data-atmosphere=memory] .atmosphere-plane { --field-background: radial-gradient(ellipse 42% 48% at var(--field-x) var(--field-y), #59367c54, #24132f2b 60%, transparent 100%), radial-gradient(ellipse 65% 22% at 58% 94%,#89577630,#5030521c 60%,transparent); }
[data-atmosphere=flow] .atmosphere-plane { --field-background: radial-gradient(ellipse 40% 62% at var(--field-x) 56%, #4b2a705c, #2514333d 58%, transparent 100%); }
[data-atmosphere=orbit] .atmosphere-plane { --field-background: radial-gradient(ellipse 44% 54% at var(--field-x) var(--field-y), #53377560, #18223c30 60%, transparent 100%); }
[data-atmosphere=begin] .atmosphere-plane { --field-background: radial-gradient(ellipse 72% 62% at 50% 62%, #66334d60, #42265e43 56%, transparent 100%); }
.chapter .scene-panel { background: linear-gradient(140deg,#21152dd9,#0e0b18e8); border-color: #a78bfa30; box-shadow: 0 28px 100px #0006, 0 0 90px -30px #a78bfa33; }
.scene-panel:before { opacity: .7; }
.scene-panel:after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(ellipse at 80% 0%,#a78bfa16,transparent 65%); }
.chapter-label>span { border-color: #a78bfa45; color: #c6b4e8; }
.scene-tabs button.active, .platform-choice button.active { background: #a78bfa1c; border-color: #a78bfa99; box-shadow: 0 0 24px #a78bfa10; }
.scene-tabs button:hover, .platform-choice button:hover { border-color: var(--violet); color: var(--bone); }
.message.mine { background: #a78bfa21; border-color: #a78bfa30; }
.message.theirs { background: #ece8e109; border-color: #a78bfa15; }
.companion-avatar { background: linear-gradient(140deg,#a78bfa33,#ff6b9d1c); border-color: #a78bfa55; color: #cfbcf2; box-shadow: 0 0 28px #a78bfa18; }
.scene-top-mark { color: var(--violet); animation: field-breathe 4s ease-in-out infinite alternate; }
.memory-scene:before { background: radial-gradient(ellipse,#a78bfa10,#3b24420a 52%,transparent 75%); }
.memory-scene:after { content: none; }
.memory-lines .living { stroke-width: 1; filter: none; }
.memory-node { box-shadow: 0 0 14px 3px #a78bfa55; animation: field-breathe 3s ease-in-out infinite alternate; }
.memory-node.n2 { animation-delay: -1s; }
.memory-node.n3 { animation-delay: -2s; }
.memory-fragment { padding-left: 16px; border-left: 1px solid #a78bfa4d; background: linear-gradient(90deg,#a78bfa0d,transparent); }
.memory-steps button.active { border-color: var(--violet); }
.task-progress li.done>span { color: #d4c3f2; background: #a78bfa1a; border-color: #a78bfa55; box-shadow: 0 0 20px #a78bfa15; }
.task-result { background: linear-gradient(110deg,#a78bfa13,#5fe6c005); border-color: #a78bfa38; }
.result-icon { background: #a78bfa18; color: #cfb9f5; }
.orbit-line { border-color: #a78bfa5c; box-shadow: 0 0 40px #a78bfa14; }
.orbit-line:after { content: none; }
.platform-orbit>img { filter: drop-shadow(0 0 25px #a78bfa80); }
.text-link span { color: var(--violet); }
.begin-glow { background: none; }
.atmosphere-paused .atmosphere-plane:before, .atmosphere-paused .memory-scene:after, .atmosphere-paused .memory-node, .atmosphere-paused .orbit-line:after, .atmosphere-paused .scene-top-mark { animation: none; }
@keyframes field-breathe { from { opacity: .5; } to { opacity: 1; } }
@media (max-width:800px) {
  .atmosphere-plane { --field-background: radial-gradient(ellipse 70% 45% at 50% 70%,#57347766,#20112d3d 60%,transparent 100%); }
  [data-atmosphere=memory] .atmosphere-plane { --field-background: radial-gradient(ellipse 75% 30% at 50% 82%,#59367c66,#24132f3d 60%,transparent 100%); }
  [data-atmosphere=orbit] .atmosphere-plane { --field-background: radial-gradient(ellipse 80% 55% at 50% 62%,#53377566,#18223c3d 60%,transparent 100%); }
}
@media (prefers-reduced-motion:reduce) {
  .atmosphere-plane:before, .memory-scene:after, .memory-node, .orbit-line:after, .scene-top-mark { animation: none; }
}
