/* The same old-world materials, with less competing information. */
.ability-sigil{background:none!important;border:0!important;box-shadow:none!important;clip-path:none!important;filter:drop-shadow(0 2px 2px #040803)}
.ability-sigil canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.trait-emblem small{display:none}.trait-emblem .ability-status{font-size:8px;margin-top:1px;color:#d9c59d}
.ability-impact{position:absolute;inset:0;pointer-events:none}.ability-impact i{position:absolute;left:50%;top:55%;width:3px;height:4px;background:#dcc797;opacity:0;rotate:calc(var(--n)*30deg);animation:ability-motes .7s ease-out both}
@keyframes ability-motes{20%{opacity:1}100%{transform:translateY(-65px);opacity:0}}
.impact-cipher i{background:#c299bb}.impact-inferno i{background:#e8a355}
.combat-legend{opacity:.75}.inscription{min-height:29px}.combat-hint{font:italic 12px/1.4 Georgia;max-width:410px}.floating-damage.player-hit{display:none}.heart-loss{display:none}
.key:not(.crit):not(.hit):not(.miss):not(.key-charred){background:linear-gradient(125deg,#897b5f,#504f43 40%,#343d34);color:#fff0cd;box-shadow:inset 1px 2px #b6a47c,inset -2px -3px #1e2821,0 2px #080e0b}
.key.miss{background:linear-gradient(135deg,#1a2420,#101915)!important;color:#59665b!important;border-color:#28352b;box-shadow:inset 1px 1px #334032,0 1px #080d09;text-shadow:none;opacity:1}
.key.hit{color:#ffdf8d!important;background:linear-gradient(130deg,#74603b,#4c3f29)!important;border-color:#a88b4e}.key.crit{color:#d6f3ba!important;background:linear-gradient(130deg,#4b6846,#263b2c)!important;border-color:#8aa274}
.key.key-charred{position:relative;overflow:hidden;background:linear-gradient(145deg,#3c211b,#111512 48%,#221b15)!important;color:#a88368!important;border-color:#512f20!important;box-shadow:inset 1px 0 #a14e2866,inset 0 -3px #1a1410!important;opacity:1;text-shadow:0 0 4px #b7562555}
.key-charred:before{content:'';position:absolute;inset:0;background:linear-gradient(63deg,transparent 43%,#0a0f0d 44% 48%,#b0653433 49%,transparent 50%),linear-gradient(125deg,transparent 60%,#080e0b 62% 66%,transparent 67%)}
.key-charred:after{content:'';position:absolute;left:15%;bottom:2px;width:2px;height:2px;background:#ed9b51;box-shadow:12px -8px #ab4b23,21px -2px #d77e32;animation:char-embers 1.6s ease-in-out infinite}
@keyframes char-embers{50%{opacity:.2;translate:0 -2px}}
.key-restoring{animation:keys-rekindle 1.3s ease-out both;animation-delay:var(--restore-age)}
@keyframes keys-rekindle{0%{filter:sepia(1) brightness(.45)}40%{filter:brightness(1.7);box-shadow:0 0 9px #e3d8b1}100%{filter:none}}
.room-5.enemyAttack .last-attack .tile{animation:none}.room-5.enemyAttack .last-attack:after{display:none}
.tile-char{position:absolute;inset:0;pointer-events:none;z-index:2;background:radial-gradient(ellipse at 50% 12%,#24120a88,transparent 70%);box-shadow:inset 0 0 6px #100e0bb0}
.tile-char b{position:absolute;inset:0;opacity:.8;background:linear-gradient(118deg,transparent 35%,#080d09 36% 40%,#c18b4833 41%,transparent 43%),linear-gradient(47deg,transparent 48%,#080e0b 50% 54%,transparent 56%);clip-path:polygon(28% 0,70% 0,52% 49%,100% 80%,100% 100%,45% 63%,20% 100%,5% 100%,36% 53%)}
.burned-row .tile{border-color:#6f4c30;box-shadow:inset 0 0 8px #0f100b}.burned-row .tile-letter{opacity:.65}
.burn-impact .tile-char{animation:tile-incinerate 1.3s ease-out 460ms both}
.tile-char i{opacity:0;position:absolute;width:4px;height:5px;background:#77634a;top:75%;left:15%;box-shadow:1px 1px #181e14}
.tile-char i:nth-child(2){left:65%;top:10%;width:3px}.tile-char i:nth-child(3){left:85%;top:70%;height:3px}
.burn-impact .tile-char i{animation:stone-falls 1s ease-in calc(550ms + var(--tile-index)*25ms) both}
@keyframes stone-falls{0%{opacity:0;transform:none}12%{opacity:1}100%{opacity:0;transform:translate(-6px,40px) rotate(65deg)}}
@keyframes tile-incinerate{0%{opacity:0;background:#ffde9b;box-shadow:0 0 15px #e27a2a}8%{opacity:1}20%{background:#d86c3177}100%{opacity:1;background:radial-gradient(ellipse at 50% 12%,#24120a88,transparent 70%)}}
/* Hold exactly five columns until the dragon's actual awakening begins. */
.dragon-dormant .awakened-rune{display:none}
.dragon-awakening .seven-runes{animation:none}.dragon-awakening .battle-scene{animation:none}.dragon-awakening .awakened-rune{animation:stone-slot-opens 2s cubic-bezier(.2,.7,.3,1) both;transform-origin:left center}
@keyframes stone-slot-opens{0%,18%{width:0;min-width:0;margin-left:-4px;opacity:0;transform:scaleX(0)}75%{width:var(--dragon-tile,40px);margin-left:0;opacity:1;transform:scaleX(1);filter:brightness(1.6)}100%{width:var(--dragon-tile,40px);margin-left:0;opacity:1;transform:none;filter:none}}
.seven-runes{--dragon-tile:40px}.dragon-announcement{animation:dragon-words 3.6s both}.dragon-dormant .keyboard{opacity:.3}
/* A quick injury reads through the rack itself; healing flows back into it. */
.stage-combat:has(.enemyAttack){animation:wound-weight .56s ease-out 250ms both}.stage-combat:has(.room-5.enemyAttack){animation-delay:460ms}
@keyframes wound-weight{0%,100%{transform:none}12%{transform:translate(-8px,4px)}26%{transform:translate(7px,-3px)}43%{transform:translate(-5px,2px)}61%{transform:translate(3px,-1px)}80%{transform:translate(-1px,0)}}
.injury-vignette{background:radial-gradient(ellipse,transparent 29%,#8f1c1644 65%,#b02824c9)}
.heart-unit.health-cracking{animation:helm-impact .5s ease-out both}.heart-unit.health-cracking i{animation:helmet-chip .65s ease-out both;opacity:1}.heart-unit.health-mending{animation:helm-repair 1.4s ease-out both}
@keyframes helm-impact{0%{filter:brightness(2) sepia(1) saturate(3);transform:scale(1.2)}25%{transform:translate(-3px,1px)}50%{transform:translate(2px,-1px)}100%{filter:none;transform:none}}
@keyframes helm-repair{0%,100%{filter:none}25%{filter:brightness(1.8) drop-shadow(0 0 5px #b4e2ad);transform:translateY(-2px)}}
.enemy-health-trail{background:linear-gradient(#eed095,#c29451)!important;transition:none!important}.enemy-health-fill{transition:none!important}
/* A prismatic blade impact replaces thin synthetic lightning and wire circles. */
.execution-bolt,.execution-sigil,.execution-shockwave,.execution-cut{display:none!important}.execution-impact .execution-prism{opacity:.6}.execution-words{max-width:90vw}.execution-impact .execution-words h2{letter-spacing:1px}.execution-power{margin-top:12px}.execution-power span{letter-spacing:2px;font-size:7px}
/* Chest camera is a persistent element, not recreated between the three phases. */
.spoils-screen{justify-content:flex-start;gap:0}.spoils-screen .loot-stage{display:grid;place-items:center;height:200px!important;margin:8px auto 0!important;animation:none!important;overflow:visible}
.chest-camera{position:relative;width:200px;height:200px;grid-area:1/1;transform:scale(1);transition:transform 1.1s cubic-bezier(.2,.7,.2,1);z-index:2}
.spoils-screen .loot-container{position:absolute;inset:0;width:200px!important;height:200px!important;transform:none!important;animation:none!important;transition:opacity .48s ease}
.chest-open{opacity:0}.loot-opening .chest-closed,.loot-pullback .chest-closed,.loot-revealed .chest-closed{opacity:0}.loot-opening .chest-open,.loot-pullback .chest-open,.loot-revealed .chest-open{opacity:1}.loot-opening .chest-open,.loot-opening .chest-closed{transition-delay:.4s}
.loot-pullback .chest-camera,.loot-revealed .chest-camera{transform:translateY(-16px) scale(.68)}
.loot-pullback .rainbow-burst{animation:hoard-light-back 1.1s ease-out both}.loot-revealed .rainbow-burst{opacity:.1;transform:scale(.7)}
.loot-dragon.loot-opening .rainbow-burst{animation:hoard-spectrum 2.45s ease-in-out both;background:conic-gradient(from 20deg,#eb947b88,#efd29a,#a1d9aa,#82cee1,#b9a0de,#dc9aba,#eb947b88);mask-image:radial-gradient(ellipse,transparent 8%,#000 35%,transparent 73%)}
.loot-dragon.loot-opening .loot-rays{animation:hoard-beams 2.45s ease-out both;background:repeating-conic-gradient(from 10deg,transparent 0 22deg,#e6c6a377 25deg 30deg,transparent 34deg 50deg);mask-image:radial-gradient(ellipse,#000 10%,transparent 70%)}
@keyframes hoard-spectrum{0%{opacity:0;transform:scale(.4) rotate(-15deg)}25%{opacity:.85;transform:scale(1.25) rotate(0)}42%{opacity:.35}58%{opacity:.9;transform:scale(1.65) rotate(15deg)}75%{opacity:.45}100%{opacity:.65;transform:scale(1.55) rotate(25deg)}}
@keyframes hoard-beams{0%{opacity:0;transform:scale(.4) rotate(-20deg)}40%{opacity:.8}100%{opacity:.6;transform:scale(2) rotate(20deg)}}
@keyframes hoard-light-back{from{opacity:.65;transform:scale(1.55)}to{opacity:.1;transform:scale(.7)}}
.loot-rarity{min-height:14px}.loot-dragon .loot-rarity{color:#ddc1ef;letter-spacing:2px}.loot-presentation{min-height:220px}.treasure-spread{display:grid;grid-template-columns:repeat(var(--finds),minmax(0,1fr));gap:12px;max-width:580px;margin:7px auto 18px}.treasure-item{width:100%!important;min-width:0}.treasure-item canvas{width:90px;height:90px;max-width:100%}.treasure-item strong{font:italic 12px/1.35 Georgia;min-height:34px}.treasure-value{display:flex!important;justify-content:center;gap:3px;align-items:center;font-variant-numeric:tabular-nums}.treasure-value b{min-width:2.8ch;text-align:right;font-variant-numeric:tabular-nums}.value-glint{display:none}.loot-total{font-variant-numeric:tabular-nums;min-height:28px}.loot-total b{min-width:3ch;text-align:right}.loot-total>span{font:7px 'Knightle Quill';letter-spacing:1px}.loot-continue{margin-top:8px}
.tooth-reward{display:flex;align-items:center;justify-content:center;gap:9px;color:#e9d7b4;margin:-7px 0 11px}.tooth-reward>span{font:8px 'Knightle Quill';text-align:left}.tooth-reward small{display:block;font:italic 12px Georgia;color:#b6b29b;margin-top:5px}.tooth-icon{width:27px;height:29px;image-rendering:pixelated}.dossier-teeth{display:flex;align-items:center;justify-content:center;gap:5px;font:18px 'Knightle Herald';color:#ddd0b0;margin-top:-4px}.dossier-teeth small{font:6px 'Knightle Quill';letter-spacing:.5px;max-width:44px;line-height:1.6}.dossier-teeth .tooth-icon{width:22px;height:24px}.coin-icon{width:22px;height:22px;vertical-align:middle}
@media(max-width:700px){.seven-runes{--dragon-tile:32px}.chest-camera,.spoils-screen .loot-container{width:176px!important;height:176px!important}.spoils-screen .loot-stage{height:170px!important}.treasure-spread{gap:6px;margin-bottom:13px}.treasure-item canvas{width:70px;height:70px}.treasure-item strong{font-size:11px;min-height:30px}.treasure-item .treasure-value{font-size:19px;gap:1px}.treasure-value .coin-icon{width:17px;height:17px}.loot-presentation{min-height:210px}.spoils-screen h2{font-size:17px}.spoils-screen h1{font-size:21px}.trait-emblem .ability-sigil{width:42px;height:42px}.trait-emblem{width:53px}.combat-hint{font-size:11px}.tooth-reward{margin-top:0}.loot-total{margin-bottom:15px}.dossier-teeth{font-size:16px}}
@media(max-width:700px) and (max-height:760px){.spoils-screen{padding-top:45px}.spoils-screen .loot-stage{height:142px!important}.chest-camera,.spoils-screen .loot-container{width:158px!important;height:158px!important}.treasure-item canvas{height:62px;width:62px}.spoils-screen h2{font-size:15px;margin-bottom:3px}.treasure-item strong{font-size:10px}.loot-total{margin-bottom:8px}.tooth-reward{margin-bottom:4px}.tooth-reward small{font-size:11px}.loot-continue{min-height:42px}}
@media(prefers-reduced-motion:reduce){.chest-camera,.loot-container{transition-duration:.1s!important}.health-cracking,.health-mending,.key-restoring,.burn-impact .tile-char,.burn-impact .tile-char i,.ability-impact i,.stage-combat:has(.enemyAttack),.key-charred:after{animation:none!important}.dragon-awakening .awakened-rune{animation:none;width:var(--dragon-tile);opacity:1}.loot-dragon.loot-opening .rainbow-burst{animation:none;opacity:.25}.loot-dragon.loot-opening .loot-rays{animation:none;opacity:.2}}
