/* A 2.5D battlefield: near/far actors, continuous painted scenery, and an independent camera. */
.rift-battle-ground{position:absolute;inset:0;z-index:0;pointer-events:none}
.rift-battle-world{position:absolute;inset:0;z-index:1;transform-origin:58% 68%;pointer-events:none}
.rift-depth-horizon,.rift-depth-floor,.rift-depth-mist,.rift-depth-platform{display:none;position:absolute;pointer-events:none}
.rift-depth{--hero-ground:12%;--enemy-ground:25%;--enemy-height:82%;--enemy-width:36%;--depth-stone:#b9a77d;--depth-grout:#766c55;--depth-rim:#e3c477;--depth-shadow:#17201a}
[data-theme=riftforge] .rift-depth{--depth-stone:#4d4141;--depth-grout:#201d28;--depth-rim:#d4935f;--depth-shadow:#0c0c19}
[data-theme=arcane] .rift-depth{--depth-stone:#3d526a;--depth-grout:#172d46;--depth-rim:#80cedc;--depth-shadow:#071423}
.rift-stage.rift-depth{perspective:1100px}
.rift-shell[data-biome=guild] .rift-stage.rift-depth,.rift-shell[data-theme=guild]:not([data-biome]) .rift-stage.rift-depth{--scene:url('/riftwalkers/art/guild-courtyard-level.png');background-position:center center}
.rift-depth .rift-depth-horizon{display:block;inset:0 0 28%;z-index:0;background:radial-gradient(ellipse at 50% 30%,#fff3d012,transparent 65%);opacity:.8}
/* Keep the authored courtyard as one continuous image. This plane adds only light. */
.rift-depth .rift-depth-floor{display:block;left:-50%;top:43%;width:200%;height:100%;z-index:1;transform-origin:50% 0;transform:perspective(1000px) rotateX(62deg);background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--depth-stone),transparent 94%) 55%,#07132312);mask-image:linear-gradient(transparent,#000 30%)}
.rift-depth .rift-depth-mist{display:block;inset:36% 0 0;z-index:2;background:linear-gradient(180deg,transparent 10%,#14222b08 100%);pointer-events:none}
.rift-depth .rift-depth-platform{display:block;z-index:2;border:0;border-radius:0;background:none;box-shadow:none;--ward-ink:#e8b45d;opacity:.95}
.rift-depth .rift-depth-platform::before{content:'';position:absolute;inset:0;background:var(--ward-ink);mask:url('/riftwalkers/bindrune.svg') center/contain no-repeat;-webkit-mask:url('/riftwalkers/bindrune.svg') center/contain no-repeat;filter:drop-shadow(0 1px 1px #58462355)}
.rift-depth .rift-depth-platform-hero{left:7.5%;bottom:calc(var(--hero-ground) - 8%);width:40%;height:16%}
.rift-depth .rift-depth-platform-enemy{right:17%;bottom:calc(var(--enemy-ground) - 4.5%);width:22%;height:9%;--ward-ink:#c4eaf0;opacity:.9}
.rift-stage.rift-depth .rift-actor.rift-hero{left:4%!important;right:auto!important;bottom:var(--hero-ground)!important;width:50%!important;height:112%!important;z-index:4}
.rift-stage.rift-depth .rift-actor.rift-enemy{right:calc(28% - var(--enemy-width)/2)!important;left:auto!important;bottom:var(--enemy-ground)!important;width:var(--enemy-width)!important;height:var(--enemy-height)!important;transform-origin:50% 100%;z-index:3}
.rift-stage.rift-depth .rift-actor .rift-sprite{filter:saturate(.85) contrast(1.04) drop-shadow(0 9px 4px #07151b80);object-position:center bottom}
.rift-stage.rift-depth .rift-enemy .rift-sprite{filter:saturate(.76) contrast(.96) brightness(1.05) drop-shadow(0 5px 4px #07151b75)}
.rift-stage.rift-depth .rift-actor-aura{left:28%;right:28%;bottom:-1%;height:5%;background:radial-gradient(ellipse,#07121bd9,transparent 70%);opacity:.8}
.rift-stage.rift-depth[data-enemy=""] .rift-depth-platform-enemy{display:none}
.rift-depth .rift-scenery{z-index:2}.rift-depth .rift-portal{display:none}.rift-depth .rift-ground{display:none}.rift-depth .rift-rift-well{opacity:.16}
.rift-playing:not(.rift-still) .rift-depth-horizon{animation:rift-depth-drift 12s ease-in-out infinite alternate}
@keyframes rift-depth-drift{from{transform:translateX(-.6%) scale(1.02)}to{transform:translateX(.6%) scale(1.025)}}
.rift-stage.rift-depth .rift-fx{z-index:6}
@media(max-width:760px){.rift-depth .rift-depth-platform-hero{left:8%;width:40%}.rift-depth .rift-depth-platform-enemy{right:14%;width:26%}.rift-stage.rift-depth .rift-actor.rift-hero{left:-4%!important;width:64%!important;height:96%!important}.rift-stage.rift-depth .rift-actor.rift-enemy{right:calc(27% - var(--enemy-width)/2)!important;width:var(--enemy-width)!important;height:var(--enemy-height)!important}.rift-stage.rift-depth .rift-actor .rift-sprite{left:17%;width:66%}}

@media(prefers-reduced-motion:reduce){.rift-depth .rift-depth-horizon{animation:none!important}}
html[data-cs-reduce-motion] .rift-depth-horizon,.rift-still .rift-depth-horizon{animation:none!important}

/* Painted floor planes differ by biome; ground and ward share one anchor. */
.rift-shell[data-biome=riftforge] .rift-depth,.rift-shell[data-theme=riftforge]:not([data-biome]) .rift-depth{--hero-ground:9%;--enemy-ground:17%;background-position:center bottom}
.rift-shell[data-biome=arcane] .rift-depth,.rift-shell[data-theme=arcane]:not([data-biome]) .rift-depth{--hero-ground:10%;--enemy-ground:20%;background-position:center bottom}
.rift-depth[data-enemy=golem]{--enemy-height:150%;--enemy-width:50%}
.rift-depth[data-enemy=regent]{--enemy-height:98%;--enemy-width:40%}
.rift-depth[data-enemy=imp]{--enemy-height:66%;--enemy-width:28%}

@media(max-width:760px){.rift-depth{--enemy-width:41%;--enemy-height:72%}.rift-depth[data-enemy=golem]{--enemy-width:62%;--enemy-height:130%}.rift-depth[data-enemy=regent]{--enemy-width:46%;--enemy-height:88%}.rift-depth[data-enemy=imp]{--enemy-width:33%;--enemy-height:58%}}
/* Illuminated Chronicle: real text and live HP over a reusable vector scroll. */
.rift-shell .rift-stage .rift-stage-plate.rift-chronicle{display:grid;grid-template-columns:40px minmax(0,1fr) auto;grid-template-rows:auto 12px;align-items:center;column-gap:9px;row-gap:5px;top:10px!important;width:42%;max-width:410px;min-height:72px;padding:13px 34px 13px 20px!important;border:0;border-radius:0;background:url('/riftwalkers/chronicle-scroll.svg') center/100% 100% no-repeat;box-shadow:0 5px 8px #0007;transform-origin:10% 30%}
.rift-shell .rift-stage .rift-chronicle::before,.rift-shell .rift-stage .rift-chronicle::after{display:none}
.rift-shell .rift-stage .rift-chronicle strong{font:700 16px/1.2 Georgia,serif!important;letter-spacing:.1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#302018}
.rift-shell .rift-stage .rift-chronicle .rift-health-value{font:700 14px/1 Georgia,serif!important;font-variant-numeric:tabular-nums;white-space:nowrap;color:#302018}
.rift-health-crest{grid-row:1/3;width:40px;height:46px;filter:drop-shadow(0 1px 1px #58351c80)}
.rift-shell .rift-chronicle .rift-health-track{grid-column:2/4;position:relative;height:12px;border:1px solid #79501e;border-radius:8px;background:#543721;box-shadow:inset 0 2px 3px #1c140eb0,0 1px #fff5c9;overflow:hidden}
.rift-shell .rift-stage .rift-chronicle .rift-health-track i{position:relative;z-index:1;display:block;min-width:0;border:0;border-top:1px solid #ffdb9e;border-radius:7px;height:100%;background:linear-gradient(#e27957 0%,#c94335 37%,#9b2522 55%,#b94832 85%,#76221d);box-shadow:inset 0 -1px 2px #52100f,0 0 4px #eaa05a66}
.rift-shell .rift-stage .rift-chronicle.enemy-plate .rift-health-track i{background:linear-gradient(#cf899e,#a54577 38%,#78264f 60%,#a44975);border-top-color:#f8c7da}
.rift-health-lag{position:absolute;inset:0 auto 0 0;background:linear-gradient(#ffe7a2,#bd853a);opacity:0;border-radius:7px}
.rift-chronicle .rift-health-track::after{content:'';position:absolute;inset:1px 0;z-index:2;background:repeating-linear-gradient(90deg,transparent 0 calc(20% - 1px),#f6d48c80 calc(20% - 1px) 20%);pointer-events:none}
.rift-shell .rift-chronicle.rift-health-critical{filter:drop-shadow(0 0 5px #c3392799)}
@media(max-width:760px){.rift-shell .rift-stage .rift-stage-plate.rift-chronicle{top:7px!important;width:44%;min-height:47px;padding:8px 19px 8px 11px!important;grid-template-columns:24px minmax(0,1fr) auto;grid-template-rows:auto 7px;gap:3px 4px}.rift-shell .rift-stage .rift-chronicle strong,.rift-shell .rift-stage .rift-chronicle .rift-health-value{font-size:9px!important}.rift-shell .rift-chronicle .rift-health-track{height:7px}.rift-health-crest{width:24px;height:30px}.rift-shell .rift-chronicle.player-plate{left:5px}.rift-shell .rift-chronicle.enemy-plate{right:5px}}
html[data-cs-high-contrast] .rift-shell .rift-chronicle{background:#fff!important;outline:2px solid #000}.rift-shell .rift-stage .rift-chronicle .rift-health-value{grid-column:3}

/* HP values stay within the parchment, clear of the right clasp at every width. */
.rift-shell .rift-stage .rift-chronicle .rift-health-value{display:block!important;position:static;justify-self:end;min-width:max-content;line-height:1.35!important;overflow:visible;padding-right:2px}

/* A quiet HUD: shrink the complete banner uniformly and keep both outer corners anchored. */
.rift-shell .rift-stage .rift-stage-plate.rift-chronicle{scale:.75;transform:none!important;translate:none!important;animation:none!important;transition:none!important;transform-origin:0 0}
.rift-shell .rift-stage .rift-stage-plate.rift-chronicle.enemy-plate{transform-origin:100% 0}

/* Match static/loading portraits to the smaller animated combatants. */
.rift-stage .rift-actor>.rift-sprite{scale:var(--rift-character-scale,1);transform-origin:50% 100%}
.rift-stage[data-hero=ranger] .rift-hero>.rift-sprite{scale:1}

/* A restrained glint inside the health fill; parchment and text stay still. */
.rift-shell .rift-stage .rift-chronicle .rift-health-track i{overflow:hidden}
.rift-shell .rift-stage .rift-chronicle .rift-health-track i::before{content:'';position:absolute;inset:0 auto 0 -35%;width:30%;pointer-events:none;opacity:0;background:linear-gradient(110deg,transparent,#fff4cf66 45%,#fff9e6a3 52%,transparent)}
.rift-playing:not(.rift-still):not(.rift-menu-paused) .rift-stage .rift-chronicle .rift-health-track i::before{animation:rift-health-shimmer 8s ease-in-out infinite}
@keyframes rift-health-shimmer{0%,60%{transform:translateX(0);opacity:0}65%{opacity:.4}88%{transform:translateX(450%);opacity:.4}92%,100%{transform:translateX(450%);opacity:0}}
@media(prefers-reduced-motion:reduce){.rift-shell .rift-stage .rift-chronicle .rift-health-track i::before{animation:none!important;opacity:0!important}}
html[data-cs-reduce-motion] .rift-shell .rift-stage .rift-chronicle .rift-health-track i::before{animation:none!important;opacity:0!important}
