*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;background:#070b13;color:#f9e9c8;font-family:Georgia,'Times New Roman',serif;overflow:hidden;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer}button:disabled{opacity:.42;cursor:default}button:focus-visible{outline:3px solid #ffe49b;outline-offset:1px}.hidden{display:none!important}
#viewport{position:relative;width:100vw;height:100dvh;background:#0c1422;overflow:hidden;touch-action:manipulation}
#game{position:absolute;left:50%;top:50%;width:1536px;height:864px;transform:translate(-50%,-50%) scale(var(--scale,1));transform-origin:center;overflow:hidden;isolation:isolate;background:#181d29;box-shadow:0 0 90px #000c}
#backdrop{position:absolute;inset:0;width:1536px;height:864px;object-fit:cover;pointer-events:none;z-index:0}
#area-banner{position:absolute;left:4px;top:0;width:364px;height:82px;object-fit:fill;z-index:12;filter:drop-shadow(0 3px 4px #0006)}
.top-buttons{position:absolute;z-index:34;right:20px;top:10px;display:flex;gap:9px;align-items:center}
.top-control{display:flex;align-items:center;justify-content:center;min-width:101px;height:53px;font-weight:bold;font-size:25px;background:linear-gradient(#252737,#0b1120 45%,#202335);border:3px ridge #eac478;border-radius:17px;color:#f4dda6;text-shadow:0 2px 2px #000;box-shadow:inset 0 0 9px #ffc86e2a,0 3px 10px #0009}
.top-control:last-child{min-width:64px}.top-control:hover{filter:brightness(1.22)}
#actors{position:absolute;inset:0;z-index:9;pointer-events:none}
.actor{position:absolute;will-change:transform;--walk:0px;--hop:0px;transform:translate(var(--walk),var(--hop));height:360px;width:350px;pointer-events:none;transition:none}
.actor img{position:absolute;width:100%;height:100%;object-fit:contain;object-position:50% 100%;pointer-events:none;display:block;filter:drop-shadow(0 7px 5px #39261c85)}
.actor .ground-shadow{position:absolute;bottom:22px;left:22%;width:63%;height:13px;background:#22190c7a;border-radius:50%;filter:blur(6px);transform:scaleY(.75)}
.actor.wolf img{transform:scaleX(-1);transform-origin:50% 50%}
.actor.hit-react img{filter:brightness(1.45) sepia(.42) drop-shadow(0 5px 6px #402222)}
.actor.is-melee-target .ground-shadow{background:#f8b855a8;box-shadow:0 0 15px 7px #f2b844a8;animation:targetPulse .5s ease-in-out infinite alternate}
.actor.is-melee-target img{filter:drop-shadow(0 7px 5px #39261c85) drop-shadow(0 0 7px #ffcf65)}
@keyframes targetPulse{from{opacity:.55;scale:.85}to{opacity:1;scale:1.08}}
#melee-target-label{position:absolute;z-index:24;min-width:140px;padding:5px 12px;border:2px double #ffde83;border-radius:18px;background:#10131deb;color:#ffe5a8;text-align:center;font-weight:bold;font-size:17px;letter-spacing:.5px;text-shadow:0 2px 2px #000;box-shadow:0 0 10px #ffb63555;pointer-events:none}
#actor-brom{left:369px;top:277px;width:377px;height:370px}
#actor-tamsin{left:150px;top:153px;width:354px;height:372px}
#actor-wolf-a{left:818px;top:366px;width:420px;height:270px}
#actor-wolf-b{left:1100px;top:265px;width:392px;height:260px}
#vfx{position:absolute;inset:0;z-index:22;pointer-events:none}
.damage{position:absolute;font-weight:900;font-style:italic;font-size:60px;color:#ff8073;-webkit-text-stroke:2px #5a0b0d;text-shadow:2px 3px 2px #180405,0 0 12px #ffbba1;animation:damageRise .95s ease-out both;white-space:nowrap}
.damage.healing{color:#a5ffb8;-webkit-text-stroke:2px #1a663a}
@keyframes damageRise{0%{opacity:0;transform:translateY(24px) scale(.7)}12%{opacity:1;transform:translateY(0) scale(1.2)}60%{opacity:1;transform:translateY(-25px)}100%{opacity:0;transform:translateY(-65px) scale(.9)}}
.slash{position:absolute;width:180px;height:100px;border-radius:50%;border-top:14px solid #ffdb8b;filter:drop-shadow(0 0 8px #ffac34);transform:rotate(-24deg);animation:slash .34s ease-out forwards}@keyframes slash{0%{opacity:0;scale:.25;rotate:-50deg}25%{opacity:1;scale:1.1}100%{opacity:0;scale:1.3;rotate:33deg}}
.arrow{position:absolute;width:96px;height:4px;transform-origin:center;background:linear-gradient(90deg,#f2d6a3,#fff2ce);box-shadow:0 0 8px #edb15d;z-index:20}.arrow:after{content:'▶';position:absolute;right:-9px;top:-13px;font-size:24px;color:#fff4c3}
.enemy-bar{position:absolute;width:248px;height:52px;z-index:19;padding:6px 9px 7px;background:linear-gradient(160deg,#171722e8,#0c1425ef);border:2px solid #cda76e;border-radius:11px;box-shadow:0 3px 8px #000b;display:flex;flex-wrap:wrap;justify-content:space-between;align-content:center;gap:4px;color:#ffdeb2;font-size:16px;font-weight:bold;text-shadow:0 2px 2px black}
#wolf-hp-a{left:935px;top:324px}#wolf-hp-b{left:1252px;top:209px;width:246px}
.enemy-track{width:100%;height:12px;overflow:hidden;background:#0a0a12;border:1px solid #b1987e;border-radius:8px}.enemy-track i{display:block;height:100%;width:100%;background:linear-gradient(#ff9895,#aa1b29 50%,#6a1019);box-shadow:0 0 5px #e84354;transition:width .17s}
.enemy-bar.dead{opacity:.32}
#activity{position:absolute;left:865px;top:694px;z-index:19;min-width:350px;max-width:405px;height:33px;padding:7px 13px;background:#121a27d9;border:1px solid #b99862;border-radius:12px;text-align:center;font-size:16px;opacity:0;transition:opacity .15s;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#activity.visible{opacity:1}
#queue{position:absolute;left:1224px;top:531px;width:292px;height:177px;z-index:18;pointer-events:none}#queue>img{position:absolute;inset:0;width:100%;height:100%}#queue .queue-live{position:absolute;inset:11px 14px 13px;display:flex;flex-direction:column;gap:7px;padding:5px 10px;background:#111723f6;border-radius:8px;box-shadow:inset 0 0 8px #0008;font-size:13px;overflow:hidden}#queue strong{font-size:18px;color:#f0cd8e;border-bottom:1px solid #94703b;padding-bottom:5px}#queue-waiting{white-space:pre-line;color:#e3d2b5;font-size:12px;line-height:18px}#queue-active{color:#fff3c9;font-size:13px}
.command{position:absolute;left:49px;top:580px;width:681px;height:144px;z-index:45;pointer-events:none}
.command-image{position:absolute;left:0;top:0;width:386px;height:144px;object-fit:fill;filter:drop-shadow(0 4px 7px #0009)}
.command-buttons{position:absolute;inset:0 294px 0 0}.action-hotspot{position:absolute;top:15px;width:80px;height:93px;background:transparent;border:2px solid transparent;border-radius:9px;pointer-events:auto;touch-action:manipulation}.action-hotspot:nth-child(1){left:14px}.action-hotspot:nth-child(2){left:108px}.action-hotspot:nth-child(3){left:198px}.action-hotspot:nth-child(4){left:285px}.action-hotspot:hover,.action-hotspot:focus-visible,.action-hotspot.picked{border-color:#ffe2a0;box-shadow:inset 0 0 13px #ffc56674,0 0 10px #fff0b7a0}
/* Larger iPhone touch targets without changing the approved gold-framed art.
   Targets stay in the same command tablet but the tap rows have more room. */
.target-panel{position:absolute;left:383px;top:-82px;width:368px;height:202px;pointer-events:auto}.target-panel>img{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 4px 6px #000a)}
#targets{position:absolute;left:29px;top:55px;width:315px;display:flex;flex-direction:column;gap:0}#targets button{height:69px;min-height:69px;text-align:left;padding:0 12px 0 20px;display:flex;align-items:center;justify-content:space-between;background:transparent;border:1px solid transparent;border-radius:9px;color:#f9e7ce;text-shadow:0 1px 2px black;pointer-events:auto;touch-action:manipulation;font-size:17px}#targets button.enemy span,#targets button.enemy small{opacity:0}#targets button.enemy:hover,#targets button.enemy:focus-visible{border:1px solid #ffe3a6;box-shadow:inset 0 0 13px #facb7450}#targets button:not(.enemy){background:#171823ed;border-color:#a17b48}#targets small{font-size:13px;color:#f4d7a1}
#target-back{position:absolute;right:13px;top:8px;width:24px;height:25px;padding:0;background:#1b1923;border:1px solid #c9a05f;border-radius:5px;font-size:22px;line-height:18px;pointer-events:auto}
.hero-panels{position:absolute;z-index:31;left:17px;bottom:11px;display:flex;gap:14px;height:136px}.hero-panel{position:relative;width:426px;height:136px;background:linear-gradient(135deg,#222332,#101a26 54%,#191622);border:3px ridge #cfaa67;border-radius:18px;box-shadow:0 4px 11px #000c,inset 0 0 18px #b9954935;display:flex;align-items:stretch;padding:6px 8px;gap:10px;text-align:left}.hero-panel.ready{border-color:#ffe69a;box-shadow:0 0 13px #ffd371d1,inset 0 0 19px #d4a44b52}.hero-panel.selected{outline:3px solid #ffdf9a;outline-offset:1px}.hero-panel.queued{border-color:#8eb4d4}.hero-panel .portrait{width:111px;height:116px;object-fit:cover;object-position:center top;border:2px solid #f3c575;border-radius:10px;box-shadow:0 0 9px #000}.hero-info{flex:1;display:flex;flex-direction:column;gap:7px;padding:2px 1px}.hero-head{display:flex;justify-content:space-between;align-items:center;text-shadow:0 2px 2px #000}.hero-head b{font-size:21px;color:#ffe7ba}.hero-head span{font-size:17px;color:#eac68c}
.track{position:relative;width:100%;height:21px;border:2px solid #9d8061;background:#11131a;border-radius:13px;overflow:hidden;box-shadow:inset 0 1px 5px #000;flex-shrink:0}.track i{position:absolute;left:0;top:0;height:100%;width:100%;background:linear-gradient(#7efa7b,#04ae3a 65%,#08602b);transition:width .12s}.track.mp i{background:linear-gradient(#80e9ff,#1c94f3 65%,#1355c0)}.track.atb i{background:linear-gradient(#fff1ac,#f5a62c 55%,#a3671e)}.track span:not(.atb-label){position:absolute;inset:0;text-align:center;font-size:15px;font-weight:bold;color:#fff3de;text-shadow:0 1px 2px black,0 1px 4px #000;line-height:17px}.track.atb .atb-label{position:absolute;left:3px;top:0;color:#100d06;z-index:2;font-size:13px;font-weight:900;line-height:17px;text-shadow:0 1px 0 #e7b560}.track.atb span[data-text]{text-align:right;padding-right:8px;line-height:17px}
.corner-note{position:absolute;right:17px;bottom:14px;z-index:8;font-size:13px;color:#f2d6a3;text-shadow:0 2px 3px #000;letter-spacing:.3px}
.intro{position:absolute;inset:0;z-index:60;background:#0d1420}.intro>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.intro-overlay{position:absolute;inset:0;background:linear-gradient(0deg,#040711ed 0%,#04071196 22%,transparent 75%),linear-gradient(90deg,#0b12306b,transparent 80%)}.intro-content{position:absolute;bottom:58px;left:75px;width:1000px;text-shadow:0 3px 6px #000}.intro-content span{color:#ecd28c;letter-spacing:3px;font-size:18px;font-weight:bold}.intro-content h1{font-size:54px;margin:10px 0 8px}.intro-content p{font-size:23px;margin:0 0 18px}.intro-content small{display:block;font-size:14px;margin-top:13px;color:#d7d4d6}.intro-content button,.dialog button{padding:12px 27px;font-size:22px;font-weight:bold;background:linear-gradient(#59402c,#161823 60%,#2c2630);border:3px double #f4c76e;border-radius:12px;box-shadow:0 0 12px #e4ad4a50}
.modal{position:absolute;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;background:#02050fd4}.dialog{width:620px;max-height:730px;padding:30px;text-align:center;background:linear-gradient(#232334,#0e1525);border:5px double #e0b16a;border-radius:21px;box-shadow:0 12px 70px #000}.dialog h1{font-size:50px;color:#ffe5a1;margin:8px}.dialog p{font-size:20px}.dialog h2{font-size:32px}.rewards{display:flex;gap:12px;justify-content:center;margin:24px 0}.rewards>div{border:1px solid #e1b978;border-radius:11px;padding:18px 24px;background:#1d2230}.rewards b{font-size:30px;color:#ffe9af;display:block}.rewards small{display:block;font-size:15px;margin-top:7px}.dialog button{margin-top:12px}
#message{position:absolute;top:92px;left:50%;transform:translateX(-50%);background:#0b0d18e9;border:1px solid #ddad6b;border-radius:8px;padding:6px 20px;z-index:65;font-size:17px;opacity:0;pointer-events:none;transition:opacity .15s}#message.show{opacity:1}
#rotate{display:none}
@media (orientation:portrait) and (max-width:800px){#game{display:none}#rotate{display:flex;position:absolute;inset:0;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px;background:linear-gradient(35deg,#101723,#293047)}#rotate strong{font-size:23px;color:#ffe3a6}#rotate p{font-size:15px}}
/* The action queue's live rows use an opaque backing so the painted reference rows
   beneath cannot show through as a ghosted duplicate. */
#queue .queue-live{background:#111622;box-shadow:inset 0 0 10px #0009}

/* Test 10: internal action queue is intentionally not visible. */
#queue{display:none !important}
/* No preset active command; selection glow is applied only after user input. */
.action-hotspot:not(.picked):not(:focus-visible){box-shadow:none;border-color:transparent}

/* TEST 12 — opening story and dedicated result screen, 1536x864 reference frame. */
#actors .actor img{filter:brightness(.89) saturate(.87) drop-shadow(0 7px 6px #241821bb)}
.story-screen,.victory-screen,.village-screen{position:absolute;inset:0;z-index:75;overflow:hidden}
.story-screen{background:#12131a}.story-screen>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform-origin:50% 50%;transition:transform .72s ease,filter .55s ease,opacity .5s ease}
#story-art{filter:brightness(.91);transform:scale(1)}#story-wolves{filter:brightness(.7) contrast(1.08)}
.story-screen.scene-1 #story-art{transform:scale(1.47) translate(-15%,-3%);filter:brightness(.80)}
.story-screen.scene-2 #story-art{transform:scale(1.21) translate(10%,-2%);filter:brightness(.82)}
.story-screen.scene-3 #story-art{transform:scale(1.09) translate(4%,-2%);filter:brightness(.75)}
.story-screen.scene-4 #story-art{transform:scale(1.21) translate(9%,-3%);filter:brightness(.84)}
.story-screen.scene-5 #story-wolves{transform:scale(1.04);filter:brightness(.64) saturate(.72)}
.story-vignette{position:absolute;inset:0;background:linear-gradient(0deg,#03040c 0%,#070a12dc 10%,#080b1440 41%,#090b173e 100%),linear-gradient(90deg,#07071035,transparent 38%,#05060a30)}
.story-top{position:absolute;top:25px;left:42px;right:38px;display:flex;align-items:center;gap:28px;font-weight:bold;letter-spacing:2px;color:#f1d4a0;text-shadow:0 2px 7px #000;font-size:18px}.story-top span:first-child{font-size:25px;color:#ffdf9a}.story-top button{margin-left:auto;color:#ffe3ad;border:2px solid #98713d;background:#12151bdd;padding:10px 19px;border-radius:9px;font-size:17px}
.story-dialogue{position:absolute;bottom:23px;left:54px;width:1428px;min-height:167px;border:3px double #b98d4e;border-radius:17px;background:linear-gradient(130deg,#111620f5,#0d101bea);box-shadow:0 4px 20px #000, inset 0 0 20px #bd8d3935;padding:14px 28px 13px 33px;text-shadow:0 2px 3px #000}
.story-speaker{display:inline-block;color:#ffdaa1;font-size:19px;font-weight:bold;letter-spacing:2px;border-bottom:1px solid #ad854b;padding:0 15px 6px 0}
#story-line{margin:11px 10px 9px;font-size:28px;line-height:1.29;max-width:1230px;font-style:italic;color:#fff3dc}
.story-footer{display:flex;justify-content:space-between;align-items:center;color:#b99b69}.story-footer small{font-size:17px}.story-footer button{background:linear-gradient(#654720,#271b19);border:2px solid #e1b26b;border-radius:10px;padding:7px 24px;font-size:19px}.story-footer button span{margin-left:15px}
.victory-screen{background:#111621 url('assets/victory_approved.webp') center / 100% 100% no-repeat;z-index:78}.victory-shadow{position:absolute;inset:0;background:linear-gradient(90deg,#15101805 0%,transparent 35%,#05071016 100%);pointer-events:none}
.victory-board{position:absolute;top:267px;height:404px;background:linear-gradient(150deg,#1c1d24f9,#10131afc 70%);border:3px double #dcad63;border-radius:16px;box-shadow:inset 0 0 16px #e3a64822,0 9px 25px #000b;padding:18px 21px}
.victory-board h2{font-size:29px;color:#ffe8b5;border-bottom:2px solid #95693a;padding-bottom:12px;margin:0 0 15px;text-shadow:0 2px #000}
.xp-board{left:477px;width:561px}.reward-board{left:1050px;width:435px}
.exp-row{display:flex;align-items:center;gap:15px;padding:10px 7px 11px;border:1px solid #9d7645;border-radius:10px;margin-bottom:13px;height:135px;background:#1b1a20f3}
.exp-row img{width:88px;height:99px;object-fit:cover;border-radius:8px;border:2px solid #c8a16b}.exp-data{flex:1}.exp-top{display:flex;align-items:baseline;justify-content:space-between;gap:7px}.exp-top strong{font-size:27px}.exp-top span{font-size:18px;color:#95f699;font-weight:bold}.exp-level{font-size:16px;color:#efc98b;margin:4px 0 8px}
.exp-track{height:25px;border:2px solid #d7aa65;border-radius:16px;background:#080d19;overflow:hidden;position:relative}.exp-track i{position:absolute;inset:0 auto 0 0;width:0%;background:linear-gradient(#83efff,#25b5f1 50%,#126ca9);box-shadow:0 0 8px #27a5fa;transition:width 1.2s ease}.exp-text{margin-top:6px;font-size:16px;color:#f6e6cf;text-align:center}
.equal-exp{color:#e1cba7;font-size:15px;text-align:center;margin:10px 0}
.reward-line{display:flex;align-items:center;gap:14px;border:1px solid #986d43;background:#221b1c;margin-bottom:14px;height:92px;padding:9px 13px;border-radius:10px}.reward-line img{width:70px;height:70px;object-fit:contain;border:2px solid #c99758;border-radius:8px;background:#18151b}.reward-line strong{display:block;color:#fff0cb;font-size:23px}.reward-line small{display:block;font-size:15px;color:#dbbea1;margin-top:6px}
.mvp-plate{position:absolute;left:32px;top:676px;width:408px;min-height:155px;border:3px double #e3b167;border-radius:18px;background:linear-gradient(165deg,#411e24f9,#10131bfa);text-align:center;padding:9px 13px;box-shadow:0 8px 20px #000b,0 0 18px #f0ae3d54}.mvp-kicker{display:block;color:#ffe09a;font-size:23px;letter-spacing:2px;font-weight:bold;text-shadow:0 0 9px #ff9b31}.mvp-person{display:flex;align-items:center;justify-content:center;gap:14px}.mvp-person img{width:70px;height:69px;object-fit:cover;border:2px solid #fbd68a;border-radius:9px}.mvp-person strong{display:block;font-size:29px;color:#fff5d7}.mvp-person small{font-size:17px;color:#e4c899}.mvp-note{font-size:12px;color:#d0b98e;margin-top:3px}
.victory-continue{position:absolute;left:720px;top:718px;width:345px;height:77px;border:4px double #8b501a;border-radius:22px;background:linear-gradient(175deg,#fff2b1,#f8c64f 50%,#a95f1b);color:#2e1b0e;font-weight:900;font-size:38px;text-shadow:0 1px #fff4c0;box-shadow:0 0 10px #f6bf63b8,inset 0 0 13px #fff2c7;z-index:1}.victory-continue span{padding-left:12px}.victory-continue:active{transform:scale(.98)}
.victory-outcome{position:absolute;left:1050px;top:697px;width:437px;font-size:16px;text-align:center;color:#fff0ce;text-shadow:0 2px #000}
.village-screen{background:#121521 url('assets/story_gloom.webp') center / cover no-repeat;z-index:78}.village-veiling{position:absolute;inset:0;background:linear-gradient(90deg,#090d19e8,#080b17c3 60%,#04060a77)}.village-post{position:absolute;top:148px;left:130px;width:1130px;color:#ffefcd;text-shadow:0 2px 4px #000}.village-post .eyebrow{font-size:19px;color:#edcb8d;letter-spacing:2px}.village-post h1{font-size:60px;margin:14px 0 15px}.village-post p{max-width:990px;font-size:28px;line-height:1.5}.village-post #village-status{margin-top:28px;padding:20px 26px;display:inline-block;background:#111622ee;border:2px solid #c4975b;border-radius:14px;font-size:22px}.village-actions{display:flex;gap:15px;flex-wrap:wrap;margin-top:30px}.village-actions button{font-size:22px;padding:13px 21px;border:3px double #e5b669;border-radius:11px;background:linear-gradient(#50402b,#151a24);color:#ffe9c3}
/* Final victory visual polish: opaque live panels fully cover baked-in demo text.
   The original illustrated Continue button stays visible and acts as the tap target. */
.victory-board{background:linear-gradient(153deg,#1d1d25 0%,#10131b 75%)}
.victory-continue{left:740px;top:707px;width:404px;height:94px;min-width:0;background:transparent;border:0;box-shadow:none;color:transparent;text-shadow:none;font-size:0;padding:0}
.victory-continue span{display:none}
.victory-continue:hover,.victory-continue:active{background:#ffe3991b;box-shadow:0 0 22px #ffd27b8c}
.victory-continue:focus-visible{outline:3px solid #fff4d4;outline-offset:-5px}

/* Test 13 — a real timed cinematic video, with independent animated figures.
   Muted + playsinline ensures it can start on mobile Safari. */
#opening-film{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#0b0d12;pointer-events:none;filter:contrast(1.05)}
.story-screen .story-vignette{pointer-events:none;background:linear-gradient(0deg,#02030ada,transparent 23%,transparent 77%,#08091439)}
.story-dialogue{left:55px;bottom:18px;width:1426px;min-height:116px;padding:11px 24px 10px 30px;background:linear-gradient(90deg,#0a0d17f2,#10121bdb);border:2px solid #ae884e;border-radius:13px}
.story-speaker{font-size:17px;padding-bottom:2px}
#story-line{font-size:24px;margin:6px 10px 3px;line-height:1.25;font-style:normal}
.story-footer small{font-size:14px}.story-footer button{font-size:16px;padding:4px 18px}
.story-top{top:16px;left:38px;right:32px}.story-top button{font-size:15px;padding:7px 15px}

/* Test 14 soundtrack is opt-in, with video still autoplaying silently on iPhone. */
.story-top #story-sound{margin-left:auto;font-size:15px;padding:7px 15px}
.story-top #skip-story{margin-left:0}
.story-top #story-sound[aria-pressed="true"]{border-color:#ebd08e;color:#fff1c6;box-shadow:0 0 9px #e2bd7770}

/* Test 18: dialogue is now in the video; move controls to the top. */
#story .story-dialogue {display:none}
#story.video-error .story-dialogue {display:block}
#story .story-top #story-next {margin-left:auto}
#story .story-top #story-sound {margin-left:0}
#story .story-top #skip-story {margin-left:0}

/* Test 19: gameplay sprites use intentionally readable HD-2D pixel geometry;
   painterly village scenery retains atmospheric depth and lantern bloom. */
.actor img { image-rendering:pixelated; image-rendering:crisp-edges; }
.hero-panel .portrait,.mvp-person img,.exp-row>img { image-rendering:pixelated; }
#actor-brom{left:382px;top:318px;width:339px;height:337px}
#actor-tamsin{left:172px;top:233px;width:296px;height:294px}
#actor-wolf-a{left:842px;top:386px;width:371px;height:248px}
#actor-wolf-b{left:1126px;top:284px;width:340px;height:221px}
.actor.wolf img{image-rendering:pixelated;}
#story .story-dialogue{display:block;min-height:105px;bottom:14px;background:linear-gradient(110deg,#0b0d16ed,#151720db)}
#story .story-top{font-size:16px}
/* Soft atmospheric light surrounds objects, while their pixels remain sharp. */
#actors{filter:drop-shadow(0 0 5px #f7a14b27)}
#backdrop{filter:brightness(.91) contrast(1.04) saturate(.92)}

/* HD-2D results screen: pixel-hero character artwork replaces the baked-in anime figure. */
.victory-screen{background:linear-gradient(120deg,#080910c0,#090c17a8),url('assets/battle_gloom.webp') center/cover no-repeat}
.victory-screen::before{content:'✦  V I C T O R Y  ✦';position:absolute;top:27px;left:420px;right:165px;text-align:center;color:#ffe2a1;font-size:70px;line-height:1.15;font-weight:bold;letter-spacing:5px;text-shadow:0 3px 0 #5a310d,0 0 20px #ffb753cc,0 8px 17px #000;z-index:1}
.victory-screen::after{content:'AREA 1 — VILLAGE     ·     1-1 VILLAGE ENTRANCE';position:absolute;top:131px;left:455px;right:180px;text-align:center;color:#ead0a1;font-size:22px;letter-spacing:3px;text-shadow:0 2px 6px #000}
#victory-featured-hero{position:absolute;left:49px;top:145px;width:390px;height:505px;object-fit:contain;object-position:50% 100%;image-rendering:pixelated;filter:drop-shadow(0 6px 5px #0a0d0bd9) drop-shadow(0 0 12px #e5ac376a)}
.victory-continue{left:737px;top:713px;width:401px;height:86px;color:#38210e;font-size:38px;font-weight:900;border:4px double #985b23;border-radius:20px;background:linear-gradient(180deg,#ffe8a3,#ecb745 54%,#8d5423);text-shadow:0 1px #fff7d7;box-shadow:inset 0 0 14px #fff0c288,0 0 18px #b86c2a55}
.victory-continue span{display:inline}
.victory-continue:hover,.victory-continue:active{background:linear-gradient(180deg,#fff3bf,#ffcf65,#9f602b);box-shadow:0 0 20px #ffd27b8c}

/* Test 20 — artist-approved eight-frame Brom slash, stable ground and visual scale. */
#actor-brom{left:240px;top:269px;width:540px;height:390px}
#actor-brom .ground-shadow{bottom:14px;left:34%;width:48%;height:11px;opacity:.85}
#actor-brom img{object-fit:fill;object-position:center center;image-rendering:pixelated}

/* Transparent HD-2D art: shared canvases keep heads/feet stable across frames. */
#actor-brom{left:245px;top:225px;width:443px;height:443px}
#actor-brom img{object-fit:contain;image-rendering:pixelated}
#actor-brom .ground-shadow{bottom:37px;left:22%;width:59%;height:12px;opacity:.88}
#actor-tamsin{left:223px;top:262px;width:266px;height:266px}
#actor-tamsin img{object-fit:contain;image-rendering:pixelated}
#actor-tamsin .ground-shadow{bottom:12px;left:23%;width:62%;height:7px;opacity:.82}
/* Space the archer behind the frontline so the bow is not hidden by Brom. */
#actor-tamsin{left:174px}

/* TEST 22 — ACTUAL PLAYABLE REBUILD: visually grounded exterior, live menus, story portraits. */
#backdrop{width:100%;height:100%;object-fit:cover;filter:brightness(.91) saturate(.91) contrast(1.04)}
#area-banner{filter:drop-shadow(0 4px 7px #0009)}
#game{background:#111522}
#actors{filter:none}
.actor{transition:transform 145ms linear;transform:translate(var(--walk),var(--hop))}
.actor img{filter:brightness(.92) saturate(.96) drop-shadow(0 2px 1px #0c0a0b85)}
.actor .ground-shadow{background:#070909b8;filter:blur(5px);height:16px;opacity:.96}
#actor-brom{left:255px;top:218px;width:435px;height:448px}
#actor-tamsin{left:165px;top:285px;width:262px;height:266px}
#actor-wolf-a{left:841px;top:390px;width:338px;height:225px}
#actor-wolf-b{left:1096px;top:313px;width:335px;height:225px}
#actor-brom .ground-shadow{bottom:35px;left:22%;width:56%;height:13px}
#actor-tamsin .ground-shadow{bottom:13px;left:19%;width:64%;height:9px}
#actor-wolf-a .ground-shadow,#actor-wolf-b .ground-shadow{bottom:16px;left:22%;width:60%;height:11px}
#wolf-hp-a{left:915px;top:355px}#wolf-hp-b{left:1130px;top:266px}
#activity{left:890px;top:682px;max-width:450px;min-width:385px}
#pause-overlay{pointer-events:none}
#pause-overlay .dialog{pointer-events:auto}
#resume-button{background:linear-gradient(#50422c,#26212a);border:2px solid #e7c077;padding:13px 24px;border-radius:9px;font-size:24px}
/* One definitive, live-text command region; no baked-in labels behind interactive controls. */
.command{top:539px;width:819px;height:151px;display:flex;gap:10px;padding:11px;background:linear-gradient(145deg,#141d30f8,#0c111eec);border:3px solid #c79b5f;border-radius:16px;box-shadow:0 9px 22px #000b,inset 0 0 13px #c69a4333;pointer-events:auto;align-items:stretch}
.command-title{position:absolute;top:-30px;left:5px;font-size:19px;white-space:nowrap;letter-spacing:.5px;color:#ffe2a4;text-shadow:0 2px 4px #000}
.command-buttons{position:relative;inset:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:471px;gap:8px;flex-shrink:0}
.action-hotspot{position:relative!important;top:auto!important;left:auto!important;width:100%;height:126px;padding:7px 2px 10px;background:linear-gradient(#303b4d,#192232 52%,#111827);border:2px solid #8d744f;border-radius:12px;color:#fff0d0;font-size:21px;text-shadow:0 2px 2px #000;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;line-height:1.1;gap:6px;pointer-events:auto}
.action-hotspot .action-symbol{font-size:39px;line-height:1;color:#ead099;text-shadow:0 0 6px #dab26f44}
.action-hotspot.picked,.action-hotspot:focus-visible{background:linear-gradient(#76552b,#49341d 45%,#29212d);border:2px solid #f7d484}
.action-hotspot:not(.picked):not(:focus-visible){border-color:#8d744f}
.target-panel{position:relative;left:auto;top:auto;width:307px;height:auto;min-width:0;flex:1;background:#131a2a;border:2px solid #a98551;border-radius:10px;box-shadow:inset 0 0 15px #0008;pointer-events:auto;display:flex;flex-direction:column;padding:8px 9px;gap:5px}
.target-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #896f50;padding-bottom:4px;gap:8px;font-size:17px;color:#fbe0aa}
#target-back{position:relative;top:auto;right:auto;width:auto;height:auto;padding:3px 8px;font-size:15px;line-height:1.2;border-radius:6px;white-space:nowrap}
#targets{position:relative;left:auto;top:auto;width:100%;display:flex;flex-direction:column;gap:4px;overflow:auto}
#targets button,#targets button.enemy{width:100%;height:40px;min-height:40px;text-align:left;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:linear-gradient(100deg,#2c3545,#192232);border:1px solid #6b6b70;border-radius:7px;font-size:17px;white-space:nowrap;color:#f8e7cb;gap:8px}
#targets button.enemy span,#targets button.enemy small{opacity:1}
#targets button span{overflow:hidden;text-overflow:ellipsis}
#targets button small{font-size:14px;flex-shrink:0;color:#e6d6b6}
#targets button:hover,#targets button:focus-visible{background:linear-gradient(90deg,#624a25,#352c25);border-color:#ffe3a6}
#targets.potion-targets button{height:40px;min-height:40px}
.command[data-step="targets"]{width:819px}
/* Always keep hero HUD visible and separated from battle/command panels. */
.hero-panels{left:24px;bottom:12px;height:119px;gap:12px}
.hero-panel{width:403px;height:119px;border-radius:14px;gap:9px}
.hero-panel .portrait{width:91px;height:99px}
.hero-info{gap:5px}
.hero-head b{font-size:20px}
.track{height:19px}
.track span:not(.atb-label){font-size:13px;line-height:15px}
.track.atb .atb-label{line-height:15px}
/* Tutorial stays out of the action area; accessible dismissal. */
#battle-guide{position:absolute;left:380px;top:82px;width:668px;min-height:70px;z-index:35;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 15px;background:linear-gradient(90deg,#141e2be8,#0e1520e2);border:2px solid #bf9758;border-radius:12px;box-shadow:0 5px 16px #0008}
#battle-guide div{flex:1}
#battle-guide .guide-kicker{display:block;color:#dfbc7c;font-size:12px;font-weight:900;letter-spacing:1.3px}
#battle-guide p{font-size:17px;line-height:1.23;color:#f9eedb;margin:5px 0 0}
#guide-dismiss{background:#1d2736;border:1px solid #88734e;border-radius:7px;color:#f4dfb4;padding:8px 11px;white-space:nowrap;font-size:14px}
/* Narrative is intentionally AFTER the playable tutorial battle, never on load. */
.narrative-screen{position:absolute;inset:0;z-index:77;background:#10131e;overflow:hidden}
.scene-camera{position:absolute;inset:-2%;overflow:hidden}
#scene-image{position:absolute;inset:0;width:105%;height:105%;object-fit:cover;object-position:center;transform-origin:center;transform:scale(1.03)}
.narrative-screen.arrival #scene-image{width:112%;height:112%;transform:scale(1.04) translateX(1.1%)}
.narrative-screen.arrival.panning #scene-image{animation:scenePan 15s ease-in-out forwards}
@keyframes scenePan{0%{transform:scale(1.19) translateX(3.7%)}100%{transform:scale(1.08) translateX(-3.7%)}}
.scene-dim{position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#0c1117d9,transparent 38%,transparent 77%,#090a138a)}
.scene-chapter{position:absolute;top:27px;left:38px;color:#ffdfaa;font-size:18px;letter-spacing:2px;text-shadow:0 3px 8px #000;background:#0e1320bd;padding:12px 20px;border:1px solid #ac8650;border-radius:8px}
.scene-dialogue{position:absolute;left:54px;right:68px;bottom:31px;height:228px;z-index:2;display:flex;align-items:flex-end;gap:20px;cursor:pointer}
.scene-portrait{width:228px;height:226px;object-fit:cover;object-position:50% 25%;border:4px double #c9a169;border-radius:11px 11px 0 0;box-shadow:0 8px 20px #000d;background:#111928}
.scene-text{position:relative;flex:1;min-height:182px;align-self:end;padding:15px 42px 30px;background:linear-gradient(135deg,#171f2af5,#0b1119f4);border:3px solid #b89360;border-radius:13px;box-shadow:0 6px 24px #000b}
.scene-speaker{font-size:26px;color:#fce3ae;font-weight:bold;padding-bottom:7px;border-bottom:1px solid #816e4b;letter-spacing:.7px}
.scene-text p{font-size:27px;line-height:1.3;color:#fff0d5;margin:11px 0 3px}
.scene-continue-cue{position:absolute;right:25px;bottom:12px;font-size:15px;color:#d2b583}
.narrative-next,.narrative-skip{position:absolute;top:27px;right:32px;z-index:10;border:2px solid #cfa86b;border-radius:9px;background:#17202be3;padding:10px 19px;font-size:20px;color:#fff0c8}
.narrative-next{top:auto;bottom:284px;right:60px}
.narrative-skip{font-size:16px}
.narrative-screen:not(.panning) .scene-dialogue:not(.hidden){display:flex}
/* End panel points back to the tutorial and replay rather than claiming further campaign exists. */
.village-screen{background:#141922 url('assets/village_pan.webp') center / cover no-repeat}
.village-veiling{background:linear-gradient(90deg,#070b13ef,#0a101bc8 58%,#090d177f)}
.village-post{top:110px;left:110px;width:1190px}
.village-post h1{font-size:53px}
/* Test22 mobile QA pass: entire two-row target selector fits, readable at iPhone scale. */
.command{top:507px;height:181px}
.command-buttons{height:153px}
.action-hotspot{height:153px;font-size:24px}
.target-panel{height:153px;flex:none;width:307px}
.target-head{font-size:18px}
#targets{gap:5px;overflow:visible}
#targets button,#targets button.enemy{height:51px;min-height:51px;font-size:21px;padding:0 10px}
#targets button small{font-size:16px}
#targets.potion-targets button{height:51px;min-height:51px}
#actor-brom{left:363px;top:239px;width:328px;height:333px}
#actor-tamsin{left:192px;top:285px;width:259px;height:266px}
#actor-brom .ground-shadow{bottom:24px;left:25%;width:54%}
#battle-guide p{font-size:21px}
#battle-guide{width:711px}
/* Keep feet visible above the command tablet; subtle shadows match the path. */
#actor-brom{top:198px}
#actor-tamsin{top:230px}
/* Both heroes use the same bottom-left command anchor. It never covers the target side. */
.command[data-step="actions"]{width:501px}
.command[data-step="targets"]{width:819px}

/* TEST 23 – free-standing portraits and three distinct village locations. */
.scene-dialogue{left:37px;right:58px;bottom:19px;height:316px;gap:0;align-items:flex-end}
.scene-portrait{width:290px;height:313px;flex:none;object-fit:contain;object-position:center bottom;border:0;border-radius:0;background:transparent;box-shadow:none;filter:drop-shadow(3px 10px 9px #030408b8);z-index:3;margin-right:-10px;align-self:flex-end;pointer-events:none;image-rendering:auto}
.scene-portrait.portrait-change{animation:portraitFade23 .24s ease-out both}
@keyframes portraitFade23{from{opacity:.35;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}
.scene-text{flex:1;z-index:2;min-height:169px;margin-bottom:7px;margin-left:0;padding:20px 38px 27px 32px;background:linear-gradient(100deg,#0d1421ed,#111927f1 45%,#0b1120e9);border:2px solid #aa8a63;border-radius:8px;box-shadow:0 8px 24px #050812aa}
.scene-speaker{font-size:27px;border-bottom:none;padding-bottom:4px;color:#ffe4a5}
.scene-text p{font-size:26px;line-height:1.33;margin:5px 0 3px}
.scene-continue-cue{right:21px;bottom:10px}
.narrative-next{bottom:324px;right:43px}
.narrative-screen.arrival #scene-image,.narrative-screen.road #scene-image{width:108%;height:108%;transform:scale(1.045) translateX(0%)}
.narrative-screen.arrival.panning #scene-image{animation:scenePan23 5.9s linear both}
@keyframes scenePan23{0%{transform:scale(1.19) translateX(2.3%)}100%{transform:scale(1.12) translateX(-2.3%)}}
.scene-location{position:absolute;bottom:54px;left:60px;max-width:760px;z-index:3;padding:21px 35px 18px;background:linear-gradient(90deg,#080d18e3,#0b121bd4,#080b1280);border-left:3px solid #dabb7e;box-shadow:0 10px 33px #000a}
.scene-location strong{display:block;font-size:27px;letter-spacing:2.4px;color:#ffdc9e}
.scene-location p{font-size:22px;line-height:1.35;color:#f1e2cb;margin:10px 0}
.scene-views{display:flex;gap:23px;font-size:14px;color:#d9bd89;text-transform:uppercase;letter-spacing:1px;margin-top:17px}
.scene-views span{border-bottom:2px solid #997a4a;padding-bottom:3px;opacity:.78}
.scene-views span:nth-child(1){color:#ffe7aa}
.narrative-screen:not(.panning) .scene-location{display:block}
/* The panoramas are artwork of separate places, not horizontally repeated textures. */

.scene-views span{color:#c3a26d;opacity:.72}
.narrative-screen[data-shot="0"] .scene-views span:nth-child(1),
.narrative-screen[data-shot="1"] .scene-views span:nth-child(2),
.narrative-screen[data-shot="2"] .scene-views span:nth-child(3){color:#ffe6a5;opacity:1;border-color:#ffe6a5}

/* TEST 24 · cinematic camera stabilization, smooth actors, destination-on-landmark hub. */
.actor{transition:none!important;backface-visibility:hidden}
.actor img{backface-visibility:hidden;image-rendering:pixelated}
.narrative-screen .scene-camera{position:absolute;inset:0;overflow:hidden;transform:translateZ(0)}
.narrative-screen #scene-image{position:absolute;inset:-2.5%;width:105%;height:105%;object-fit:cover;object-position:center;transform:translate3d(0,0,0) scale(1.01);transform-origin:50% 50%;will-change:transform;backface-visibility:hidden;image-rendering:auto}
.narrative-screen.arrival #scene-image,.narrative-screen.road #scene-image{width:105%;height:105%;transform:translate3d(0,0,0) scale(1.01)}
.narrative-screen.arrival.panning #scene-image{animation:cinematicPan24 7.6s ease-in-out both}
@keyframes cinematicPan24{
 from{transform:translate3d(21px,0,0) scale(1.025)}
 to{transform:translate3d(-21px,0,0) scale(1.025)}
}
/* Town map contains a single uninterrupted image rather than repeating scenery. */
.town-map{position:absolute;inset:0;z-index:82;overflow:hidden;background:#131522}
.town-overview-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;image-rendering:auto}
.town-vignette{position:absolute;inset:0;background:linear-gradient(180deg,#070d1de5 0%,#0a10202c 27%,transparent 49%,#060b17b5 100%);pointer-events:none}
.town-header{position:absolute;z-index:3;top:27px;left:35px;min-width:645px;max-width:840px;padding:17px 28px 18px;background:linear-gradient(100deg,#0c1425e9,#111c2abe 72%,#15152100);border-left:4px solid #e6ba73;text-shadow:0 2px 6px #000}
.town-kicker{font-size:17px;font-weight:bold;letter-spacing:2px;color:#e7c58b}
.town-header h1{font-size:39px;margin:3px 0 7px;color:#ffefc8}
.town-header p{font-size:21px;margin:0;color:#eae0cc}
.town-pin{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;gap:3px;justify-content:center;width:249px;min-height:86px;border-radius:12px;border:2px solid #a18d78;color:#efe5ce;background:linear-gradient(155deg,#1c2633f3,#101824f0);box-shadow:0 9px 16px #000b, inset 0 0 18px #c4a36a20;text-align:center;text-shadow:0 2px 3px #050608;padding:12px;touch-action:manipulation}
.town-pin:after{content:'';position:absolute;top:100%;left:calc(50% - 2px);height:27px;width:4px;background:#cab18488;box-shadow:0 0 7px #000}
.town-pin:before{content:'';position:absolute;top:calc(100% + 26px);left:calc(50% - 7px);width:14px;height:14px;border-radius:50%;border:2px solid #d1bc9c;background:#30353b;box-shadow:0 1px 10px #000}
.town-pin-name{font-size:27px;font-weight:900;letter-spacing:.6px;line-height:1.05}
.town-pin-sub{font-size:16px;white-space:nowrap;color:#d2c8ad}
.town-pin.locked{opacity:.88;filter:grayscale(.75);border-color:#817c79}
.town-pin.locked .town-pin-name{color:#c0c1c5}
.town-pin.available{background:linear-gradient(150deg,#40311af8,#1c2533f4);border:3px solid #fbd995;box-shadow:0 0 0 3px #c6ab5b4a,0 0 25px #ffc9627b,0 9px 20px #050606e8;color:#fff5d4;animation:townPulse 1.9s ease-in-out infinite alternate}
.town-pin.available .town-pin-sub{color:#fff4c3}
.town-pin.available:before{border-color:#ffe0a3;background:#efaf44;box-shadow:0 0 20px #ffd574}
@keyframes townPulse{from{box-shadow:0 0 0 3px #c6ab5b4a,0 0 20px #ffc96258,0 9px 20px #050606e8}to{box-shadow:0 0 0 3px #eecb6b70,0 0 35px #ffc962b6,0 9px 20px #050606e8}}
.town-pin.available:hover,.town-pin.available:focus-visible{background:linear-gradient(150deg,#604823,#263444);filter:brightness(1.13)}
.town-pin.completed .town-pin-sub{color:#d5d5b9}
.town-inn{left:6.4%;top:51%}
.town-store{left:39%;top:41%}
.town-hall{right:6.4%;top:23.5%;}
.town-footer{position:absolute;z-index:3;left:40px;right:40px;bottom:24px;min-height:68px;padding:14px 22px;background:linear-gradient(90deg,#0a1120f2,#131b28d7);border:2px solid #b9985a;border-radius:10px;display:flex;justify-content:space-between;align-items:center;gap:25px}
.town-progress{color:#ffe0a2;font-size:22px;letter-spacing:1.1px;font-weight:bold}
.town-completed-tools{display:flex;gap:12px}
.town-completed-tools button{font-size:19px;border:1px solid #c0a477;border-radius:7px;padding:9px 15px;background:#242a30ed}

/* Test 25: three ornate commands and square touch targets. */
.command{top:469px;height:222px}
.command[data-step="actions"]{width:501px}
.command[data-step="targets"]{width:862px}
.command-buttons{grid-template-columns:repeat(3,minmax(0,1fr));width:471px;height:194px;gap:10px}
.action-hotspot{height:194px;font-size:25px;gap:12px;justify-content:center;background:linear-gradient(150deg,#344156,#1b2536 55%,#101724);border:2px solid #ae8955;box-shadow:inset 0 0 15px #080e1a,0 2px 6px #0008}
.action-hotspot .action-symbol{display:flex;align-items:center;justify-content:center;width:92px;height:100px;filter:drop-shadow(0 2px 7px #d3a45d55)}
.action-hotspot .action-symbol svg{width:87px;height:87px;overflow:visible}
.action-hotspot:disabled{opacity:.48;filter:grayscale(.7)}
.target-panel{width:339px;height:194px;flex:none;padding:8px 10px}
#targets,#targets.potion-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-content:start;overflow:auto;min-height:0}
#targets button,#targets button.enemy,#targets.potion-targets button{aspect-ratio:1/1;width:100%;height:auto;min-height:0;padding:8px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;white-space:normal;font-size:22px;line-height:1.12;border:2px solid #92734e;border-radius:10px;background:linear-gradient(155deg,#344053,#1b2535 65%,#121a28);box-shadow:inset 0 0 14px #0008}
#targets button span{overflow:visible;text-overflow:clip}
#targets button small{font-size:17px}
#targets button:hover,#targets button:focus-visible,#targets button:active{border-color:#f5ce7e;background:linear-gradient(155deg,#72552c,#352c27 70%,#1a1d2b);box-shadow:inset 0 0 12px #e6b86144,0 0 8px #efc77c88}
#targets button:disabled{opacity:.35;filter:grayscale(1)}
#targets:has(button:nth-child(3)) button{font-size:17px;gap:5px}
#targets:has(button:nth-child(3)) button small{font-size:14px}

/* Test 26: engraved bevels and ornamental corner brackets for command and target tiles. */
.action-hotspot,#targets button,#targets button.enemy,#targets.potion-targets button{position:relative;isolation:isolate;border:3px solid #bd9658;border-radius:7px;background:linear-gradient(145deg,#536073 0%,#303c50 12%,#172235 56%,#0b1321 100%);box-shadow:inset 0 0 0 2px #141a25,inset 0 0 0 4px #7b6141,inset 0 11px 20px #ffffff12,inset 0 -12px 18px #000b,0 4px 9px #000a;clip-path:polygon(0 11px,11px 0,calc(100% - 11px) 0,100% 11px,100% calc(100% - 11px),calc(100% - 11px) 100%,11px 100%,0 calc(100% - 11px))}
.action-hotspot:before,#targets button:before{content:'✦';position:absolute;top:4px;left:7px;font:15px Georgia,serif;color:#e3c78a;text-shadow:0 0 7px #e0bd74;pointer-events:none}
.action-hotspot:after,#targets button:after{content:'◆';position:absolute;right:8px;bottom:4px;font:12px Georgia,serif;color:#b08b50;pointer-events:none}
.action-hotspot:hover,.action-hotspot.picked,#targets button:hover,#targets button:focus-visible{border-color:#ffe3a4;box-shadow:inset 0 0 0 2px #362c20,inset 0 0 0 4px #cfad6a,inset 0 0 20px #d2a35b33,0 0 13px #f6d58c66}
.damage{color:#fffdf4;-webkit-text-stroke:2px #30313c;text-shadow:2px 3px 3px #0a0b10,0 0 9px #ffffff66}
.damage.critical{color:#ff9b3b;-webkit-text-stroke:2px #8b1e13;text-shadow:2px 3px 2px #26090a,0 0 13px #ff4935}
.interior-screen,.chapter-screen{position:absolute;inset:0;z-index:88;overflow:hidden;background:#11141e}
.interior-screen>img{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center}
.interior-shade{position:absolute;inset:0;background:linear-gradient(90deg,#090d18f2 0%,#0b111cc9 36%,transparent 75%),linear-gradient(0deg,#090c17b8,transparent 55%)}
.interior-card{position:absolute;top:94px;left:68px;width:600px;padding:29px 35px 31px;background:linear-gradient(130deg,#141c2bf5,#1d2232e5);border:3px double #d5af72;box-shadow:0 0 0 5px #101521b9,0 12px 40px #000b;color:#f5e8d1}
.interior-kicker{color:#d9b574;letter-spacing:2px;font-size:16px;font-weight:700}
.interior-card h1{font-size:41px;margin:8px 0 10px;color:#ffe5b0}
.interior-card p{font-size:23px;line-height:1.35}
#interior-options{display:flex;flex-direction:column;gap:12px;margin-top:24px}
#interior-options button,#interior-back{padding:14px 20px;border:2px solid #b88d55;background:linear-gradient(#59452f,#252736);color:#ffe7b9;font-size:23px;text-align:left;box-shadow:inset 0 0 0 2px #1b202a,0 4px 10px #0008}
#interior-status{font-size:18px;color:#d5c4a3;min-height:24px}
#interior-back{margin-top:12px;background:#1d2736;font-size:19px}
.town-exit{position:absolute;z-index:7;left:35%;bottom:111px;width:30%;height:68px;font-size:22px;letter-spacing:1px;font-weight:800;color:#fff0c9;border:3px double #f5d38b;background:linear-gradient(130deg,#66502a,#222b3b);box-shadow:0 0 20px #edb86488,0 6px 20px #000b}
.town-footer{bottom:12px;min-height:60px}
.town-pin.available:not(.town-hall){animation:none}
.chapter-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:sepia(.3) brightness(.56)}
.chapter-shroud{position:absolute;inset:0;background:radial-gradient(ellipse at 40% 54%,#1218267a 0%,#080e1ae8 80%),linear-gradient(0deg,#050a13da,transparent)}
.chapter-heading{position:absolute;top:40px;left:62px;color:#f5e4c7;text-shadow:0 3px 8px #000}
.chapter-heading span{color:#edc47c;font-size:21px;letter-spacing:3px}
.chapter-heading h1{font-size:52px;margin:6px 0}
.chapter-heading p{font-size:21px}
.chapter-route{position:absolute;left:50px;right:55px;top:320px;display:flex;align-items:center;gap:0}
.chapter-node{position:relative;z-index:2;width:255px;min-height:142px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:15px;background:linear-gradient(150deg,#4d3a28,#1a2332);border:3px double #d7b16c;color:#ffe8b9;box-shadow:0 0 0 4px #111725,0 8px 18px #000b;font-size:22px;text-align:center;clip-path:polygon(0 14px,14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px))}
.chapter-node small{font-size:15px;color:#e1bf83}
.chapter-node:disabled{filter:grayscale(1);opacity:.55}
.chapter-node.cleared{border-color:#a3c5a5}
.chapter-node.next{box-shadow:0 0 0 4px #111725,0 0 26px #e4bc6d}
.route-line{height:5px;flex:1;background:repeating-linear-gradient(90deg,#d0ad73 0 13px,transparent 13px 23px);filter:drop-shadow(0 2px 3px #000)}
.chapter-unknown{position:absolute;right:65px;bottom:120px;color:#9c9ea9;font-size:20px;letter-spacing:2px;text-align:right;border-top:1px solid #777985;padding-top:14px}

.battle-encounter-label{position:absolute;top:22px;left:380px;z-index:24;background:linear-gradient(90deg,#0b1320ed,#263144e9,#0b1320ed);padding:12px 30px;border:2px solid #d6ac6b;color:#ffdfa0;letter-spacing:1.7px;font-size:20px;text-shadow:0 2px 4px #000;box-shadow:0 6px 18px #0008}

/* Test 27: detailed store inventory and inn service panels */
.interior-card{top:66px;left:62px;width:790px;max-height:735px;overflow:hidden;padding:24px 30px 23px;border:3px solid #d3a96b;border-radius:14px;background:linear-gradient(140deg,#202b3cf5,#111827f5 70%);box-shadow:inset 0 0 0 2px #59452c,inset 0 0 0 7px #131a28,0 20px 60px #000d}
.interior-card:before,.interior-card:after{content:'✦';position:absolute;color:#f3d39b;font-size:25px;top:5px;text-shadow:0 0 8px #e9ba6b;pointer-events:none}.interior-card:before{left:11px}.interior-card:after{right:11px}
.interior-card h1{font-size:36px;margin:4px 0 7px}.interior-card p{font-size:19px;margin:8px 0;line-height:1.3}
#interior-options{margin-top:14px;gap:0}
.shop-list-heading{display:flex;justify-content:space-between;padding:8px 14px;color:#f0d7a7;letter-spacing:2px;font-size:16px;border:1px solid #9e7b4b;background:#2a2c34}
.shop-list-heading small{font-size:12px;letter-spacing:1px;color:#c5af89}
.shop-list{max-height:296px;min-height:180px;overflow-y:auto;overscroll-behavior:contain;padding:8px;border:2px solid #9e7b4b;border-top:0;background:linear-gradient(135deg,#131d2d,#252b36);scrollbar-color:#b68a53 #111927;scrollbar-width:thin}
.shop-item{display:flex;align-items:center;gap:14px;min-height:119px;padding:10px 14px;margin-bottom:8px;border:2px solid #a17a48;border-radius:9px;background:linear-gradient(115deg,#374053,#1b2637 72%);box-shadow:inset 0 0 0 2px #1a2432,0 3px 7px #0006}
.shop-item-icon{width:76px;height:85px;display:flex;align-items:center;justify-content:center;flex:none;border:2px solid #c39a5f;border-radius:9px;background:radial-gradient(circle,#465369,#1a2231 75%);box-shadow:inset 0 0 14px #0009}.shop-item-icon svg{width:61px;height:75px;filter:drop-shadow(0 0 7px currentColor)}.shop-item-icon.hp{color:#e23f56}.shop-item-icon.mp{color:#448ce8}
.shop-item-copy{display:flex;flex-direction:column;flex:1;gap:4px;min-width:0}.shop-item-copy strong,.inn-service strong{font-size:23px;color:#ffdfa1}.shop-item-copy span,.inn-service span{font-size:16px;color:#eee3d2}.shop-item-copy small,.inn-service small{font-size:14px;color:#bfb9ae}
.shop-item-buy{display:flex;flex-direction:column;align-items:center;gap:7px;flex:none}.shop-price{color:#ffd47e;font-size:23px;font-weight:800;white-space:nowrap}.shop-price small{font-size:12px;letter-spacing:1px}
#interior-options .shop-item-buy button{padding:8px 17px;min-width:126px;text-align:center;font-size:18px;font-weight:700;border:2px solid #e4bc7b;border-radius:7px;background:linear-gradient(#80613c,#49331f 52%,#292a32);box-shadow:inset 0 0 0 2px #302638,0 3px 7px #0008}
#interior-options .shop-item-buy button:active{transform:translateY(1px)}#interior-options .shop-item-buy button:focus-visible,#interior-back:focus-visible{outline:3px solid #fff2bf;outline-offset:2px}
.shop-future{text-align:center;padding:19px;color:#bba783;font-style:italic;font-size:16px;border:1px dashed #68563d}
.inn-service{display:flex;align-items:center;gap:18px;padding:22px;border:2px solid #b48b56;border-radius:10px;background:linear-gradient(120deg,#3d3840,#1c2939);box-shadow:inset 0 0 0 3px #202231}.inn-service>div:nth-child(2){display:flex;flex-direction:column;gap:7px;flex:1}.inn-service-icon{font-size:54px;color:#f5d49d;text-shadow:0 0 17px #efb55e}
#interior-status{font-size:16px;min-height:23px;margin:12px 0 5px;padding:7px 10px;background:#121c2b;border-left:3px solid #c39b62}
#interior-back{display:block;margin-top:9px;width:100%;padding:12px 20px;border:2px solid #d2a96a;border-radius:8px;text-align:center;font-size:19px;font-weight:700;background:linear-gradient(#43536a,#263348 58%,#192332);box-shadow:inset 0 0 0 2px #151d2a,0 3px 8px #0009}

/* TEST 28 — picturesque encounter map; all interactive markers are real buttons. */
.chapter-screen{background:#101624}
.chapter-backdrop{filter:brightness(.78) saturate(.91);object-position:center center}
.chapter-shroud{background:linear-gradient(90deg,#070d19a8,transparent 37%,transparent 73%,#070d19a3),linear-gradient(0deg,#090e1dbd,transparent 24%,transparent 76%,#090e1b7a);pointer-events:none}
.chapter-heading{top:22px;left:36px;z-index:2;background:linear-gradient(100deg,#111625e8,#192136b8);border:3px ridge #b78b4e;clip-path:polygon(0 0,100% 0,96% 100%,0 100%);padding:14px 65px 14px 23px;box-shadow:0 6px 22px #0008}
.chapter-heading span{font-size:17px}.chapter-heading h1{font-size:37px;margin:2px 0}.chapter-heading p{font-size:17px;margin:0;color:#e3d4ba}
.chapter-return{position:absolute;z-index:4;left:23px;top:290px;width:250px;height:91px;display:flex;align-items:center;gap:13px;padding:10px 18px;background:linear-gradient(145deg,#4a3523,#171c2c 55%,#111724);border:4px ridge #e3bd78;clip-path:polygon(0 0,92% 0,100% 50%,92% 100%,0 100%,5% 50%);box-shadow:0 5px 18px #000b;color:#ffe4a7;font-weight:bold;font-size:22px;text-align:left;text-shadow:0 2px 4px #000}
.chapter-return .return-icon{font-size:55px;color:#ffd88b;line-height:1}.chapter-return:active{filter:brightness(1.3)}
.chapter-route{inset:0;display:block;pointer-events:none}
.chapter-node{position:absolute;pointer-events:auto;width:139px;height:146px;min-height:0;gap:0;padding:10px 5px 24px;display:flex;flex-direction:column;justify-content:center;background:radial-gradient(ellipse at 45% 15%,#685135,#241e20 57%,#111722);border:5px ridge #dcb56c;clip-path:polygon(50% 0,88% 18%,100% 50%,88% 83%,50% 100%,12% 83%,0 50%,12% 18%);box-shadow:inset 0 0 0 3px #120f13,0 0 18px #e7b34d75;filter:drop-shadow(0 7px 7px #000b);font-size:31px;text-shadow:0 2px 5px #000}
.chapter-node .node-symbol{font-size:24px;color:#ffe0a1;line-height:1}.chapter-node b{font-size:34px}.chapter-node small{font-size:12px;letter-spacing:.7px;color:#ffdda1;max-width:110px;white-space:nowrap}.chapter-node .node-check{display:none;position:absolute;bottom:2px;left:54px;width:30px;height:29px;border:2px solid #f8dc93;background:#173a2b;border-radius:50%;color:#ffe3a0;font:bold 24px/24px Georgia;text-shadow:0 1px 2px #000}
.chapter-node.cleared .node-check{display:block}.chapter-node.cleared{border-color:#f4d38b;opacity:1;filter:drop-shadow(0 5px 6px #000a)}
.chapter-node.next{box-shadow:inset 0 0 0 3px #17100a,0 0 25px 8px #f9bf5c8c;animation:chapterReady 2.2s ease-in-out infinite alternate}
@keyframes chapterReady{to{box-shadow:inset 0 0 0 3px #17100a,0 0 12px 2px #f9bf5c88}}
.chapter-node:disabled{opacity:.84;filter:grayscale(.95) brightness(.6) drop-shadow(0 5px 5px #000b)}
.chapter-node:disabled small{color:#bcbac2}.chapter-node:disabled .node-symbol{color:#bcbac2}
.chapter-node[data-fight="0"]{left:465px;top:615px}
.chapter-node[data-fight="1"]{left:850px;top:375px}
.chapter-node[data-fight="2"]{left:665px;top:148px}
.chapter-unknown{right:27px;bottom:107px;font-size:20px;letter-spacing:2px;border:2px ridge #8c7655;background:#101726dc;padding:12px 19px;color:#f2d5a3;text-align:center;box-shadow:0 4px 12px #0009}
.chapter-unknown span{font-size:15px;color:#aaa9b1}
.chapter-caption{position:absolute;bottom:14px;left:320px;right:320px;text-align:center;color:#ffe4bb;font-style:italic;font-size:20px;background:linear-gradient(90deg,transparent,#111826e8 15%,#111826e8 85%,transparent);padding:12px 16px;text-shadow:0 2px 5px #000}

/* Test 29 — embellished shield-shaped stage medallions and encounter preview */
.chapter-node{width:148px;height:162px;clip-path:none;border:0;border-radius:0;overflow:visible;padding:13px 9px 25px;background:linear-gradient(140deg,#e6c881 0%,#86602e 12%,#302b32 20%,#171b2a 78%,#a97b3b 91%,#f8e0a3 100%);box-shadow:0 8px 15px #000b;filter:drop-shadow(0 7px 7px #000b);isolation:isolate}
.chapter-node::before{content:"";position:absolute;z-index:-1;inset:5px;clip-path:polygon(50% 0%,91% 16%,98% 63%,50% 100%,2% 63%,9% 16%);background:radial-gradient(ellipse at 50% 25%,#5b4933,#1b2230 65%,#0c1321);border:2px solid #e9c37b}
.chapter-node::after{content:"";position:absolute;z-index:-2;inset:-6px;clip-path:polygon(50% 0%,92% 14%,100% 63%,50% 100%,0% 63%,8% 14%);background:linear-gradient(125deg,#f8dfa1,#91632e 32%,#d9a954 70%,#f5dfac);pointer-events:none}
.chapter-node .node-symbol{font-size:27px;filter:drop-shadow(0 1px 3px #000)}.chapter-node b{font-size:36px;color:#fff0c5}.chapter-node small{font-size:11px;letter-spacing:1px}
.chapter-node.cleared .node-check{bottom:-10px;left:57px;background:#30291d;border:3px solid #f6d58b;box-shadow:0 0 10px #e5b957}
.chapter-node.next{animation:chapterReady 2.2s ease-in-out infinite alternate}
.chapter-node.selected{filter:drop-shadow(0 0 15px #ffe2a4);transform:translateY(-5px)}
.chapter-node:focus-visible{outline:4px solid #fff0bc;outline-offset:8px}
.chapter-preview{position:absolute;z-index:8;right:24px;top:130px;width:350px;padding:18px 19px 16px;color:#f7e8ca;background:linear-gradient(145deg,#2b3443f5,#121b2af7 55%,#181722fa);border:4px ridge #cba367;border-radius:12px;box-shadow:inset 0 0 0 2px #55412c,0 12px 36px #000e;text-shadow:0 2px 3px #000}
.chapter-preview.hidden{display:none}.preview-kicker{color:#e3bc78;font-size:14px;letter-spacing:2px}.chapter-preview h2{font: bold 26px Georgia,serif;margin:8px 0 13px;color:#fff0c8;border-bottom:1px solid #a98753;padding-bottom:12px}.preview-subtitle{font-size:13px;letter-spacing:1.8px;color:#e5c99d;margin-bottom:8px}
.preview-enemies{display:flex;flex-direction:column;gap:8px}.preview-enemy{display:flex;align-items:center;gap:13px;background:linear-gradient(95deg,#3d4147,#222b39);border:2px ridge #90744d;border-radius:7px;padding:5px 10px;min-height:72px}.preview-wolf{height:62px;width:75px;overflow:hidden;display:flex;align-items:center;justify-content:center}.preview-wolf img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 4px #000)}.preview-enemy strong{font: bold 20px Georgia,serif;display:block}.preview-enemy span{font-size:15px;color:#d4bfa1}
.preview-battle{margin-top:16px;width:100%;padding:12px;border:3px ridge #f4cd80;border-radius:8px;background:linear-gradient(#b98940,#76501e 55%,#44301d);box-shadow:inset 0 0 0 2px #5e421f,0 4px 12px #000a;color:#fff5d8;font:bold 24px Georgia,serif;text-shadow:0 2px 3px #000}.preview-battle:active{filter:brightness(1.3)}.preview-close{width:100%;background:transparent;color:#d5c6b0;border:0;padding:11px;font-size:15px}
.chapter-preview ~ .chapter-unknown{display:none}

/* Test 30: levelled wolf C, gold stage shields, readable completion marks. */
#actor-wolf-c{left:972px;top:392px;width:326px;height:215px;z-index:5}
#actor-wolf-c .ground-shadow{bottom:16px;left:22%;width:60%;height:11px}
#wolf-hp-c{left:1000px;top:323px}
.chapter-node::before{background:radial-gradient(ellipse at 50% 25%,#e8b94e 0%,#b77b24 55%,#614016 100%)}
.chapter-node b{color:#fff4c6;text-shadow:0 2px 4px #4e2808}
.chapter-node.cleared .node-check{width:39px;height:39px;left:54px;bottom:-14px;background:#f7d46c;color:#19321d;border:3px solid #fff4bf;font:bold 31px/33px Georgia;text-shadow:none;box-shadow:0 0 12px #ffe39b}
/* Crossfade between scene artworks without a visible reset of the previous pan. */
.narrative-screen .scene-previous{position:absolute;inset:-2.5%;width:105%;height:105%;object-fit:cover;transition:opacity .65s ease;opacity:1;z-index:1;pointer-events:none}
.narrative-screen #scene-image{transition:opacity .65s ease}
.story-figures{position:absolute;inset:0;z-index:3;pointer-events:none;display:none}
.narrative-screen.road .story-figures{display:block}
.story-figures img{position:absolute;bottom:19%;height:48%;width:auto;object-fit:contain;filter:drop-shadow(0 10px 6px #0009);animation:storyBreath 5s ease-in-out infinite alternate}
.story-brom{left:27%}.story-tamsin{left:55%;animation-delay:1.7s!important}
@keyframes storyBreath{from{transform:translateY(0)}to{transform:translateY(-3px)}}
.scene-ambient{position:absolute;inset:0;pointer-events:none;z-index:2;display:none}
.narrative-screen.arrival .scene-ambient{display:block}
.scene-ambient span{position:absolute;width:8px;height:8px;border-radius:50%;background:#ffe6a4;box-shadow:0 0 20px 7px #f6c46c66;opacity:.15;animation:ambientShift 8s ease-in-out infinite alternate}
.scene-ambient span:nth-child(1){left:24%;top:56%}.scene-ambient span:nth-child(2){left:65%;top:39%;animation-delay:2s}.scene-ambient span:nth-child(3){left:83%;top:60%;animation-delay:4s}
@keyframes ambientShift{0%,35%{opacity:.08;transform:translateY(0)}80%,100%{opacity:.3;transform:translateY(-7px)}}
.hub-satchel{position:absolute;z-index:12;display:flex;gap:10px}.hub-satchel button{background:linear-gradient(#51412c,#181c2b);border:2px solid #cfa65e;color:#ffdf9b;border-radius:8px;padding:12px 17px;font:700 18px Georgia;box-shadow:0 5px 12px #0009}
.town-satchel{right:28px;bottom:112px}.chapter-satchel{right:36px;top:24px}
.satchel-screen{position:absolute;inset:0;z-index:90;background:linear-gradient(#080e1ddc,#080e1df0),url('assets/town_overview.webp') center/cover;display:grid;place-items:center;color:#f5e5bd}
.satchel-screen.hidden{display:none}.satchel-panel{width:82%;height:78%;border:5px double #d6ad65;background:linear-gradient(140deg,#293041,#101727);box-shadow:0 18px 55px #000e;padding:27px 36px;display:flex;flex-direction:column}
.satchel-panel header span{font:15px Georgia;color:#d6b474;letter-spacing:3px}.satchel-panel h2{font:42px Georgia;margin:6px 0 15px}.satchel-tabs{display:flex;gap:12px}.satchel-tabs button,.satchel-back{font:21px Georgia;color:#e9c681;background:#252e40;border:2px solid #967345;padding:10px 23px}.satchel-tabs button.active{background:#765727;color:#fff2d1}.satchel-content{flex:1;overflow-y:auto;padding:18px 0}.gear-hero{display:flex;align-items:center;gap:24px;border-bottom:1px solid #7e6b4c;padding:9px 0}.gear-hero img{width:105px;height:105px;object-fit:contain}.gear-hero h3,.inventory-section h3{font:29px Georgia;margin:4px}.gear-hero p,.inventory-section p{font:19px Georgia;margin:7px}.satchel-back{align-self:flex-end}.satchel-hint{color:#bdb6a6}
/* Keep three enemy nameplates distinct on the landscape battlefield. */
#wolf-hp-c{left:1020px;top:492px;width:240px}
/* Restrained villagers in the village-pan backdrops. */
.scene-villager{position:absolute;z-index:3;bottom:23%;width:80px;height:132px;object-fit:contain;opacity:.83;filter:drop-shadow(0 7px 5px #0009);animation:villagerShift 9s ease-in-out infinite alternate;pointer-events:none}
.scene-villager.villager-two{left:72%;bottom:24%;height:120px;animation-delay:2.5s}
.scene-villager.villager-one{left:19%}
@keyframes villagerShift{0%,35%,75%{transform:translateY(0) rotate(0)}45%{transform:translateY(-2px) rotate(.6deg)}100%{transform:translateY(0) rotate(0)}}

.scene-villagers{display:none;position:absolute;inset:0;z-index:3;pointer-events:none}.narrative-screen.arrival .scene-villagers{display:block}

/* Test 31: illustrated equipment interface */
.satchel-panel{width:94%;height:89%;padding:13px 20px;box-sizing:border-box;min-height:0}
.satchel-panel header span{font-size:11px}.satchel-panel h2{font-size:27px;margin:2px 0 6px}.satchel-tabs button,.satchel-back{font-size:15px;padding:6px 15px}.satchel-content{padding:8px 0;min-height:0}
.equipment-layout{display:grid;grid-template-columns:19% 58% 23%;height:100%;gap:9px;min-height:0;font-family:Georgia,serif}
.gear-roster,.gear-stage,.gear-detail{background:linear-gradient(155deg,#273144,#111825);border:1px solid #a88b57;box-shadow:inset 0 0 18px #0008;min-width:0;padding:9px;box-sizing:border-box}
.gear-roster h3,.gear-detail h3{font:15px Georgia;letter-spacing:2px;color:#e5c583;margin:2px 0 10px}.roster-hero{width:100%;display:flex;align-items:center;text-align:left;gap:7px;background:#151d2b;color:#f1e1bd;border:1px solid #5c5548;padding:5px;margin-bottom:7px;min-width:0}.roster-hero.selected{border:2px solid #e5bd69;background:#4c3b28}.roster-hero img{width:42px;height:53px;object-fit:contain}.roster-hero strong,.roster-hero small{display:block}.roster-hero strong{font:17px Georgia}.roster-hero small{font:10px Georgia;color:#d8bd84;line-height:1.6}.roster-foot{font:12px Georgia;color:#aeb4bf;line-height:1.4}
.gear-stage{display:flex;flex-direction:column;overflow:hidden}.gear-stage-heading{text-align:center;font:19px Georgia;letter-spacing:2px;color:#f1d39a}.gear-stage-heading span{font-size:11px;color:#b6b6c2;margin-left:8px}.gear-body{flex:1;min-height:0;display:grid;grid-template-columns:28% 44% 28%;align-items:stretch;gap:2px}.gear-slot-column{display:flex;flex-direction:column;justify-content:space-evenly;gap:5px;min-width:0}.equip-slot{background:linear-gradient(#30384a,#141b29);color:#e9d7b2;border:1px solid #887049;border-radius:5px;padding:5px 3px;display:flex;align-items:center;gap:4px;min-width:0;text-align:left}.equip-slot.chosen{border:2px solid #f2c66d;background:#4b3b2c}.slot-emblem{font:25px Georgia;color:#e8c17d;min-width:28px;text-align:center;text-shadow:0 0 7px #ba8d4277}.slot-copy{min-width:0;flex:1}.slot-copy strong,.slot-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot-copy strong{font:12px Georgia}.slot-copy small{font:10px Georgia;color:#aeb6c1}.slot-level{font:10px Georgia;color:#e0bd7d}
.hero-figure{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:hidden}.figure-halo{position:absolute;width:95%;height:75%;border-radius:50%;background:radial-gradient(ellipse,#98784c55,transparent 70%)}.hero-figure img{position:relative;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 6px #000a)}.hero-figure>span{position:absolute;bottom:0;font:11px Georgia;letter-spacing:3px;color:#e7c788}.gear-stats{display:flex;justify-content:space-around;border-top:1px solid #6d624c;padding-top:5px;font:12px Georgia;color:#c7b8a1}.gear-stats b{color:#f3db9d}.gear-detail{text-align:center;display:flex;flex-direction:column;align-items:center}.detail-icon{display:grid;place-items:center;font:55px Georgia;color:#f3d28b;width:85px;height:85px;border:3px double #b89456;background:radial-gradient(#59462d,#192132);margin:7px 0}.gear-detail>small{font:11px Georgia;color:#a8b2c2;letter-spacing:2px}.gear-detail h4{font:20px Georgia;color:#f0d394;margin:10px 0 3px}.gear-detail p{font:13px Georgia;color:#c7c6c7}.gear-bonus{padding:9px;width:90%;border-top:1px solid #7e6c4b;border-bottom:1px solid #7e6c4b;color:#e5ca8d;font:15px Georgia}.detail-note{margin-top:12px;color:#b9c1cd;font:12px Georgia;line-height:1.4}
.inventory-redesign{height:100%;padding:8px 16px}.inventory-heading{display:flex;justify-content:space-between;align-items:center;color:#e4c385}.inventory-heading h3{font:19px Georgia;letter-spacing:2px;margin:0 0 10px}.inventory-heading span{font:12px Georgia}.inventory-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.inventory-item{display:flex;align-items:center;gap:10px;background:linear-gradient(130deg,#29354a,#161c2a);border:1px solid #927748;padding:10px;min-width:0}.inventory-icon{width:54px;height:54px;display:grid;place-items:center;flex:none;background:radial-gradient(#5b452c,#151c2a);border:2px double #d0aa68;color:#eac985;font:33px Georgia}.inventory-item small{font:11px Georgia;color:#d7b97c}.inventory-item h4{font:18px Georgia;margin:2px 0;color:#f2e2bb}.inventory-item p{font:12px Georgia;color:#c3c9d0;margin:2px 0}.inventory-count{margin-left:auto;font:16px Georgia;color:#e9ce8f}.inventory-note{font:12px Georgia;color:#b5bbc4}
/* Remove the oversized, perspective-inconsistent background walkers entirely. */
.scene-villagers{display:none!important}.scene-villager{animation:none!important}
@media(max-height:520px){.satchel-panel{height:94%;padding:7px 12px}.satchel-panel h2{font-size:22px}.satchel-tabs button,.satchel-back{font-size:12px;padding:4px 12px}.gear-roster,.gear-stage,.gear-detail{padding:5px}.roster-hero img{width:34px;height:42px}.slot-emblem{font-size:20px;min-width:21px}.equip-slot{padding:3px 2px}.detail-icon{width:52px;height:52px;font-size:35px;margin:3px}.gear-detail h4{font-size:16px;margin:4px}.detail-note{margin-top:4px}}

/* Test 32: ornate, pictorial equipment assets and reliable navigation */
.slot-emblem img{display:block;width:33px;height:36px;object-fit:contain;filter:drop-shadow(0 2px 3px #0009)}
.detail-icon img{width:78%;height:78%;object-fit:contain;filter:drop-shadow(0 4px 6px #000b)}
.inventory-icon img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 3px 5px #000b)}
.gear-roster,.gear-stage,.gear-detail{border:2px ridge #a78a55;background:radial-gradient(ellipse at 50% 5%,#354056,#111725 75%)}
.equip-slot{border:1px solid #b09259;box-shadow:inset 0 1px #f1d4a72a,0 3px 8px #0007;border-radius:7px}
.equip-slot.chosen{box-shadow:inset 0 0 14px #c9a65b40,0 0 9px #b9915d77}
.inventory-item{border:2px ridge #a88a57;box-shadow:inset 0 1px #e7c78726,0 4px 12px #0008;border-radius:6px}
.satchel-back{position:relative;z-index:2;cursor:pointer;min-height:31px;border-radius:5px;background:linear-gradient(#655032,#292536);border:2px solid #d4b474;color:#ffe7a9}
.satchel-panel{background:linear-gradient(145deg,#30354b,#101625 80%);border:5px double #d8b575}
@media(max-height:520px){.slot-emblem img{width:23px;height:25px}.inventory-icon img{width:34px;height:34px}}

/* Test 33: Character, Stats, and interactive starter skill trees */
.satchel-screen{background:linear-gradient(125deg,#090911ed,#161124ed),url('assets/hall_interior.webp') center/cover}
.satchel-panel{background:linear-gradient(145deg,#241c29ed,#0b0d19f5 82%);border:2px solid #c79b4e;box-shadow:inset 0 0 0 2px #493722,0 0 0 3px #161017,0 15px 45px #000d}
.satchel-panel h2{color:#f5d9a2;text-shadow:0 2px 12px #bf792955}.satchel-tabs button{border:1px solid #b38c4d;background:linear-gradient(#302338,#100f20);color:#f5d9a2;border-radius:5px;box-shadow:inset 0 1px #e6bd6840}.satchel-tabs button.active{background:linear-gradient(#76502c,#2b1d24);border-color:#f5c86c;box-shadow:0 0 12px #e7a84977}
.character-layout{display:grid;grid-template-columns:19% 31% 50%;gap:8px;height:100%;min-height:0;font-family:Georgia,serif}.character-display{position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 60%,#6b47354d,transparent 66%),url('assets/hall_interior.webp') center/cover;border:1px solid #b98b46;min-width:0}.character-art{position:absolute;inset:0;display:flex;justify-content:center;align-items:end}.character-aura{position:absolute;inset:14% 5%;border-radius:50%;background:radial-gradient(ellipse,#f7c26729,transparent 70%)}.character-art img{position:relative;width:100%;height:96%;object-fit:contain;filter:drop-shadow(0 12px 9px #000b)}.character-caption{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:6px;background:linear-gradient(transparent,#0c0b18dd);color:#edc779;font-size:12px;letter-spacing:1.5px}.character-data{min-width:0;overflow:auto;border:1px solid #b58b4d;background:linear-gradient(145deg,#191522f5,#090e19f8);padding:8px;box-sizing:border-box}.character-banner{border-bottom:1px solid #967341;padding:2px 5px 7px}.character-banner h3{font:24px Georgia;color:#f2d7a3;margin:0}.character-banner h3 small{float:right;font-size:14px}.character-banner>span{font-size:12px;color:#d6c4a7}.character-exp{height:6px;border:1px solid #927348;background:#10111a;margin-top:4px}.character-exp i{display:block;height:100%;background:linear-gradient(90deg,#5933a1,#bb77ef)}.stat-headline{display:flex;justify-content:space-around;margin:7px 0;padding:7px 0;border:1px solid #8e6b38;color:#e9c58c;font-size:12px}.stat-headline b{font-size:17px;color:#fff0c8}.stat-sections{display:grid;grid-template-columns:1fr 1fr;gap:7px}.stat-group{border:1px solid #9c743b;padding:5px 7px;min-width:0;background:#171622}.stat-group h4{margin:0 0 4px;color:#e9c17b;font-size:14px;border-bottom:1px solid #806037;padding-bottom:3px}.stat-row{display:flex;gap:5px;align-items:center;justify-content:space-between;font-size:11px;color:#d6d4d6;padding:3px 0;border-bottom:1px solid #53433355}.stat-row strong{color:#f6e1b8;margin-left:auto}.stat-row em{font-size:10px;color:#80d994}.stats-disclaimer{font-size:10px;color:#aaa5a9;margin-top:6px}.skill-data{display:flex;flex-direction:column;overflow:hidden}.class-tree-tabs{display:flex;gap:5px;margin:7px 0}.class-tree-tabs button{flex:1;font:12px Georgia;color:#e6c58a;background:#1e1a2a;border:1px solid #86673e;padding:6px 2px}.class-tree-tabs button.selected{background:#674724;border-color:#edc36b}.skill-workspace{display:grid;grid-template-columns:65% 35%;gap:6px;min-height:0;flex:1}.skill-map{min-height:0;overflow:auto;background:radial-gradient(ellipse,#392c33,#10121f 75%);border:1px solid #795b39;padding:4px}.tree-branches{height:100%;display:flex;flex-direction:column;justify-content:space-around;gap:2px}.tree-tier{display:flex;align-items:center;justify-content:center;gap:9px;min-height:0;flex:1;position:relative}.tree-tier:not(:last-child):after{content:'│';position:absolute;bottom:-10px;left:50%;color:#a88651;pointer-events:none}.tier-label{position:absolute;left:2px;top:0;color:#8e7d69;font:9px Georgia}.skill-node{position:relative;min-width:62px;max-width:92px;flex:1;min-height:40px;border:2px solid #776c71;border-radius:9px;background:linear-gradient(#292838,#111321);color:#d7d1cb;font:10px Georgia;padding:3px 2px;cursor:pointer}.skill-node span{display:block;font-size:18px}.skill-node small{display:block;font-size:9px;line-height:1.1}.skill-node em{position:absolute;right:2px;top:1px;font:8px Georgia;color:#c8ac80}.skill-node.unlocked{border-color:#e9b85c;background:linear-gradient(#735022,#2d1f24);box-shadow:0 0 10px #ffbf5066}.skill-node.selected{outline:2px solid #fbe5ac;outline-offset:1px}.skill-node.locked{opacity:.6}.skill-inspector{border:1px solid #94703b;background:#151521;padding:7px;display:flex;flex-direction:column;gap:6px;overflow:auto}.skill-inspector h4{color:#f1d394;font:17px Georgia;margin:0}.skill-inspector>span{color:#d1ae76;font:10px Georgia}.skill-inspector p{font:11px/1.4 Georgia;color:#d7d0c8;margin:0}.skill-inspector .skill-requirement{color:#f4d293}.skill-inspector button{background:linear-gradient(#71522f,#322333);border:1px solid #e0ae62;color:#ffe5b4;font:12px Georgia;padding:6px}.skill-inspector button:disabled{opacity:.45}.skill-inspector small{font:10px/1.3 Georgia;color:#aaa6a7}.locked-class-message{display:grid;place-content:center;text-align:center;height:100%;color:#d7c19c;padding:20px}.locked-class-message strong{font:22px Georgia}.locked-class-message p{font:13px Georgia}.gear-roster,.gear-stage,.gear-detail{border-color:#b28b51}.roster-hero.selected{box-shadow:0 0 12px #efb65266}
@media(max-height:520px){.character-banner h3{font-size:18px}.character-banner>span{font-size:10px}.stat-headline{padding:3px 0;margin:4px 0}.stat-group{padding:3px 5px}.stat-group h4{font-size:11px;margin-bottom:2px}.stat-row{padding:1px 0;font-size:9px}.stat-row em{font-size:8px}.skill-node{min-height:31px}.skill-node span{font-size:13px}.skill-node small{font-size:8px}.skill-inspector h4{font-size:14px}.skill-inspector p{font-size:10px}.satchel-tabs button{padding:3px 12px}}
.g35-active .satchel-panel{width:99%;height:98%;padding:1% 1.2%;background:linear-gradient(90deg,#090a10e8,#17131be0),url('assets/hall_interior.webp') center/cover;border:1px solid #a77b3b;display:grid;grid-template-columns:19% 81%;grid-template-rows:9% 1fr 8%;gap:1%;font-family:Georgia,serif}.g35-active .satchel-panel header{align-self:center}.g35-active .satchel-panel header span{display:none}.g35-active .satchel-panel h2{font:bold clamp(16px,2.6vw,38px) Georgia;margin:0;color:#fff0d0}.g35-active .satchel-tabs{justify-content:center;align-items:stretch;gap:4px}.g35-active .satchel-tabs button,.g35-active .satchel-back,.g35-more{background:linear-gradient(#34303a,#0b0c14 55%,#24202a);border:3px double #b98b45;color:#f9e4b7;font:bold clamp(10px,1.5vw,23px) Georgia;border-radius:6px;text-shadow:0 2px #000}.g35-active .satchel-tabs button.active{background:linear-gradient(#b77a13,#694006,#d9a23c);color:#fff7df}.g35-active .satchel-content{grid-column:1/-1;padding:0;overflow:hidden}.g35-active .satchel-back{justify-self:start;padding:0 14px;min-height:0}.g35-layout{display:grid;grid-template-columns:18% 50% 30%;gap:1%;height:100%;font-family:Georgia,serif;color:#f5e7cb}.g35-frame{border:4px double #b58a4a;box-shadow:inset 0 0 16px #000,0 2px 5px #000;background:linear-gradient(135deg,#1a1922,#090b12 70%);position:relative}.g35-frame:before,.g35-frame:after{content:'◆';position:absolute;color:#d5a65d;font-size:12px;line-height:1;pointer-events:none}.g35-frame:before{top:-5px;left:-4px}.g35-frame:after{bottom:-5px;right:-4px}.g35-roster{padding:5%;display:flex;flex-direction:column;gap:3%}.g35-roster button{display:flex;align-items:center;gap:5%;text-align:left;padding:3%;background:linear-gradient(#292831,#0c0e17);border:2px solid #80623d;border-radius:6px;color:#fff1d5;font:clamp(11px,1.7vw,25px) Georgia}.g35-roster button.selected{border-color:#ffd27c;background:linear-gradient(#63441d,#24190e);box-shadow:0 0 9px #e9a747}.g35-roster img{width:35%;aspect-ratio:1;object-fit:cover}.g35-roster small{display:block;font-size:.72em;margin-top:5px}.g35-stage{position:relative;overflow:hidden;background:url('assets/hall_interior.webp') center/cover}.g35-art{position:absolute;inset:0 14% 17%;background:url('assets/character35/brom.webp') center top/cover no-repeat}.g35-stage.tamsin .g35-art{background:radial-gradient(#78604755,transparent)}.g35-art img{width:100%;height:100%;object-fit:contain}.g35-name{position:absolute;z-index:2;top:1%;left:3%;font:bold clamp(16px,2.5vw,36px) Georgia;text-shadow:0 2px 4px #000;background:#101019b0;padding:1% 3%;border-bottom:1px solid #b98b45}.g35-name small{display:block;font-size:.58em;color:#f3d6a0}.g35-slots{position:absolute;top:19%;bottom:20%;width:19%;display:flex;flex-direction:column;justify-content:space-between;z-index:2}.g35-slots.left{left:2%}.g35-slots.right{right:2%}.g35-tile{position:relative;height:30%;aspect-ratio:1;background:#14131c;border:2px solid #b98b45;border-radius:7px;overflow:hidden;padding:0;color:#fff3d4;box-shadow:0 3px 6px #000}.g35-tile img{width:100%;height:100%;object-fit:contain}.g35-tile.empty img{opacity:.42}.g35-tile span{position:absolute;bottom:0;right:0;background:#090910e8;padding:2px 4px;font:bold clamp(8px,1vw,16px) Georgia}.g35-tile.chosen{border-color:#9fe7ff;box-shadow:0 0 10px #00aaff, inset 0 0 5px #fff}.g35-stats{position:absolute;bottom:1%;left:1%;right:1%;height:15%;text-align:center}.g35-stats h4{position:absolute;top:0;left:50%;transform:translate(-50%,-55%);white-space:nowrap;background:#201a19;border:2px solid #a77b42;padding:1px 12px;margin:0;color:#f7d18a;font:bold clamp(10px,1.4vw,20px) Georgia}.g35-stats>div{display:flex;height:100%;align-items:center;padding-top:2%;box-sizing:border-box}.g35-stats span{flex:1;border-right:1px solid #886b44;font-size:clamp(9px,1.25vw,19px)}.g35-stats span:last-child{border:0}.g35-stats strong{display:block;color:#f4cd83;font-size:.85em}.g35-stats b{display:block;margin-top:3px}.g35-detail{padding:5%;display:flex;flex-direction:column;gap:3%;overflow:auto;text-align:left}.g35-item{display:flex;align-items:center;gap:5%}.g35-item img{width:29%;aspect-ratio:1;object-fit:contain;border:2px solid #9b7845;border-radius:5px}.g35-item h3{font:bold clamp(13px,2vw,29px) Georgia;margin:0 0 5px;color:#fff0d0}.g35-item small,.g35-detail p{font:clamp(10px,1.3vw,19px) Georgia;color:#e6d4b7;margin:0}.g35-detail p{font-style:italic;line-height:1.4}.g35-detail h4{font:bold clamp(12px,1.6vw,23px) Georgia;color:#f5cf85;background:linear-gradient(90deg,#69503b88,transparent);border-top:1px solid #b58a4a;margin:2% 0 0;padding:3% 1%}.g35-row{display:flex;justify-content:space-between;border-bottom:1px solid #40352c;padding:2% 0;font-size:clamp(11px,1.5vw,22px)}.g35-more{margin-top:auto;padding:3%}
/* Test 36: equipment-only responsive layout, reference-inspired typography and ornaments. */
#game:has(.g35-active:not(.hidden)){width:calc(100vw / var(--scale));height:calc(100dvh / var(--scale));}
.g35-active .satchel-panel{width:100%;height:100%;padding:12px 16px;grid-template-columns:19% minmax(0,1fr);grid-template-rows:10% minmax(0,1fr) 8%;gap:12px;border:2px solid #b58a4a;container-type:size;}
.g35-active .satchel-panel h2{font-size:clamp(28px,3.6cqh,44px);font-weight:bold;letter-spacing:.4px}
.g35-active .satchel-tabs{gap:10px;justify-content:center}
.g35-active .satchel-tabs button{min-width:16%;padding:0 16px;font-size:clamp(22px,3.4cqh,34px);border:5px double #c89b50;border-radius:12px 5px;box-shadow:inset 0 2px #f5d18c66,0 3px 5px #000}
.g35-active .satchel-back{font-size:clamp(23px,3.4cqh,34px);padding:0 30px;border:5px double #d4a65e;border-radius:9px}
.g35-layout{grid-template-columns:19% minmax(0,1fr) 31%;gap:12px;}
.g35-frame{border:5px double #c69a53;background:radial-gradient(ellipse at 50% 0%,#27242d,#0c0d15 70%);box-shadow:inset 0 0 0 1px #694a29,inset 0 0 25px #0009,0 4px 8px #000;}
.g35-frame:before,.g35-frame:after{content:'❧';font-size:32px;line-height:1;color:#e1b66d;text-shadow:1px 2px #4e2c10;z-index:5}.g35-frame:before{top:-8px;left:-5px;transform:rotate(-35deg)}.g35-frame:after{bottom:-8px;right:-5px;transform:rotate(145deg)}
.g35-roster{padding:6%;gap:12px}.g35-roster button{font-size:clamp(20px,3.2cqh,32px);border:4px double #9d7944;padding:6px;gap:10px;min-height:12cqh}.g35-roster img{width:37%;border:2px solid #b98b45}.g35-roster small{font-size:.75em;color:#e8d4a9}.g35-roster button.selected{border-color:#ffd58b;box-shadow:0 0 12px #f9b64e,inset 0 0 12px #dca34b44}
.g35-stage{border-top:1px solid #a47a40;background:linear-gradient(#17152030,#0b0d1680),url('assets/hall_interior.webp') center/cover}.g35-art{inset:0 13% 17%;background-size:contain;background-position:center bottom}.g35-name{font-size:clamp(26px,4cqh,42px);background:linear-gradient(90deg,#101019e0,transparent);padding:4px 12px;left:1%;top:1%}.g35-name small{font-size:.58em}.g35-slots{top:18%;bottom:21%;width:17%;gap:8px}.g35-tile{height:auto;flex:1;min-height:0;aspect-ratio:auto;border:5px double #c79a52;border-radius:12px 5px;background:radial-gradient(#303344,#0a0b13 75%);box-shadow:0 3px 7px #000;}.g35-tile img{width:100%;height:100%;object-fit:contain;padding:4px}.g35-tile span{font-size:clamp(15px,2.3cqh,23px);padding:2px 6px}.g35-tile.chosen{border-color:#ffda84;box-shadow:0 0 14px #e7b44d,inset 0 0 8px #ffdb85}.g35-tile.empty img{opacity:.38}
.g35-stats{height:17%;bottom:1%;left:1%;right:1%}.g35-stats h4{font-size:clamp(20px,3cqh,30px);padding:3px 24px;border:4px double #c69a53;border-radius:10px 4px}.g35-stats>div{padding-top:12px}.g35-stats span{font-size:clamp(17px,2.8cqh,28px);border-image:linear-gradient(transparent,#c59b55,transparent) 1}.g35-stats strong{font-size:.78em;white-space:nowrap}.g35-stats strong i{font-style:normal;font-size:1.45em;color:#ffd477;margin-right:5px;text-shadow:0 2px #70491d}.g35-stats b{font-size:1.05em;color:#fff3d9;margin-top:5px}
.g35-detail{padding:5%;gap:2.5%}.g35-item{gap:4%}.g35-item img{width:31%;border:5px double #c69a53;background:#151621;padding:4px}.g35-item h3{font-size:clamp(24px,3.8cqh,39px);line-height:1.1}.g35-item small,.g35-detail p{font-size:clamp(18px,2.7cqh,27px);line-height:1.35}.g35-detail h4{font-size:clamp(22px,3.3cqh,33px);border-top:0;padding:10px 6px 5px;margin:4% 0 0;position:relative;background:linear-gradient(90deg,#79583c66,transparent)}.g35-detail h4:before{content:'';position:absolute;left:0;right:0;top:-10px;height:12px;background:url('assets/character35/rule.webp') center/100% 100% no-repeat}.g35-row{font-size:clamp(20px,3cqh,30px);padding:5px 0;color:#f6e7cb}.g35-row b{color:#fff3d9}.g35-more{font-size:clamp(22px,3.3cqh,32px);border:5px double #c69a53;padding:10px;border-radius:9px}
/* Test 37: reusable illustrated ornaments and compact landscape composition */
.g35-active .satchel-panel{grid-template-rows:10% minmax(0,1fr) 7%;gap:9px;padding:10px 14px}
.g35-layout{grid-template-columns:18% minmax(0,1fr) 30%;gap:10px}
.g35-frame{border:3px solid #a97a3e;border-image:url('assets/character37/frame.svg') 14 stretch;background:radial-gradient(ellipse at top,#20212a,#0b0c14 75%);position:relative}
.g35-frame:before,.g35-frame:after{content:'';width:42px;height:42px;background:url('assets/character37/corner.png') center/contain no-repeat;position:absolute;pointer-events:none;z-index:5;transform:none;top:0;left:0}.g35-frame:after{top:auto;left:auto;right:0;bottom:0;transform:rotate(180deg)}
.g35-stage{background:linear-gradient(90deg,#080b15aa,transparent 30%,transparent 70%,#080b15aa),url('assets/hall_interior.webp') center/cover}
.g35-stage.brom .g35-art{inset:0 12% 16%;background:url('assets/character37/brom.webp') center bottom/contain no-repeat;mask-image:linear-gradient(to bottom,#000 95%,transparent)}
.g35-name{background:linear-gradient(90deg,#0b0d16e8,transparent);z-index:3;font-size:3.8cqh}
.g35-slots{top:17%;bottom:20%;width:19%;align-items:center;gap:6px}.g35-tile{flex:0 1 auto;height:calc((100% - 12px)/3);width:auto;max-width:100%;aspect-ratio:1;border:8px solid transparent;border-image:url('assets/character37/frame.svg') 14 stretch;border-radius:0;background:#10121d;overflow:hidden}.g35-tile img{padding:0}.g35-tile.chosen{filter:drop-shadow(0 0 5px #ffc66a);box-shadow:inset 0 0 8px #f8cc7d}.g35-tile span{font-size:1.8cqh}
.g35-active .satchel-tabs button,.g35-active .satchel-back,.g35-more{border:8px solid transparent;border-image:url('assets/character37/frame.svg') 14 stretch;border-radius:0;background:linear-gradient(#3a3844,#10111b 65%);padding:0 15px}.g35-active .satchel-tabs button.active{background:linear-gradient(#b87a18,#70400c 48%,#e7b94e)}
.g35-roster button{border:7px solid transparent;border-image:url('assets/character37/frame.svg') 14 stretch;min-height:11cqh}.g35-roster button.selected{background:linear-gradient(110deg,#795322,#211b1b);filter:drop-shadow(0 0 4px #f5bc60)}
.g35-stats{height:18%}.g35-stats h4{border:6px solid transparent;border-image:url('assets/character37/frame.svg') 14 stretch;background:#17141a;font-size:2.8cqh}.g35-stats>div{padding-top:8px}.g35-stats strong{display:flex;align-items:center;justify-content:center;gap:4px;font-size:1.9cqh}.g35-stats b{font-size:2.7cqh;margin-top:1px}.g37-stat-icon{width:3.6cqh;height:3.6cqh;object-fit:contain;vertical-align:middle;mix-blend-mode:screen}
.g35-detail{padding:4%;gap:1.2%;overflow:auto}.g35-item img{width:29%;border:7px solid transparent;border-image:url('assets/character37/frame.svg') 14 stretch;padding:0}.g35-item h3{font-size:3.5cqh}.g35-item small,.g35-detail p{font-size:2.5cqh;line-height:1.15}.g35-detail h4{font-size:2.9cqh;margin:2% 0 0;padding:5px 4px}.g35-detail h4:before{top:-5px;height:7px}.g35-row{font-size:2.7cqh;padding:2px 0}.g35-more{flex-shrink:0;min-height:5cqh;font-size:2.6cqh;margin-top:auto}.g35-detail p{flex-shrink:0}
/* Test 38: keep the framed stats anchored to the bottom, not in normal flow. */
.g35-stage > .g35-frame.g35-stats{position:absolute;top:auto;bottom:1%;left:1%;right:1%;height:18%;z-index:4;box-sizing:border-box;}
.g35-stage.brom .g35-art{inset:1% 12% 19%;}
.g35-stage .g35-name{z-index:5;}
.g35-stage .g35-slots{top:17%;bottom:22%;}
/* Test 39: reference-derived graphical frames; equipment only. */
.g35-active .satchel-panel{grid-template-columns:19% minmax(0,1fr);grid-template-rows:12% minmax(0,1fr) 8%;gap:9px;padding:9px 12px;background:radial-gradient(ellipse at 50% 30%,#25232c,#090a11 85%);}
.g35-active .satchel-panel h2{font-size:4.5cqh;padding-left:1.5cqh;color:#fff3dc;}
.g35-active .satchel-tabs{justify-content:center;gap:4px;}
.g35-active .satchel-tabs button,.g35-active .satchel-back,.g35-more{border:12px solid transparent;border-image:url('assets/character39/tab.png') 23 25 fill stretch;background:linear-gradient(#383743,#0c0d16 55%,#191722);background-clip:padding-box;font-size:3.6cqh;line-height:1;min-height:0;padding:0 12px;}
.g35-active .satchel-tabs button.active{border-image-source:url('assets/character39/active.png');background:linear-gradient(#d69b29,#74420a 55%,#bb8123);background-clip:padding-box;}
.g35-layout{grid-template-columns:18.5% minmax(0,1fr) 30%;gap:10px;}
.g35-frame{border:12px solid transparent;border-image:url('assets/character39/panel.png') 24 stretch;background:radial-gradient(ellipse at top,#20212b,#0b0c14 75%);background-clip:padding-box;box-shadow:none;}
.g35-frame:before,.g35-frame:after{display:none;}
.g35-stage{background:radial-gradient(ellipse at 50% 35%,#3a3540,#0b0d17 75%);border:0;}
.g35-stage.brom .g35-art{inset:0 7% 17%;background:url('assets/character39/scene.webp') center bottom/auto 100% no-repeat;mask-image:none;}
.g35-name{font-size:4.5cqh;left:2%;top:1%;padding:0 8px 4px;background:linear-gradient(90deg,#0b0d16e8,transparent);}
.g35-slots{top:19%;bottom:21%;width:20%;gap:5px;}.g35-slots.left{left:1%;}.g35-slots.right{right:1%;}
.g35-tile{border:9px solid transparent;border-image:url('assets/character39/tile.png') 15 22 stretch;background:radial-gradient(#303342,#10111b);background-clip:padding-box;}
.g35-tile.chosen{filter:drop-shadow(0 0 6px #5dcaff);box-shadow:0 0 3px 2px #a3eaff;}.g35-tile span{font-size:2cqh;}
.g35-roster{padding:4%;gap:10px;}.g35-roster button{border:9px solid transparent;border-image:url('assets/character39/tab.png') 23 25 stretch;background-clip:padding-box;font-size:3.6cqh;}.g35-roster button.selected{border-image-source:url('assets/character39/active.png');}
.g35-stage > .g35-frame.g35-stats{height:19%;bottom:0;left:0;right:0;}.g35-stats h4{border-image:url('assets/character39/tab.png') 23 25 stretch;font-size:3.1cqh;padding:2px 18px;}.g35-stats strong{font-size:2.15cqh;}.g35-stats b{font-size:3.3cqh;}.g37-stat-icon{width:4.6cqh;height:4.6cqh;}
.g35-detail{padding:3%;gap:1%;}.g35-item img{border:9px solid transparent;border-image:url('assets/character39/tile.png') 15 22 stretch;width:29%;}.g35-item h3{font-size:4cqh;}.g35-item small,.g35-detail p{font-size:2.8cqh;}.g35-detail h4{font-size:3.3cqh;padding:3px 4px;margin:2% 0 0;}.g35-row{font-size:3cqh;padding:0;}.g35-more{font-size:3cqh;min-height:6cqh;flex-shrink:0;}
/* Test 40: clean, uninterrupted character scene. */
.g35-stage.brom .g35-art{inset:0 0 18%;background:url('assets/character39/scene.webp') center center/cover no-repeat;mask-image:none;}
.g35-stage .g35-slots{top:17%;bottom:22%;width:23%;}
.g35-stage .g35-slots.left{left:0;}.g35-stage .g35-slots.right{right:0;}
.g35-stage .g35-name{background:linear-gradient(90deg,#090a12e8,transparent);}
