/* Living Halo R1 — additive motion over Gold Halo. Exact R4 art is untouched.
   Movement is limited to opacity/transform; all decoration is non-interactive. */
:root { --living-ease:cubic-bezier(.2,.75,.25,1); }
.halo-wallpaper {
  opacity:.88;
  contain:strict;
  --living-light:color-mix(in srgb, var(--accent) 52%, transparent);
}
.halo-wallpaper::before {
  inset:-14%;
  background:radial-gradient(ellipse at 18% 48%,color-mix(in srgb,var(--accent) 12%,transparent),transparent 42%),
    radial-gradient(ellipse at 84% 70%,color-mix(in srgb,var(--line) 21%,transparent),transparent 45%),
    radial-gradient(ellipse at 42% 95%,color-mix(in srgb,var(--accent) 7%,transparent),transparent 52%);
  animation:none;
}
.halo-wallpaper::after {
  left:calc(50% - min(58vw, 680px)); top:20%; width:min(116vw,1360px);
  border-color:color-mix(in srgb,var(--accent) 12%,transparent);
  transform:scaleY(.56) rotate(-20deg);
}
.living-lightfield,.living-orbit,.living-echoes { position:absolute; pointer-events:none; }
.living-lightfield {
  inset:-5%; opacity:.42;
  background-image:radial-gradient(circle at 9% 29%,var(--living-light) 0 1px,transparent 1.7px),
    radial-gradient(circle at 91% 39%,var(--living-light) 0 1.2px,transparent 1.8px),
    radial-gradient(circle at 24% 72%,var(--living-light) 0 1px,transparent 1.7px),
    radial-gradient(circle at 73% 87%,var(--living-light) 0 1.2px,transparent 1.9px),
    radial-gradient(circle at 67% 24%,var(--living-light) 0 1px,transparent 1.7px),
    radial-gradient(circle at 41% 55%,var(--living-light) 0 1px,transparent 1.7px);
}
.living-orbit {
  width:min(112vw,1100px); aspect-ratio:1; left:50%; top:26%;
  border:1px solid color-mix(in srgb,var(--accent) 9%,transparent);
  border-radius:50%; transform:translateX(-50%) scaleY(.52) rotate(18deg);
}
.living-orbit::before,.living-orbit::after {
  content:""; position:absolute; width:5px; height:5px; border-radius:50%;
  background:var(--living-light); box-shadow:0 0 14px color-mix(in srgb,var(--accent) 25%,transparent);
  left:14.5%; top:14.5%;
}
.living-orbit::after { left:auto; top:auto; right:14.5%; bottom:14.5%; width:3px; height:3px; opacity:.65; }
.living-echoes { inset:0; overflow:hidden; }
.living-echo { position:absolute; width:240px; height:240px; transform:translate(-50%,-50%); color:var(--accent); }
.living-echo-ring { position:absolute; inset:0; border:1px solid currentColor; border-radius:50%; opacity:0; }
.living-echo-ring:first-child { background:radial-gradient(circle,color-mix(in srgb,var(--accent) 8%,transparent),transparent 68%); }
.living-echo-ring:nth-child(2) { inset:18px; }
.living-echo-ring:nth-child(3) { inset:34px; }
.living-echo-light { position:absolute; width:3px; height:3px; left:50%; top:50%; border-radius:50%; background:currentColor; opacity:0; box-shadow:0 0 8px color-mix(in srgb,var(--accent) 55%,transparent); }

/* Clear static hover/focus feedback remains even when decorative motion is off. */
.recording-choices button:not(:disabled):hover,
.recording-choices button:focus-visible { box-shadow:0 0 0 1px var(--accent),0 8px 22px color-mix(in srgb,var(--accent) 12%,transparent); }
.recording-row:focus-within { border-color:var(--accent); }
.theme-option:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }

