/* Finite, compositor-driven ceremony. One existing character image, no new renderer. */
.result-ceremony{--ritual-ink:#e9c478;border-radius:26px 26px 0 0!important;background:radial-gradient(ellipse at 50% 20%,#49381f55,transparent 65%),#0e1113!important}
.result-ceremony .sheet-body{position:relative}
.result-ceremony .ceremony-stage{height:260px!important;isolation:isolate;overflow:hidden;border-radius:18px;background:radial-gradient(ellipse at 50% 80%,#ac7a2122,transparent 58%)}
.result-ceremony .ceremony-mascot.sheet-art{height:220px!important;width:auto!important;inset:20px 0 auto;z-index:4;filter:drop-shadow(0 9px 12px #0009)!important}
.result-ceremony .ritual-phase{font:500 15px/24px 'Songti SC',Georgia,serif;letter-spacing:2px;text-align:center;color:#f5dfad;min-height:24px;order:0}
.ritual-seal{position:absolute;width:248px;height:248px;top:0;left:50%;transform:translateX(-50%);color:#edc675;opacity:.35;z-index:1}
.ritual-seal svg{width:100%;height:100%;stroke:currentColor;stroke-width:.8}
.ritual-gate{position:absolute;top:0;bottom:0;width:50%;z-index:7;background:linear-gradient(90deg,#121416,#25231af5);border:1px solid #b7934955;opacity:0}
.gate-left{left:0;border-right:2px solid #ebcb83;border-radius:15px 0 0 15px}
.gate-right{right:0;border-left:2px solid #ebcb83;background:linear-gradient(270deg,#121416,#25231af5);border-radius:0 15px 15px 0}
.result-ceremony .ceremony-emblem{display:none}
.result-ceremony .ceremony-banner{bottom:0;font-size:8px;opacity:.6}
.result-ceremony[data-ritual-kind="coronation"] .ceremony-banner{display:none}
.result-ceremony .ceremony-counter{font:600 54px/1.2 Georgia,serif!important;color:#f6d992}
.result-ceremony .ceremony-controls{position:relative;z-index:10}
.result-ceremony.ceremony-playing .ceremony-mascot{animation:ritual-character-in 1.4s .65s cubic-bezier(.16,1,.3,1) both!important}
.result-ceremony.ceremony-player.ceremony-playing .ceremony-mascot{animation:ritual-character-in 1s .15s ease-out both!important}
.result-ceremony.ceremony-playing .ritual-seal{animation:ritual-seal-open 4s ease-out both}
.result-ceremony[data-ritual-kind="coronation"].ceremony-playing .ritual-gate{animation:ritual-gate-left 1.4s .25s cubic-bezier(.6,0,.2,1) both}
.result-ceremony[data-ritual-kind="coronation"].ceremony-playing .gate-right{animation-name:ritual-gate-right}
.result-ceremony.ceremony-player.ceremony-playing .ceremony-coin{animation:ritual-coin-gather 1.4s both!important;animation-delay:calc(.55s + var(--delay))!important;z-index:5}
.result-ceremony.ceremony-hero.ceremony-playing .ceremony-spark{animation:ritual-star-rise 2.2s both!important;animation-delay:calc(1.8s + var(--delay))!important;z-index:5}
.result-ceremony .ceremony-rays{width:290px;height:290px;top:-15px;color:#f6d992}
.result-ceremony.ceremony-playing .ceremony-rays{animation:ritual-rays-open 3.4s .6s ease-out both!important}
.result-ceremony.ceremony-player.ceremony-playing .ceremony-rays{animation-duration:2s!important}
.result-ceremony.ceremony-playing .sheet-body>.kv,.result-ceremony.ceremony-playing .sheet-body>.note,.result-ceremony.ceremony-playing .sheet-body>.btn-primary,.result-ceremony.ceremony-playing .sheet-body>.btn-secondary{animation-delay:2.8s!important}
.result-ceremony.ceremony-hero.ceremony-playing .sheet-body>.kv,.result-ceremony.ceremony-hero.ceremony-playing .sheet-body>.note,.result-ceremony.ceremony-hero.ceremony-playing .sheet-body>.btn-primary,.result-ceremony.ceremony-hero.ceremony-playing .sheet-body>.btn-secondary{animation-delay:5.2s!important}
@keyframes ritual-character-in{from{opacity:0;transform:translateY(16px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes ritual-gate-left{0%{opacity:1;transform:translateX(0)}85%{opacity:1}100%{opacity:0;transform:translateX(-100%)}}
@keyframes ritual-gate-right{0%{opacity:1;transform:translateX(0)}85%{opacity:1}100%{opacity:0;transform:translateX(100%)}}
@keyframes ritual-seal-open{0%{opacity:0;transform:translateX(-50%) scale(.65) rotate(-35deg)}35%{opacity:.8}100%{opacity:.35;transform:translateX(-50%) scale(1) rotate(0)}}
@keyframes ritual-coin-gather{0%{opacity:0;transform:translate(var(--x),var(--y)) scale(.5)}20%{opacity:1}75%{opacity:1}100%{opacity:0;transform:translate(0,105px) scale(.4)}}
@keyframes ritual-star-rise{0%{opacity:0;transform:translate(var(--x),80px)}30%{opacity:1}100%{opacity:0;transform:translate(var(--x),calc(var(--y) - 65px))}}
@keyframes ritual-rays-open{0%{opacity:0;transform:scale(.5) rotate(-10deg)}35%{opacity:.7}100%{opacity:.25;transform:scale(1.1) rotate(15deg)}}
@media(prefers-reduced-motion:reduce){.result-ceremony *{animation:none!important;transition:none!important}}
body[data-motion="off"] .result-ceremony *{animation:none!important;transition:none!important}
/* Keep the fixed entry dock above portal light and outside its painted region. */
body[data-tab="game"] #view-game>.entry-panel{isolation:isolate;z-index:25}
.result-ceremony .ceremony-controls{position:relative;top:auto;right:auto;left:auto;margin:0;justify-content:flex-end;height:32px}
.result-ceremony .ceremony-controls button{min-height:30px;padding:3px 13px;width:auto}
.result-ceremony .preview-label{margin:0!important;padding:5px!important;line-height:1.4}
.result-ceremony .sheet-body{gap:8px!important}
.result-ceremony .sheet-head{margin-bottom:9px}
.result-ceremony .sheet-head h2{font-size:23px}
.result-ceremony .ceremony-stage{height:225px!important}
.result-ceremony .ceremony-mascot.sheet-art{height:190px!important;inset:14px 0 auto}
.result-ceremony .ritual-seal{width:220px;height:220px}
@media(max-height:740px){.result-ceremony .ceremony-stage{height:190px!important}.result-ceremony .ceremony-mascot.sheet-art{height:155px!important}.result-ceremony .ritual-seal{width:185px;height:185px}}
.result-ceremony[data-ritual-kind="coronation"] .sheet-head h2{transition:opacity .5s ease}
.result-ceremony[data-ritual-kind="coronation"][data-ritual-phase="0"] .sheet-head h2,.result-ceremony[data-ritual-kind="coronation"][data-ritual-phase="1"] .sheet-head h2{opacity:0}

/* Honor stays separate from the anatomy: halo behind, emblem beside the pedestal. */
.ritual-glory{position:absolute;top:-8px;left:50%;width:170px;height:170px;transform:translateX(-50%);z-index:2;opacity:.25;color:#f5d58d}
.ritual-glory svg{width:100%;height:100%;stroke:currentColor;stroke-width:1}
.ritual-honor{position:absolute;bottom:15px;right:12%;width:56px;height:68px;color:#f4d48c;z-index:5;opacity:0;text-align:center}
.ritual-honor svg{width:52px;height:52px;stroke:currentColor;stroke-width:1.3;fill:#171a17e8}
.ritual-honor span{display:block;font:600 9px/14px Georgia,serif;letter-spacing:3px;padding-left:3px}
.result-ceremony.ceremony-playing .ritual-glory{animation:ritual-glory-light 2s 1.3s ease-out both}
.result-ceremony.ceremony-playing .ritual-honor{animation:ritual-honor-reveal .9s 2.7s ease-out both}
.result-ceremony.ceremony-complete .ritual-honor{opacity:1}
.result-ceremony .ritual-covenant{position:relative;display:grid;gap:4px;text-align:center;padding:12px 8px;border:1px solid #d5b36e55;border-radius:12px;background:linear-gradient(110deg,#171b18,#342b1d88,#171b18);color:#f2d498;opacity:1}
.ritual-covenant .covenant-title{font-size:10px;letter-spacing:3px;color:#bda578}
.ritual-covenant strong{font:500 17px/1.5 Georgia,'Songti SC',serif}
.ritual-covenant small{font-size:10px;color:#b9b3a3;line-height:1.6}
.result-ceremony.ceremony-playing .ritual-covenant{animation:ritual-plan-reveal .8s 4.4s cubic-bezier(.2,.65,.3,1) both}
.result-ceremony[data-ritual-kind="coronation"] .ceremony-stage .guardian-energy{opacity:.3}
@keyframes ritual-glory-light{from{opacity:0;transform:translateX(-50%) scale(.92)}to{opacity:.7;transform:translateX(-50%) scale(1)}}
@keyframes ritual-honor-reveal{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@keyframes ritual-plan-reveal{from{opacity:0;transform:translateY(12px);clip-path:inset(0 0 100% 0)}to{opacity:1;transform:translateY(0);clip-path:inset(0)}}
@media(max-height:740px){.ritual-glory{width:145px;height:145px}.ritual-honor{width:48px;height:58px;right:10%;bottom:10px}.ritual-honor svg{width:44px;height:44px}}

.result-ceremony .hero-result-details{border:1px solid #b69a5944;border-radius:10px;color:#c6b896}
.hero-result-details summary{font-size:12px;padding:10px 12px;cursor:pointer}
.hero-result-details .kv{border:0;border-top:1px solid #b69a5933;border-radius:0 0 10px 10px}
.result-ceremony.ceremony-playing .hero-result-details{animation:ceremony-detail .5s 5.2s both}
.result-ceremony[data-ritual-kind="coronation"] .ceremony-stage{height:205px!important}
.result-ceremony[data-ritual-kind="coronation"] .ceremony-mascot.sheet-art{height:178px!important;inset:9px 0 auto}
.result-ceremony[data-ritual-kind="coronation"] .ritual-seal{width:205px;height:205px}
@media(max-height:740px){.result-ceremony[data-ritual-kind="coronation"] .ceremony-stage{height:175px!important}.result-ceremony[data-ritual-kind="coronation"] .ceremony-mascot.sheet-art{height:150px!important}}

/* Keep the guardian-led player ceremony and a separate, always reachable footer. */
.sheet.result-ceremony.ceremony-player{display:flex;flex-direction:column;max-height:calc(100dvh - 18px);overflow:hidden;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.ceremony-player>.sheet-head,.ceremony-player:before{flex-shrink:0}
.ceremony-player>#sheet-body{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}
.player-result-footer{flex-shrink:0;padding-top:12px;margin-top:6px;border-top:1px solid #c5a65c33;background:#101412;position:relative;z-index:12}
.ceremony-player .player-result-footer .btn-primary{animation:none!important;min-height:50px}
/* Result themes come from the settled round, independent of the currently open hall. */
.result-ceremony[data-result-hall="1"]{--result-bg:url('../assets/guardian/08-temple-background.webp');--a:#efcf88;--b:#b17f36}
.result-ceremony[data-result-hall="2"]{--result-bg:url('../assets/arena/bg-silver.webp');--a:#c3e9fa;--b:#659ab7}
.result-ceremony[data-result-hall="3"]{--result-bg:url('../assets/arena/bg-elite.webp');--a:#f9d487;--b:#bc8737}
.sheet.result-ceremony[data-result-hall]{background:linear-gradient(#0d1114e8,#0d1114f5 75%),var(--result-bg) center top/cover no-repeat!important}
.result-ceremony[data-result-hall] .ceremony-stage{background:linear-gradient(#0d111422,#0d111438),var(--result-bg) center/cover no-repeat}
.result-hall-label{text-align:center;font-size:10px;letter-spacing:2px;color:var(--a);line-height:18px}
.result-ceremony[data-result-hall="2"]{border-color:#9fcce280!important}
.result-ceremony[data-result-hall="2"] .ritual-seal,.result-ceremony[data-result-hall="2"] .ritual-glory,.result-ceremony[data-result-hall="2"] .ritual-honor,.result-ceremony[data-result-hall="2"] .ritual-phase,.result-ceremony[data-result-hall="2"] .ceremony-counter,.result-ceremony[data-result-hall="2"] .result-total{color:#c7eaff!important}
.result-ceremony[data-result-hall="2"] .sheet-head h2{color:#deeff9}
.result-ceremony[data-result-hall="2"] .ritual-covenant{border-color:#96cbe166;background:linear-gradient(110deg,#151e25,#28455999,#151e25);color:#cceafd}
.result-ceremony[data-result-hall="2"] .ceremony-coin{background:linear-gradient(90deg,#527b91,#d8f3ff,#7faabd);border-color:#def5ff;box-shadow:0 0 7px #a6ddff55}
.result-ceremony[data-result-hall="3"] .ritual-seal,.result-ceremony[data-result-hall="3"] .ritual-glory{color:#f9d487}
.full-flow-notice{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:12;background:#101714ed;border:1px solid #dec58b66;border-radius:14px;padding:7px 12px;color:#ecdbb5;font-size:11px;pointer-events:none;white-space:nowrap}
.sheet.result-ceremony[data-ritual-kind="claim"]{display:flex;flex-direction:column;max-height:calc(100dvh - 18px);overflow:hidden;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.result-ceremony[data-ritual-kind="claim"]>.sheet-head,.result-ceremony[data-ritual-kind="claim"]:before{flex-shrink:0}
.result-ceremony[data-ritual-kind="claim"]>#sheet-body{overflow:auto;min-height:0;overscroll-behavior:contain}
.result-ceremony[data-ritual-kind="claim"] .player-result-footer .btn-primary{animation:none!important}
.result-ceremony[data-ritual-kind="claim"] .ceremony-stage{height:190px!important}
.result-ceremony[data-ritual-kind="claim"] .ceremony-mascot.sheet-art{height:170px!important;inset:5px 0 auto}
.result-ceremony[data-ritual-kind="claim"].ceremony-playing .ceremony-mascot{animation:ritual-character-in .65s .1s ease-out both!important}
.result-ceremony[data-ritual-kind="claim"].ceremony-playing .ceremony-spark{animation:claim-light-gather 1.5s ease-out both!important;animation-delay:calc(.15s + var(--delay))!important}
.result-ceremony[data-ritual-kind="claim"].ceremony-playing .sheet-body>.note{animation-delay:2.1s!important}
.result-ceremony[data-ritual-kind="claim"] .ceremony-counter:before{content:'+';margin-right:4px}
.result-ceremony[data-ritual-kind="claim"] .ceremony-counter:after{content:' ✨';font-size:20px;vertical-align:middle}
.result-ceremony[data-ritual-kind="claim"] .ritual-seal{opacity:.18}
@keyframes claim-light-gather{0%{opacity:0;transform:translate(var(--x),var(--y)) scale(.5)}25%{opacity:.9}85%{opacity:.9}100%{opacity:0;transform:translate(0,65px) scale(.3)}}
.sheet.result-ceremony.ceremony-hero{display:flex;flex-direction:column;max-height:calc(100dvh - 18px);overflow:hidden;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.result-ceremony.ceremony-hero>.sheet-head,.result-ceremony.ceremony-hero:before{flex-shrink:0}
.result-ceremony.ceremony-hero>#sheet-body{overflow:auto;min-height:0;overscroll-behavior:contain}
.result-ceremony .player-result-footer .btn-primary{animation:none!important;min-height:50px}
.result-ceremony[data-ritual-kind="claim"] .result-total:before{content:'+';margin-right:4px}
