/* RE:AWAKEN / visual score. Only decorations and art move; reading and controls
   retain their geometry. Independent transforms preserve pointer parallax. */
.rhythm-scene{--rhythm-beat:0;--rhythm-tick:0;--rhythm-bar:0;--rhythm-sway:0;--rhythm-swing:0;--rhythm-orbit:0deg;--rhythm-scan:0;--rhythm-energy:0}
.rhythm-edge{position:absolute;right:5.5rem;bottom:1rem;display:flex;align-items:flex-end;gap:4px;height:18px;pointer-events:none;color:var(--orange);z-index:3}
.rhythm-edge i{display:block;width:5px;height:5px;background:currentColor;transform-origin:bottom;opacity:.3}
.rhythm-scene[data-rhythm-live] .rhythm-edge i{height:16px;opacity:calc(.25 + var(--rhythm-energy)*.5);scale:1 calc(.25 + var(--rhythm-beat)*.75)}
.rhythm-scene[data-rhythm-live] .rhythm-edge i:nth-child(2){scale:1 calc(.4 + var(--rhythm-tick)*.6)}
.rhythm-scene[data-rhythm-live] .rhythm-edge i:nth-child(3){scale:1 calc(.3 + var(--rhythm-bar)*.7)}
.rhythm-scene[data-rhythm-step="0"] .rhythm-edge i:nth-child(1),.rhythm-scene[data-rhythm-step="1"] .rhythm-edge i:nth-child(2),.rhythm-scene[data-rhythm-step="2"] .rhythm-edge i:nth-child(3),.rhythm-scene[data-rhythm-step="3"] .rhythm-edge i:nth-child(4){opacity:1}
.site-header,.status-band,.folio-strip,.realms-home,.factions,.database,.archive-home,.site-footer,.page-opening{position:relative}
.site-header:after{content:'';position:absolute;inset:auto 0 -3px;height:3px;background:var(--yellow);transform-origin:left;scale:calc(.08 + var(--rhythm-scan)*.92) 1;opacity:calc(var(--rhythm-energy)*.85);pointer-events:none}
.brand:before{scale:calc(1 + var(--rhythm-beat)*.12);rotate:calc(var(--rhythm-swing)*3deg)}
.brand-mark em{display:inline-block;translate:0 calc(var(--rhythm-beat)*-2px)}
.status-band:after{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--orange);scale:1 calc(.25 + var(--rhythm-beat)*.75);opacity:var(--rhythm-energy)}
/* The city breathes over eight beats; typography gets a restrained printed echo. */
.cover-art img{scale:calc(1.01 + var(--rhythm-bar)*.014);translate:calc(var(--rhythm-sway)*3px) calc(var(--rhythm-beat)*2px)}
.cover-title .re-word{ text-shadow:calc(var(--rhythm-beat)*4px) calc(var(--rhythm-beat)*2px) 0 #1112}
.cover-title .re-word i{display:inline-block;translate:calc(var(--rhythm-beat)*4px) 0;rotate:calc(var(--rhythm-swing)*1.5deg)}
.cover-coordinate{translate:0 calc(var(--rhythm-beat)*-4px)}
.cover-art-caption strong{display:block;translate:calc(var(--rhythm-sway)*5px) 0}
.cover-scroll i{translate:0 calc(var(--rhythm-beat)*4px)}
.cover-spine{background-position:0 calc(var(--rhythm-scan)*28px)}
.rhythm-halo{position:absolute;z-index:2;pointer-events:none;right:13%;top:16%;width:clamp(130px,21vw,310px);aspect-ratio:1;border:1px solid #fff4;border-radius:50%;opacity:calc(var(--rhythm-energy)*.75);scale:calc(.96 + var(--rhythm-bar)*.08);rotate:var(--rhythm-orbit)}
.rhythm-halo:before,.rhythm-halo:after{content:'';position:absolute;inset:12%;border:1px dashed #fff7;border-radius:50%}
.rhythm-halo:after{inset:-8px;border:2px solid transparent;border-top-color:var(--yellow);border-bottom-color:#fff9;scale:calc(1 + var(--rhythm-beat)*.05);rotate:90deg}
.rhythm-halo i{position:absolute;top:50%;left:-5px;width:10px;height:10px;background:var(--yellow);rotate:45deg}
.cover .rhythm-edge{right:6rem;bottom:9.5rem;color:var(--yellow)}
/* Nova and Lirya share the song, but alternate the movement of orbit and stripes. */
.cast-figure img{translate:calc(var(--rhythm-sway)*4px) calc(var(--rhythm-beat)*-7px);rotate:calc(var(--rhythm-swing)*.32deg);transform-origin:50% 75%}
.cast-sunburst .cast-figure img{translate:calc(var(--rhythm-sway)*-5px) calc(var(--rhythm-beat)*-10px);rotate:calc(var(--rhythm-swing)*-.55deg)}
.cast-orbit{scale:calc(1 + var(--rhythm-bar)*.075);rotate:var(--rhythm-orbit)}
.cast-orbit:after{border-top:4px solid var(--cast-accent);border-bottom:4px solid var(--cast-accent);opacity:calc(.5 + var(--rhythm-beat)*.5);rotate:calc(var(--rhythm-orbit)*-2)}
.cast-bg:after{translate:calc(var(--rhythm-sway)*9px) 0;scale:calc(1 + var(--rhythm-beat)*.055) 1}
.cast-watermark{translate:0 calc(var(--rhythm-sway)*-9px)}
.cast-registration{translate:calc(var(--rhythm-tick)*3px) 0;opacity:calc(.55 + var(--rhythm-beat)*.4)}
.cast-art-label i{display:inline-block;translate:calc(var(--rhythm-beat)*6px) 0}
.cast-heading h2 span{display:inline-block;text-shadow:calc(var(--rhythm-beat)*3px) 0 0 #fc542d33}
.cast-picker button[aria-pressed=true]:after{content:'';position:absolute;bottom:-4px;left:10%;width:80%;height:2px;background:var(--orange);scale:calc(.3 + var(--rhythm-beat)*.7) 1;opacity:var(--rhythm-energy)}
/* Editorial accents: registration marks, card corners, dossier stamps, year rules. */
.chapter-number{translate:0 calc(var(--rhythm-bar)*-5px)}
.chapter-heading h2 span{display:inline-block;translate:calc(var(--rhythm-beat)*3px) 0}
.section-head .kicker:before,.page-opening .kicker:before{content:'';display:inline-block;width:6px;height:6px;margin-right:.6rem;background:var(--orange);rotate:calc(var(--rhythm-beat)*45deg);scale:calc(1 + var(--rhythm-beat)*.3)}
.realm-card:before{translate:calc(var(--rhythm-beat)*-10px) calc(var(--rhythm-beat)*10px)}
.realm-card:nth-child(3n+2):before{translate:calc(var(--rhythm-tick)*-9px) calc(var(--rhythm-tick)*9px)}
.realm-card:nth-child(3n):before{translate:calc(var(--rhythm-bar)*-10px) calc(var(--rhythm-bar)*10px)}
.realm-card .realm-arrow{translate:calc(var(--rhythm-beat)*3px) calc(var(--rhythm-beat)*-3px)}
.realm-card:nth-child(even) .realm-arrow{translate:calc(var(--rhythm-tick)*3px) calc(var(--rhythm-tick)*-3px)}
.faction:before{translate:calc(var(--rhythm-sway)*5px) 0}
.faction .dossier-ribbon{translate:calc(var(--rhythm-beat)*3px) 0}
.faction .dossier-ribbon>span:last-child{translate:calc(var(--rhythm-tick)*3px) 0}
.dossier-card .class-code{translate:calc(var(--rhythm-bar)*4px) 0;rotate:calc(var(--rhythm-swing)*.5deg)}
.dossier-card .tag{box-shadow:calc(var(--rhythm-beat)*3px) calc(var(--rhythm-beat)*3px) 0 #1113}
.archive-year{translate:calc(var(--rhythm-beat)*2px) 0}
.timeline-item:before{scale:calc(1 + var(--rhythm-beat)*.45)}
.page-opening:after{background-position:0 calc(var(--rhythm-scan)*24px)}
.footer-brand span{display:inline-block;translate:0 calc(var(--rhythm-beat)*-4px)}
.chapter-rail a[aria-current]:after{content:'';position:absolute;left:2px;top:5px;bottom:5px;width:2px;background:var(--orange);scale:1 calc(.25 + var(--rhythm-beat)*.75)}
.music-popover label[for=world-rhythm]{margin-top:.8rem}
.music-popover select{width:100%;border:1px solid #727c65;background:#22271f;color:var(--paper);padding:.6rem .4rem;font:700 .66rem var(--mono);border-radius:0}
.music-popover select:disabled{opacity:.55}
@media(max-width:940px){.rhythm-edge{right:1.5rem}.cover .rhythm-edge{right:2rem}.rhythm-halo{right:10%;top:12%;width:180px}}
@media(max-width:650px){.rhythm-halo{width:145px}.cast-figure img{translate:calc(var(--rhythm-sway)*2px) calc(var(--rhythm-beat)*-4px)}.cast-sunburst .cast-figure img{translate:calc(var(--rhythm-sway)*-2px) calc(var(--rhythm-beat)*-6px)}.rhythm-edge{bottom:.65rem;height:12px}}
/* Independent transforms also stop when the OS or the existing motion control
   disables animation. This applies before JS executes or if it is unavailable. */
.motion-off .rhythm-scene{--rhythm-beat:0!important;--rhythm-tick:0!important;--rhythm-bar:0!important;--rhythm-sway:0!important;--rhythm-swing:0!important;--rhythm-orbit:0deg!important;--rhythm-energy:0!important}
@media(prefers-reduced-motion:reduce){.rhythm-scene{--rhythm-beat:0!important;--rhythm-tick:0!important;--rhythm-bar:0!important;--rhythm-sway:0!important;--rhythm-swing:0!important;--rhythm-orbit:0deg!important;--rhythm-energy:0!important}}
@media print{.rhythm-edge,.rhythm-halo{display:none}}
