:root{--gold:#d5b878;--paper:#f4e9ce;--ink:#172138}*{box-sizing:border-box}body{margin:0;background:#0b1120;color:var(--paper);font:15px Georgia,serif;background-image:radial-gradient(ellipse at top,#26324b88,transparent 65%)}button{font:inherit;cursor:pointer;color:inherit;background:#18243b;border:1px solid #c4a76588;border-radius:6px;padding:10px 15px;transition:background .2s,transform .2s}button:hover:not(:disabled){background:#304058;transform:translateY(-1px)}button:disabled{opacity:.4;cursor:default}button:focus-visible{outline:3px solid #80dedb;outline-offset:3px}[hidden]{display:none!important}header{display:flex;justify-content:space-between;align-items:center;max-width:1400px;margin:auto;padding:17px 24px}.brand{display:flex;gap:12px;align-items:center}.sigil{font-size:50px;color:var(--gold)}h1{font-weight:400;letter-spacing:5px;margin:0;font-size:32px}.brand small{font:9px system-ui;letter-spacing:2.6px;color:#b6a985}.topright{display:flex;gap:10px;align-items:center}#money{font:13px system-ui;color:#e1c483}.topright button{padding:8px 11px}main{max-width:1400px;margin:auto;padding:0 18px}#scene{position:relative;aspect-ratio:1.85;overflow:hidden;border:1px solid #ae8d52;border-radius:10px 10px 0 0;box-shadow:0 15px 60px #0007;background:#25374a}#scenery{position:absolute;inset:0;background:url('assets/town.webp') center center/100% 100% no-repeat;transition:filter 2s,opacity .4s}.shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#0b102b66,transparent 30%,transparent 65%,#0b102b77)}#heroes{position:absolute;left:16px;top:17px;display:flex;gap:8px}.hero{background:#11192deb;border:1px solid #bfa366aa;border-radius:5px;padding:6px;display:flex;gap:8px;align-items:center;min-width:145px;box-shadow:0 3px 10px #0006}.face{width:43px;height:45px;background-image:url('assets/characters.webp');background-size:660px 440px;border:1px solid var(--gold);border-radius:4px;flex-shrink:0;background-color:#302143}.face.Crimson{background-position:-16px -32px}.face.Amethyst{background-position:-61px -32px}.face.Teal{background-position:-106px -32px}.face.Clementine{background-image:url('assets/archive.webp');background-size:510px 340px;background-position:-3px -272px}.hero strong{font-size:13px;display:block;margin-bottom:4px}.hero small{font:9px system-ui;color:#b9c4d1}.bar{height:4px;background:#070d19;border-radius:4px;overflow:hidden;margin:4px 0}.bar i{height:100%;display:block;background:#79cfba;transition:width .3s}#quest{position:absolute;right:17px;top:17px;background:#10182deE;border:1px solid #d1b679;border-radius:5px;padding:13px 16px;width:263px;box-shadow:0 3px 20px #0007}#quest small{font:8px system-ui;letter-spacing:1.8px;color:#ddc58d}#objective{display:block;font:16px/1.4 Georgia;margin-top:8px;font-weight:400}#objective:before{content:'◇ ';color:#ffdc83}#location{position:absolute;top:96px;left:18px;background:#121d32d9;padding:8px 13px;border:1px solid #cfb27255;font-size:13px;border-radius:5px}#location i{width:5px;height:5px;background:#9be2cc;display:inline-block;border-radius:50%;margin-right:9px}.spot{position:absolute;transform:translate(-50%,-50%);padding:0;border:0;background:transparent;z-index:2;display:flex;align-items:center;flex-direction:column;gap:6px;filter:drop-shadow(0 3px 5px #0008)}.spot:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.07);background:transparent}.spot .gem{width:32px;height:32px;background:#17253df5;border:1px solid #f1dca0;transform:rotate(45deg);display:grid;place-items:center;box-shadow:0 0 18px #fff5}.gem span{transform:rotate(-45deg);color:#ffe1a3;font-size:18px}.spot small{background:#10192ee8;padding:5px 9px;border:1px solid #cbb47b77;border-radius:3px;font:10px system-ui;color:#f5e6c4}.spot.important .gem{animation:pulse 2s infinite;border-color:#fff0a9}.spot.done .gem{border-color:#75dfc0}.spot.done .gem span{color:#75dfc0}@keyframes pulse{50%{box-shadow:0 0 28px #ffdc87aa}}#sceneTip{position:absolute;bottom:12px;left:15px;color:#fff5d9;font:10px system-ui;letter-spacing:1px;text-shadow:0 2px 5px #000}#traveler{position:absolute;z-index:3;width:32px;height:32px;border:1px solid #ffe0a0;border-radius:50%;background:#17243b;box-shadow:0 0 22px #63e3db;display:grid;place-items:center;transform:translate(-50%,-50%);transition:left .7s,top .7s;pointer-events:none}#restored{position:absolute;inset:42% 15% auto;text-align:center;padding:24px;background:#162b3ac9;border:1px solid #f7d27c;font-size:30px;z-index:5}#dialog{background:linear-gradient(120deg,#f6ecd2,#e6d3ad);border:1px solid #ad8d53;border-top:3px solid #c3a469;display:flex;gap:20px;padding:17px 22px;min-height:164px;color:#27232b;box-shadow:inset 0 0 0 4px #a2854c22}.portrait{width:100px;min-height:114px;flex-shrink:0;background-image:url('assets/characters.webp');background-size:1500px 1000px;background-position:-137px -72px;border:1px solid #9e7c42;border-radius:5px;background-color:#15233c}.portrait.Crimson{background-position:-36px -72px}.portrait.Amethyst{background-position:-137px -72px}.portrait.Teal{background-position:-240px -72px}.portrait.Clementine{background-image:url('assets/archive.webp');background-size:1060px 707px;background-position:-9px -575px}.dialogbody{flex:1}#speaker{font:12px system-ui;letter-spacing:2px;color:#75543b;text-transform:uppercase}#line{font:21px/1.45 Georgia;margin:9px 0 13px;min-height:30px}#actions{display:flex;gap:8px;flex-wrap:wrap}#actions button{font:12px system-ui;padding:9px 13px;color:#fff0cc}nav{display:flex;justify-content:center;gap:9px;padding:14px;background:#111b2edb;border:1px solid #ad8d5344;border-top:0;border-radius:0 0 9px 9px}nav button{min-width:110px;font-size:18px}nav span{font-size:13px;margin-left:7px}footer{display:flex;justify-content:space-between;padding:13px 3px 20px;font:10px system-ui;color:#919caf;letter-spacing:.3px}.overlay{position:fixed;inset:0;background:#070d19da;backdrop-filter:blur(7px);z-index:15;overflow:auto;padding:30px 15px;display:grid;align-items:start;justify-content:center}.modal{position:relative;width:min(700px,calc(100vw - 30px));margin:20px auto;background:linear-gradient(130deg,#1b2942,#101b2e);border:1px solid #c1a369;border-radius:12px;padding:28px;box-shadow:0 20px 100px #000b}.modal h2{font-weight:400;color:#edd19a;font-size:30px;margin:4px 0 20px}.modal p{line-height:1.6}.close{position:absolute;right:12px;top:12px;border:0;background:transparent;font-size:23px;padding:0 8px}.card{padding:15px;margin:10px 0;border:1px solid #d3b47744;border-radius:7px;background:#ffffff04;line-height:1.6}.card small,.muted{color:#aab8ca;font:12px/1.6 system-ui}.row{display:flex;align-items:center;justify-content:space-between;gap:14px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.questdone{color:#87debd}.battlemodal{max-width:720px}#battleArt{position:relative;text-align:center;background:linear-gradient(#141c3890,#111b2bd9),url('assets/archive.webp') 55% 45%/cover;border-radius:8px;padding:20px;overflow:hidden}#battleArt small{letter-spacing:3px;color:#d6b7e9;font:9px system-ui}#battleArt h2{font-size:29px;margin:12px}#enemyStat{font:11px system-ui;color:#cfbedf}.whisper{position:relative;height:140px;display:grid;place-items:center}.whisper i{position:absolute;width:110px;height:110px;background:#9076bc;border-radius:47% 53% 33% 67%;filter:blur(15px);opacity:.5;animation:float 3s ease-in-out infinite}.whisper b{font-size:90px;font-weight:400;color:#e2d5ef;text-shadow:0 0 30px #9e73c9;z-index:1;animation:float 3s ease-in-out infinite}@keyframes float{50%{transform:translateY(-10px) rotate(5deg)}}.enemybar{height:7px;max-width:330px;margin:12px auto}.enemybar i{background:#b893de}#battleHeroes{display:flex;gap:7px;flex-wrap:wrap;margin:17px 0}#battleHeroes .hero{flex:1}#battleActions{display:flex;gap:8px;flex-wrap:wrap}#battleLog{font-size:18px;min-height:55px;line-height:1.5}#motes{position:absolute;inset:0;pointer-events:none}#motes i{position:absolute;width:3px;height:3px;background:#ffe5a9;border-radius:50%;box-shadow:0 0 9px #ffedb7;animation:float 4s infinite alternate}.mirror{font-size:48px;color:#e2c57e;text-align:center}.mirrorbutton{width:100%;margin-top:10px}.notice{padding:13px;background:#d5b87815;border-left:2px solid var(--gold);line-height:1.6;margin:14px 0}
@media(max-width:900px){.hero{min-width:110px}.hero .face{display:none}#quest{width:225px}.hero strong{font-size:12px}}
@media(max-width:600px){header{padding:11px 13px}.sigil{font-size:34px}h1{font-size:24px}.brand small{font-size:7px;letter-spacing:1.5px}.topright{gap:6px}#money{font-size:10px}.topright button{font-size:12px;padding:7px}main{padding:0 8px}#scene{aspect-ratio:1.1}#scenery{background-size:100% 100%}#heroes{top:8px;left:8px;gap:4px}.hero{min-width:0;width:90px;padding:6px}.hero small{font-size:8px}.hero strong{font-size:11px}#quest{top:auto;bottom:8px;right:8px;width:205px;padding:9px 11px}#quest small{font-size:7px}#objective{font-size:13px;margin-top:4px}#location{top:76px;left:8px;font-size:10px;padding:6px 8px}.spot .gem{width:25px;height:25px}.spot small{font-size:8px;padding:4px 5px}.spot .gem span{font-size:14px}#sceneTip{display:none}#dialog{gap:11px;padding:12px;min-height:170px}.portrait{width:65px;min-height:88px;background-size:1000px 667px;background-position:-91px -48px}.portrait.Crimson{background-position:-24px -48px}.portrait.Amethyst{background-position:-91px -48px}.portrait.Teal{background-position:-160px -48px}.portrait.Clementine{background-size:720px 480px;background-position:-6px -391px}#line{font-size:17px;margin:7px 0 12px}#actions button{font-size:11px;padding:8px 10px}nav{gap:5px;padding:9px 6px}nav button{min-width:0;flex:1;padding:9px 4px}nav span{display:block;margin:3px 0 0;font-size:10px}footer{font-size:8px}.modal{padding:22px 17px}.modal h2{font-size:25px}.grid{grid-template-columns:1fr}#restored{font-size:21px;padding:14px}}
/* Walking JRPG edition */
body{overflow:hidden}#app{height:100svh;display:flex;flex-direction:column}header{height:74px;min-height:74px;padding:10px 22px;width:100%;max-width:1700px}main{width:100%;max-width:1700px;padding:0 12px 10px;flex:1;min-height:0;position:relative}#scene{height:100%;aspect-ratio:auto;border-radius:12px;isolation:isolate;touch-action:none}#world{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0;will-change:transform}#scenery{background-size:100% 100%!important;inset:0}.shade{z-index:3;background:linear-gradient(#0b102b66,transparent 25%,transparent 65%,#0b102b99)}#motes{z-index:3}#heroes{z-index:9;left:17px;top:17px;gap:6px}.hero{min-width:123px;background:#11192ddf;backdrop-filter:blur(4px)}#heroes .face{display:block;width:36px;height:42px;background-size:var(--faceSize,660px 440px)}#heroes .hero strong{font-size:11px}#heroes .hero small{font-size:8px}#heroes .hero{min-width:0;width:126px}#quest{z-index:8;right:17px;top:17px;width:235px;padding:11px 13px;pointer-events:none}#location{z-index:7;top:90px}#minimap{position:absolute;right:17px;top:117px;width:151px;height:101px;background:#111c30dd;border:1px solid #d2b56f;border-radius:8px;z-index:7;pointer-events:none}#questGo{position:absolute;right:17px;top:230px;z-index:8;font:10px system-ui;padding:8px 11px;background:#162339df}#sceneTip{z-index:7;left:20px;bottom:75px;font-size:10px}#spots{display:none}#traveler{display:none!important}nav{position:absolute;right:30px;bottom:29px;z-index:9;background:#101a2b88;padding:7px;border:1px solid #d2b56f77;border-radius:8px;backdrop-filter:blur(7px)}nav button{min-width:77px;padding:7px 11px;background:#142137dd}nav span{font-size:11px}footer{display:none}#dialog{position:absolute;bottom:91px;left:3%;width:77%;max-width:1000px;z-index:10;border:2px solid #bda066;border-radius:9px;box-shadow:inset 0 0 0 4px #a2854c22,0 10px 50px #0006;background:linear-gradient(120deg,#fbf0d6f7,#e6d3b2f7);padding:15px 20px;min-height:144px;gap:18px}#dialog.hidden{display:none}#line{font-size:20px;margin:7px 0 12px}#speaker{font-size:11px}.portrait{width:88px;min-height:103px;background-size:1350px 900px;background-position:-123px -65px}.portrait.Crimson{background-position:-32px -65px}.portrait.Amethyst{background-position:-123px -65px}.portrait.Teal{background-position:-216px -65px}.portrait.Clementine{background-size:950px 633px;background-position:-7px -515px}#closeDialogue{position:absolute;right:8px;top:6px;padding:1px 6px;background:transparent;color:#634c39;border:0;font-size:20px}.actor{position:absolute;pointer-events:none;transform:translate(-50%,-100%);width:65px;height:92px;z-index:4;filter:drop-shadow(0 8px 4px #0005)}.actor .sprite{width:100%;height:100%;background-image:url('assets/party-sprites.webp');background-size:400% 400%;background-repeat:no-repeat;transform-origin:50% 90%}.actor.walking .sprite{animation:walkBob .28s infinite ease-in-out alternate}.actor .shadow{position:absolute;width:37px;height:11px;background:#10202b55;border-radius:50%;left:14px;bottom:0;filter:blur(2px)}@keyframes walkBob{0%{transform:translateY(0) rotate(-1deg)}100%{transform:translateY(-3px) rotate(1deg)}}#worldObjects{position:absolute;inset:0;pointer-events:none}.worldspot{position:absolute;transform:translate(-50%,-100%);display:flex;align-items:center;flex-direction:column;border:0;background:transparent;padding:0;pointer-events:auto;gap:7px;z-index:5}.worldspot:hover:not(:disabled){background:transparent;transform:translate(-50%,-100%) scale(1.06)}.worldspot .gem{width:24px;height:24px;box-shadow:0 0 15px #ffe6a877}.worldspot .gem span{font-size:13px}.worldspot small{font:10px system-ui;color:#ffecc8;background:#132037dc;border:1px solid #c6a86788;border-radius:4px;padding:4px 7px;white-space:nowrap}.worldspot .gem.quest-marker{border-color:#fff1b5;box-shadow:0 0 22px #ffe4a8;animation:pulse 2s infinite}.worldspot.near small{color:#fff5d5;border-color:#fff0b4}.worldspot.near small:after{content:' · E'}.worldspot .feet{width:15px;height:5px;border:1px solid #fff9;border-radius:50%;margin-top:5px}.npc-label{position:absolute;transform:translate(-50%,-100%);color:#fff3d6;background:#142137cc;border:1px solid #c2a46d66;border-radius:3px;padding:3px 7px;font-size:10px;pointer-events:none}.target-ring{position:absolute;width:22px;height:10px;transform:translate(-50%,-50%);border:2px solid #ffe1a1;border-radius:50%;box-shadow:0 0 14px #ffe3a1;pointer-events:none}#lightBeams{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;filter:drop-shadow(0 0 6px #ffdb93)}#walkToast{position:absolute;left:50%;top:22%;transform:translateX(-50%);z-index:12;background:#142038ed;color:#f2ddb3;border:1px solid #c6a56e;padding:10px 16px;border-radius:5px;font:12px system-ui;opacity:0;transition:opacity .3s;pointer-events:none;max-width:85%;text-align:center}#walkToast.show{opacity:1}#touchControls{position:absolute;inset:0;pointer-events:none;z-index:8}#dpad{position:absolute;bottom:23px;left:22px;width:112px;height:112px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:2px;opacity:.85;pointer-events:auto;touch-action:none}#dpad button{padding:0;background:#15233bd9;color:#f3d899;font-size:15px;border-radius:7px;touch-action:none;user-select:none}#dpad button[data-dir=up]{grid-column:2;grid-row:1}#dpad button[data-dir=left]{grid-column:1;grid-row:2}#dpad button[data-dir=down]{grid-column:2;grid-row:3}#dpad button[data-dir=right]{grid-column:3;grid-row:2}#dpad button.held{background:#51627b}#interact{position:absolute;bottom:104px;right:27px;border-radius:50%;width:59px;height:59px;font-size:23px;box-shadow:0 3px 20px #0007;background:#1e3548ed;pointer-events:auto;touch-action:manipulation}#interact span{position:absolute;top:62px;left:50%;transform:translateX(-50%);font:9px system-ui;color:#e9d1a4}.dialog-open #touchControls,.dialog-open #sceneTip{opacity:0;pointer-events:none}.dialog-open #touchControls *{pointer-events:none!important}.modal{margin:10px auto}.battlemodal{width:min(1100px,calc(100vw - 30px));padding:0;overflow:hidden;display:flex;flex-direction:column;min-height:min(690px,90svh)}#battleArt{height:min(440px,53svh);padding:20px;isolation:isolate;border-radius:0;flex:1;min-height:230px;background:linear-gradient(0deg,#16203d88,transparent 55%),url('assets/archive-clean.webp') center/cover}#battleArt small{position:relative;z-index:5}#battleArt h2{position:relative;z-index:5;font-size:24px;margin:10px}.whisper{position:absolute;right:9%;top:18%;width:34%;height:72%;z-index:3;filter:drop-shadow(0 10px 13px #17102d)}.whisper i{display:none}.whisper b{display:none}.whisper:before{content:'';position:absolute;inset:0;background:url('assets/whisper.webp') center/contain no-repeat;animation:enemyBreathe 3s ease-in-out infinite}.enemybar{position:absolute;right:10%;bottom:16px;width:31%;z-index:4}.enemybar i{background:linear-gradient(90deg,#8761b2,#d0a7ed)}#enemyStat{position:absolute;right:10%;bottom:0;width:31%;font-size:10px}.battlePartyArt{position:absolute;left:6%;bottom:8%;width:44%;height:60%;display:flex;align-items:end;z-index:2}.battlePartyArt .actor{position:relative;left:auto;top:auto;transform:none;width:26%;height:73%;filter:drop-shadow(0 10px 5px #10122488)}.battlePartyArt .actor:nth-child(2){margin-bottom:14%}.battlePartyArt .actor:nth-child(3){margin-bottom:6%}.battlePartyArt .actor:nth-child(4){margin-bottom:20%}.battlePartyArt .actor .sprite{background-position-x:33.3333%!important}.battleflash{position:absolute;left:64%;top:40%;font:38px Georgia;color:#fff3c6;text-shadow:0 3px 8px #000;z-index:9;animation:damage 1s ease-out forwards;pointer-events:none}@keyframes damage{to{transform:translateY(-55px);opacity:0}}.whisper.hit{filter:brightness(2) drop-shadow(0 0 35px #cda8ff);animation:hit .2s 2}@keyframes hit{50%{transform:translateX(12px)}}#battleHeroes{padding:10px 20px 0;margin:0;gap:6px}#battleHeroes .hero{min-width:0}#battleHeroes .face{display:none}#battleLog{margin:0;padding:16px 23px;color:#2f2635;background:linear-gradient(110deg,#f5e7c8,#e2cea9);font-size:18px;min-height:88px;border-block:1px solid #b89b68}#battleActions{padding:13px 20px 18px;gap:8px;background:#111c30}#battleActions button{font-size:13px}.turn-active{outline:2px solid #ead39a;box-shadow:0 0 15px #ffe5a52e}.overlay{z-index:20}.mirror-diagram{width:100%;height:140px;background:#0d1626;border:1px solid #bda36555;border-radius:8px}.map-grid button{padding:14px}.action-row{display:flex;gap:8px;flex-wrap:wrap}
@media(min-width:1100px){#dpad{opacity:.5}#dpad:hover{opacity:1}#sceneTip{bottom:28px;left:160px}}
@media(max-width:900px){#heroes .hero{width:102px}#heroes .face{display:none}#quest{width:210px}#dialog{width:84%;left:2%}}
@media(max-width:600px){header{height:60px;min-height:60px;padding:7px 12px}main{padding:0 5px 5px}#heroes{top:8px;left:8px;gap:3px;max-width:calc(100% - 16px);flex-wrap:wrap}#heroes .hero{width:83px;padding:5px}#heroes .hero strong{font-size:10px}#heroes .hero small{font-size:7px}#quest{top:77px;bottom:auto;right:8px;width:180px;padding:8px 10px}#quest small{font-size:6px;letter-spacing:1px}#objective{font-size:12px;margin-top:4px}#location{top:81px;left:8px;max-width:145px;font-size:9px;padding:6px 7px}#minimap{top:141px;right:8px;width:108px;height:72px}#questGo{top:220px;right:8px;font-size:9px;padding:6px 8px}nav{right:15px;bottom:17px;gap:3px;padding:4px}nav button{padding:5px 7px;min-width:38px;font-size:16px}nav span{font-size:8px;display:block;margin-top:1px}#dialog{bottom:78px;width:94%;left:3%;padding:12px;gap:10px;max-height:47svh;overflow:auto;min-height:135px}#line{font-size:16px;line-height:1.45}#speaker{font-size:10px}#actions button{font-size:11px;padding:8px 10px}.portrait{width:60px;min-height:85px;background-size:930px 620px}.portrait.Crimson{background-position:-22px -45px}.portrait.Amethyst{background-position:-85px -45px}.portrait.Teal{background-position:-149px -45px}.portrait.Clementine{background-size:680px 453px;background-position:-5px -369px}#dpad{left:13px;bottom:85px;width:103px;height:103px}#interact{bottom:110px;right:22px;width:53px;height:53px}#sceneTip{display:none}.worldspot small{font-size:9px}#battleArt{min-height:250px;height:43svh}.battlemodal{margin:0 auto;min-height:88svh}#battleHeroes{padding:9px}.battlemodal .hero{width:auto}.battlemodal .hero small{font-size:8px}#battleLog{font-size:16px;padding:13px 17px;min-height:90px}#battleActions{padding:12px;gap:7px}#battleActions button{font-size:11px;padding:10px 12px}.battlePartyArt{left:0%;width:54%;height:53%;bottom:8%}.whisper{right:1%;width:43%}.enemybar{right:4%;width:36%}#enemyStat{right:4%;width:36%}.overlay{padding:16px 8px}}
@media(max-height:570px) and (min-width:600px){header{height:48px;min-height:48px;padding:3px 15px}.sigil{font-size:30px}h1{font-size:22px}.brand small{font-size:7px}#heroes{top:9px}#quest{top:9px}#minimap{top:97px;width:100px;height:67px}#questGo{top:174px}#location{top:75px}#dialog{bottom:67px;min-height:112px;padding:11px 15px}#line{font-size:17px}.portrait{min-height:80px}#dpad{width:85px;height:85px;bottom:15px}#interact{bottom:82px;width:45px;height:45px}nav{bottom:21px}nav button{padding:5px 10px}#battleArt{min-height:140px}#battleLog{min-height:58px;padding:9px 15px}#battleHeroes{padding:7px 12px 0}#battleActions{padding:8px 12px}.battlemodal{min-height:90svh;margin:0 auto}.overlay{padding:8px}}
/* Canonical character-sheet portrait crops. */
.portrait,.portrait.Crimson,.portrait.Amethyst,.portrait.Teal,.portrait.Clementine{background-image:url('assets/canon.webp');background-size:900px 600px}
.portrait.Crimson{background-position:-80px -232px}.portrait.Amethyst{background-position:-630px -235px}.portrait.Teal{background-position:-535px -235px}.portrait.Clementine{background-position:-198px -234px}
.face,.face.Crimson,.face.Amethyst,.face.Teal,.face.Clementine{background-image:url('assets/canon.webp');background-size:460px 307px}
.face.Crimson{background-position:-42px -120px}.face.Amethyst{background-position:-323px -120px}.face.Teal{background-position:-274px -120px}.face.Clementine{background-position:-101px -120px}
@media(max-width:600px){.portrait,.portrait.Crimson,.portrait.Amethyst,.portrait.Teal,.portrait.Clementine{background-size:650px 433px}.portrait.Crimson{background-position:-58px -170px}.portrait.Amethyst{background-position:-455px -170px}.portrait.Teal{background-position:-386px -170px}.portrait.Clementine{background-position:-143px -170px}}
#heroes .face{background-size:460px 307px}.worldspot .gem{display:grid;place-items:center;background:#17243be8;border:1px solid #f2d69b;transform:rotate(45deg);width:24px;height:24px}.worldspot .gem span{display:block;transform:rotate(-45deg);color:#ffe2a2}.worldspot{gap:8px}
.face.Crimson{background-position:-56px -136px}.face.Amethyst{background-position:-341px -139px}.face.Teal{background-position:-289px -139px}.face.Clementine{background-position:-108px -139px}
.portrait.Crimson{background-position:-110px -267px}.portrait.Amethyst{background-position:-660px -268px}.portrait.Teal{background-position:-560px -267px}.portrait.Clementine{background-position:-210px -264px}
@media(max-width:600px){.portrait.Crimson{background-position:-79px -193px}.portrait.Amethyst{background-position:-477px -194px}.portrait.Teal{background-position:-404px -193px}.portrait.Clementine{background-position:-152px -191px}}
/* Preserve square atlas cells in battle instead of stretching the art. */
.battlePartyArt{left:2%;bottom:13%;width:50%;height:65%}.battlePartyArt .actor{position:absolute;left:0;bottom:0;width:43%;height:auto;aspect-ratio:1;margin:0!important;transform:none}.battlePartyArt .actor:nth-child(2){left:22%;bottom:24%}.battlePartyArt .actor:nth-child(3){left:43%;bottom:6%}.battlePartyArt .actor:nth-child(4){left:62%;bottom:30%}.battlePartyArt .actor .sprite{position:absolute;inset:0}.actor{width:82px;height:82px}
@media(max-width:600px){.battlePartyArt{left:1%;bottom:13%;width:54%;height:57%}.battlePartyArt .actor{width:46%}}
/* Keep Amethyst's entire face inside her dialogue portrait at both sizes. */
.portrait.Amethyst{width:110px;height:130px;min-height:130px;align-self:flex-start;background-size:900px 600px;background-position:-620px -260px;background-repeat:no-repeat}
.face.Amethyst{background-position:-318px -133px}
@media(max-width:600px){.portrait.Amethyst{width:75px;height:95px;min-height:95px;background-size:650px 433px;background-position:-448px -185px}}

/* Avoid a full-room offscreen SVG filter on mobile GPUs. */
#lightBeams{filter:none}
/* Chapter II: visible enemy parties and four-guardian formation. */
.actor[data-name="Forest"] .sprite{background-image:url('assets/forest-sprites.webp');background-size:400% 100%;background-position-y:0!important}
.portrait.Forest{background-image:url('assets/canon.webp');background-size:900px 600px;background-position:-400px -260px;width:110px;height:130px;min-height:130px;align-self:flex-start}
.face.Forest{background-image:url('assets/canon.webp');background-size:460px 307px;background-position:-205px -133px}
.map-enemy{display:block;width:72px;height:78px;background:url('assets/whisper.webp') center/contain no-repeat;filter:drop-shadow(0 5px 6px #160e25);margin-bottom:-18px;animation:enemyBreathe 3s ease-in-out infinite;pointer-events:none}
.map-enemy.enemy-dullard{background-image:url('assets/dullard.webp');width:88px;height:85px}
.encounter-spot small{border-color:#b9a0d4}.questdone{color:#a8d5b9}.campaign-battle #battleArt{min-height:300px;background-position:center;background-size:cover}
.campaign-battle #enemyName{margin-top:5px;font-size:23px;text-shadow:0 2px 6px #000}
.campaign-battle #enemyStat{left:24px;right:auto;bottom:auto;top:60px;width:auto;font:12px system-ui;background:#142037d9;border-radius:4px;padding:5px 9px}
#enemyGroup{position:absolute;right:3%;top:22%;width:58%;height:68%;display:flex;align-items:center;justify-content:center;gap:4px;z-index:4}
.enemy-unit{flex:1;max-width:190px;min-width:0;border:1px solid transparent;padding:4px 2px;background:transparent!important;display:flex;align-items:center;flex-direction:column;transform:none!important;filter:drop-shadow(0 5px 8px #171022)}
.enemy-unit.selected{border-color:#f5dc9a;border-radius:10px;box-shadow:0 0 15px #e9bd6c55;background:#1e284755!important}.enemy-unit.defeated{opacity:.18}.enemy-unit .enemy-sprite{display:block;width:100%;height:145px;background:url('assets/whisper.webp') center/contain no-repeat;animation:enemyBreathe 3s ease-in-out infinite}
.enemy-unit.foe-dullard .enemy-sprite{background-image:url('assets/dullard.webp')}.enemy-unit .enemy-label{font:11px system-ui;text-shadow:0 2px 4px #000;text-align:center;min-height:28px;display:grid;place-items:center}.enemy-unit .bar{width:85%;height:5px;margin:5px 0}.enemy-unit .bar i{background:linear-gradient(90deg,#8e6da9,#ddbbf2)}.enemy-health{font:10px system-ui;color:#f1e4c9}
.campaign-battle .battlePartyArt{width:39%;left:0;bottom:8%;height:58%}.campaign-battle .battlePartyArt .actor{width:51%}.campaign-battle #battleHeroes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.campaign-battle #battleHeroes .hero{width:auto}.campaign-battle #battleActions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.portrait.Forest{width:75px;height:95px;min-height:95px;background-size:650px 433px;background-position:-289px -185px}.campaign-battle #battleArt{height:37svh;min-height:225px}.campaign-battle #enemyName{font-size:18px;margin-left:0}.campaign-battle #enemyStat{left:10px;top:54px;font-size:9px}#enemyGroup{width:63%;right:1%;top:28%;height:62%}.enemy-unit .enemy-sprite{height:105px}.enemy-unit .enemy-label{font-size:9px;min-height:25px}.enemy-health{font-size:8px}.campaign-battle .battlePartyArt{width:40%;height:48%;bottom:9%}.campaign-battle #battleLog{min-height:78px;font-size:14px}.campaign-battle #battleActions button{padding:10px 4px;font-size:10px}.campaign-battle #battleHeroes .hero{padding:5px}.campaign-battle #battleHeroes strong{font-size:11px}.map-enemy{width:62px;height:68px}.map-enemy.enemy-dullard{width:72px;height:73px}}
/* The First Six: roster and long-form journey menus. */
.roster-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.roster-card{border:1px solid #d0b07877;border-radius:9px;background:linear-gradient(145deg,#23304a,#121c2d);padding:14px}.roster-card .hero,.roster-choice .hero{width:100%;min-width:0;margin:8px 0}.roster-card p{margin:8px 0}.roster-card small{display:block;line-height:1.6;color:#d6ccb7}.roster-card .action-row{margin-top:12px}.roster-card button{padding:9px 12px;font-size:12px}.status-tag{font:10px system-ui;letter-spacing:1.3px;color:#96e6d3}.reserve-tag{color:#d9baec}.roster-choice{padding:12px;text-align:left}.roster-choice>span{font-size:12px}.actor[data-name="Daffodil"] .sprite{background-image:url('assets/daffodil-sprites.webp');background-size:400% 100%;background-position-y:0!important}
.portrait.Daffodil{background-image:url('assets/canon.webp');background-size:900px 600px;background-position:-308px -260px;width:110px;height:130px;min-height:130px}.face.Daffodil{background-image:url('assets/canon.webp');background-size:460px 307px;background-position:-157px -133px}
.worldspot .gem.quest-marker{border-color:#fff3af;box-shadow:0 0 22px #ffe4a8;animation:pulse 2s infinite}#line{white-space:pre-line}.modal{max-height:91svh;overflow-y:auto}.modal .hero strong{white-space:normal}.modal h3{color:#e8ca90;font-weight:400;margin-top:23px}.battlemodal{overflow-y:auto}
@media(max-width:600px){.roster-grid{grid-template-columns:1fr;gap:10px}.roster-card{padding:12px}.roster-card .hero strong{font-size:16px}.roster-card .hero small{font-size:11px}.roster-card .face{display:block;flex-shrink:0}.portrait.Daffodil{width:75px;height:95px;min-height:95px;background-size:650px 433px;background-position:-222px -185px}.modal{padding:22px 14px}#heroes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:calc(100% - 16px)}#heroes .hero{width:auto;min-width:0}#heroes .hero strong{font-size:10px}#heroes .hero small{font-size:7px}}
.portrait.narrator{background:radial-gradient(ellipse,#455570,#15243c);display:grid;place-items:center;color:#e7ca8e;font-size:54px;width:85px;min-height:100px;height:100px}
.actor[data-name="Daffodil"] .sprite{width:42%;margin-left:29%}.actor[data-name="Forest"] .sprite{width:75%;margin-left:12.5%}.battlePartyArt .actor[data-name="Daffodil"] .sprite{right:auto;width:42%}.battlePartyArt .actor[data-name="Forest"] .sprite{right:auto;width:75%}
