/* Painted light and rune textures carry the dialogue transitions. */
.modal-shade{animation:veil-in .35s ease both}.modal{position:relative;animation:spell-in .42s cubic-bezier(.16,.75,.24,1) both}
.modal:before,.story-box:before{content:'';position:absolute;inset:-50px;pointer-events:none;background:none center/contain no-repeat;mix-blend-mode:screen;z-index:-1;opacity:0;animation:rune-bloom .85s ease-out both}
#modal-root.vanishing .modal{animation:spell-out .26s ease-in both}#modal-root.vanishing .modal-shade{animation:veil-out .26s both;pointer-events:none}
.magic-echo{position:absolute;inset:10% 20%;z-index:55;pointer-events:none;background:none center/contain no-repeat;mix-blend-mode:screen;animation:echo-out .6s ease-out both}
.story-intro{animation:veil-in .5s ease both;position:relative;isolation:isolate;overflow:hidden}.story-intro:after{content:'';position:absolute;inset:-5%;z-index:0;pointer-events:none;background:linear-gradient(0deg,#040d1eef,#07132522 80%),none center 35%/cover no-repeat;animation:story-camera 10s ease-in-out infinite alternate}.story-chapter,.story-box{position:relative;z-index:1}.story-box{isolation:isolate;animation:spell-in .65s both}.story-box.line-enter #story-text,.story-box.line-enter #story-who{animation:ink-in .45s ease-out both}.story-intro.vanishing{animation:spell-out .36s both;pointer-events:none}
.narrative-line{margin:20px 0;line-height:1.95}.narrative-line b{font-size:12px;color:#9de5f5}.narrative-line p{margin-top:5px;font-size:15px;color:#e5e1d2}.narrative-choices{display:grid;gap:12px;margin-top:25px}.narrative-choice{background:linear-gradient(90deg,#1d465a80,#10233090);border:1px solid #8aafbc80;text-align:left;padding:16px 22px;font-size:14px;line-height:1.8}.narrative-choice:hover{border-color:#dfc582;box-shadow:inset 0 0 25px #9edff01a}.narrative-outcome{color:#cfe9db;line-height:1.9;font-size:15px;animation:ink-in .5s both}
.independent-portrait img{left:0;width:100%;height:100%;object-fit:contain}.hero-card .independent-portrait img{padding:24px 12px 0}.title-heroes img{object-fit:contain}
#ultimate-control{pointer-events:auto;position:absolute;right:30px;bottom:178px;display:flex;align-items:center;gap:9px;min-width:181px;max-width:245px;min-height:73px;padding:10px 17px 10px 8px;background:#081827 none center/100% 100% no-repeat;border:0;isolation:isolate;text-align:left}
#ultimate-control:before{content:'';position:absolute;inset:7px 14px;background:linear-gradient(90deg,#289fdf55,#64d5ff20);clip-path:inset(0 calc(100% - var(--oath,0%)) 0 0);z-index:-1;transition:clip-path .15s}
#ultimate-control img{width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 0 8px #39b5f650)}#ultimate-control span{display:flex;flex-direction:column;gap:3px}#ultimate-control small{font-size:9px;color:#aac7d9}#ultimate-control b{font-size:14px;color:#e2edfa}#ultimate-control em{font-size:9px;font-style:normal;color:#8dd5ed}#ultimate-control kbd{font-size:9px;margin-left:auto}#ultimate-control.ready{filter:drop-shadow(0 0 10px #63cfff66)}#ultimate-control.ready img{animation:oath-glow 1.2s ease-in-out infinite alternate}#army-count{position:absolute;bottom:152px;right:45px;color:#c4e9eb;font-size:12px}
#banter{--banter-align-x:-50%;position:absolute;left:50%;bottom:185px;transform:translateX(-50%);display:none;align-items:center;gap:12px;max-width:min(600px,60vw);padding:17px 30px;background:#071725e8 none center/100% 100% no-repeat;pointer-events:none;line-height:1.7;z-index:4}#banter.visible{display:flex;animation:banter-in .5s both}#banter.fading{animation:banter-out .3s both}#banter img{width:42px;height:60px;object-fit:contain}#banter b{font-size:11px;color:#9bdff1}#banter p{font-size:14px;color:#f4e8cd}
@keyframes spell-in{from{opacity:0;filter:blur(8px) brightness(2.5);clip-path:inset(45% 0)}to{opacity:1;filter:blur(0) brightness(1);clip-path:inset(-20%)}}
@keyframes spell-out{to{opacity:0;filter:blur(10px) brightness(2);clip-path:inset(45% 0)}}
@keyframes veil-in{from{opacity:0}to{opacity:1}}@keyframes veil-out{to{opacity:0}}@keyframes ink-in{from{opacity:0;filter:blur(5px)}to{opacity:1;filter:none}}@keyframes rune-bloom{0%{opacity:0;transform:rotate(-12deg) scale(.65)}35%{opacity:.35}100%{opacity:0;transform:rotate(12deg) scale(1.15)}}@keyframes echo-out{from{opacity:.4;transform:scale(.6)}to{opacity:0;transform:scale(1.25) rotate(20deg)}}@keyframes oath-glow{to{filter:drop-shadow(0 0 13px #8eeeff);transform:scale(1.07)}}@keyframes story-camera{from{background-size:100% 100%;background-position:50% 35%}to{background-size:112% 112%;background-position:55% 42%}}@keyframes banter-in{from{opacity:0;filter:blur(7px);transform:translateX(var(--banter-align-x)) translateY(15px) scale(.97);clip-path:inset(40% 0)}to{opacity:1;filter:none;transform:translateX(var(--banter-align-x));clip-path:inset(-20%)}}@keyframes banter-out{to{opacity:0;filter:blur(6px);transform:translateX(var(--banter-align-x)) translateY(-10px);clip-path:inset(45% 0)}}
@media(max-width:800px){#ultimate-control{right:17px;bottom:165px;min-width:148px;min-height:60px;padding:7px 12px 7px 5px;gap:4px}#ultimate-control img{width:42px;height:42px}#ultimate-control b{font-size:11px}#ultimate-control kbd{display:none}#army-count{right:22px;bottom:145px;font-size:9px}#banter{bottom:230px;max-width:75vw;padding:15px 22px}#banter p{font-size:11px}.narrative-line p{font-size:13px}}
@media(max-width:540px) and (orientation:portrait){#ultimate-control{right:20px;bottom:270px;min-width:164px}#army-count{bottom:248px}#banter{left:5%;right:5%;--banter-align-x:0%;transform:none;max-width:none;bottom:350px;padding:15px 24px}#banter img{width:28px;height:38px}#banter p{font-size:12px}.narrative-line{margin:15px 0}.narrative-choice{padding:12px 15px;font-size:12px}}
@media(max-height:570px) and (orientation:landscape){#ultimate-control{right:18px;bottom:108px;min-width:130px;min-height:47px;padding:5px 11px 5px 4px;gap:4px}#ultimate-control img{width:36px;height:36px}#ultimate-control b{font-size:10px}#ultimate-control small,#ultimate-control em{font-size:7px}#army-count{bottom:91px;right:25px;font-size:8px}#banter{bottom:78px;max-width:48vw;padding:10px 20px}#banter img{width:28px;height:34px}#banter b{font-size:8px}#banter p{font-size:10px}.narrative-line{margin:12px 0}.narrative-line p{font-size:12px}.narrative-choices{gap:7px;margin-top:15px}.narrative-choice{padding:10px 15px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.modal,.modal-shade,.story-intro,.story-box,.story-box.line-enter #story-text,.story-box.line-enter #story-who,#banter.visible{animation:veil-in .15s both}.modal:before,.story-box:before,.magic-echo{display:none}#ultimate-control.ready img{animation:none}}

.skeleton-portrait canvas{width:100%;height:100%;display:block;object-fit:contain}.hero-card .skeleton-portrait{mask-image:linear-gradient(#000 94%,transparent)}
/* Replace the old magnified character crop with the full, approved city key art. */
.story-intro{background:linear-gradient(0deg,#040d1eef,#07132522 80%),none center 35%/cover no-repeat}
.story-box{border:28px solid transparent;border-image:none 65 fill stretch;border-image-width:34px;padding:20px 24px;box-shadow:none}
.story-chapter{text-shadow:0 2px 5px #000;color:#e0c59e}
@media(max-width:540px){.story-intro{background-position:62% 20%}.story-box{border-width:20px;border-image-width:26px;padding:14px 10px}}
@media(max-height:570px) and (orientation:landscape){.story-box{border-width:20px;border-image-width:26px;padding:10px 15px}}
.instruction,.training-preview{border:20px solid transparent;border-image:none 65 fill stretch;border-image-width:24px;padding:12px 15px;background:none}
.narrative-choices{width:100%;max-width:540px;margin-left:auto;margin-right:auto}
.narrative-choice{border:0;background:none center/100% 100% no-repeat;padding:20px 38px;min-height:75px;text-align:center;color:#f6e4bb}
.narrative-choice:hover{background-image:none;box-shadow:none;filter:drop-shadow(0 0 7px #87d9ef44)}
@media(max-width:540px){.narrative-choice{min-height:65px;padding:16px 31px}}
@media(max-height:570px) and (orientation:landscape){.narrative-choice{min-height:52px;padding:12px 30px}}
.story-controls button:last-child{border:0;background:none center/100% 100% no-repeat;min-width:140px;min-height:52px;padding:14px 28px;color:#f5dfb8}
.story-controls button:last-child:hover{background-image:none}
@media(max-width:540px){.story-controls button:last-child{min-width:104px;min-height:44px;padding:11px 22px}}
