/* Battle ritual: shared pixel grid, parchment lettering and restrained spectral light. */
.intro-ready{min-height:48px;padding:15px 24px;letter-spacing:2px;background:linear-gradient(90deg,transparent,#b8924030,transparent);border-top:1px solid #c6a26255;border-bottom:2px solid #c6a262aa;color:#ffe5ad;box-shadow:0 10px 20px #0004}
.intro-ready:hover,.intro-ready:focus-visible{color:#fff0ce;filter:brightness(1.25);outline:2px solid #d3b97e;outline-offset:5px}
.encounter-rule{padding:25px 14px;background:radial-gradient(ellipse,#09100ef5 15%,#09100e99 60%,transparent 78%)}
.intro-rule .encounter-rule{animation:foe-name .55s ease both}
/* There is no visible plaintext layer in the wizard keyboard or hit cinematics. */
.wizard-weave .cipher-symbol{animation:rune-reweave 1.2s ease-in-out both}
.wizard-weave .key:not(.wide){animation:rune-shift 1.2s ease-in-out both;animation-delay:calc(var(--key-index)*8ms)}
.focus-rune .cipher-glyph{width:42px;height:51px;margin:auto}
.weakpoint-burst .cipher-glyph{width:62px;height:74px;margin:auto}
@keyframes rune-reweave{0%,100%{opacity:1;filter:none}35%{opacity:.45;transform:rotate(-12deg);filter:drop-shadow(4px -3px #e5c48388)}60%{opacity:.8;transform:rotate(8deg) scale(1.15);filter:drop-shadow(-3px 2px #f2dba488)}}
@keyframes rune-shift{0%,100%{transform:none}35%{transform:translate(-3px,2px) rotate(-5deg);filter:brightness(1.3)}65%{transform:translate(3px,-2px) rotate(4deg)}}
/* The bound vowel remains legible beneath the translucent slime. */
.slime-coat{background:linear-gradient(115deg,#acd367dd,#5e883ada 60%,#304f29eb);animation:goop-arrives .6s cubic-bezier(.18,.8,.3,1.2) both}
.slime-coat .trapped-vowel{position:absolute;inset:0;display:grid;place-items:center;color:#e2f4b9;opacity:.72;font:inherit;font-weight:700;text-shadow:1px 2px #27461c,0 0 5px #b5dd7766}
.slime-coat i{z-index:2;animation:slime-bubble 2.8s ease-in-out infinite}.slime-coat i:nth-of-type(2){animation-delay:-1.5s}.slime-coat i:nth-of-type(3){animation-delay:-.8s}
.slime-coat .goop-drip{position:absolute;bottom:0;left:67%;height:5px;width:4px;background:#88af4f;transform-origin:top;animation:goop-drips 2.6s ease-in-out infinite}
.current .slime-coat{animation:none}.tile.gooped{overflow:visible}.tile.gooped .slime-coat{overflow:visible}
@keyframes goop-arrives{0%{transform:translateY(-42px) scale(.25);opacity:0}50%{opacity:1;transform:translateY(2px) scale(1.25,.75)}73%{transform:translateY(-3px) scale(.9,1.12)}100%{transform:none}}
@keyframes slime-bubble{0%,100%{opacity:.4;translate:0 0}50%{opacity:.85;translate:0 -2px}}
@keyframes goop-drips{0%,100%{transform:scaleY(.5)}70%{transform:scaleY(1.8)}}
/* Illustrated chamber tells live beside the enemy, above the controls. */
.trait-emblem{position:absolute;left:0;bottom:12px;width:84px;z-index:3;display:grid;justify-items:center;gap:5px;pointer-events:none;color:#d6c695;filter:drop-shadow(1px 2px #0a100d);text-align:center}
.trait-emblem small{font:7px/1.5 'Knightle Quill',Georgia;letter-spacing:.7px;max-width:85px;color:#d6c9ac;background:radial-gradient(ellipse,#0c130ed9,transparent 75%)}
.trait-emblem svg{display:block;image-rendering:pixelated;shape-rendering:crispEdges}
.guard-pips{display:flex;align-items:end;gap:3px;height:42px}.guard-pips i{font:10px 'Knightle Quill';font-style:normal;display:grid;place-items:center;width:12px;height:25px;background:#38372bbb;color:#817b64;box-shadow:inset 0 2px #8d836444;clip-path:polygon(2px 0,100% 0,100% calc(100% - 3px),50% 100%,0 calc(100% - 3px),0 2px)}
.guard-pips .open{height:36px;background:#96703b;color:#ffedb2;box-shadow:inset 0 2px #f2d58b;animation:guard-opening 2.4s ease-in-out infinite}
.armor-seal{width:42px;transition:filter .3s}.armor-seal svg{width:42px;height:46px}.armor-crack{opacity:0}.armor-seal.broken .armor-crack{opacity:1}.armor-seal.broken{filter:sepia(.7) brightness(.6)}
.bone-seals{display:flex;gap:4px;height:38px;align-items:end}.bone-seals svg{width:15px;height:29px}.bone-seals>span{color:#58635b;opacity:.55}.bone-seals>span.lit{color:#eee4bd;opacity:1;filter:drop-shadow(0 0 3px #bfd8c2)}.bone-seals.shattered>span:nth-child(2){transform:translateY(4px) rotate(25deg)}.bone-seals.shattered>span:first-child{transform:rotate(-18deg)}
.furnace-seals{display:flex;gap:1px;align-items:end;height:42px}.furnace-seals svg{width:22px;height:30px}.furnace-seals>span{color:#44392d;filter:brightness(.6)}.furnace-seals>span.lit{color:#e99544;filter:drop-shadow(0 0 5px #e8803c99)}.furnace-seals.inferno-ready>span{animation:furnace-breathe 1.5s ease-in-out infinite}.furnace-seals.inferno-ready>span:nth-child(2){animation-delay:-.35s}.inferno-ready+small{color:#ffd38d}
.cipher-seal{color:#d5bd84;padding:4px 0}.cipher-seal svg{height:35px;width:30px}
.slime-memento{width:35px;height:32px;position:relative;background:linear-gradient(120deg,#7eaa4b99,#3d602a88);clip-path:polygon(8px 0,27px 0,27px 4px,32px 4px,35px 10px,35px 28px,30px 28px,30px 32px,5px 32px,5px 29px,0 29px,0 10px,4px 10px,4px 4px,8px 4px)}.slime-memento span{font:bold 21px/32px 'Knightle Herald';color:#cfdfa5}.slime-memento i{width:3px;height:3px;background:#b1c873;position:absolute;left:4px;top:12px;animation:slime-bubble 2.5s infinite}.slime-memento i:last-child{left:28px;top:20px}
.trait-trigger.guard .guard-pips,.trait-trigger.armor .armor-seal,.trait-trigger.bones .bone-seals,.trait-trigger.interrupt .furnace-seals{animation:seal-break .8s ease-out both}
.trait-trigger.inferno .furnace-seals{filter:brightness(1.8);transform:scale(1.25)}
@keyframes guard-opening{50%{filter:brightness(1.2);transform:translateY(-2px)}}@keyframes furnace-breathe{50%{filter:brightness(1.45) drop-shadow(0 0 6px #f28d42);transform:scaleY(1.1)}}@keyframes seal-break{20%{filter:brightness(2);transform:scale(1.25)}40%{transform:rotate(-7deg)}60%{transform:rotate(5deg)}100%{transform:none}}
/* Second green onward: iridescent numbers and a real, escalating damage bonus. */
.tile .rune-damage{animation:resonant-number 1.7s ease-out both;animation-delay:var(--impact-delay);font-variant-numeric:tabular-nums}
.tile.resonant-rune .rune-damage{font-size:calc(23px + var(--chain)*3px);color:#efc3f8;text-shadow:2px 2px #18201b,-1px -1px #17201b,0 0 12px #c4bbff88}
.tile.resonant-rune:nth-child(2n) .rune-damage{color:#acf3e7}.tile.resonant-rune:nth-child(3n) .rune-damage{color:#ffdaa0}
.tile.resonant-rune .rune-spark{background:#ddbbf1;box-shadow:4px -4px #a8e7df,-3px 5px #f2d68a}
.prismatic-burst{background:radial-gradient(ellipse,#e7c0ed44,#b9ecdf22 32%,transparent 65%)}
.prismatic-burst>span{color:#f1dcff;text-shadow:3px 3px #514754,-2px -2px #13261d,0 0 30px #e1c2ec}
.prismatic-burst i,.resonance-bloom i{background:hsl(calc(var(--n)*27deg) 65% 78%)}
.resonant-focus .focus-rune{background:conic-gradient(from 40deg,#d8bb8270,#95c8bb66,#b3a5d777,#d2a1b166,#d8bb8270),#1e3226!important;color:#ffefcb}
.resonant-focus .critical-number{font-size:calc(44px + var(--chain)*5px);color:#eac2f7;text-shadow:2px 3px #272331,0 0 20px #dab9f177}
.resonant-focus .critical-window:before{background:radial-gradient(ellipse,#cbb5e822,#a3cdbd11 45%,transparent 70%)}
.rainbow-damage{font-size:calc(32px + var(--chain)*5px);color:#e6c5fa;text-shadow:2px 3px #1b2117,0 0 17px #bcb8e588;animation:resonance-total 1.15s ease-out both}
.resonance-bloom{position:absolute;z-index:8;inset:-20px -20px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;pointer-events:none;isolation:isolate;animation:resonance-rise .78s ease-out both}
.resonance-bloom>b{font:10px 'Knightle Quill';letter-spacing:2px;color:#f6e6b8}.resonance-bloom>strong{font:bold calc(38px + var(--chain)*4px) 'Knightle Herald';color:#e9c7f6;text-shadow:2px 3px #171f18,0 0 24px #c7b3f4}.resonance-bloom>small{font:8px 'Knightle Quill';letter-spacing:2px;color:#d5d7b9}
.spectrum-ring{position:absolute;z-index:-1;width:160px;height:160px;background:conic-gradient(#f1bc9a55,#dfcf8866,#a3dcb077,#9dcce677,#c3a9e577,#e9afd377,#f1bc9a55);mask-image:radial-gradient(circle,transparent 25%,#000 46%,transparent 68%);animation:spectrum-open .78s ease-out both}
.resonance-bloom i{position:absolute;width:4px;height:4px;top:50%;left:50%;transform:rotate(calc(var(--n)*22.5deg)) translateX(60px);animation:resonance-particle .78s ease-out both}
@keyframes resonant-number{0%{transform:translate(-50%,7px) scale(.7);opacity:0}13%{transform:translate(-50%,-6px) scale(1.18);opacity:1}30%{transform:translate(-50%,-16px) scale(1);opacity:1}75%{opacity:1}100%{transform:translate(-50%,-59px);opacity:0}}
@keyframes resonance-total{0%{transform:translateY(18px) scale(.65);opacity:0}15%{transform:translateY(3px) scale(1.18);opacity:1}35%{transform:translateY(-8px) scale(1);opacity:1}80%{opacity:1}100%{transform:translateY(-40px);opacity:0}}
@keyframes resonance-rise{0%{opacity:0;transform:scale(.7)}25%{opacity:1;transform:scale(1.08)}75%{opacity:1;transform:scale(1)}100%{opacity:0;transform:translateY(-12px)}}
@keyframes spectrum-open{from{transform:scale(.35) rotate(-50deg)}to{transform:scale(1.7) rotate(40deg)}}@keyframes resonance-particle{from{opacity:1;translate:0 0}to{opacity:0;translate:calc((var(--n) - 8)*8px) -55px}}
/* A complete word gathers light, then one lightning-cut delivers the execution. */
.execution-cinema{position:fixed;inset:0 0 var(--ad-space);z-index:55;isolation:isolate;pointer-events:none;overflow:hidden;display:grid;place-items:center;text-align:center}
.execution-charge{background:#06100ac7;animation:execution-gather 1.15s ease-in both}
.execution-words{position:absolute;z-index:3;top:26%;left:15px;right:15px;text-shadow:2px 3px #111c16}
.execution-words small{font:9px 'Knightle Quill';letter-spacing:3px;color:#e3dbb4}.execution-words h2{font:bold clamp(25px,5vw,48px) 'Knightle Herald';letter-spacing:3px;color:#fff0c7;margin:15px 0 22px}
.execution-runes{display:flex;gap:10px;justify-content:center}.execution-runes>span{font:bold 28px 'Knightle Herald';color:#d9ecc1;text-shadow:0 0 18px #d9f3af66}.execution-runes svg{height:30px;width:24px}
.execution-sigil{position:absolute;left:50%;top:46%;width:230px;height:230px;translate:-50% -50%;background:repeating-conic-gradient(from 10deg,transparent 0 40deg,#e9e2bd99 41deg 42deg,transparent 44deg 60deg);mask-image:radial-gradient(circle,transparent 14%,#000 16% 17%,transparent 20% 52%,#000 54% 58%,transparent 61%);animation:execution-focus 1.15s ease-in both}
.execution-light{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 46%,#fff4c0,#f7e8bf66 15%,transparent 58%);opacity:0}
.execution-charge .execution-light{animation:light-gathers 1.15s ease-in both}
.execution-bolt{position:absolute;z-index:1;left:calc(50% - 50px);top:0;width:100px;height:70%;background:#fff4c9;filter:drop-shadow(0 0 12px #fff0b5);clip-path:polygon(38% 0,54% 0,43% 20%,75% 20%,53% 40%,88% 39%,31% 100%,46% 53%,13% 54%,40% 30%,16% 31%);opacity:0}
.execution-cut{position:absolute;left:0;top:15%;width:100%;height:60%;background:linear-gradient(140deg,transparent 46%,#a7cfd866 47%,#fff9da 49% 50%,#efc794aa 52%,transparent 54%);opacity:0}
.execution-impact .execution-light{background:#fff3d4;animation:execution-flash 1.15s ease-out both}
.execution-impact .execution-bolt{animation:execution-lightning .6s ease-out both}.execution-impact .execution-cut{animation:execution-slash .7s ease-out both}
.execution-impact .execution-words{animation:execution-title 1.15s ease-out both}.execution-impact .execution-words h2{color:#fff0bd;text-shadow:3px 3px #17231b,0 0 16px #f0d49466}.execution-impact .execution-sigil{animation:execution-shock 1.15s ease-out both}
.execution-fragment{position:absolute;left:50%;top:46%;width:5px;height:5px;opacity:0;background:hsl(calc(var(--n)*19deg) 55% 80%);transform:rotate(calc(var(--n)*16.36deg)) translateX(70px)}
.execution-impact .execution-fragment{animation:execution-shards 1.1s ease-out both}
.finisherImpact .battle-wrap{animation:finisher-recoil .65s ease-out both}.finisherImpact .floating-damage{font:bold 20px 'Knightle Herald';top:65%;color:#f7e6b7;animation:resonance-total 1.15s ease-out both}
@keyframes execution-gather{from{opacity:0}35%,100%{opacity:1}}@keyframes execution-focus{from{transform:scale(1.8) rotate(-30deg);opacity:0}35%{opacity:.7}to{transform:scale(.1) rotate(10deg);opacity:1}}
@keyframes light-gathers{0%,20%{opacity:0}75%{opacity:.35}100%{opacity:.75}}
@keyframes execution-flash{0%{opacity:.9}20%{opacity:.5}65%,100%{opacity:0}}@keyframes execution-lightning{0%{opacity:0;transform:scaleY(.1);transform-origin:top}12%{opacity:1;transform:scaleY(1)}50%{opacity:1}100%{opacity:0}}
@keyframes execution-slash{0%,10%{opacity:0;transform:translate(-25%,20%) scale(.7)}30%{opacity:1;transform:none}100%{opacity:0;transform:translate(20%,-20%) scale(1.3)}}@keyframes execution-title{0%{opacity:0;transform:scale(.8)}25%{opacity:1;transform:scale(1.08)}45%,85%{opacity:1;transform:scale(1)}100%{opacity:0;transform:translateY(-8px)}}
@keyframes execution-shock{from{opacity:1;transform:scale(.1)}to{opacity:0;transform:scale(3.5)}}@keyframes execution-shards{10%{opacity:1}100%{opacity:0;translate:calc((var(--n) - 11)*20px) calc((var(--n) - 9)*11px)}}@keyframes finisher-recoil{15%{transform:translate(-6px,3px)}30%{transform:translate(5px,-2px)}50%{transform:translate(-3px,1px)}to{transform:none}}
/* One coin asset everywhere, and appraised values count into the purse. */
img.coin-icon{display:inline-block;object-fit:contain;width:24px;height:24px;min-width:24px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;image-rendering:pixelated;vertical-align:-5px}
.treasure-item>.treasure-value{display:flex;align-items:center;justify-content:center;position:relative;gap:2px;min-height:30px}.treasure-value>b{font:bold 23px 'Knightle Herald';min-width:22px;font-variant-numeric:tabular-nums}.treasure-value .coin-icon{width:26px;height:26px;vertical-align:0;margin-right:4px}
.value-glint{position:absolute;right:10%;top:-1px;font:14px 'Knightle Herald';color:#fff2ba;opacity:0}.value-settled .treasure-value{animation:coin-settles .5s ease-out both}.value-settled .value-glint{animation:value-glimmer .7s ease-out both}.tally-settled{color:#e3ce9d}.tally-settled b{animation:coin-settles .5s ease-out both}
@keyframes coin-settles{30%{transform:scale(1.17);filter:brightness(1.3)}100%{transform:none}}@keyframes value-glimmer{20%{opacity:1;transform:scale(1.3)}100%{opacity:0;transform:translateY(-16px) scale(.6)}}
/* Kneel, let the darkness settle, then hold the epitaph for nearly four seconds. */
.death-veil{animation:blackout 1.3s 1.1s forwards}.death-screen p{top:65%;width:90%;text-align:center;line-height:1.6;font:22px/1.5 'Knightle Herald';letter-spacing:2px;opacity:0;animation:epitaph-arrives .65s 1.45s forwards}.death-skip{opacity:0;animation:epitaph-arrives .5s 2.2s forwards;background:none;border:0;border-bottom:1px solid #8c7b55;font:10px 'Knightle Quill';color:#c5b896;min-height:44px}
@keyframes epitaph-arrives{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@media(max-width:700px){.trait-emblem{width:64px;left:-2px;bottom:14px;transform:scale(.85);transform-origin:left bottom}.trait-emblem small{font-size:7px}.guard-pips{gap:2px}.guard-pips i{width:11px}.execution-words{top:27%}.execution-words small{font-size:8px;letter-spacing:1.5px}.execution-words h2{font-size:27px;letter-spacing:2px}.execution-sigil{width:180px;height:180px}.combat-legend{gap:10px;letter-spacing:0;font-size:6px}.death-screen p{font-size:20px}.treasure-value>b{font-size:21px}}
@media(prefers-reduced-motion:reduce){.trait-emblem *,.slime-coat *,.wizard-weave .key,.wizard-weave .cipher-symbol,.rune-damage,.rainbow-damage,.value-settled .treasure-value,.tally-settled b{animation:none!important}.execution-light,.execution-bolt,.execution-cut,.execution-fragment,.execution-sigil,.spectrum-ring,.resonance-bloom i{display:none}.execution-cinema,.execution-words,.resonance-bloom,.death-screen p,.death-skip{animation:none!important;opacity:1}.execution-cinema{background:#07110ae8}.death-veil{animation:none;opacity:.8}.finisherImpact .battle-wrap{animation:none}.wizard-weave .cipher-symbol{opacity:1}.rune-damage{transform:translate(-50%,-16px)}.death-screen p{translate:none}}

body:has(.death-screen) #achievement-toast,body:has(.execution-cinema) #achievement-toast{visibility:hidden;pointer-events:none}
.resonant-focus .focus-rune{background:conic-gradient(from 35deg,#edbe8b,#b3d4a1,#8cc9d6,#b2a3d9,#d3a2ba,#edbe8b)!important;box-shadow:inset 0 3px #f4e2ac,inset 0 -5px #302a28,0 0 24px #c5b8dd55!important;color:#fff3cf;text-shadow:2px 3px #3a3931}
.resonant-focus .focus-rune:after{content:'';position:absolute;inset:4px;background:#193325aa;z-index:-1}