@media (prefers-reduced-motion:no-preference) {
  :root[data-living-motion=on] .halo-wallpaper::before { animation:living-tide 25s ease-in-out infinite alternate; }
  :root[data-living-motion=on] .living-lightfield { animation:living-starlight 11s ease-in-out infinite alternate; }
  :root[data-living-motion=on] .living-orbit { animation:living-orbit-drift 34s ease-in-out infinite alternate; }
  :root[data-living-motion=on] .living-echo-ring { animation:living-echo 1.4s var(--living-ease) both; }
  :root[data-living-motion=on] .living-echo-ring:nth-child(2) { animation-delay:100ms; }
  :root[data-living-motion=on] .living-echo-ring:nth-child(3) { animation-delay:200ms; }
  :root[data-living-motion=on] .living-echo-light { animation:living-light 1.5s var(--living-ease) var(--echo-delay) both; }
  :root[data-living-motion=on] :is(.recording-choices button,.theme-option,.recording-row,.play-all) {
    transition:transform .22s var(--living-ease),box-shadow .22s ease,border-color .22s ease,background-color .22s ease;
  }
  :root[data-living-motion=on] :is(.recording-choices button,.theme-option,.play-all):not(:disabled):active { transform:scale(.98); }
  :root[data-living-motion=on] #player :is(.play-button,.seek-step,.queue-control):not(:disabled):active { scale:.94; }
  :root[data-living-motion=on] #player :is(.play-button,.seek-step,.queue-control) { transition:scale .18s var(--living-ease),background-color .18s ease; }
  :root[data-living-motion=on] .help-item[open] p { animation:living-reveal .24s ease both; }
  @media (hover:hover) and (pointer:fine) {
    :root[data-living-motion=on] .recording-choices button:not(:disabled):hover,
    :root[data-living-motion=on] .theme-option:hover { transform:translateY(-3px); }
    :root[data-living-motion=on] .play-all:hover { transform:translateY(-2px); }
    :root[data-living-motion=on] .bani-disc-button .bani-disc-name { transition:color .2s ease; }
    :root[data-living-motion=on] .bani-disc-button:hover .bani-disc-name { color:var(--accent); }
  }
}

/* Stop off-screen work. Still scenery also stops the existing home halo/equaliser. */
body:is(.page-open,.player-open,.focus-open) > .halo-wallpaper { display:none; }
:root[data-living-motion=off] .halo-wallpaper::before,
:root[data-living-motion=off] .living-lightfield,
:root[data-living-motion=off] .living-orbit,
:root[data-still-scenery=true] .bani-halo::before,
:root[data-still-scenery=true] .bani-halo::after,
:root[data-still-scenery=true] .halo-sparks,
:root[data-still-scenery=true] .disc-now i,
:root[data-still-scenery=true] #player .puck-face,
:root[data-scene-hidden=true] #player .puck-face,
:root[data-scene-hidden=true] .disc-now i { animation-play-state:paused!important; }
:root[data-living-motion=off] .living-echoes { display:none; }
:root[data-theme=ivory] .halo-wallpaper,
:root[data-theme=sage] .halo-wallpaper,
:root[data-theme=sky] .halo-wallpaper { opacity:.55; }
:root[data-theme=contrast] .halo-wallpaper { display:none; }
:root[data-theme=contrast] .recording-choices button { box-shadow:none; }
@media (forced-colors:active) { .halo-wallpaper { display:none; } }
@media (prefers-reduced-motion:reduce) {
  .halo-wallpaper::before,.living-lightfield,.living-orbit,.living-echo-ring,.living-echo-light { animation:none!important; }
  .living-echoes { display:none; }
}
@keyframes living-tide { from { transform:translate(-2%,-1%) scale(1); } to { transform:translate(4%,3%) scale(1.055); } }
@keyframes living-starlight { from { opacity:.3; transform:translateY(0); } to { opacity:.65; transform:translateY(-8px); } }
@keyframes living-orbit-drift { from { transform:translateX(-50%) scaleY(.52) rotate(18deg); } to { transform:translateX(-50%) scaleY(.57) rotate(32deg); } }
@keyframes living-echo { 0% { opacity:0; transform:scale(.14); } 14% { opacity:.64; } 100% { opacity:0; transform:scale(1.3); } }
@keyframes living-light { 0% { opacity:0; transform:translate(0,0) scale(.4); } 25% { opacity:.85; } 100% { opacity:0; transform:translate(var(--echo-x),var(--echo-y)) scale(.7); } }
@keyframes living-reveal { from { opacity:.65; } to { opacity:1; } }
