/* Stable stone geometry: the new dragon slots enter at their final size. */
.rune-board-controls .seven-runes{--dragon-tile:52px;--dragon-gap:6px}
.rune-board-controls .seven-runes>.guess-row{width:calc(7 * var(--dragon-tile) + 6 * var(--dragon-gap));gap:var(--dragon-gap)}
.rune-board-controls .seven-runes>.guess-row>.tile{box-sizing:border-box;width:var(--dragon-tile);min-width:var(--dragon-tile);flex:0 0 var(--dragon-tile)}
.dragon-dormant .seven-runes>.guess-row{translate:calc(var(--dragon-tile) + var(--dragon-gap)) 0}
.dragon-dormant .seven-runes .awakened-rune{display:flex;visibility:hidden}
.dragon-awakening .seven-runes>.guess-row{animation:dragon-stones-make-room 1.4s cubic-bezier(.22,.7,.2,1) both}
.dragon-awakening .seven-runes .awakened-rune{visibility:visible;animation:dragon-stone-arrives 1.4s ease-out both;transform-origin:center}
.dragon-awakening .seven-runes .awakened-rune:last-of-type{animation-delay:.12s}
@keyframes dragon-stones-make-room{from{translate:calc(var(--dragon-tile) + var(--dragon-gap)) 0}to{translate:0 0}}
@keyframes dragon-stone-arrives{0%,25%{opacity:0;transform:translateY(12px);filter:brightness(.6)}65%{opacity:1;transform:translateY(-2px);filter:brightness(1.35)}100%{opacity:1;transform:none;filter:none}}
/* Distinct materials stay behind the Wordle colors and never cover a letter. */
.tile .enemy-inlay{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:.6}
.iron-stone .enemy-inlay{border:2px solid #98a9a46b;box-shadow:inset 0 0 0 1px #15221a,inset 4px 0 #61766c44,inset -4px 0 #61766c44;background:radial-gradient(circle at 5px 5px,#d6d8ae 0 1px,transparent 2px),radial-gradient(circle at calc(100% - 5px) calc(100% - 5px),#d6d8ae 0 1px,transparent 2px)}
.iron-cracked .enemy-inlay{border-color:#9d846455;box-shadow:inset 0 0 0 1px #15221a;background:linear-gradient(118deg,transparent 42%,#0d150dbb 43% 47%,transparent 48%),linear-gradient(40deg,transparent 66%,#c0a27788 67% 70%,transparent 71%);opacity:.45}
.bone-stone .enemy-inlay:before,.bone-stone .enemy-inlay:after{content:'';position:absolute;width:5px;top:3px;bottom:3px;background:#c7c1a68c;clip-path:polygon(0 0,100% 0,100% 15%,65% 21%,65% 78%,100% 84%,100% 100%,0 100%,0 84%,35% 78%,35% 21%,0 15%)}
.bone-stone .enemy-inlay:before{left:3px}.bone-stone .enemy-inlay:after{right:3px}
.bone-shattered .enemy-inlay:before{clip-path:polygon(0 0,100% 0,100% 15%,65% 21%,65% 40%,0 32%,0 15%);opacity:.4}
.bone-shattered .enemy-inlay:after{clip-path:polygon(35% 61%,100% 74%,100% 100%,0 100%,0 84%,35% 78%);opacity:.4}
/* A readable crossfade, on one clock, without a random middle alphabet. */
.combat-entering .cipher-human{animation:letter-to-rune 3.6s ease both;animation-delay:var(--cipher-age)}
.combat-entering .cipher-symbol{animation:rune-from-letter 3.6s ease both;animation-delay:var(--cipher-age)}
@keyframes letter-to-rune{0%,20%{opacity:1;filter:none}48%{opacity:.45;filter:blur(.4px)}68%,100%{opacity:0;filter:blur(1px)}}
@keyframes rune-from-letter{0%,25%{opacity:0;filter:blur(2px);transform:translateY(2px)}70%,100%{opacity:1;filter:none;transform:none}}
/* First split the metal visibly, hold the crack, then let both halves fall. */
.ward-crack{position:absolute;inset:2px 8px 3px 9px;background:#e6c981;opacity:0;clip-path:polygon(55% 0,78% 0,48% 34%,91% 49%,41% 69%,65% 100%,42% 100%,19% 69%,63% 49%,22% 34%);filter:drop-shadow(0 0 2px #d8b765)}
.ward-breaking .ward-crack{animation:ward-fracture 1.05s linear both;animation-delay:var(--fracture-age)}
.ward-breaking .ward-break-target .ward-left{animation:ward-cleave-left 1.05s ease-in both;animation-delay:var(--fracture-age)}
.ward-breaking .ward-break-target .ward-right{animation:ward-cleave-right 1.05s ease-in both;animation-delay:var(--fracture-age)}
.ward-breaking .ward-break-target>i{animation-delay:calc(var(--fracture-age) + 360ms)}
@keyframes ward-fracture{0%{opacity:0}10%,43%{opacity:1}66%,100%{opacity:0}}
@keyframes ward-cleave-left{0%{filter:brightness(2);transform:none}18%,42%{opacity:1;filter:none;transform:translate(-1px,0) rotate(-4deg)}100%{opacity:0;transform:translate(-12px,33px) rotate(-32deg)}}
@keyframes ward-cleave-right{0%{filter:brightness(2);transform:none}18%,42%{opacity:1;filter:none;transform:translate(1px,0) rotate(4deg)}100%{opacity:0;transform:translate(14px,36px) rotate(39deg)}}
/* Char the complete stone before breaking it into falling ash. */
.room-5.enemyAttack .ashen-impact .tile{animation:stone-burn-through 1.5s linear calc(780ms + var(--tile-index)*24ms) both!important;transform-origin:50% 100%}
@keyframes stone-burn-through{0%{opacity:1;filter:none;transform:none;clip-path:inset(0)}12%{filter:brightness(1.7) sepia(.7);box-shadow:0 0 14px #fb932a99}38%{filter:brightness(.5) grayscale(.6);opacity:1;transform:none;clip-path:inset(0)}58%{filter:brightness(.35) grayscale(1);opacity:1;clip-path:polygon(0 0,100% 0,100% 83%,77% 71%,65% 100%,49% 66%,30% 92%,0 79%)}100%{filter:brightness(.3) grayscale(1);opacity:0;transform:translateY(14px);clip-path:polygon(0 74%,24% 62%,42% 90%,62% 72%,83% 83%,100% 65%,100% 100%,0 100%)}}
/* Extinguish the chamber with the kneel, retaining a legible knight silhouette. */
.death-screen{--last-light:1;background:#020503}
.death-screen .death-veil{z-index:0;opacity:calc(1 - var(--last-light));animation:none!important}
.death-screen .death-scene{z-index:1;animation:none!important;opacity:calc(.42 + var(--last-light) * .58);filter:brightness(calc(.65 + var(--last-light) * .35))}
.death-screen .death-epitaph{animation-delay:3.6s}.death-screen .death-return{animation-delay:5s}
/* The numeral owns the center. Oaths never add another frame around it. */
.rank-crest:not([data-tier="0"]){padding:0;margin:0;min-width:0;min-height:0;border:0;outline:0;box-shadow:none;clip-path:none;background:none}
.rank-crest i{position:absolute;left:100%;bottom:2px;margin-left:5px;font-size:6px;letter-spacing:0}
.ascension-emblem:not([data-tier="0"]):after{display:none}
.ascension-emblem .ascension-halo{inset:-32px!important;left:-32px!important;top:-32px!important;translate:none!important;width:calc(100% + 64px);height:calc(100% + 64px)}
/* The choice reads at a glance and reports the health actually restored. */
.last-stand-backdrop{background:radial-gradient(ellipse at 50% 45%,#14231ec9,#030706d9)}
.last-stand.field-dialog{width:min(380px,100%);padding:25px 24px 20px;border-color:#4c4230}
.last-stand h2{font-size:32px;margin:14px 0 8px}
.revive-benefits{display:flex;justify-content:center;gap:28px;padding:15px 4px;border-block:1px solid #b69a614d;margin:14px 0;color:#bfcca9}
.revive-benefits b{display:block;font:31px 'Knightle Herald';color:#e9d79d;margin-bottom:7px}.revive-benefits span{font:6px/1.5 'Knightle Quill';letter-spacing:1px}
.last-stand .revive-promise{margin:12px 0 4px!important}.last-stand .revive-use{min-height:61px;background:linear-gradient(#46533a,#273a2b);border-color:#c3b471;box-shadow:inset 0 1px #e4d7a244,0 0 18px #89b47718}
.dossier-gold,.stock-purse b,.combat-purse b{font-variant-numeric:tabular-nums}
@media(max-width:700px){
 .rune-board-controls .seven-runes{--dragon-tile:min(44px,calc((100vw - 110px)/7));--dragon-gap:3px}
 .combat-purse{right:calc(100% + 7px);min-width:64px}.combat-purse b{font-size:17px}.combat-purse .coin-icon{width:17px;height:17px}
 .boss-combat .combat-purse{right:auto;left:0;bottom:-29px}.boss-combat .combat-purse small{display:none}
 .last-stand.field-dialog{padding:23px 18px 17px}.last-stand h2{font-size:29px}
}
@media(prefers-reduced-motion:reduce){
 .dragon-dormant .seven-runes>.guess-row{translate:0 0}.dragon-awakening .seven-runes>.guess-row,.dragon-awakening .seven-runes .awakened-rune{animation:none!important;transform:none;opacity:1;translate:0 0}
 .combat-entering .cipher-human{display:none}.combat-entering .cipher-symbol{animation:none;opacity:1}
 .ward-breaking .ward-crack{display:none}.ward-breaking .ward-break-target{opacity:0}
 .room-5.enemyAttack .ashen-impact .tile{animation:burned-inscription .3s linear 130ms both!important}
 .death-screen .death-epitaph{animation-delay:1.4s}.death-screen .death-return{animation-delay:2s}
}
@media(max-width:700px){
 .combat .combat-purse{left:0;right:auto;bottom:-27px}
 .combat .turn-clock{width:calc(100% - 150px);max-width:none;margin-left:150px;margin-right:0}
}
