/* style.css */
:root{--ink:#203f43;--cream:#fffbea;--muted:#617d79;--gold:#f5cf72;--green:#2e7465;--line:#d4ddc5;--red:#db6353}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:#102b31;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;color:var(--ink)}button{font:inherit;cursor:pointer;border:0;min-height:46px;border-radius:14px;font-weight:700;touch-action:manipulation;color:inherit;background:#ecf0da;padding:12px 16px;transition:transform .1s,filter .1s}button:active{transform:translateY(2px) scale(.97);filter:brightness(.95)}button:disabled{opacity:.5;cursor:default}button:focus-visible{outline:3px solid #e6ac3d;outline-offset:2px}.hidden{display:none!important}#game{height:100%;height:100dvh;max-width:960px;margin:auto;position:relative;overflow:hidden;background:#9acb87;isolation:isolate}.screen{position:absolute;inset:0}.eyebrow{display:block;letter-spacing:2px;font-size:10px;font-weight:900;line-height:1.5}h1,h2,h3,p{margin:0}h2{font-size:26px;line-height:1.15;margin:8px 0 14px}h3{font-size:17px;margin:0 0 6px}p{line-height:1.5}.primary{background:var(--green);color:#fffbed;box-shadow:0 4px 0 #154e48}.primary span{float:right}.gold{background:var(--gold)}.danger{background:#fae1d6;color:#9f3b31}.subtle{background:none;box-shadow:none;color:var(--muted)}small,.muted{font-size:12px;color:var(--muted);line-height:1.5}#title{background:#7da69d;color:#fffde9}.title-art{position:absolute;inset:0;background:linear-gradient(#0d444438,transparent 50%,#123a3bdb),url('assets/title.webp') center/cover;image-rendering:auto}.title-copy{position:absolute;inset:0;padding:max(42px,env(safe-area-inset-top)) 28px max(24px,env(safe-area-inset-bottom));display:flex;align-items:center;flex-direction:column;text-align:center;text-shadow:0 2px 8px #173d3c66}.title-copy .eyebrow{font-size:11px;color:#fff4c3}h1{font-family:Georgia,serif;font-size:clamp(38px,10vw,62px);letter-spacing:1px;color:#ffe68c;line-height:1.05;margin:12px 0;text-shadow:0 3px #28596a,2px 0 #28596a,-2px 0 #28596a}h1 span{display:block;color:#fffcdf;font:italic 22px Georgia;letter-spacing:0;margin-top:10px}.title-copy p{margin-top:auto;font-size:16px}.title-copy button{width:min(100%,340px);margin-top:14px;box-shadow:0 4px 0 #173d3c77}.title-copy .primary{background:#f5d080;color:#294a44}.title-copy small{margin-top:20px;color:#d9e6d0;font-size:10px;text-shadow:none}#world{display:flex;flex-direction:column}header{height:76px;flex:none;background:#fffbea;display:flex;align-items:center;justify-content:space-between;padding:calc(8px + env(safe-area-inset-top)) 18px 8px;min-height:calc(68px + env(safe-area-inset-top));border-bottom:4px solid #325e4b;z-index:2}header strong{display:block;font-size:18px}header .eyebrow{color:#71866a;letter-spacing:1.5px}.icon-button{background:#e1ead4;width:46px;padding:0;font-size:23px}#viewport{position:relative;flex:1;min-height:0;background:#8fb97a;overflow:hidden}#map{display:block;width:100%;height:100%;image-rendering:pixelated;touch-action:none}#objective{position:absolute;top:12px;left:12px;right:80px;background:#fffbebf2;box-shadow:0 3px 0 #1b553e44;text-align:left;border-radius:10px;padding:10px 12px;min-height:52px;line-height:1.25;font-size:12px}#objective b{display:block;font-size:13px}#objective span{color:#54836c;font-size:11px}#map-button{position:absolute;right:12px;top:12px;width:56px;height:52px;border-radius:10px;background:#fffbebed;font-size:24px;padding:3px}#map-button span{display:block;font-size:10px}#world-hint{position:absolute;bottom:160px;left:22px;right:22px;text-align:center;font-size:12px;background:#163b36cb;color:#fff6d4;padding:10px;border-radius:10px;pointer-events:none}#nearby{position:absolute;bottom:158px;left:50%;transform:translateX(-50%);background:#fffbebf2;border:2px solid #547967;border-radius:12px;padding:7px 12px;font-size:12px;font-weight:bold;white-space:nowrap;pointer-events:none}#nearby:empty{display:none}#controls{position:absolute;bottom:calc(14px + env(safe-area-inset-bottom));left:18px;right:18px;height:126px;display:flex;align-items:center;justify-content:space-between;pointer-events:none;z-index:3}#stick{position:relative;width:126px;height:126px;border-radius:50%;background:#e9efcd86;border:3px solid #fffbe5ac;box-shadow:0 4px 0 #274f4966;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none}.cross{position:absolute;inset:0;display:grid;place-items:center;font-size:83px;color:#e6efca7a;line-height:1}#nub{position:absolute;width:52px;height:52px;left:34px;top:34px;background:#f8ecc1;border:4px solid #fff8de;border-radius:50%;box-shadow:0 3px 6px #184b4a55;pointer-events:none}.control-right{display:grid;gap:9px;pointer-events:auto;width:130px}.control-right button{display:flex;align-items:center;justify-content:space-between}#interact{background:#f5d080;box-shadow:0 4px 0 #af955b;min-height:54px}#interact b{border-radius:50%;background:#a98436;color:#fff5cf;width:29px;height:29px;display:grid;place-items:center}#team-shortcut{background:#fffbebeb;font-size:13px}#team-shortcut span{font-size:20px}#save-status{position:absolute;bottom:0;left:0;right:0;background:#9d3a35;color:white;z-index:25;text-align:center;font-size:12px}#overlay{position:absolute;inset:0;z-index:20;background:#102e36a8;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:18px;padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom))}#sheet{background:var(--cream);border:3px solid #375e52;border-radius:22px;box-shadow:0 8px 0 #112e3855;width:100%;max-width:580px;max-height:100%;overflow:auto;padding:22px;animation:sheet-in .18s ease-out}#sheet.dialogue{align-self:flex-end;margin-bottom:5px}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:8px}.sheet-head h2{margin:0}.sheet-head button{padding:4px;min-width:44px;background:#e9edda;font-size:20px}.stack{display:grid;gap:10px;margin-top:18px}.row{display:flex;align-items:center;gap:12px}.row.between{justify-content:space-between}.card{background:#eef0da;border:1px solid #d3ddc0;border-radius:14px;padding:13px;margin:10px 0}.pokemon-card{display:flex;align-items:center;gap:10px}.pokemon-card img{width:76px;height:76px;image-rendering:pixelated;object-fit:contain}.pokemon-card>div{flex:1}.pokemon-card button{padding:8px;font-size:12px}.hp{height:8px;background:#d6dcc8;border-radius:6px;overflow:hidden;margin:6px 0 4px}.hp i{display:block;height:100%;background:#56a679;transition:width .22s}.hp.low i{background:#e19556}.hp.critical i{background:#d66159}.xp{height:4px;background:#cad9cd;border-radius:4px;overflow:hidden;margin-top:6px}.xp i{display:block;background:#73a6c0;height:100%}.type{display:inline-block;border-radius:6px;padding:3px 6px;color:#fff;font-size:10px;font-weight:900;letter-spacing:.5px;background:var(--type,#8a9b88)}.starter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:20px -6px}.starter-grid button{padding:8px 3px;background:#eef0db;border:2px solid #d6dfc8;font-size:12px}.starter-grid img{width:100%;image-rendering:pixelated}.starter-grid span{display:block;margin-top:8px;font-size:10px}.dialogue-top{display:flex;align-items:center;gap:10px;margin-bottom:12px}.avatar{width:48px;height:52px;background:#dce7ce;border-radius:12px;display:grid;place-items:center;font-size:26px}.dialogue-top small{letter-spacing:1px}.dialogue-text{font-size:16px;min-height:75px;line-height:1.6}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.menu-grid button{text-align:left;background:#e8edda}.menu-grid button small{display:block;margin-top:5px;font-weight:normal}.map-frame{position:relative;aspect-ratio:32/38;background:#87b26d;border:4px solid #c8cdae;border-radius:12px;overflow:hidden;margin:12px auto;max-height:54dvh}.map-frame canvas{width:100%;height:100%;image-rendering:pixelated;display:block}.map-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:12px}.map-legend b{color:#be614e}#toast{position:absolute;left:24px;right:24px;bottom:calc(155px + env(safe-area-inset-bottom));z-index:40;background:#163e3bed;color:#fff3c9;padding:13px;border-radius:13px;text-align:center;font-size:13px;pointer-events:none;opacity:0;transition:opacity .15s}.battle-heading{display:flex;align-items:center;justify-content:space-between;background:#fffbea;padding:calc(12px + env(safe-area-inset-top)) 18px 10px;font-size:11px;font-weight:900;letter-spacing:1px}.battle-heading button{min-width:44px;padding:4px;font-size:20px}#battle{background:#f7f3dc;display:flex;flex-direction:column}.battle-field{position:relative;flex:1;min-height:180px;overflow:hidden;background:linear-gradient(#9ecdc7 0%,#d9e9c5 48%,#8db985 49%,#c4d79b 100%);isolation:isolate}.distant-trees{position:absolute;left:-10%;right:-10%;height:26%;top:24%;background:radial-gradient(ellipse at 20% 100%,#477d68 0 32%,transparent 33%),radial-gradient(ellipse at 60% 100%,#6a986d 0 40%,transparent 41%),radial-gradient(ellipse at 90% 100%,#558968 0 35%,transparent 36%);opacity:.8}.enemy-base,.ally-base{position:absolute;border-radius:50%;background:#83a36d;border:7px solid #acc592;box-shadow:0 6px #6d98626e;width:46%;height:14%}.enemy-base{top:47%;right:-1%}.ally-base{bottom:-5%;left:-8%;width:66%;height:19%}.battle-sprite{position:absolute;width:42%;height:46%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 5px 1px #1e5c4322)}.enemy{right:1%;top:13%}.ally{left:1%;bottom:-1%;width:54%;height:53%}.monster-hud{position:absolute;background:#fffbea;border:2px solid #54765e;border-radius:12px;padding:10px 12px;width:51%;box-shadow:0 4px #2d5a4833;z-index:2;font-size:12px}#enemy-hud{top:7%;left:4%}#ally-hud{right:4%;bottom:6%}.monster-hud .row{gap:4px}.monster-hud strong{font-size:15px}.monster-hud .type{font-size:8px}.monster-hud small{font-size:10px}.battle-console{flex:none;background:#fffbea;padding:12px 16px calc(16px + env(safe-area-inset-bottom));border-top:5px solid #3c6855}#battle-message{font-size:14px;min-height:48px;margin-bottom:10px;line-height:1.45}#battle-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#battle-actions button{min-height:54px;border:1px solid #ced8bc;font-size:14px;text-align:left;padding:10px 14px}#battle-actions button small{display:block;font-size:10px;font-weight:normal}#battle-actions button.fight{background:#f0c779}#battle-actions button.ball{background:#dce8cb}.hit{animation:hit .22s steps(2) 2}.lunge{animation:lunge .28s ease}.throw{animation:throw .65s ease}.caught{animation:caught .6s ease forwards}.fainted{animation:faint .4s ease forwards}.float{position:absolute;font-size:30px;font-weight:900;z-index:8;color:#fff8dd;text-shadow:2px 2px #314b41;left:65%;top:27%;animation:float .7s ease forwards}.float.own{left:20%;top:66%}.battle-flash{animation:flash .25s ease}#battle-effect{position:absolute;inset:0;pointer-events:none;z-index:5}@keyframes hit{50%{opacity:.2;transform:translateX(5px)}}@keyframes lunge{50%{transform:translate(15px,-8px)}}@keyframes throw{0%{transform:translate(-180px,140px) rotate(0)}65%{transform:translate(0,0) rotate(540deg)}85%{transform:rotate(20deg)}100%{transform:rotate(0)}}@keyframes caught{to{transform:scale(0);opacity:0}}@keyframes faint{to{transform:translateY(50px);opacity:0}}@keyframes float{to{transform:translateY(-35px);opacity:0}}@keyframes flash{50%{filter:brightness(1.4)}}@keyframes sheet-in{from{opacity:0;transform:translateY(12px)}}@media(min-width:700px){#game{max-width:740px;border-left:6px solid #102b31;border-right:6px solid #102b31}.title-copy{padding-top:50px}.title-copy p{margin-top:auto}.battle-console{padding-left:28px;padding-right:28px}.battle-sprite{max-height:340px}.starter-grid img{height:120px;object-fit:contain}}@media(max-height:650px){header{min-height:56px;height:56px;padding-top:6px}#objective{min-height:44px;padding:7px 10px}#controls{height:100px;bottom:10px}#stick{width:100px;height:100px}#nub{left:21px;top:21px}#nearby,#world-hint{bottom:120px}.battle-heading{padding:6px 16px}.battle-console{padding:8px 12px}#battle-actions button{min-height:44px}#battle-message{min-height:40px;font-size:12px}.title-copy{padding-top:18px}.title-copy small{margin-top:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}}

.campaign{text-align:left;padding:20px;border:2px solid #8ca789;background:#e2ecd4}.campaign strong{display:block;font-size:21px;margin:8px 0}.campaign small{display:block;font-weight:400}.campaign.rocket{background:#efe0dd;border-color:#b77b80}.campaign.rocket .eyebrow{color:#a13e50}#sheet input{max-width:100%;margin:18px 0}#sheet p+p{margin-top:12px}
/* GBA-inspired handheld layout: close camera, pixel tiles, explicit pockets. */
:root{--ink:#253d4a;--cream:#fff9e2;--green:#396f79;--gold:#edd17c}#game{background:#e4dfbb}header{height:61px;min-height:61px;padding:8px 13px;border-bottom:3px solid #486c68}header strong{font-size:15px}header .eyebrow{font-size:9px}.icon-button{width:56px;font-size:20px;line-height:1.05;border:2px solid #adbbaa;border-radius:8px}.icon-button small{display:block;font-size:9px;color:var(--ink)}#viewport{border:4px solid #53786b;border-top:0;border-bottom:0}#objective{left:8px;top:8px;right:69px;min-height:44px;padding:7px 9px;border:2px solid #738d70;border-radius:7px;box-shadow:2px 2px #244b4844}#objective b{font-size:11px}#objective span{font-size:10px}#map-button{top:8px;right:8px;width:52px;height:46px;min-height:46px;border:2px solid #738d70;border-radius:7px}#controls{position:relative;inset:auto;left:auto;right:auto;bottom:auto;height:119px;min-height:119px;flex:none;padding:8px 24px;background:linear-gradient(#e5e7cc,#cbd6bd);border-top:4px solid #53786b;pointer-events:auto;z-index:3}#stick{width:101px;height:101px;border-radius:18px;background:#aebfab;border:3px solid #7b9484;box-shadow:inset 0 3px #8fa893,0 2px #fff9dc}#nub{width:37px;height:37px;left:29px;top:29px;border:3px solid #e8ecd6;background:#789c8c;box-shadow:0 2px #5e7c72;opacity:.7}.cross{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:20px;line-height:1.25;color:#f7f4db;text-shadow:1px 2px #657e74}.cross span{display:block}.control-right{width:143px;gap:6px}#interact{min-height:49px;border:2px solid #ba9a58;border-radius:25px;box-shadow:0 3px #8f7b4e;background:#ebce7f;font-size:13px}#team-shortcut{min-height:32px;padding:6px;font-size:11px;background:#eaf0d6;border:1px solid #9cad94;border-radius:8px}#nearby{bottom:10px;border-radius:6px;padding:5px 9px;font-size:11px}#world-hint{bottom:12px;left:15px;right:15px;font-size:11px}#quick-nav{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;background:#466d68;padding:7px 8px calc(7px + env(safe-area-inset-bottom));flex:none}#quick-nav button{font-size:10px;min-height:43px;padding:4px 1px;border-radius:6px;background:#fff7d8;box-shadow:0 2px #263e41;color:#274c50}#quick-nav b{display:block;font-size:18px;line-height:1.05}#toast{bottom:210px;font-size:12px}#sheet{border-radius:11px;border:4px solid #4e716e;box-shadow:inset 0 0 0 2px #f6e7b9,0 6px #152f3c55;padding:18px}#sheet h2{font-size:23px}.sheet-head{margin-bottom:14px}.card{border-radius:8px}.pokemon-card{border-left:5px solid #6a9a84}.pokemon-card img{width:72px;height:72px}.mon-name{min-height:28px;padding:2px 0;background:none;font-size:14px;text-align:left}.bag-tabs{display:flex;gap:4px;padding-bottom:13px;border-bottom:2px solid #c9d1af}.bag-tabs button{flex:1;min-height:42px;padding:6px 3px;font-size:11px;border-radius:6px}.bag-tabs .selected{background:#537b79;color:#fff7d8}.bag-content{min-height:170px;padding:22px 0}.item-row{display:flex;align-items:flex-start;gap:18px}.item-row h3 b{float:right;margin-left:15px}.item-row p{font-size:13px;margin-bottom:12px}.item-icon{flex:none;width:42px;height:50px;display:grid;place-items:center}.pokeball-icon{border-radius:50%;height:38px;border:4px solid #43535d;background:linear-gradient(#d65d5d 0 44%,#43535d 44% 56%,#fff8dd 56%);position:relative}.pokeball-icon:after{content:'';position:absolute;width:11px;height:11px;border:3px solid #43535d;background:#fff8dd;border-radius:50%}.potion-icon{background:#ad87af;color:#fff7da;border:4px solid #705d87;border-radius:8px;font-size:25px;box-shadow:inset 3px 0 #d0add0}.wallet{display:flex;justify-content:space-between;padding:13px;background:#e1e6cd;border-radius:6px;margin-bottom:15px}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:17px;background:#e6e9d1;margin:15px 0}.stats-grid b{float:right}.detail-mon img{width:120px;height:120px}.center-banner{background:#e2e9d3;border:2px solid #acbda3;text-align:center;padding:20px;border-radius:8px}.center-banner span{display:block;color:#c75f66;font-size:36px}.center-banner b,.center-banner small{display:block;margin-top:6px}.battle-console{border-top:5px solid #466a6a}.monster-hud{border-radius:7px;border-width:3px}.battle-heading{background:#f5ebcb}.battle-field{background:linear-gradient(#b3d4cf 0%,#dbe7ba 47%,#7bac79 48%,#d4daa4 100%)}.enemy-base,.ally-base{background:repeating-linear-gradient(12deg,#7da56c 0 3px,#89b174 3px 7px);border-color:#a9c382}#battle-actions button{border-radius:7px;border:2px solid #91a791}#battle-message{border:2px solid #76958c;background:#f4f2d5;padding:9px;border-radius:6px}
@media(max-height:650px){#controls{height:92px;min-height:92px;padding:5px 20px}#stick{width:79px;height:79px}#nub{left:21px;top:21px;width:31px;height:31px}.cross{font-size:16px}#quick-nav{padding-top:5px;padding-bottom:5px}#quick-nav button{min-height:36px}#quick-nav b{font-size:14px}header{height:50px;min-height:50px}.control-right{width:138px}#interact{min-height:43px}#team-shortcut{min-height:29px}#nearby,#world-hint{bottom:8px}}
.empty-slot{border:2px dashed #bac8aa;border-radius:7px;color:#7f937e;font-size:11px;padding:12px;margin:8px 0}.pokemon-card .hp{height:9px}.pokemon-card .mon-name{font-size:14px}.pokemon-card>div{min-width:0}.pokemon-card .type{font-size:8px}#sheet>small{display:block;margin-top:12px}

/* rpg.css */
/* Handheld RPG interface: full game screens, compact lists, persistent button legend. */
:root{--rpg-dark:#243b4a;--rpg-mid:#526f74;--rpg-light:#d9e8cf;--rpg-paper:#f9f5dd;--rpg-gold:#e5c56e}body,button,input,select{font-family:'Courier New',ui-monospace,monospace;font-weight:700}button{transition:none;border-radius:3px;box-shadow:none}button:hover{filter:brightness(1.06)}button:focus-visible{outline:3px solid #d8a747;outline-offset:-3px}#overlay{padding:0;backdrop-filter:none;background:#16333a55;align-items:stretch;justify-content:stretch}#sheet.rpg-screen{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:4px solid #344d59;border-radius:0;margin:0;background:var(--rpg-paper);box-shadow:inset 0 0 0 3px #ecdfaa;overflow:hidden;animation:none;color:var(--rpg-dark)}.rpg-head{display:flex;align-items:center;gap:10px;min-height:53px;padding:7px 14px;background:repeating-linear-gradient(0deg,#55747b 0 2px,#5d7b80 2px 4px);color:#fff9d8;border-bottom:4px solid #243e4e;flex:none}.rpg-head h2{font-size:17px!important;margin:0!important;letter-spacing:1px;flex:1;line-height:1.3}.screen-marker{color:var(--rpg-gold);font-size:19px}.rpg-back{width:36px;min-height:34px;height:34px;border-radius:50%;border:2px solid #1d3f4c;background:#f1d782;color:#304655;padding:0;box-shadow:1px 2px #233c47}.rpg-body{padding:14px;overflow:auto;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#8fa48c #e6e9ce}.rpg-footer{padding:8px 12px;display:flex;justify-content:space-between;font-size:10px;background:#d7e1c4;border-top:3px solid #8ba38d;flex:none;color:#3d6263}.rpg-body p{font-size:12px;line-height:1.55}.rpg-body small{font-size:10px;font-weight:400}.rpg-body h3{font-size:15px;margin-bottom:8px}.rpg-body button{border:2px solid #6c8b86;background:#e2e9cf;min-height:41px;font-size:12px;border-radius:3px}.rpg-body button.primary{background:#4e7a77;color:#fff8d8;box-shadow:2px 2px #2a4d55}.rpg-body .stack{gap:8px}.rpg-body .card{border-radius:3px;border:2px solid #b7c8a5;background:#e6ebd3}.rpg-prompt{padding:11px;background:#e8ecd4;border:2px solid #91a792;box-shadow:inset 0 0 0 2px #f9f7de;margin:12px 0;font-size:11px!important;color:#46676a}.rpg-body .muted{font-size:10px!important}.rpg-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.rpg-bottom-back{width:100%;margin-top:14px;background:#e7dfb8!important}.rpg-tabs{display:flex;gap:3px;border-bottom:4px solid #58797b;margin:10px 0 14px}.rpg-tabs button{flex:1;border-bottom:0;padding:8px 3px;border-radius:3px 3px 0 0;font-size:11px}.rpg-tabs .active{background:#58797b;color:#fff7d5}.rpg-screen.rpg-party{background:repeating-linear-gradient(0deg,#5b7e83 0 3px,#60858a 3px 6px)!important}.party-layout{display:grid;grid-template-columns:1fr 1fr;gap:8px}.party-slot{position:relative;display:flex;align-items:center;gap:3px;width:100%;text-align:left;min-height:113px!important;padding:8px 5px!important;background:#f0edc9!important;border:3px solid #b3cb9e!important;box-shadow:2px 3px #263f4d!important;overflow:hidden;flex-wrap:wrap}.party-slot:first-child{grid-column:1/-1;min-height:104px!important;flex-wrap:nowrap;background:#f6e9ba!important;border-color:#dec77e!important}.party-slot img{width:47px;height:47px;object-fit:contain;image-rendering:pixelated;flex:none}.party-slot:first-child img{width:82px;height:82px}.party-info{flex:1;min-width:70px}.party-info strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis}.party-info>small{font-size:9px;display:block}.party-info .hp{height:7px;border:1px solid #6c8979;margin:5px 0 2px;background:#bfc9a7;border-radius:2px}.party-info .hp+small{font-size:8px}.party-index{position:absolute;right:4px;top:3px;font-size:8px;opacity:.45}.party-empty{min-height:103px;border:2px dashed #adbea5;background:#446b70;color:#d5e3c9;display:flex;align-items:center;justify-content:center;font-size:10px;gap:8px}.party-empty span{font-size:25px}.status-tag{font-size:8px;background:#ad6c73;color:#fff5dc;padding:2px 4px;display:inline-block}.summary-hero{display:flex;gap:18px;align-items:center;background:repeating-linear-gradient(0deg,#d7e5c8 0 3px,#dfebcf 3px 6px);border:2px solid #8da794;padding:8px;min-height:133px}.summary-hero>img{width:112px;height:112px;object-fit:contain;image-rendering:pixelated;flex:none}.summary-hero h3{font-size:20px;margin:8px 0}.summary-hero .type{margin:7px 0}.summary-lines{background:#e8ecd1;border:2px solid #afc1a2;padding:8px}.summary-lines p{display:flex;justify-content:space-between;gap:8px;margin:7px 0}.summary-lines b{text-align:right;font-size:11px}.stats-grid{border:2px solid #b0bda2;padding:12px;gap:12px;margin:12px 0;font-size:11px}.stats-grid b{color:#254b58}.move-panel{background:#ecedce;border:2px solid #a5b99c;padding:12px;margin:7px 0;display:grid;grid-template-columns:65px 1fr;gap:7px;align-items:center}.move-panel strong{font-size:13px}.move-panel small{grid-column:2}.move-list{display:grid;gap:6px}.move-list>button{display:flex;align-items:center;text-align:left;gap:10px;padding:10px;flex-wrap:wrap}.move-list>button b,.move-list>button strong{flex:1;font-size:12px}.move-list>button>small{width:100%;font-size:9px}.move-list>button img{width:48px;height:48px;image-rendering:pixelated;object-fit:contain}.move-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}.move-grid button{min-height:126px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;padding:12px;background:#e5eacb;border:3px solid #8daa94}.move-grid strong{font-size:14px}.move-grid small{font-size:10px}.evo-route{display:flex;gap:10px;align-items:center;margin:10px 0;padding:10px;border:2px solid #a9bba0;background:#e9ecd2}.evo-route img{width:79px;height:79px;object-fit:contain;image-rendering:pixelated}.evo-route>div{flex:1}.evo-route strong{font-size:14px}.evo-route small{display:block;font-size:9px;color:#7c7360;margin:8px 0}.evo-route p{font-size:10px;margin:5px 0}.evo-route button{width:100%;margin-top:4px}.evolution-stage{text-align:center;padding:28px 5px;display:flex;flex-direction:column;gap:18px;align-items:center}.evolution-stage>img{width:160px;height:160px;image-rendering:pixelated}.evolution-pair{position:relative;width:230px;height:230px;background:radial-gradient(#f5f5d5,#c5dacb 70%);border:4px solid #738f86;overflow:hidden}.evolution-pair img{position:absolute;inset:10%;width:80%;height:80%;object-fit:contain;image-rendering:pixelated}.evo-before{animation:evo-old 1.6s steps(4) forwards}.evo-after{animation:evo-new 1.6s steps(4) forwards}@keyframes evo-old{0%,25%{opacity:1}40%,65%{filter:brightness(0) invert(1)}100%{opacity:0}}@keyframes evo-new{0%,60%{opacity:0}70%{opacity:1;filter:brightness(0) invert(1)}100%{opacity:1;filter:none}}.dex-count{display:flex;justify-content:space-between;padding:8px;background:#ded7a8;border:2px solid #ae9f77;font-size:9px;margin-bottom:10px}.dex-count b{font-size:12px}.dex-filters{display:flex;gap:5px;margin-bottom:10px}.rpg-body select,.rpg-body input{border:2px solid #7c9a90;border-radius:2px;background:#fff9df;color:#2e5057;padding:8px;font-size:12px;min-width:0;min-height:40px;max-width:100%}.dex-filters select{width:108px;font-size:10px}.dex-filters input{flex:1;width:0;font-size:10px}.dex-filters button{width:38px;padding:5px;flex:none}.dex-list{border:3px solid #64887f;background:#dbe7cf}.dex-list button{border:0;border-bottom:1px solid #aec1a7;display:flex;align-items:center;gap:10px;min-height:40px;padding:3px 7px;width:100%;text-align:left;background:#e7edd2}.dex-list button:nth-child(even){background:#dce6c9}.dex-number{font-size:10px;color:#708977;min-width:25px}.dex-list img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}.dex-list strong{font-size:12px;flex:1}.unknown-mon{filter:brightness(0);opacity:.35}.page-controls{display:flex;justify-content:center;align-items:center;gap:22px;margin:12px 0;font-size:11px}.page-controls button{width:54px}.dex-evolutions{padding:9px;background:#e6ebd2;border:2px solid #bac9a9;margin-bottom:15px}.dex-evolutions p{margin:7px 0}.dex-evolutions small{display:block;font-size:9px}.dex-learnset{border:2px solid #b2c1a3;max-height:240px;overflow:auto}.dex-learnset>div{display:flex;align-items:center;gap:8px;padding:9px;background:#e7ecd2;border-bottom:1px solid #c6cfaf;font-size:10px}.dex-learnset b{flex:1}.dex-learnset .type{font-size:8px}.region-crest{background:#547b83;border:4px solid #d7c380;color:#fff4c4;text-align:center;padding:22px;letter-spacing:4px;font-size:25px}.region-crest small{display:block;letter-spacing:1px;font-size:9px;margin-top:10px;color:#eff2d0}.field-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:13px 0;padding:8px;background:#e6ebd0}.field-row label{font-size:11px;color:#47676a;max-width:45%}.field-row select,.field-row input{width:57%;font-size:11px}.training-row{border:2px solid #b0c0a0;padding:10px;margin:10px 0;display:flex;gap:5px;flex-wrap:wrap}.training-row strong,.training-row small{width:100%;display:block}.training-row button{flex:1}.rpg-screen.rpg-bag{background:linear-gradient(90deg,#e3bf75 0 17%,#f7edcd 17%)!important}.rpg-bag .rpg-body{padding:18px 14px 14px 24px}.rpg-bag .bag-content{background:#fff5d4;border:3px solid #ac9870;padding:18px 12px;min-height:220px}.rpg-bag .bag-tabs{border-bottom:3px solid #ac9870}.rpg-bag .bag-tabs button{border:2px solid #a59472;font-size:10px}.rpg-bag .bag-tabs .selected{background:#a78950}.rpg-bag .wallet{border:2px solid #ae9c75;border-radius:2px;background:#f0deb0;font-size:12px}.rpg-bag .item-row{gap:12px}.rpg-bag .item-row h3{font-size:14px}.rpg-screen.rpg-pause{width:260px;max-width:88%;margin-left:auto;background:#f8f3d8;box-shadow:-5px 0 #14323b55}.rpg-pause .rpg-body{padding:10px}.trainer-banner{display:flex;align-items:center;gap:10px;padding:10px;border:2px solid #9bb39d;background:#dce8c8;margin-bottom:12px}.trainer-banner b{font-size:13px}.trainer-banner small{display:block;font-size:9px;margin-top:7px}.trainer-mark{width:34px;height:38px;background:#598390;color:#fff3c4;display:grid;place-items:center;font-size:26px;border:2px solid #3c5c68}.trainer-mark.rocket{background:#344958;color:#d96a77}.pause-list{display:grid;gap:5px}.pause-list button{position:relative;text-align:left;min-height:43px;padding:10px 10px 10px 22px;border:0;border-bottom:2px solid #b0c1a2;background:#eff0d6;font-size:12px}.pause-list button:before{content:'▶';position:absolute;left:7px;top:12px;font-size:8px;color:#719388}.pause-list small{display:block;font-size:9px;color:#718773;margin-top:3px}.rpg-screen.rpg-dialog{align-self:flex-end;max-height:75%;height:auto;margin:12px;width:calc(100% - 24px);border:4px solid #506f73;box-shadow:inset 0 0 0 2px #fff2c5,0 4px #18354088;background:#fff8dc}.rpg-dialog .rpg-head{min-height:40px;padding:5px 12px}.rpg-dialog .rpg-head h2{font-size:14px!important}.rpg-dialog .rpg-body{padding:12px 16px}.rpg-dialog .dialogue-text{font-size:14px;line-height:1.65;min-height:66px}.rpg-dialog .rpg-footer{display:none}#battle-actions button{font-family:'Courier New',monospace;text-transform:uppercase;font-size:12px;border:3px solid #708d86;border-radius:2px;box-shadow:inset 0 0 0 2px #f8f2d4}#battle-actions button small{text-transform:none;font-size:9px}#battle-message{border:4px double #f2e5b4;background:#456b76;color:#fff6d0;border-radius:0;font-size:12px;min-height:67px}#quick-nav button{font-size:9px;border-radius:2px}header strong{font-size:13px}.title-copy{background:linear-gradient(transparent 45%,#143a4088)}.title-copy button{font-family:'Courier New',monospace;border:3px solid #fbebac;border-radius:3px;font-size:13px;letter-spacing:1px}.title-copy h1{font-family:Georgia,serif}.title-copy small{font-family:'Courier New',monospace}#objective{font-family:'Courier New',monospace;border:3px double #79977e;border-radius:2px}#objective b{font-size:10px}#objective span{font-size:9px}#team-shortcut{font-family:'Courier New',monospace}.rpg-screen .type{border-radius:2px;font-size:9px;letter-spacing:0;padding:3px 5px}.rpg-head .rpg-back{border-radius:50%}
@media(max-height:650px){.party-slot{min-height:90px!important}.party-slot:first-child{min-height:87px!important}.party-slot img{width:40px;height:40px}.party-slot:first-child img{width:66px;height:66px}.party-empty{min-height:86px}.rpg-head{min-height:43px}.rpg-body{padding:10px}.rpg-footer{padding:6px 10px}.dex-list button{min-height:33px}.dex-list img{width:30px;height:30px}.dex-filters{margin-bottom:7px}.party-info strong{font-size:11px}.party-info>small{font-size:8px}.move-grid button{min-height:105px}.summary-hero{min-height:110px}.summary-hero>img{width:90px;height:90px}}
@media(prefers-reduced-motion:reduce){.evo-before{opacity:0}.evo-after{opacity:1}}
/* Keep Safari from zooming the whole game when a search/number field gains focus. */
.rpg-body input,.rpg-body select{font-size:16px}.dex-filters select{width:112px;font-size:16px}.dex-filters input{font-size:16px}.field-row select,.field-row input{font-size:16px}#title button:disabled{opacity:.6}#title button:disabled:after{content:' · A CARREGAR';font-size:9px}
.track-status{font-size:9px;background:#dfe8cc;border:2px solid #b6c49f;padding:10px;margin-bottom:12px}.chapter-victory{text-align:center;padding:20px 6px;display:flex;align-items:center;flex-direction:column;gap:18px}.chapter-victory p{max-width:390px}.badge-medal{width:98px;height:112px;display:grid;place-items:center;background:linear-gradient(135deg,#e8d393,#a6b1a0 50%,#6f888c);border:7px solid #576b71;clip-path:polygon(22% 0,78% 0,100% 28%,88% 75%,50% 100%,12% 75%,0 28%);color:#fff1ba;font-size:54px;filter:drop-shadow(2px 4px #324a4c)}.rocket-badge{background:linear-gradient(135deg,#536d7a,#263b4c);color:#df7081;border-color:#8f7682;font-family:Georgia,serif;font-weight:900}.story-checklist{padding:12px;background:#e9edd4;border:2px solid #b5c4a3}.story-checklist p{margin:7px 0;font-size:11px}.journey-map{background:#dce7c8;border:3px solid #738d7c;padding:16px;display:flex;align-items:center;flex-direction:column;gap:8px}.journey-map>div{border:2px solid #809986;background:#f5f0d2;text-align:center;padding:11px;width:100%;font-size:12px}.journey-map small{display:block;font-size:9px;margin-top:5px}.journey-map>span{color:#738b78;font-size:24px}.battle-field[data-arena=quarry]{background:linear-gradient(#465b64 0%,#75867d 35%,#a89c7c 36%,#c5b78f)}.battle-field[data-arena=quarry] .distant-trees{background:repeating-linear-gradient(78deg,#5c706d 0 35px,#75847a 35px 55px);top:0;height:45%;opacity:.9;clip-path:polygon(0 0,100% 0,100% 72%,84% 100%,72% 67%,56% 98%,38% 66%,20% 90%,0 60%)}.battle-field[data-arena=gym],.battle-field[data-arena=archive]{background:linear-gradient(#667e7f 0 35%,#adc0af 35% 40%,#cbd0b5 40% 100%)}.battle-field[data-arena=gym] .distant-trees,.battle-field[data-arena=archive] .distant-trees{top:3%;height:34%;opacity:1;background:repeating-linear-gradient(90deg,#5a7277 0 20px,#8da299 20px 35px,#9bac9e 35px 50px)}.battle-field[data-arena=gym] .enemy-base,.battle-field[data-arena=gym] .ally-base,.battle-field[data-arena=archive] .enemy-base,.battle-field[data-arena=archive] .ally-base{background:#b7bfaa;border-color:#e0daba;box-shadow:0 6px #7b918b}.type-projectile{position:absolute;z-index:8;line-height:1;color:var(--element);font-size:50px;text-shadow:2px 2px #fff4c4,-2px -2px #fff4c4;filter:drop-shadow(0 0 8px var(--element))}.type-projectile.from-ally{left:22%;top:67%;animation:projectile-out var(--vfx-time,.58s) ease-in forwards}.type-projectile.from-enemy{left:72%;top:27%;animation:projectile-in var(--vfx-time,.58s) ease-in forwards}.vfx-water{border:5px solid #b7e8dd;border-radius:50%;font-size:28px;background:var(--element);padding:3px}.vfx-fire{font-size:58px;transform:rotate(18deg)}.vfx-electric{font-size:85px}.vfx-grass{font-size:62px}.vfx-rock,.vfx-ground,.vfx-steel{font-size:45px;text-shadow:4px 3px #4f6262}.impact-ring{position:absolute;width:70px;height:70px;border:7px solid var(--element);border-radius:50%;opacity:0;animation:impact-burst var(--vfx-time,.58s) ease-out forwards;filter:drop-shadow(0 0 6px var(--element))}.impact-enemy{left:66%;top:26%}.impact-ally{left:19%;top:62%}.status-wave{position:absolute;font-size:30px;color:#d0adf1;text-shadow:2px 2px #536778;animation:status-rise .7s ease-out forwards}.battle-attack.ally{animation:ally-lunge .35s ease}.battle-attack.enemy{animation:enemy-lunge .35s ease}.capture-ball{position:absolute;left:20%;top:70%;width:29px;height:29px;border:4px solid #354e5a;border-radius:50%;background:linear-gradient(#d8686a 0 43%,#354e5a 43% 57%,#fff3d0 57%);animation:capture-arc 1.4s ease forwards;z-index:9}.capture-ball i{position:absolute;width:10px;height:10px;border:2px solid #354e5a;background:#fff7d4;border-radius:50%;left:5px;top:5px}@keyframes projectile-out{0%{opacity:0}10%{opacity:1}80%{left:71%;top:27%;opacity:1;transform:scale(.8) rotate(35deg)}100%{left:71%;top:27%;opacity:0;transform:scale(1.4)}}@keyframes projectile-in{0%{opacity:0}10%{opacity:1}80%{left:22%;top:65%;opacity:1;transform:scale(.8) rotate(-35deg)}100%{left:22%;top:65%;opacity:0;transform:scale(1.4)}}@keyframes impact-burst{0%,60%{opacity:0;transform:scale(.3)}75%{opacity:.9;transform:scale(.6)}100%{opacity:0;transform:scale(1.6)}}@keyframes status-rise{to{opacity:0;transform:translateY(-40px)}}@keyframes ally-lunge{50%{transform:translate(16px,-10px)}}@keyframes enemy-lunge{50%{transform:translate(-16px,10px)}}@keyframes capture-arc{0%{left:20%;top:70%;transform:rotate(0)}35%{left:49%;top:8%;transform:rotate(180deg)}60%{left:74%;top:35%;transform:rotate(360deg)}70%,90%{transform:rotate(15deg)}80%,100%{left:74%;top:45%;transform:rotate(-15deg)}}

@media(prefers-reduced-motion:reduce){.type-projectile,.impact-ring,.status-wave,.capture-ball{animation:none!important;display:none}.battle-attack{animation:none!important}}
/* v0.6: readable text on a 393 CSS-pixel iPhone viewport, adjustable touch controls. */
#game{--control-size:112px}#controls{height:var(--control-size)}#stick{width:var(--control-size);height:var(--control-size);flex:none}#nub{left:calc(50% - 26px);top:calc(50% - 26px)}#game.left-handed #controls{flex-direction:row-reverse}#controls,#interact,#team-shortcut{-webkit-user-select:none;user-select:none;touch-action:none}#viewport{touch-action:none}#sheet{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}#overlay{touch-action:pan-y}.rpg-body{overflow-wrap:anywhere}.rpg-screen button{min-height:44px}.rpg-screen .rpg-body{font-size:14px}.rpg-screen .rpg-body p,.rpg-screen .rpg-prompt{font-size:13px;line-height:1.55}.rpg-screen .rpg-body small,.pause-list small,.party-info>small{font-size:11px;line-height:1.45}.rpg-screen .rpg-body button{font-size:13px}.rpg-dialog .dialogue-text{font-size:16px!important;line-height:1.6}.rpg-head h2{font-size:17px!important}.rpg-head .rpg-back{min-width:44px;min-height:44px}.rpg-footer{font-size:11px}#objective b{font-size:12px}#objective span{font-size:11px}#battle-message{font-size:15px;line-height:1.5}#battle-actions button{font-size:14px}#battle-actions button small{font-size:11px}#quick-nav button{font-size:11px}header strong{font-size:15px}.party-info strong{font-size:14px}.party-slot{min-height:112px}.dex-list button{min-height:50px}.dex-filters{flex-wrap:wrap;gap:6px}.dex-filters input{min-width:120px;flex:1}.dex-filters select{min-width:100px}.storage-list{display:grid;gap:8px;margin:12px 0}.storage-row{display:flex;align-items:center;gap:8px;background:#edf0d9;border:2px solid #a8b8a1;padding:6px}.storage-row>img{width:52px;height:52px;object-fit:contain;image-rendering:pixelated}.storage-row>div{flex:1;min-width:0}.storage-row small{display:block}.storage-row button{padding:8px;min-width:44px}.bag-item{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:2px solid #bac7ad}.bag-item>div{flex:1}.bag-item h3{font-size:16px}.bag-item p{margin:8px 0}.bag-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.bag-tabs button{padding:9px 3px!important;font-size:11px!important;min-width:0}.move-description{display:block;font-size:11px;font-weight:normal;text-transform:none;line-height:1.4;margin-top:8px}.move-grid button{height:auto;min-height:165px}.rpg-body .field-row input[type=range]{min-width:120px;max-width:60%}.rpg-body .field-row label{font-size:14px}#game.compact-text .rpg-body{font-size:12px}#game.compact-text .rpg-body p,#game.compact-text .rpg-prompt{font-size:11px}#game.compact-text .rpg-body small{font-size:9px}#game.compact-text #objective b{font-size:10px}#game.compact-text #battle-message{font-size:12px}
@media(max-height:550px) and (orientation:landscape){#controls{bottom:calc(8px + env(safe-area-inset-bottom));height:90px}#stick{width:90px;height:90px}#world header{min-height:44px;height:44px;padding:4px 14px}#world #quick-nav{height:44px}.control-right{width:118px}.control-right button{min-height:40px!important;padding:7px}.rpg-screen{max-width:100%}}

.rpg-head{padding-top:calc(7px + env(safe-area-inset-top));padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}.rpg-footer{padding-bottom:calc(8px + env(safe-area-inset-bottom))}.rpg-dialog .rpg-head{padding-top:7px}.rpg-screen .rpg-prompt{font-size:13px!important}#game.compact-text .rpg-prompt{font-size:11px!important}.party-info .hp+small{font-size:11px}.rpg-body{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}

/* combat-polish.css */
/* Presentation only. Existing saves, mechanics and creature assets are retained. */
.battle-field{background:radial-gradient(ellipse at 74% 61%,#b8c29b 0 10%,transparent 11%),linear-gradient(#9bbebc 0%,#d5dfc2 40%,#728f69 41%,#aab888 72%,#c6c59c 100%);isolation:isolate}
.battle-field[data-arena=quarry]{background:radial-gradient(ellipse at 75% 61%,#b8af96 0 12%,transparent 13%),linear-gradient(#8caaa9 0%,#c8cbbb 35%,#68756c 36%,#a4a08a 65%,#c3b99b 100%)}
.battle-field[data-arena=gym]{background:repeating-linear-gradient(90deg,transparent 0 63px,#d5c6a326 64px 65px),linear-gradient(#526569 0%,#a8afa0 40%,#717e72 41%,#b7b498 100%)}
.battle-field[data-arena=archive]{background:repeating-linear-gradient(90deg,transparent 0 48px,#2d414c44 49px 51px),linear-gradient(#354e5b 0%,#7b9396 40%,#5f7577 41%,#a8b3a4 100%)}
.distant-trees{filter:drop-shadow(0 4px 2px #29453f40)}
.enemy-base,.ally-base{border:0;background:radial-gradient(ellipse,#283f404f,transparent 70%);box-shadow:none;height:10%}
.enemy-base{top:52%}.ally-base{bottom:0}
.battle-sprite{filter:drop-shadow(2px 5px 2px #1c363d55);transform-origin:50% 90%}
.monster-hud{background:linear-gradient(110deg,#fff7de,#e3e5cb);box-shadow:2px 4px #203a3938;border-color:#526e68;padding:8px 10px}
.combat-types{display:flex;gap:4px;align-items:center;min-height:22px;flex-wrap:wrap}.combat-types .type{font-size:9px;padding:2px 6px}
.monster-hud strong{overflow-wrap:anywhere;line-height:1.15}.monster-hud .row{align-items:flex-start}.monster-hud .row small{white-space:nowrap}
.monster-hud .xp{margin-top:5px}.monster-hud .hp{border:1px solid #647c6c;height:8px}
.move-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.move-choice{text-align:left;border:2px solid #9ba99b;border-left:5px solid var(--move-color);background:linear-gradient(#fff8df,#e8e5ce);padding:12px;min-height:112px;white-space:normal}
.move-choice .row{gap:6px;flex-wrap:wrap}.move-choice b{font-size:14px}.move-choice .type{font-size:9px}.move-category{display:block;margin:9px 0 5px;font-size:12px;font-weight:700}.move-choice small{display:block;line-height:1.5;font-size:11px}.move-hint{font-size:12px;line-height:1.5;margin-top:13px;color:#465d60}
.move-choice:disabled{opacity:.5}.move-choice:focus-visible,#battle-actions button:focus-visible{outline:3px solid #2f7288;outline-offset:2px}
.battle-console{background:linear-gradient(#ece3c0,#fff5db)}#battle-actions button{min-height:52px}#battle-actions button:active:not(:disabled){transform:translateY(1px);filter:brightness(.95)}
.combat-heal{animation:combat-heal .5s ease}.healing-ring{position:absolute;width:30%;height:18%;border:3px solid #c9efb4;border-radius:50%;box-shadow:0 0 20px #b9e5a9;animation:combat-ring .5s ease forwards}
@keyframes combat-heal{50%{filter:brightness(1.3) drop-shadow(0 0 10px #b4dd9b)}}@keyframes combat-ring{from{transform:scale(.4);opacity:.9}to{transform:scale(1.3);opacity:0}}
@media(max-width:360px){.move-grid{grid-template-columns:1fr}.move-choice{min-height:96px}.monster-hud{width:54%;padding:6px}.monster-hud strong{font-size:12px}.combat-types{min-height:19px}}
@media(max-height:500px) and (orientation:landscape){#battle{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.85fr);grid-template-rows:auto 1fr}.battle-heading{grid-column:1/-1;padding-top:max(5px,env(safe-area-inset-top))}.battle-field{min-height:0}.battle-console{border-top:0;border-left:3px solid #466a6a;overflow:auto;padding:8px max(10px,env(safe-area-inset-right)) 8px 10px}#battle-message{font-size:12px;min-height:0;padding:7px;margin-bottom:7px}#battle-actions{gap:5px}#battle-actions button{min-height:46px;font-size:12px;padding:6px}.monster-hud strong{font-size:12px}.monster-hud .type{font-size:8px}.monster-hud small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.combat-heal,.healing-ring{animation:none!important}.type-projectile,.impact-ring{animation:none!important}}
.move-choice{display:flex;flex-direction:column;gap:6px;min-width:0}.move-choice>strong{font-size:15px;overflow-wrap:anywhere;line-height:1.3}.move-choice>.type{align-self:flex-start}.move-choice small{margin:0}.move-description{display:block;font-size:12px;line-height:1.45;border-top:1px solid #b5bea8;padding-top:7px;margin-top:3px}.move-original{font-size:11px;margin-top:3px;border-top:1px solid #b5bea8;padding-top:7px}.move-original summary{cursor:pointer;line-height:1.4;min-height:28px}.move-original p{font-size:11px;line-height:1.5;margin:6px 0 0}.battle-entering .battle-sprite.enemy{animation:enter-enemy .36s ease-out}.battle-entering .battle-sprite.ally{animation:enter-ally .36s ease-out}.battle-entering .monster-hud{animation:enter-hud .28s ease-out}
@keyframes enter-enemy{from{opacity:0;transform:translate(60px,-8px)}to{opacity:1;transform:translate(0)}}@keyframes enter-ally{from{opacity:0;transform:translate(-65px,10px)}to{opacity:1;transform:translate(0)}}@keyframes enter-hud{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.battle-entering .battle-sprite,.battle-entering .monster-hud{animation:none!important}}

/* exploration-art.css */
/* Exploration presentation only. All selectors are scoped away from combat. */
#world header{background:linear-gradient(#f6eed6,#e8e3c8)}#viewport{box-shadow:inset 0 0 25px #244e431c}#nearby{border-radius:4px;background:#f9efd4;color:#39575b;border-color:#6f897c}#objective{background:#faf3dfef;box-shadow:2px 3px #264e4333}#stick{background:#d2dec79c;border-color:#eee9cd}#nub{background:linear-gradient(#f8edc9,#c9c79d);border-color:#eee3be}#interact{background:linear-gradient(#e4cc92,#ceae6f);border-color:#947f57}
.dialogue-scene{display:flex;gap:12px;align-items:flex-start}.dialogue-portrait{width:72px;height:72px;flex:none;image-rendering:pixelated;border:2px solid #577679;box-shadow:2px 3px #2d4c5540;object-fit:cover}.dialogue-scene>div{min-width:0;flex:1}.dialogue-scene .dialogue-text{margin-top:4px!important}.rpg-dialog .rpg-body{padding:12px}.rpg-dialog .dialogue-text{min-height:0}.rpg-dialog .dialogue-scene button{width:100%}.rpg-dialog{max-height:64dvh}.rpg-dialog .rpg-head h2{font-size:17px}
#viewport.area-arriving:after{content:'';position:absolute;inset:0;background:#e5e0cb;pointer-events:none;z-index:8;animation:area-arrival .16s ease-out forwards}@keyframes area-arrival{from{opacity:.8}to{opacity:0}}
@media(max-width:360px){.dialogue-portrait{width:56px;height:56px}.dialogue-scene{gap:8px}}
@media(prefers-reduced-motion:reduce){#viewport.area-arriving:after{display:none}}

/* adventure-upgrade.css */
/* Fixed mobile title; decorative animation never changes gameplay or input. */
#title{background:#101f36}.title-art.aurora-sky{background:linear-gradient(#12243d,#244a60 52%,#163d40);overflow:hidden}.aurora-stars{position:absolute;inset:0;background-image:radial-gradient(circle,#f1eac8 1px,transparent 2px),radial-gradient(circle,#adddc9 1px,transparent 2px);background-size:79px 113px,137px 91px;background-position:11px 17px,41px 31px;opacity:.55;animation:sky-glimmer 5s ease-in-out infinite alternate}.aurora-ribbon{position:absolute;inset:-15% -30% 25%;background:conic-gradient(from 155deg at 50% 15%,transparent 0 8%,#a9dbc738 13%,#70bfb455 20%,transparent 27%);filter:blur(10px);transform:rotate(-14deg);animation:aurora-sway 9s ease-in-out infinite alternate}.aurora-mountains{position:absolute;inset:52% -5% -2%;background:#172e3c;clip-path:polygon(0 24%,18% 3%,31% 27%,54% 0,72% 25%,86% 12%,100% 34%,100% 100%,0 100%)}
#title .title-copy{position:absolute;inset:0;display:grid;grid-template-rows:auto auto minmax(90px,1fr) auto auto;align-items:center;gap:8px;padding:calc(24px + env(safe-area-inset-top)) 24px calc(14px + env(safe-area-inset-bottom));text-shadow:none}#title .eyebrow{font-size:9px;letter-spacing:2px;color:#b9d9d2}#title h1{margin:5px 0 0;font-size:clamp(28px,8vw,45px);line-height:1.05;letter-spacing:2px;color:#fff1c6;text-shadow:0 4px #102c3e;align-self:start}#title h1 span{display:block;font-size:1.15em;color:#9ce0c5;letter-spacing:3px;margin-top:3px}
.title-duel{position:relative;min-height:90px;align-self:stretch;width:min(100%,410px);margin:auto;isolation:isolate;overflow:hidden}.duel-orbit{position:absolute;inset:18% 9%;border:1px solid #94d5c244;border-radius:50%;transform:rotate(-14deg);box-shadow:0 0 30px #8ddcc013,inset 0 0 35px #bce9ce10}.duel-mon{position:absolute;width:57%;height:85%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 9px 5px #06172277)}.duel-left{left:-2%;top:0;animation:title-left 5s ease-in-out infinite}.duel-right{right:-2%;top:10%;transform:scaleX(-1);animation:title-right 5s ease-in-out infinite}.duel-spark{position:absolute;left:48%;top:45%;width:7px;height:7px;background:#f4e4a8;box-shadow:0 0 25px 10px #d8d7b044;transform:rotate(45deg);animation:title-spark 5s ease-in-out infinite}.duel-caption{position:absolute;bottom:0;left:0;right:0;font-size:9px;letter-spacing:2px;color:#b8d1c8}
#title .title-actions{display:flex;flex-direction:column;gap:9px;width:min(100%,340px);margin:auto}#title .title-actions button{margin:0;width:100%;min-height:47px;font-size:14px;border-radius:12px;background:#253f52;color:#e0e8d6;border:1px solid #8ac6b66b;box-shadow:0 4px #091b2a88}#title .title-actions .primary{background:linear-gradient(#eadba7,#cfb97c);border-color:#f2e8bd;color:#1d3c43;font-weight:900}#title .title-actions .title-import{min-height:28px;padding:4px;background:transparent;border:0;box-shadow:none;font-size:11px;color:#b9d2d0}#title .title-copy>small{margin:0;font-size:9px;line-height:1.6;color:#abc3c3}
.region-selector{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:14px}.region-selector button{font-size:11px;min-height:34px;padding:7px 9px}.region-selector .selected{background:#3e6c72;color:#fff3ce}.starter-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.starter-choices button{display:flex;align-items:center;flex-direction:column;gap:8px;padding:9px 3px;min-width:0}.starter-choices img{width:100%;max-width:96px;image-rendering:pixelated}.starter-choices strong{font-size:12px;overflow-wrap:anywhere}.starter-choices .type{font-size:8px;padding:2px 4px}.starter-confirm{text-align:center}.starter-confirm img{width:140px;image-rendering:pixelated}.campaign-cards{display:grid;gap:12px}.campaign-cards .campaign{text-align:left;padding:18px;border:2px solid #719c91;min-height:130px}.campaign-cards strong,.campaign-cards span,.campaign-cards small{display:block}.campaign-cards span{font-size:10px;letter-spacing:1px}.campaign-cards strong{font-size:21px;margin:8px 0}.campaign-cards small{line-height:1.5}.campaign-cards .rocket{background:#d5d7db;border-color:#747a92}
.habitat-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.habitat-card{position:relative;overflow:hidden;border:2px solid #718f82;background:linear-gradient(#9bbec0 0 45%,#98ac78 46%);min-height:118px;padding:68px 9px 8px}.habitat-card i{position:absolute;left:10%;right:10%;top:20px;height:45px;background:#486e55;clip-path:polygon(0 100%,12% 45%,25% 65%,35% 10%,51% 65%,66% 18%,84% 60%,95% 35%,100% 100%)}.habitat-card b,.habitat-card small{position:relative;display:block;background:#f4eed1d9;padding:3px 5px;font-size:12px}.habitat-card small{font-size:10px}.habitat-card[data-biome=coast],.habitat-card[data-biome=wetlands]{background:linear-gradient(#b6d2cc 0 40%,#68a4ad 41% 74%,#d9c699 75%)}.habitat-card[data-biome=coast] i{background:repeating-linear-gradient(0deg,#b9d9ca 0 2px,transparent 2px 12px);clip-path:none;top:46px;height:25px}.habitat-card[data-biome=mountain] i{background:#6c7f84}.habitat-card[data-biome=snow]{background:linear-gradient(#b7cdd5,#e8e8d8)}.habitat-card[data-biome=snow] i{background:#eaf3e6}.habitat-card[data-biome=volcano]{background:linear-gradient(#ac897a,#605951 50%,#b08054)}.habitat-card[data-biome=volcano] i{background:#5d5b59}.habitat-card[data-biome=ruins]{background:linear-gradient(#84939d,#797b76)}.habitat-card[data-biome=ruins] i{background:repeating-linear-gradient(90deg,#b5bca3 0 15px,transparent 15px 24px);clip-path:none}.habitat-card[data-biome=meadow] i{background:#a9bb82;clip-path:ellipse(55% 35% at 50% 100%)}.block{display:block}.evolution-ready button{display:flex;align-items:center;gap:15px;width:100%;margin:8px 0}.evolution-ready img{width:72px;image-rendering:pixelated}.original-family-preview{display:flex;gap:5px;justify-content:center}.original-family-preview div{width:33%;text-align:center}.original-family-preview img{width:100%;max-width:128px;image-rendering:pixelated}.original-family-preview b{font-size:11px;display:block}.star-map{text-align:center;color:#567b91;line-height:2;font-size:30px;background:#172d43;border:3px solid #719698;margin-bottom:15px}
@keyframes title-left{0%,100%{transform:translateY(0)}40%{transform:translate(5px,-6px)}50%{transform:translate(14px,-3px)}60%{transform:translate(0,0)}}@keyframes title-right{0%,100%{transform:scaleX(-1)}45%{transform:translateY(-4px) scaleX(-1)}55%{transform:translate(4px,1px) scaleX(-1)}}@keyframes title-spark{0%,43%,62%,100%{opacity:.15;transform:scale(.5) rotate(45deg)}50%{opacity:1;transform:scale(2) rotate(135deg)}}@keyframes sky-glimmer{to{opacity:.85}}@keyframes aurora-sway{to{transform:rotate(-5deg) translateX(4%)}}
@media(max-height:620px){#title .title-copy{gap:4px;padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:calc(8px + env(safe-area-inset-bottom))}#title h1{font-size:25px}#title .eyebrow{font-size:8px}#title .title-actions button{min-height:39px}#title .title-copy>small{font-size:8px}.duel-caption{font-size:8px}}@media(max-height:440px) and (orientation:landscape){#title .title-copy{grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr auto;column-gap:24px}#title .eyebrow{grid-column:1}#title h1{grid-column:1;grid-row:2;align-self:center}#title .title-duel{grid-column:2;grid-row:1/3}#title .title-actions{grid-column:1/3;display:grid;grid-template-columns:1fr 1fr 1fr}#title .title-copy>small{grid-column:1/3}}
@media(prefers-reduced-motion:reduce){.aurora-stars,.aurora-ribbon,.duel-mon,.duel-spark{animation:none!important}}
.battle-field[data-arena=route][data-biome=coast]{background:linear-gradient(#abd1cc 0 43%,#5d9faf 44% 69%,#d8ce9b 70%)}.battle-field[data-arena=route][data-biome=snow]{background:linear-gradient(#a0beca 0 45%,#e4e9d9 46%)}.battle-field[data-arena=route][data-biome=volcano]{background:linear-gradient(#a18d82 0 40%,#6a615b 41%,#ac8c6f)}.battle-field[data-arena=route][data-biome=ruins]{background:repeating-linear-gradient(90deg,transparent 0 58px,#b4bca34d 59px 78px),linear-gradient(#536b7a 0 42%,#8b998a 43%,#b4b49a)}.battle-field[data-arena=route][data-biome=mountain]{background:linear-gradient(#9db6bd 0 39%,#7c8a83 40% 58%,#b6b49c 59%)}.battle-field[data-arena=route][data-biome=wetlands]{background:linear-gradient(#a4bdb1 0 45%,#658c80 46%,#9bb18b)}

/* living-world.css */
/* Readable mobile UI, scoped to the existing game shell. */
.rpg-body{font-size:14px;line-height:1.5}.rpg-head h2{font-size:19px;letter-spacing:.5px}.rpg-body .rpg-prompt{font-size:14px!important;line-height:1.5}.rpg-body button{min-height:44px}.rpg-body .pause-list button{font-size:14px;padding:13px}.rpg-footer{font-size:11px}.rpg-body p{line-height:1.55}.dialogue-scene{gap:14px}.dialogue-portrait{width:82px;height:82px}.rpg-dialog .dialogue-text{font-size:15px;line-height:1.6}.rpg-dialog .rpg-head h2{font-size:17px}.rpg-screen{display:flex;flex-direction:column;overflow:hidden}.rpg-screen .rpg-head,.rpg-screen .rpg-footer{flex:none}.rpg-screen .rpg-body{overflow-y:auto;min-height:0;overscroll-behavior:contain}.rpg-body button:active:not(:disabled){transform:translateY(1px);filter:brightness(.95)}.rpg-body button:focus-visible{outline:3px solid #477f92;outline-offset:2px}
.science-readout{padding:20px;background:linear-gradient(130deg,#284c61,#467c7d);color:#e1ebcf;border:3px solid #9bb7a4;text-align:center;box-shadow:inset 0 0 0 2px #557f83}.science-readout>span{display:block;font-size:11px;letter-spacing:1px}.science-readout strong{display:block;font-size:38px;margin:10px}.science-readout p{font-size:13px}
.starter-stage .starter-choices{gap:8px}.starter-stage .starter-choices button{border:2px solid #8aa99b;background:linear-gradient(#e4ebd6,#b9d2c2);box-shadow:0 3px #6c8d84;padding:14px 4px}.starter-stage .starter-choices img{max-width:110px;filter:drop-shadow(0 5px 2px #395d5a33);animation:starter-idle 2.8s ease-in-out infinite}.starter-stage .starter-choices button:nth-child(2) img{animation-delay:-.8s}.starter-stage .starter-choices button:nth-child(3) img{animation-delay:-1.6s}.starter-stage .starter-choices strong{font-size:13px}.starter-confirm{position:relative}.starter-confirm>img{width:160px;height:160px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 7px 4px #547f7933);animation:partner-arrives .28s ease-out}.starter-description{font-size:14px;margin:10px auto;max-width:320px}.starter-traits{margin:14px auto;max-width:320px;padding:12px;background:#dce6cf;border:1px solid #9fb29e;text-align:left}.starter-traits>div{display:grid;grid-template-columns:90px 1fr 25px;align-items:center;gap:8px;font-size:12px;margin:6px 0}.starter-traits i{height:7px;background:#b3c6b0;border-radius:3px;overflow:hidden}.starter-traits b{display:block;height:100%;background:#588a8d}.starter-traits small{text-align:right}
.living-bag .bag-tabs{gap:5px}.living-bag .bag-tabs button{font-size:12px;min-height:51px}.living-bag .bag-tabs button:before{content:'';display:block;width:14px;height:11px;border:2px solid currentColor;border-radius:3px;margin:0 auto 4px;opacity:.75}.living-bag .bag-tabs button:nth-child(2):before{width:13px;height:13px;border-radius:50%;background:linear-gradient(transparent 45%,currentColor 46% 55%,transparent 56%)}.living-bag .bag-tabs button:nth-child(3):before{border-radius:0;transform:rotate(45deg);width:10px;height:10px}.living-bag .bag-tabs button:nth-child(4):before{border-radius:6px 1px 1px 6px}.living-bag .bag-item{position:relative;padding:14px 12px 14px 44px;background:#e4e9d2;border:1px solid #a3b5a0;border-radius:6px;margin-bottom:9px}.living-bag .bag-item:before{content:'';position:absolute;left:13px;top:20px;width:18px;height:24px;background:linear-gradient(#aec7bc 0 20%,#668d91 21% 85%,#4b6c79 86%);border:2px solid #52717a;border-radius:4px}.living-bag .bag-item h3{font-size:15px;line-height:1.4}.living-bag .bag-item p{font-size:13px;margin:7px 0}.living-bag button:disabled{opacity:.45;filter:grayscale(.4)}
#controls{background:linear-gradient(#d3dfcc,#b4cab9);border-top-color:#527a78}#stick{box-shadow:inset 0 2px 8px #39625d25,0 3px #6b8f7d33}#interact:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px #8f7b4e}#interact:disabled{opacity:.45}
#title.quiet-title .aurora-stars,#title.quiet-title .aurora-ribbon,#title.quiet-title .duel-mon,#title.quiet-title .duel-spark{animation:none!important}
@keyframes starter-idle{50%{transform:translateY(-3px)}}@keyframes partner-arrives{from{opacity:.25;transform:translateY(9px) scale(.92)}to{opacity:1;transform:none}}
@media(max-width:360px){.dialogue-portrait{width:64px;height:64px}.rpg-body{padding-left:12px;padding-right:12px}.rpg-dialog .dialogue-text{font-size:14px}.starter-stage .starter-choices strong{font-size:11px}.living-bag .bag-tabs button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.starter-stage .starter-choices img,.starter-confirm>img{animation:none!important}}

/* volume-world.css */
#volume-map{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;image-rendering:auto}#volume-controls{position:absolute;bottom:10px;right:9px;display:flex;gap:5px;z-index:4}#volume-controls button{min-width:42px;min-height:40px;padding:7px 10px;background:#eceddbed;border:2px solid #63898b;color:#2d535f;border-radius:8px;box-shadow:0 2px #365c6244;font-size:13px}#volume-controls button:active{transform:translateY(1px)}.volume-options{margin-top:18px;padding:14px;background:#dce7d4;border:1px solid #9cb7a4}.volume-options>button{width:100%}#viewport>#objective,#viewport>#map-button,#viewport>#nearby,#viewport>#world-hint{z-index:3}#viewport>#nearby{max-width:58%}@media(max-width:360px){#volume-controls{bottom:6px;right:5px;gap:3px}#volume-controls button{padding:6px;min-width:38px;font-size:12px}}

#viewport.volume-enabled>#world-hint{bottom:60px}#viewport.volume-enabled>#nearby{max-width:48%}
/* 0.7.1: overlay controls reclaim the former handheld panel for the 3D world. */
#world.immersive-world{background:#b1c8ba}#world.immersive-world header{position:absolute;top:0;left:0;right:0;height:auto;min-height:calc(54px + env(safe-area-inset-top));padding:calc(7px + env(safe-area-inset-top)) 12px 7px;background:#eff1dfed;border:0;box-shadow:0 1px 8px #24434a22;z-index:5}#world.immersive-world header strong{font-size:14px}
#world.immersive-world #viewport{position:absolute;inset:0;border:0}#world.immersive-world #objective{top:calc(65px + env(safe-area-inset-top));min-height:44px;border:1px solid #d7e1cb;border-radius:12px;background:#edf1dfdf;box-shadow:0 3px 14px #27494a18;backdrop-filter:blur(6px);padding:8px 10px}#world.immersive-world #objective b{font-size:12px}#world.immersive-world #map-button{top:calc(65px + env(safe-area-inset-top));border:1px solid #d7e1cb;border-radius:12px;background:#edf1dfdf}
#world.immersive-world #controls{position:absolute;left:14px;right:14px;bottom:calc(68px + env(safe-area-inset-bottom));height:max(112px,var(--control-size,112px));min-height:0;padding:0;background:none;border:0;pointer-events:none;align-items:flex-end;gap:12px}#world.immersive-world #stick{flex:none;width:var(--control-size,112px);height:var(--control-size,112px);border-radius:50%;border:2px solid #e3edda99;background:#355e6550;box-shadow:inset 0 0 0 7px #eff1da18,0 3px 12px #1b3c4030;pointer-events:auto}#world.immersive-world #nub{width:38%;height:38%;left:31%;top:31%;border-radius:50%;border:2px solid #e9e9cdcc;background:#dee5c8bb;box-shadow:0 3px 8px #264c4566;opacity:1}#world.immersive-world .cross{font-size:18px;opacity:.55}
#world.immersive-world .control-right{width:112px;pointer-events:auto;gap:8px}#world.immersive-world #interact{min-height:52px;border:1px solid #e0cd99;border-radius:28px;background:#f0d693eb;box-shadow:0 3px 12px #233f4633;font-size:12px;padding:9px}#world.immersive-world #interact:disabled{opacity:.35}#world.immersive-world #team-shortcut{min-height:44px;background:#edf1dfd9;border:1px solid #d7e1cb;border-radius:24px;font-size:11px}
#world.immersive-world #quick-nav{position:absolute;left:12px;right:12px;bottom:calc(8px + env(safe-area-inset-bottom));padding:0;background:none;gap:6px;z-index:4}#world.immersive-world #quick-nav button{min-height:46px;border:1px solid #d7e1cb;border-radius:13px;background:#edf1dfdc;box-shadow:0 2px 8px #24434a22;font-size:10px}#world.immersive-world #quick-nav b{font-size:15px}
#world.immersive-world #volume-controls{bottom:calc(224px + env(safe-area-inset-bottom));right:12px;gap:5px}#world.immersive-world #volume-controls button{min-width:44px;min-height:44px;padding:7px;border:1px solid #c7d8c8;border-radius:13px;background:#e7eedbca;font-size:12px}#world.immersive-world #nearby{bottom:calc(245px + env(safe-area-inset-bottom));left:12px;transform:none;max-width:54%;white-space:normal;border:0;border-radius:9px;background:#edf1dfd9;font-size:12px}#world.immersive-world #world-hint{bottom:calc(285px + env(safe-area-inset-bottom));left:18px;right:18px;font-size:12px}
#game.left-handed #world.immersive-world #controls{flex-direction:row-reverse}
#battle-volume{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}#battle-field.arena-volume .battle-sprite,#battle-field.arena-volume .enemy-base,#battle-field.arena-volume .ally-base,#battle-field.arena-volume .distant-trees{visibility:hidden}#battle-field.arena-volume .monster-hud{z-index:3}#battle-field.arena-volume #battle-effect{visibility:hidden}
@media(max-height:600px){#world.immersive-world #controls{height:100px}#world.immersive-world #volume-controls{bottom:calc(180px + env(safe-area-inset-bottom))}#world.immersive-world #nearby{bottom:calc(195px + env(safe-area-inset-bottom))}#world.immersive-world #world-hint{bottom:calc(235px + env(safe-area-inset-bottom))}}

#world.immersive-world #viewport{touch-action:none}

/* cinema-ui.css */
/* 0.8: stationary mobile menu over a real-time 3D showcase. */
#title.cinema-title{background:#0b192c;color:#edf4ef;overflow:hidden;font-family:ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,sans-serif}.cinema-backdrop{position:absolute;inset:0;background:radial-gradient(ellipse at 18% 32%,#da77342e,transparent 45%),radial-gradient(ellipse at 85% 33%,#50c8b32b,transparent 43%),linear-gradient(#102d3f,#091425)}#cinema-canvas{position:absolute;top:0;left:0;width:100%;height:68%;z-index:1;pointer-events:none;image-rendering:auto}.cinema-shade{position:absolute;inset:0;z-index:2;background:linear-gradient(#0b192c33 0%,transparent 18%,transparent 39%,#0b192caa 59%,#0b192c 76%);pointer-events:none}.cinema-ui{position:absolute;inset:0;z-index:3;padding:calc(20px + env(safe-area-inset-top)) 22px calc(12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;pointer-events:none}.cinema-ui button{pointer-events:auto}.cinema-brand{text-align:center}.cinema-brand .eyebrow{font-size:8px;color:#a4cecf;letter-spacing:2px}.cinema-brand h1{font-family:ui-rounded,system-ui,sans-serif;font-size:clamp(27px,8vw,45px);font-weight:950;letter-spacing:4px;line-height:1.05;color:#fff2ce;margin:9px 0;text-shadow:0 3px 20px #0006}.cinema-brand h1 span{font:600 clamp(18px,5vw,25px) ui-rounded,system-ui,sans-serif;letter-spacing:7px;color:#7cdbce;margin-top:5px}.cinema-scene-info{margin-top:auto;display:flex;justify-content:center;align-items:center;gap:7px;font-size:10px;letter-spacing:.5px;color:#acd6d3;padding-bottom:13px;text-shadow:0 2px 4px #0008}.cinema-live-dot{width:5px;height:5px;border-radius:50%;background:#7bd9bd;box-shadow:0 0 9px #7bd9bd}.cinema-menu{display:grid;gap:9px;width:min(100%,370px);align-self:center}.cinema-menu>button{display:flex;align-items:center;gap:14px;min-height:60px;padding:12px 16px;border-radius:16px;border:1px solid #769caa66;background:linear-gradient(110deg,#23485ae6,#172c44ee);color:#f0f5e9;text-align:left;box-shadow:0 5px 18px #0003;font-size:15px}.cinema-menu>button>span:nth-child(2){flex:1}.cinema-menu>button b{color:#99bfc5;font-size:19px}.cinema-menu>button small{display:block;font-size:10px;font-weight:400;color:#a5c3c5;line-height:1.4;margin-top:3px}.cinema-menu .menu-symbol{width:31px;text-align:center;font-size:24px;color:#90d5c9}.cinema-menu>button.cinema-primary{background:linear-gradient(110deg,#f5d58d,#d4ad67);color:#1b3945;border-color:#ffdfa4;box-shadow:0 5px 22px #f2be501c}.cinema-menu .cinema-primary small,.cinema-menu .cinema-primary b,.cinema-primary .menu-symbol{color:#49666b}.cinema-primary:disabled{background:#263c4e;border-color:#4a6474;color:#a9bdc4;opacity:.7}.cinema-menu-secondary{display:grid;grid-template-columns:1fr 1fr;gap:9px}.cinema-menu-secondary button{border:1px solid #5b7c8d66;background:#162c42dc;color:#b9d6d6;font-size:12px;min-height:46px;border-radius:13px;padding:9px 7px}.cinema-menu>button.cinema-import{justify-content:center;min-height:30px;padding:5px;background:none;border:0;font-size:11px;color:#83aaaf;box-shadow:none}.cinema-version{text-align:center;color:#617e90;font-size:9px;line-height:1.3}
#sheet.cinematic-select{font-family:ui-rounded,system-ui,-apple-system,sans-serif;background:linear-gradient(145deg,#132d43,#0c1c31);border:1px solid #547b8c;border-radius:22px;color:#e7f1ed;box-shadow:0 20px 70px #0007,inset 0 1px #91c2c433;max-height:calc(100dvh - 36px);padding:0;overflow:hidden}#sheet.cinematic-select .rpg-head{background:none;border:0;padding:17px 17px 10px;min-height:56px;color:#c0ddd9}#sheet.cinematic-select .rpg-head h2{font:800 14px ui-rounded,system-ui,sans-serif!important;letter-spacing:1px;color:#d7e7df}#sheet.cinematic-select .screen-marker{color:#d2b779;font-size:12px}#sheet.cinematic-select .rpg-back{min-width:44px;min-height:44px;border:1px solid #6d9b9c66;border-radius:50%;background:#2d5362;color:#c8dfdb;font:700 15px system-ui}#sheet.cinematic-select .rpg-footer{background:#0a192c;color:#688d9d;border:0;font:10px system-ui;padding:10px 17px}#sheet.cinematic-select .rpg-body{padding:6px 17px 17px;font:14px/1.5 ui-rounded,system-ui,sans-serif}#sheet.cinematic-select .rpg-body p{font:13px/1.5 ui-rounded,system-ui,sans-serif;color:#9fc3c7;background:none;border:0;padding:0}#sheet.cinematic-select .selection-lead{text-align:center;font-size:13px;margin:0 0 14px;color:#a1c7c8}#sheet.cinematic-select button{font-family:inherit}#sheet.cinematic-select .hero-campaigns{display:grid;gap:12px}.hero-campaign{position:relative;display:flex;align-items:center;min-height:172px;overflow:hidden;border:1px solid #4ba5b2;border-radius:17px;background:radial-gradient(ellipse at 10% 40%,#367f9655,transparent 70%),linear-gradient(120deg,#204d60,#152c44);color:#d3e8e5;padding:9px 12px 9px 0;text-align:left;box-shadow:inset 0 1px #b9e6db22,0 4px 12px #0002;isolation:isolate}.hero-campaign.rocket{border-color:#a478bd;background:radial-gradient(ellipse at 10% 40%,#a153a450,transparent 70%),linear-gradient(120deg,#483760,#20273f)}.hero-campaign:before{content:'';position:absolute;left:-30px;top:-25px;width:190px;height:190px;border:1px solid #8ecdc52b;border-radius:50%;z-index:-1;box-shadow:0 0 0 15px #95c3c509,0 0 0 30px #95c3c505}.hero-campaign>svg{width:116px;height:152px;flex:none;filter:drop-shadow(0 5px 8px #0005)}.hero-copy{display:flex;flex-direction:column;gap:7px;min-width:0}.hero-copy>small{font-size:8px;letter-spacing:1px;color:#8bd9d0}.rocket .hero-copy>small{color:#d6a9e5}.hero-copy strong{font-size:20px;line-height:1.1;color:#f8f0da}.hero-copy>span{font-size:11px;line-height:1.5;color:#9fc5c8;font-weight:400}.hero-copy b{font-size:11px;color:#f0cf84;margin-top:4px}.trainer-idle{transform-origin:70px 165px;animation:trainer-breathe 3.5s ease-in-out infinite}.rocket .trainer-idle{animation-delay:-1.2s}.hero-campaign:active:not(:disabled){filter:brightness(1.2);transform:scale(.985)}#sheet.cinematic-select .cinema-back{width:100%;background:none;border:0;color:#94b6c2;min-height:44px;padding:12px;font-size:12px;margin-top:8px}#sheet.cinematic-select .credits-star{font-size:42px;text-align:center;color:#f0cd80}#sheet.cinematic-select h3{color:#e6dbb8;margin:8px 0 16px}#sheet.cinematic-select .rpg-body>button:not(.hero-campaign):not(.cinema-back){border-radius:12px;border:1px solid #67969c;background:#285466;color:#e5ece0;min-height:46px;padding:12px;font-size:13px}
.cinema-region{display:flex;align-items:center;justify-content:center;gap:14px;margin:6px 0 17px}.cinema-region>button{min-width:44px;min-height:44px;border-radius:50%;border:1px solid #497c91;background:#224859;color:#aad7d3;font-size:26px;padding:3px}.cinema-region label{display:grid;text-align:center;font-size:9px;letter-spacing:1px;color:#7aa4b4}.cinema-region select{background:none;border:0;color:#eadcae;font-size:19px;font-weight:700;padding:4px 7px;max-width:160px}.cinema-region option{background:#183b51}.cinema-starters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.cinema-starters>button{position:relative;border:1px solid color-mix(in srgb,var(--partner),#3d6578 50%);border-radius:15px;background:radial-gradient(ellipse at 50% 30%,color-mix(in srgb,var(--partner) 24%,transparent),transparent 65%),#18394b;color:#e9f0dd;padding:10px 3px;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;overflow:hidden}.partner-stage{height:126px;position:relative;display:grid;place-items:center;width:100%}.partner-stage>i{position:absolute;bottom:6px;left:9%;right:9%;height:25px;border:1px solid var(--partner);border-radius:50%;background:color-mix(in srgb,var(--partner) 16%,transparent);box-shadow:0 0 20px color-mix(in srgb,var(--partner) 16%,transparent)}.partner-stage img{position:relative;width:100%;height:108px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 6px 8px #0005);animation:partner-hover 2.6s ease-in-out infinite}.cinema-starters>button:nth-child(2) img{animation-delay:-.8s}.cinema-starters>button:nth-child(3) img{animation-delay:-1.6s}.cinema-starters strong{font-size:12px;line-height:1.2;overflow-wrap:anywhere}.cinema-starters>button>small{font-size:9px;color:#b9cfd0}.cinema-starters .type{font:700 8px system-ui;padding:3px 4px;border-radius:5px}.cinema-starters>button:active{box-shadow:0 0 22px color-mix(in srgb,var(--partner) 50%,transparent)}#sheet.cinematic-select .selection-note{text-align:center;font-size:10px;line-height:1.6;color:#749fae;margin:15px 0 0}#sheet.cinematic-confirm .starter-confirm{background:radial-gradient(ellipse,#2e6b7155,transparent 70%);padding:6px;text-align:center}#sheet.cinematic-confirm .starter-traits{background:#16374a;border:1px solid #39647a;border-radius:12px;color:#b5d2ce}#sheet.cinematic-confirm .starter-description{font-size:12px!important}#sheet.cinematic-confirm .starter-traits i{background:#284f62}#sheet.cinematic-confirm .starter-traits b{background:linear-gradient(90deg,#55a8b7,#b9d68c)}
/* Clearer, more colourful battle console and travelling VFX. */
.battle-heading{background:#132e45;color:#c8e0dd;border:0;font-family:system-ui;letter-spacing:1px}.battle-heading button{background:#25485d;color:#c5e1df;border-radius:50%;border:1px solid #668891}.battle-console{background:linear-gradient(#1b3b50,#11283d);border-top:1px solid #718e92;padding-top:10px}.battle-console #battle-message{font-family:ui-rounded,system-ui,sans-serif;background:#10293d;color:#d9e9df;border:1px solid #436b7d;border-radius:12px;font-size:14px;min-height:54px}.battle-console #battle-actions>button{position:relative;border:1px solid #537b8c;border-radius:13px;color:#e8f0e5;background:linear-gradient(120deg,#2d6174,#1b405a);box-shadow:inset 0 1px #96c6c344;font-family:ui-rounded,system-ui,sans-serif;overflow:hidden}.battle-console #battle-actions>button.fight{background:linear-gradient(110deg,#bd6a48,#8c494c);border-color:#dc9560}.battle-console #battle-actions>button.ball{background:linear-gradient(110deg,#4f947c,#2c626b);border-color:#77bbaa}.battle-console #battle-actions>button small{color:#b3d1d3}.monster-hud{font-family:ui-rounded,system-ui,sans-serif;background:#f1f4e1e8;border:1px solid #adc6b6;border-radius:12px;box-shadow:0 4px 15px #24454c22}.monster-hud .hp{height:9px;background:#b6c7b5}.monster-hud .hp i{background:linear-gradient(90deg,#3d9a86,#9fd19b)}.monster-hud .hp.low i{background:linear-gradient(90deg,#d08d49,#e9c36b)}.monster-hud .hp.critical i{background:linear-gradient(90deg,#b85b65,#e39b89)}#attack-flight{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:6}.flight-active #battle-effect .type-projectile,.flight-active #battle-effect .impact-ring{visibility:hidden}.battle-field.flight-active{isolation:isolate}.move-choice{border-radius:13px!important;background:linear-gradient(130deg,#e9efdb,#d5e4d8);border-color:#8fb8ae!important}.move-choice>.type{box-shadow:0 2px 7px #254c4c22}
@keyframes trainer-breathe{50%{transform:translateY(-2px) rotate(.5deg)}}@keyframes partner-hover{50%{transform:translateY(-7px)}}
@media(max-height:680px){.cinema-ui{padding-top:calc(11px + env(safe-area-inset-top));padding-bottom:calc(7px + env(safe-area-inset-bottom))}.cinema-brand h1{font-size:26px;letter-spacing:3px}.cinema-brand h1 span{font-size:17px}.cinema-brand .eyebrow{font-size:7px}.cinema-menu{gap:6px}.cinema-menu>button{min-height:51px;padding:8px 13px;font-size:14px}.cinema-menu-secondary button{min-height:42px}.cinema-scene-info{padding-bottom:9px;font-size:9px}.cinema-version{font-size:8px}.hero-campaign{min-height:145px}.hero-campaign>svg{width:96px;height:128px}.hero-copy strong{font-size:18px}.hero-copy>span{font-size:10px}.hero-copy{gap:5px}#sheet.cinematic-select .rpg-head{padding-top:10px;min-height:48px}.partner-stage{height:104px}.partner-stage img{height:91px}}
@media(max-width:350px){.cinema-ui{padding-left:16px;padding-right:16px}.hero-campaign>svg{width:89px}.hero-copy strong{font-size:17px}.cinema-starters strong{font-size:11px}.cinema-starters .type{font-size:7px}}
@media(max-height:500px) and (orientation:landscape){.cinema-brand{width:44%;margin-top:25px}.cinema-menu{position:absolute;right:22px;top:25px;bottom:15px;width:43%;align-content:center}.cinema-scene-info{position:absolute;left:20px;bottom:22px;width:43%}#cinema-canvas{width:56%;height:100%}.cinema-shade{background:linear-gradient(90deg,transparent,#0b192c55 45%,#0b192c 63%)}.hero-campaigns{grid-template-columns:1fr 1fr}.hero-campaign{min-height:170px}.hero-campaign>svg{width:80px}.cinema-brand h1{font-size:24px}}
@media(prefers-reduced-motion:reduce){.trainer-idle,.partner-stage img{animation:none!important}}

/* rebirth.css */
/* Elevated 2.5D exploration and a fixed, readable atlas. */
#world.immersive-world #objective{right:72px;background:#f4f1dfed;border:1px solid #d9d3b6}#world.immersive-world header{background:linear-gradient(#f6efd8f2,#e4e6d6e8)}#world.immersive-world header strong{color:#31505b}#world.immersive-world #stick{background:#284e5b40;border-color:#f7f0d599}#world.immersive-world #controls{bottom:calc(65px + env(safe-area-inset-bottom))}#world.immersive-world #volume-controls{bottom:calc(215px + env(safe-area-inset-bottom))}#world.immersive-world #volume-controls button{background:#eff0ddd9;color:#355867;border:1px solid #b3c6bc}#world.immersive-world #world-hint{bottom:calc(268px + env(safe-area-inset-bottom));background:#274b5fd4;padding:7px 10px;border-radius:12px;font-size:11px;max-width:80%;left:10%;right:10%}
#atlas-minimap{position:absolute;top:calc(126px + env(safe-area-inset-top));right:11px;width:87px;height:103px;padding:0;border:2px solid #e0dfc7;border-radius:13px;background:#254652dc;box-shadow:0 3px 12px #152f3d44;overflow:hidden;opacity:.88;z-index:3;touch-action:manipulation}#atlas-minimap svg{display:block;width:100%;height:100%}#viewport:not(.volume-enabled)>#atlas-minimap{top:68px;width:73px;height:88px}
#sheet.atlas-sheet{font-family:ui-rounded,system-ui,sans-serif;background:#112d3e;border:1px solid #628c94;color:#d7e8e3;border-radius:20px;padding:0;box-shadow:0 15px 50px #00182588}#sheet.atlas-sheet .rpg-head{background:#173d4d;border:0;padding:12px 15px;min-height:53px}#sheet.atlas-sheet .rpg-head h2{font:800 12px system-ui!important;letter-spacing:.5px;color:#d4e5df}#sheet.atlas-sheet .rpg-back{background:#325a64;border:0;color:#e4e9d4;border-radius:50%;min-width:44px;min-height:44px}#sheet.atlas-sheet .rpg-body{padding:10px 13px;overflow:auto}#sheet.atlas-sheet .rpg-footer{background:#0d2535;color:#7aa0ab;border:0;font:10px system-ui;padding:10px 14px}.atlas-layout{display:grid;grid-template-columns:1fr;gap:9px}.atlas-map{position:relative;width:100%;aspect-ratio:32/38;max-height:43dvh;max-width:calc(43dvh * 32 / 38);margin:auto;border:1px solid #94b4b0;border-radius:12px;overflow:hidden;background:#294b54}#atlas-route,#atlas-route>svg,.atlas-pins{position:absolute;inset:0;width:100%;height:100%}.atlas-pins{pointer-events:none}.atlas-pin{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;min-height:32px;min-width:32px;width:32px;height:32px;border:1px solid #eff0cf;background:#355d6ee8;border-radius:50%;color:#edf0db;padding:0;font:800 15px system-ui;box-shadow:0 2px 6px #17334277}.atlas-pin:active{transform:translate(-50%,-50%) scale(.94)}.atlas-pin.main{background:#e2bd70;color:#294451;border-color:#fff0b4;z-index:2}.atlas-pin.side{background:#98b9a2;color:#264d58}.atlas-pin.heal{background:#c67f7b}.atlas-pin.shop{background:#4c968f}.atlas-pin.arena{background:#8674a0}.atlas-pin.done{background:#55776e;color:#bfddc7}.atlas-pin.locked{background:#4e6673;color:#a8bbc1;border-color:#889ca3}.atlas-north{position:absolute;right:6px;top:5px;background:#1c3e4bbb;border-radius:5px;color:#d8e8d9;font:9px system-ui;padding:3px 5px;pointer-events:none}#atlas-info{padding:10px 12px;border:1px solid #486d7c;background:#1b4051;border-radius:12px;min-height:115px;display:grid;gap:6px}#atlas-info strong{font:700 14px system-ui;color:#f0e2b6}#atlas-info .atlas-state{display:block;font:10px system-ui;color:#91c4c7;margin-top:4px}#atlas-info p{font:12px/1.4 system-ui;margin:0}#atlas-info small{font:10px/1.4 system-ui;color:#91b4bd}#atlas-info button,#sheet.atlas-sheet .rpg-body>button{font:700 12px system-ui;min-height:44px;background:#d9c18a;color:#294956;border-radius:10px;padding:9px 12px}.atlas-legend{font:11px/1.5 system-ui;color:#92b1ba;padding:7px}.atlas-legend summary{min-height:30px;cursor:pointer}.atlas-legend p{font:10px/1.6 system-ui!important}#sheet.atlas-sheet .rpg-body>button{width:100%;margin-top:3px;background:#2e5968;color:#bad6d5}
#title.cinema-title .cinema-brand h1{color:#ffe8b7;text-shadow:0 3px 12px #1c3c4e88}#title.cinema-title .cinema-brand h1 span{color:#d4ece3}.cinema-shade{background:linear-gradient(#203c4f44,transparent 20%,#b28d4720 40%,#10283ca8 59%,#0b192c 76%)}.cinema-menu>button.cinema-primary{background:linear-gradient(110deg,#f6df9f,#cda768)}
#sheet.lab-scene-dialogue{align-self:flex-end;margin-bottom:8px;background:#132f43ed;color:#e1e8df;border:1px solid #779f9e;border-radius:17px;box-shadow:0 8px 30px #13293566;max-height:35dvh;padding:0;width:100%;font-family:ui-rounded,system-ui,sans-serif}#sheet.lab-scene-dialogue .rpg-head{background:none;border:0;min-height:36px;padding:10px 14px 4px}#sheet.lab-scene-dialogue .rpg-head h2{font:700 14px system-ui!important;color:#eed5a1}#sheet.lab-scene-dialogue .rpg-body{padding:6px 14px 12px}#sheet.lab-scene-dialogue .dialogue-portrait,#sheet.lab-scene-dialogue .avatar,#sheet.lab-scene-dialogue .rpg-footer{display:none}#sheet.lab-scene-dialogue .dialogue-text{font:14px/1.5 system-ui!important;min-height:0;color:#d3e4e0}#sheet.lab-scene-dialogue button{min-height:40px;border-radius:10px;background:#b5cbb9;color:#284b59;padding:8px 12px;font:700 12px system-ui}#overlay:has(.lab-scene-dialogue){background:#0d293b28;backdrop-filter:none}
#aurora-prologue{position:absolute;inset:0;z-index:45;background:#163448;color:#e8eee1;font-family:ui-rounded,system-ui,sans-serif;overflow:hidden}#prologue-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.prologue-top{position:absolute;left:14px;right:14px;top:calc(12px + env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:center;gap:12px}.prologue-top>span{font-size:11px;letter-spacing:1px;color:#f3dfae;text-shadow:0 2px 4px #143546}.prologue-top>button{min-height:44px;border:1px solid #b3cfbf77;border-radius:22px;background:#163c4dbb;color:#d8e7dd;padding:9px 17px;font-size:12px}.prologue-dialog{position:absolute;bottom:calc(26px + env(safe-area-inset-bottom));left:18px;right:18px;padding:15px 17px;border:1px solid #91b2ae88;border-radius:16px;background:#102c40e8;box-shadow:0 10px 30px #122c4a44}.prologue-dialog small{display:block;font:800 10px system-ui;letter-spacing:1.4px;color:#e6cf9a;margin-bottom:7px}.prologue-dialog p{font:15px/1.5 ui-rounded,system-ui,sans-serif;color:#d5e8df}
@media(min-width:650px){.atlas-layout{grid-template-columns:minmax(0,1fr) minmax(150px,.7fr);align-items:center}.atlas-map{max-width:100%;max-height:52dvh}#atlas-info{height:auto}.atlas-pin{min-width:36px;min-height:36px}}
@media(max-height:660px){.atlas-map{max-height:36dvh;max-width:calc(36dvh * 32 / 38)}#atlas-info{min-height:90px;padding:8px;gap:5px}#atlas-info p{font-size:11px}#sheet.atlas-sheet .rpg-head{padding:6px 12px;min-height:44px}.prologue-dialog p{font-size:13px}}

.atlas-pin{width:40px;height:40px;min-width:40px;min-height:40px}

/* quiet-ui.css */
/* Scoped selectors intentionally beat legacy paper-colour button rules. */
#overlay:has(.quiet-campaign){align-items:center;justify-content:center;padding:18px;background:#081824d9;backdrop-filter:blur(3px)}#sheet.cinematic-select.quiet-campaign{height:auto;max-height:calc(100dvh - 36px);max-width:480px;width:100%;border:1px solid #42616d;border-radius:20px;background:#102a3a;box-shadow:0 18px 60px #0006}#sheet.cinematic-select.quiet-campaign .rpg-head{min-height:64px;padding:13px 18px;background:none}#sheet.cinematic-select.quiet-campaign .rpg-head h2{font:700 13px/1.4 system-ui!important;letter-spacing:1px;color:#dce8e4}#sheet.quiet-campaign .screen-marker,#sheet.quiet-campaign .rpg-footer{display:none}#sheet.cinematic-select.quiet-campaign .rpg-body{padding:3px 18px 12px}#sheet.quiet-campaign .hero-campaigns{display:grid;gap:12px}#sheet.cinematic-select.quiet-campaign .rpg-body .hero-campaign{min-height:144px;display:flex;gap:14px;align-items:flex-start;padding:19px 16px;background:#173d4b;border:1px solid #3c6470;border-radius:14px;box-shadow:none;color:#e7efeb;text-align:left;animation:none;transition:border-color .15s,background .15s}#sheet.cinematic-select.quiet-campaign .rpg-body .hero-campaign.rocket{background:#292f46;border-color:#55546d}#sheet.quiet-campaign .hero-campaign:before{display:none}#sheet.quiet-campaign .campaign-number{font:500 12px/1.5 system-ui;color:#789ca7;flex:none;padding-top:1px}#sheet.quiet-campaign .hero-copy{gap:8px}#sheet.quiet-campaign .hero-copy>small{font:600 9px/1.4 system-ui;letter-spacing:1px;color:#94bbc2}#sheet.quiet-campaign .hero-copy strong{font:700 21px/1.15 system-ui;color:#f4edda}#sheet.quiet-campaign .hero-copy>span{font:400 12px/1.5 system-ui;color:#b1c7cb}#sheet.quiet-campaign .hero-copy b{font:600 12px/1.4 system-ui;color:#e5ca91;margin-top:2px}#sheet.quiet-campaign .hero-campaign:active:not(:disabled){background:#254d59!important;border-color:#91b2af;transform:scale(.99);filter:none}#sheet.quiet-campaign .cinema-back{font:500 12px system-ui;min-height:44px;margin-top:8px;color:#9bb7bf;background:none;border:0}
/* The environment is a quiet full-bleed background; no orbit, stage label or orbit decoration. */
#cinema-canvas{height:100%}.cinema-scene-info,.cinema-brand>.eyebrow{display:none}.cinema-ui .cinema-menu{margin-top:auto}.cinema-shade{background:linear-gradient(#10283766,transparent 24%,#0c213052 39%,#0b1c30e8 64%,#0b192c 82%)}.cinema-brand h1{font-size:clamp(26px,7.8vw,40px);letter-spacing:3px}.cinema-brand h1 span{font-size:19px;letter-spacing:5px}.cinema-menu>button{min-height:54px;box-shadow:none;border-radius:12px}.cinema-menu>button small{font-size:10px}.cinema-menu .menu-symbol{font-size:20px;width:24px}.cinema-menu-secondary button{background:#19334599;border-color:#3e5c6a;border-radius:10px}.cinema-menu>button.cinema-primary{box-shadow:none}.cinema-version{font-size:8px;color:#78909c}
/* Calm mobile HUD. Full controls remain available through settings. */
#world.quiet-hud{font-family:ui-rounded,system-ui,-apple-system,sans-serif}#world.quiet-hud button{font-family:inherit}#world.immersive-world.quiet-hud header{background:linear-gradient(#193d4dc9,#193d4d00);box-shadow:none;min-height:54px;padding:calc(9px + env(safe-area-inset-top)) 13px 8px;border:0;pointer-events:none;align-items:flex-start}#world.immersive-world.quiet-hud header .eyebrow{display:none}#world.immersive-world.quiet-hud header strong{font:600 13px/1.3 system-ui;color:#edf2e5;text-shadow:0 1px 4px #1e445a}#world.immersive-world.quiet-hud header .icon-button{pointer-events:auto;width:44px;height:44px;min-height:44px;font-size:22px;border:1px solid #e9eedb55;border-radius:50%;background:#2449579c;color:#e7eedf}#world.quiet-hud header .icon-button small{display:none}#world.immersive-world.quiet-hud #objective{top:calc(56px + env(safe-area-inset-top));left:12px;right:66px;min-height:42px;border:1px solid #e2e9d977;background:#edf0dcd9;backdrop-filter:blur(3px);border-radius:12px;padding:10px 12px;box-shadow:none}#world.immersive-world.quiet-hud #objective b{font:600 12px/1.4 system-ui;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#294b59}#world.quiet-hud #objective span{display:none}#world.immersive-world.quiet-hud #map-button{top:calc(56px + env(safe-area-inset-top));right:12px;width:44px;height:44px;min-height:44px;font-size:23px;border:1px solid #e2e9d977;background:#edf0dcd9;border-radius:50%;box-shadow:none}#world.quiet-hud #map-button span{display:none}
#world.quiet-hud #volume-controls,#world.quiet-hud #team-shortcut,#world.quiet-hud #nearby,#world.quiet-hud #world-hint{display:none!important}#world.immersive-world.quiet-hud #controls{left:14px;right:14px;bottom:calc(22px + env(safe-area-inset-bottom));height:var(--control-size,112px);align-items:flex-end}#world.immersive-world.quiet-hud #stick{width:var(--control-size,112px);height:var(--control-size,112px);border:1px solid #f0f2da80;background:#254e5a28;box-shadow:inset 0 0 0 6px #e3ecd80a;border-radius:50%}#world.quiet-hud #stick .cross{display:none}#world.immersive-world.quiet-hud #nub{background:#e5edcd80;border:1px solid #f2f5d5bb;box-shadow:none}#world.immersive-world.quiet-hud .control-right{width:80px;gap:0}#world.immersive-world.quiet-hud #interact{display:flex;flex-direction:column;justify-content:center;gap:3px;width:80px;height:66px;min-height:66px;border-radius:26px;background:#e8d39adf;border:1px solid #f4e3b9;box-shadow:none;padding:8px;font:600 11px/1.2 system-ui}#world.immersive-world.quiet-hud #interact b{display:none}#world.quiet-hud #interact:disabled{visibility:hidden;pointer-events:none}#world.immersive-world.quiet-hud #quick-nav{left:50%;right:auto;bottom:calc(22px + env(safe-area-inset-bottom));transform:translateX(-50%);width:104px;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0;background:none}#world.quiet-hud #quick-nav>button:nth-child(n+3){display:none}#world.immersive-world.quiet-hud #quick-nav>button{width:48px;min-height:46px;padding:7px 0;border:1px solid #e1e7d96b;border-radius:14px;background:#e4ebd4c9;color:#365864;font:500 9px system-ui;box-shadow:none}#world.quiet-hud #quick-nav>button b{font-size:16px;line-height:1.15}#world.quiet-hud #atlas-minimap{top:calc(113px + env(safe-area-inset-top));width:70px;height:83px;border:1px solid #dde6d5bb;border-radius:11px;opacity:.8}
@media(max-height:600px){#sheet.cinematic-select.quiet-campaign .rpg-body .hero-campaign{min-height:125px;padding:15px}.cinema-brand h1{font-size:25px}.cinema-menu>button{min-height:48px}.cinema-ui{padding-top:calc(15px + env(safe-area-inset-top))}}
@media(max-width:360px){#world.immersive-world.quiet-hud #quick-nav{width:88px;gap:4px}#world.immersive-world.quiet-hud #quick-nav>button{width:42px}#world.immersive-world.quiet-hud .control-right,#world.immersive-world.quiet-hud #interact{width:68px}#sheet.quiet-campaign .hero-copy strong{font-size:19px}}
@media(max-height:500px) and (orientation:landscape){#cinema-canvas{width:100%;height:100%}.cinema-brand{width:44%}.cinema-ui .cinema-menu{margin-top:0}#world.immersive-world.quiet-hud #controls{bottom:calc(12px + env(safe-area-inset-bottom))}#world.immersive-world.quiet-hud #quick-nav{bottom:calc(12px + env(safe-area-inset-bottom))}}

#world.immersive-world.quiet-hud.wide-pad #quick-nav{bottom:calc(184px + env(safe-area-inset-bottom))}
@media(max-width:360px){#world.immersive-world.quiet-hud:not(.wide-pad) #quick-nav{margin-left:10px}#game.left-handed #world.immersive-world.quiet-hud:not(.wide-pad) #quick-nav{margin-left:-10px}}

/* forest-title.css */
/* Shared blue-and-gold title and journey components. Real text and native buttons. */
#title.forest-title{--forest-blue:#0a2439;--forest-line:#7196ac;--forest-gold:#ffd36d;background:#0a201f;position:absolute;inset:0;height:100%;min-height:0;isolation:isolate;overflow:hidden;color:#fff}
#forest-artwork{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;overflow:hidden}
#title.forest-title .forest-poster{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 38%;opacity:1;clip-path:none;animation:forest-scene291 18s ease-in-out infinite alternate}
.forest-bottom-shade{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,#001b3020 25%,transparent 38%,#031d2a70 57%,#031619e8 86%);pointer-events:none}
.forest-brand291{position:absolute;top:calc(5% + env(safe-area-inset-top));left:4%;right:4%;z-index:2;text-align:center;pointer-events:none;filter:drop-shadow(0 4px 3px #0009)}
.forest-brand291 h1{margin:0;line-height:.95;transform:rotate(-3deg)}
.forest-brand291 h1>span{display:block;color:#ffdc42;font:1000 clamp(38px,12vw,78px)/1 system-ui;letter-spacing:-.06em;-webkit-text-stroke:2px #214c8b;text-shadow:2px 4px #102b53}
.forest-brand291 h1>strong{display:block;text-transform:uppercase;font:900 clamp(28px,9vw,56px)/1.15 Georgia,serif;letter-spacing:-.06em;color:#f4dfb3;-webkit-text-stroke:.7px #472e19;text-shadow:0 3px #3a281e,2px 5px #080e13}
.forest-brand-rule291{margin:6px auto;width:46%;height:24px;display:flex;align-items:center;justify-content:center;gap:8px;color:#f7d78b}.forest-brand-rule291:before,.forest-brand-rule291:after{content:'';height:1px;flex:1;background:#e4c573}.forest-brand-rule291 svg{width:25px;height:25px}
/* Existing transparent art stays in the scene, clear of real controls. */
.forest-legends291{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.forest-legends291 img{position:absolute;object-fit:contain;filter:drop-shadow(0 5px 4px #05243950);animation:legend-float291 7s ease-in-out infinite alternate;user-select:none}.legend-lugia291{left:0;top:24%;width:52%;height:24%;opacity:1;transform:rotate(-5deg)}.legend-rayquaza291{right:0;top:24%;width:49%;height:31%;opacity:1}.legend-mew291{left:6%;top:42%;width:31%;height:17%;animation-delay:-3s!important}.legend-celebi291{right:7%;top:43%;width:29%;height:16%;animation-delay:-5s!important}
@keyframes legend-float291{from{translate:0 0}to{translate:0 -5px}}

.forest-menu{position:absolute;z-index:3;bottom:0;left:50%;transform:translateX(-50%);width:min(94%,570px);display:flex;flex-direction:column;gap:9px;padding:0 0 max(10px,env(safe-area-inset-bottom));color:#fff}
#title.forest-title .forest-menu button{display:flex;align-items:center;justify-content:center;gap:14px;border:1px solid #7b9fb9;border-radius:18px;background:linear-gradient(150deg,#193d5ded,#08233aef);color:#fff;font:700 18px/1.15 system-ui;min-height:53px;padding:11px 18px;box-shadow:inset 0 1px 2px #bedaff35,0 5px 9px #00101b75;touch-action:manipulation;transition:transform .13s,filter .13s}
#title.forest-title .forest-menu button>span{flex:1;text-align:center}.forest-menu svg{width:25px;height:25px;flex:none}
#title.forest-title .forest-menu button.forest-primary291{background:linear-gradient(#ffe995,#ffcb5d 55%,#e9a742);color:#171e23;border:2px solid #ffe29b;box-shadow:inset 0 1px #fffbd4,0 0 0 3px #b98c3c40,0 5px 14px #0008}
#title.forest-title .forest-menu button:active{transform:scale(.975);filter:brightness(1.1)}#title.forest-title button:focus-visible{outline:3px solid #fff0a3;outline-offset:3px}#title.forest-title button:disabled{opacity:.5;filter:saturate(.4)}#title.forest-title button:disabled:after{content:none}
.forest-secondary{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:7px}#title.forest-title .forest-secondary button{font-size:11px;gap:6px;min-height:47px;padding:9px 6px;border-radius:12px}.forest-secondary svg{width:19px;height:19px}
#title.forest-title .forest-menu .forest-discover291{justify-content:flex-start;padding:5px 12px;background:linear-gradient(90deg,#0b3045ea,#0c2939ce),url('assets/forest/journey-landscape-v291.webp') center 45%/cover;min-height:62px;border-radius:14px;font-size:12px;gap:9px}.forest-discover291 img{width:55px;height:55px;object-fit:contain}.forest-discover291 small{display:block;font-size:10px;color:#d1e3e4;margin-top:5px;font-weight:400}.forest-discover291 svg{width:16px}
#title.forest-title .forest-menu .forest-import{align-self:center;background:none;box-shadow:none;border:0;min-height:44px;padding:5px 20px;font-size:12px;color:#dfedee;text-decoration:underline;text-underline-offset:3px;margin-top:-6px}
#title.forest-title #title-save-hint287{margin:-9px 4px 0;text-align:center;font:11px/1.3 system-ui;color:#d9e5e4;min-height:14px}
.forest-version291{display:flex;justify-content:space-between;gap:12px;font:10px/1.4 system-ui;color:#d0d8d4;padding:0 3px}.title-extras291 button{display:flex;gap:12px;align-items:center;min-height:48px}.title-extras291 svg{width:22px;height:22px}
#cinema-canvas{display:none!important}.forest-still .forest-poster,.forest-still .forest-legends291 img{animation-play-state:paused!important}
@keyframes forest-scene291{from{transform:scale(1)}to{transform:scale(1.025)}}
@media(min-width:700px) and (min-height:650px){.forest-brand291{left:15%;right:15%}.forest-menu{width:520px}}
@media(max-height:650px) and (orientation:portrait){.forest-brand291{top:2%}.legend-mew291{top:39%}.legend-celebi291{top:41%}.forest-menu{gap:6px}#title.forest-title .forest-menu button{min-height:46px;padding:8px 15px;font-size:16px}.forest-discover291 img{width:40px;height:40px}#title.forest-title .forest-menu .forest-discover291{min-height:50px}.forest-version291{font-size:9px}}
@media(orientation:landscape) and (max-height:650px){#title.forest-title .forest-poster{object-position:50% 38%}.forest-brand291{top:12%;left:3%;right:52%}.forest-brand291 h1>span{font-size:48px}.forest-brand291 h1>strong{font-size:35px}.forest-legends291{right:49%}.legend-lugia291{top:42%;left:2%;width:60%;height:32%}.legend-rayquaza291{top:40%;right:0;width:54%;height:46%}.legend-mew291{top:72%;left:12%;width:36%;height:27%}.legend-celebi291{top:76%;right:10%;width:34%;height:23%}.forest-menu{left:auto;right:max(16px,env(safe-area-inset-right));transform:none;width:46%;bottom:4%;gap:6px}#title.forest-title .forest-menu button{min-height:44px;padding:7px 12px;font-size:16px}#title.forest-title .forest-secondary button{min-height:44px;font-size:10px}.forest-discover291 img{height:35px;width:35px}#title.forest-title .forest-menu .forest-discover291{min-height:44px}.forest-version291{font-size:9px}#title.forest-title .forest-menu .forest-import{min-height:44px}}
@media(prefers-reduced-motion:reduce){#title.forest-title .forest-poster,.forest-legends291 img{animation:none}#title.forest-title .forest-menu button{transition:none}}

#game[data-ui-motion=off] .forest-poster,#game[data-ui-motion=off] .forest-legends291 img,#game[data-performance=battery] .forest-poster,#game[data-performance=battery] .forest-legends291 img{animation:none!important}

/* classic-world.css */
#world.classic-world #map{visibility:visible!important;image-rendering:pixelated;image-rendering:crisp-edges}#world.classic-world #volume-map,#world.classic-world #volume-controls{display:none!important}#world.classic-world #viewport{background:#78c65b}#world.classic-world #zone-header{background:#f5edcbed;color:#294d3e}#world.classic-world .quest-tracker{background:#fff4ceeb;color:#31543d}
.volume-options button[onclick^="quietCameraTurn"]{display:none!important}
/* Classic exploration: the map fills the viewport, controls float above it. */
#world.classic-world.immersive-world header{min-height:42px;height:42px;padding:5px 10px;background:#f9f3d7e8;border-bottom:2px solid #527b67;box-shadow:none}#world.classic-world header .eyebrow{font:700 9px monospace;letter-spacing:1px}#world.classic-world header strong{font:700 13px monospace}#world.classic-world header button{min-height:32px;height:32px;width:38px;padding:4px;border-radius:3px;border:2px solid #688a75;background:#fff9df;font-size:19px}#world.classic-world #objective{top:48px;left:8px;right:54px;min-height:30px;padding:5px 8px;border:3px double #799b80;border-radius:2px;background:#fff9ddec;backdrop-filter:none;box-shadow:none;font:12px/1.3 monospace}#world.classic-world #objective b{font:700 12px/1.3 monospace}#world.classic-world #map-button{top:48px;right:8px;width:38px;height:34px;min-height:34px;padding:3px;border:2px solid #6b8d78;border-radius:3px;background:#fff9dde6}#world.classic-world.quiet-hud #controls{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));height:var(--control-size,112px);min-height:0;padding:0;background:transparent;border:none;pointer-events:none}#world.classic-world.quiet-hud #stick{border:2px solid #eef3dac0;border-radius:50%;background:#315a4a35;box-shadow:none;pointer-events:auto}#world.classic-world #nub{background:#f5efc9b0;border:1px solid #7b9873;box-shadow:none}#world.classic-world.quiet-hud #quick-nav{bottom:calc(14px + env(safe-area-inset-bottom));background:none}#world.classic-world.quiet-hud #quick-nav>button{background:#fff8dbd9;border:2px solid #6b8d78;border-radius:4px;font:10px monospace;color:#2b5145}#world.classic-world.quiet-hud #interact{border-radius:50%;width:58px;height:58px;min-height:58px;background:#f4d780df;border:2px solid #fff1bd;font:11px monospace;pointer-events:auto}#world.classic-world #nearby,#world.classic-world #world-hint{display:none}
/* Game menus use compact double frames, independently of the approved title. */
#sheet.rpg-screen:not(.cinematic-select){border-radius:3px;border:5px double #e8d190;background:#f8f2d6;box-shadow:0 3px 0 #244a4b;font-family:monospace;color:#274b50}#sheet.rpg-screen:not(.cinematic-select) .rpg-head{background:#29566b;color:#fff1ca;border-bottom:3px double #e8d190;padding:8px 12px;min-height:44px}#sheet.rpg-screen:not(.cinematic-select) .rpg-head h2{font:700 17px/1.2 monospace;color:#fff1ca}#sheet.rpg-screen:not(.cinematic-select) button{border-radius:2px;font-family:monospace}#overlay:has(.rpg-dialog){align-items:flex-end;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:#10272c18;backdrop-filter:none}#sheet.rpg-screen.rpg-dialog{height:auto;max-height:38%;width:100%;max-width:680px;background:#29566b;color:#fff4d1}#sheet.rpg-dialog .rpg-head{min-height:28px;padding:5px 10px;border-bottom:0}#sheet.rpg-dialog .rpg-head h2{font-size:13px!important}#sheet.rpg-dialog .screen-marker,#sheet.rpg-dialog .rpg-footer,#sheet.rpg-dialog .rpg-body>small{display:none}#sheet.rpg-dialog .rpg-body{padding:4px 12px 10px;background:#29566b;color:#fff4d1}#sheet.rpg-dialog .dialogue-text{font:16px/1.5 monospace;margin-top:0!important;color:#fff4d1}#sheet.rpg-dialog .stack{margin:5px 0 0}#sheet.rpg-dialog #dialogue-next{min-height:32px;padding:5px 10px;background:#e9d69b;color:#294d57;font:700 12px monospace;box-shadow:none}#battle-message{background:#29566b;color:#fff2cf;border:4px double #e8d190;border-radius:2px;font-family:monospace}#battle-actions button{border:3px double #567e78;border-radius:2px;background:#fff5d8;color:#28505a;font-family:monospace}.battle-console{background:#e7e9d0}
/* 0.10.4 — high density 2D and compact illustrated conversations. */
#world.aurora-hd #map{image-rendering:auto!important;filter:none!important}
#world.aurora-hd header{background:linear-gradient(120deg,#fff6de,#e3f1df)!important;border-bottom:1px solid #b6d2b4!important}
#world.aurora-hd header strong{font:750 14px/1.2 system-ui,sans-serif!important;color:#224d57}
#world.aurora-hd header .eyebrow{font:800 8px/1.5 system-ui,sans-serif!important;letter-spacing:2px;color:#6b9a79}
#world.aurora-hd #objective{top:51px;border:1px solid #fff4ce;border-radius:10px;background:#fff9e8eb;box-shadow:0 3px 10px #19494b20;padding:7px 10px}
#world.aurora-hd #objective b{font:700 11px/1.35 system-ui,sans-serif!important}
#world.aurora-hd #map-button{top:51px;border-radius:10px;border:1px solid #d3e4c2;background:#f9ffe9eb;color:#2a6470}
#world.aurora-hd #stick{background:#244f6840!important;border:2px solid #efffe5b3!important;box-shadow:inset 0 1px 12px #163c5222!important}
#world.aurora-hd #nub{background:linear-gradient(#fffae2c9,#badfcac9)!important;border:1px solid #ffffffa6!important}
#world.aurora-hd #interact{background:linear-gradient(#ffe0a3,#ecad5e)!important;color:#5c462f!important;border:2px solid #fff0c1!important;box-shadow:0 3px 9px #3a574936!important}
#sheet.rpg-screen.rpg-dialog{border:1px solid #f2d49a;border-radius:16px;background:linear-gradient(130deg,#143f57f5,#215e69f5);box-shadow:0 8px 24px #123c504d;max-height:min(37dvh,310px);overflow:hidden;font-family:system-ui,sans-serif}
#sheet.rpg-dialog .rpg-head{min-height:35px;background:none;border-bottom:1px solid #b1dec029;padding:9px 13px 6px}
#sheet.rpg-dialog .rpg-head h2{font:750 14px/1.2 system-ui,sans-serif!important;color:#ffe1a4!important;letter-spacing:.1px;margin:0}
#sheet.rpg-dialog .rpg-body{padding:10px 12px 11px;background:transparent;color:#f5f4df;overflow-y:auto}
#sheet.rpg-dialog .dialogue-scene{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:start;gap:12px}
#sheet.rpg-dialog .dialogue-scene>.dialogue-portrait{width:72px;height:86px;object-fit:cover;image-rendering:auto;border:1px solid #bbdec2;border-radius:10px;background:#b8d9c5;box-shadow:0 3px 8px #102e3a44}
#sheet.rpg-dialog .dialogue-scene>div{min-width:0}
#sheet.rpg-dialog .dialogue-scene>div>small{display:none}
#sheet.rpg-dialog .dialogue-text{font:450 14px/1.5 system-ui,sans-serif!important;color:#f7f8e7;margin:0!important;min-height:0;letter-spacing:0}
#sheet.rpg-dialog .stack{margin-top:9px}
#sheet.rpg-dialog #dialogue-next{width:100%;min-height:38px;padding:8px 12px;font:750 12px/1.2 system-ui,sans-serif;border:1px solid #ffedbd;border-radius:8px;background:linear-gradient(#ffe4ad,#edc47f);color:#30505a;box-shadow:none}
#overlay:has(.rpg-dialog){padding:8px 9px calc(9px + env(safe-area-inset-bottom));background:transparent;backdrop-filter:none}
@media(max-height:620px){#sheet.rpg-screen.rpg-dialog{max-height:46dvh}#sheet.rpg-dialog .dialogue-text{font-size:13px!important}#sheet.rpg-dialog .dialogue-scene{grid-template-columns:58px minmax(0,1fr);gap:9px}#sheet.rpg-dialog .dialogue-scene>.dialogue-portrait{width:58px;height:72px}}

@keyframes aurora-portrait-enter{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
#sheet.rpg-dialog .dialogue-portrait{animation:aurora-portrait-enter .2s ease-out}
@media(prefers-reduced-motion:reduce){#sheet.rpg-dialog .dialogue-portrait{animation:none}}

/* Shown only after the new renderer actually runs, never by the static title alone. */
#world.aurora-hd[data-art-version="2.0.22"] header strong::after{content:"HD · 2.0.22";display:inline-block;margin-left:7px;vertical-align:middle;padding:3px 5px;border-radius:5px;background:#d2ead2;color:#286761;font:750 8px/1 system-ui,sans-serif;letter-spacing:.1px}

/* partner-menu.css */
/* Partner selection: a light, game-like clearing with one featured creature. */
#overlay:has(.partner-menu){padding:0;align-items:stretch;background:#193f38f5;backdrop-filter:none}
#sheet.partner-menu{--partner-accent:#427e55;--partner-wash:#edf5d8;--partner-light:#b9db87;width:100%!important;max-width:780px;height:100%!important;max-height:100%!important;border:0!important;border-radius:0!important;background:var(--partner-wash)!important;color:#274e45;box-shadow:none!important;overflow:hidden;font-family:ui-rounded,system-ui,-apple-system,sans-serif!important}
#sheet.partner-menu .rpg-head{flex:none;display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 17px 4px;background:transparent;border:0;position:relative;z-index:2}
#sheet.partner-menu .rpg-head h2{font:750 13px/1.3 ui-rounded,system-ui,sans-serif!important;letter-spacing:.2px;margin:0;color:#3c6155!important;order:2}
#sheet.partner-menu .screen-marker,#sheet.partner-menu .rpg-footer{display:none}
#sheet.partner-menu .rpg-back{order:1;position:static;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #7b9d7e66;border-radius:50%;background:#fffdf575;color:#385e50;box-shadow:none;font:500 27px/1 system-ui}
#sheet.partner-menu .rpg-body{position:relative;display:flex;flex:1;min-height:0;flex-direction:column;padding:6px 20px max(12px,env(safe-area-inset-bottom));overflow-y:auto;background:transparent;overscroll-behavior:contain}
#sheet.partner-menu .partner-region{display:flex;align-items:center;justify-content:center;gap:16px;flex:none;margin:3px 0 5px}
#sheet.partner-menu .partner-region>button{width:34px;height:34px;min-height:34px;border-radius:50%;padding:0;background:#ffffff70;color:var(--partner-accent);border:1px solid #7e9e6c55;font:500 24px/1 system-ui;box-shadow:none}
#sheet.partner-menu .partner-region label{display:flex;flex-direction:column;align-items:center;gap:0;min-width:112px}
#sheet.partner-menu .partner-region small{font:800 8px/1.3 system-ui;letter-spacing:2px;color:#6c8870}
#sheet.partner-menu .partner-region select{max-width:170px;background:transparent;border:0;color:#365b4d;font:800 18px/1.3 ui-rounded,system-ui,sans-serif;padding:2px 7px;text-align:center}
#sheet.partner-menu .partner-region option{background:#fff9e8;color:#315947}
#sheet.partner-menu .partner-hero{display:flex;flex:1;min-height:210px;flex-direction:column;align-items:center;justify-content:center;position:relative;isolation:isolate}
#sheet.partner-menu .partner-heading{flex:none;text-align:center;position:relative;z-index:2;margin-top:6px}
#sheet.partner-menu .partner-kicker{font:800 8px/1.5 system-ui;letter-spacing:2px;color:var(--partner-accent)}
#sheet.partner-menu .partner-heading h3{font:900 clamp(27px,7.5vw,40px)/1.1 ui-rounded,system-ui,sans-serif;letter-spacing:-1px;color:#254c42;margin:3px 0 7px;text-shadow:0 1px #fff8}
#sheet.partner-menu .partner-types{display:flex;justify-content:center;align-items:center;gap:5px}
#sheet.partner-menu .partner-types .type{font:750 9px/1.2 system-ui;border-radius:20px;padding:4px 8px;box-shadow:none}
#sheet.partner-menu .partner-level{font:700 9px/1 system-ui;padding-left:5px;color:#5e7d67}
#sheet.partner-menu .partner-clearing{position:relative;display:grid;place-items:center;width:100%;flex:1;min-height:140px;max-height:300px;margin-top:2px;isolation:isolate;background:radial-gradient(ellipse at 50% 64%,#fffcebcc 0 28%,transparent 63%)}
#sheet.partner-menu .partner-clearing::before{content:'';position:absolute;width:80%;height:43%;bottom:8%;border-radius:50%;background:radial-gradient(ellipse,var(--partner-light),#b3cf8955 62%,transparent 72%);z-index:-1}
#sheet.partner-menu .partner-clearing::after{content:'';position:absolute;width:65%;height:1px;bottom:12%;background:linear-gradient(90deg,transparent,#93b27977,transparent)}
#sheet.partner-menu .partner-hero-art{position:relative;z-index:1;width:clamp(170px,48vw,260px);height:clamp(150px,27dvh,250px);object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 9px 3px #2d59472b);animation:partner-arrival .22s ease-out;pointer-events:none}
#sheet.partner-menu .partner-leaf{position:absolute;width:52px;height:85px;border-radius:100% 0 100% 0;background:linear-gradient(140deg,#85b77455,#6b9f6622);z-index:-1;transform:rotate(-30deg)}
#sheet.partner-menu .leaf-one{left:4%;bottom:12%}#sheet.partner-menu .leaf-two{right:4%;bottom:21%;width:38px;height:64px;transform:rotate(110deg)}
#sheet.partner-menu .partner-orbit{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);width:166px;height:166px;border:1px solid #ffffff65;border-radius:50%;z-index:-1}
#sheet.partner-menu .partner-number{position:absolute;right:9%;bottom:7%;font:700 8px/1 system-ui;letter-spacing:1px;color:#6f8d70}
#sheet.partner-menu .partner-personality{flex:none;color:#5a7b63;font:550 12px/1.4 system-ui;text-align:center;margin:3px 0 10px}
#sheet.partner-menu .partner-bottom{flex:none;width:100%;max-width:460px;margin:0 auto}
#sheet.partner-menu .partner-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 12px}
#sheet.partner-menu .partner-pick{display:flex;align-items:center;flex-direction:column;position:relative;min-height:82px;gap:0;padding:4px 2px 7px;border:1px solid #afc6a6;border-radius:12px;background:#fffff34d;color:#3b6153;box-shadow:none;overflow:visible}
#sheet.partner-menu .partner-pick.selected{border:2px solid var(--partner-accent);background:#fffdf2;box-shadow:0 3px 0 #8ba47933;padding:3px 1px 6px}
#sheet.partner-menu .partner-pick img{width:62px;height:52px;object-fit:contain;image-rendering:pixelated;filter:none;animation:none}
#sheet.partner-menu .partner-pick span{font:750 10px/1.2 system-ui;overflow-wrap:anywhere}
#sheet.partner-menu .partner-pick i{position:absolute;right:5px;top:5px;font:850 10px/1 system-ui;font-style:normal;color:var(--partner-accent)}
#sheet.partner-menu .partner-primary{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;min-height:49px;padding:13px 16px;border:1px solid #ffe8ab;border-radius:12px;background:linear-gradient(#ffd982,#edb454);box-shadow:0 3px 0 #ad824a66;color:#324b3c;font:850 14px/1.25 ui-rounded,system-ui,sans-serif;text-align:left}
#sheet.partner-menu .partner-primary>span{font:700 21px/1 system-ui}
#sheet.partner-menu .partner-fineprint{font:550 9px/1.4 system-ui;color:#728b72;text-align:center;margin:11px 0 0}
#sheet.partner-menu .partner-secondary{display:block;min-height:39px;padding:9px;margin:5px auto 0;background:transparent;border:0;color:#5e7d67;font:700 12px/1.2 system-ui;box-shadow:none}
#sheet.partner-menu .partner-attributes{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0 0 12px;padding:10px 0;border-top:1px solid #aac39b77;border-bottom:1px solid #aac39b77;text-align:center}
#sheet.partner-menu .partner-attributes>div+div{border-left:1px solid #aac39b77}#sheet.partner-menu dt{font:650 9px/1.3 system-ui;color:#6b866e}#sheet.partner-menu dd{font:850 21px/1.2 ui-rounded,system-ui;color:var(--partner-accent);margin:3px 0 0}
#sheet.partner-menu .partner-gift{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:12px}
#sheet.partner-menu .partner-gift img{width:44px;height:44px;object-fit:contain;image-rendering:pixelated}#sheet.partner-menu .partner-gift p{display:flex;flex-direction:column;gap:2px;text-align:left}#sheet.partner-menu .partner-gift strong{font:750 11px/1.3 system-ui;color:#4b6d56}#sheet.partner-menu .partner-gift span{font:500 10px/1.4 system-ui;color:#718b73}
#sheet.partner-menu button:focus-visible{outline:3px solid var(--partner-accent);outline-offset:2px}
@keyframes partner-arrival{from{opacity:.4;transform:translateY(5px) scale(.96)}to{opacity:1;transform:none}}
@media(max-height:600px){#sheet.partner-menu .rpg-head{min-height:40px;padding-top:6px}#sheet.partner-menu .rpg-body{padding:0 14px 9px}#sheet.partner-menu .partner-region{margin:0}#sheet.partner-menu .partner-hero{min-height:170px}#sheet.partner-menu .partner-heading h3{font-size:27px}#sheet.partner-menu .partner-clearing{min-height:105px}#sheet.partner-menu .partner-hero-art{height:140px;width:180px}#sheet.partner-menu .partner-personality{font-size:10px;margin:0 0 6px}#sheet.partner-menu .partner-pick{min-height:65px}#sheet.partner-menu .partner-pick img{height:40px}#sheet.partner-menu .partner-roster{margin-bottom:8px}#sheet.partner-menu .partner-attributes{padding:7px 0;margin-bottom:7px}#sheet.partner-menu .partner-gift{margin-bottom:7px}#sheet.partner-menu .partner-fineprint{margin-top:8px}}
@media(prefers-reduced-motion:reduce){#sheet.partner-menu .partner-hero-art{animation:none}}
/* Override legacy paragraph typography only within these two screens. */
#sheet.partner-menu .rpg-body .partner-personality{font:550 12px/1.4 system-ui;color:#5a7b63}
#sheet.partner-menu .rpg-body .partner-fineprint{font:550 9px/1.4 system-ui;color:#728b72}
#sheet.partner-menu .rpg-back{width:44px;height:44px;min-height:44px}
@media(max-height:600px){#sheet.partner-menu .rpg-body .partner-personality{font-size:10px}#sheet.partner-menu .partner-hero-art{height:120px;width:160px}}
@media(max-height:520px){#sheet.partner-menu .partner-kicker,#sheet.partner-menu .partner-personality,#sheet.partner-menu .partner-fineprint{display:none}#sheet.partner-menu .partner-heading h3{font-size:23px;margin-top:0}#sheet.partner-menu .partner-hero{min-height:135px}#sheet.partner-menu .partner-clearing{min-height:78px}#sheet.partner-menu .partner-hero-art{height:96px;width:128px}#sheet.partner-menu .partner-pick{min-height:57px}#sheet.partner-menu .partner-pick img{height:33px}#sheet.partner-menu .partner-orbit{width:100px;height:100px}#sheet.partner-menu .partner-attributes dd{font-size:18px}}

/* legends.css */
.legend-record{text-align:center;padding:18px;border:1px solid #8dad8a;border-radius:18px;background:linear-gradient(145deg,#e7f4d8,#d3e8e5);color:#203f39}.legend-record img,.legend-reveal img{width:128px;height:128px;image-rendering:pixelated}.legend-silhouette{font-size:80px;color:#233e3b;text-shadow:0 0 30px #76b391}.legend-reveal{text-align:center;padding:24px;background:radial-gradient(ellipse,#6d9d6780,transparent 70%);animation:legend-arrival .45s ease-out}.legend-menu-button{width:100%;margin-top:12px}@keyframes legend-arrival{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.legend-reveal{animation:none}}
.journey-guidance{padding:16px;margin-bottom:16px;border-left:4px solid #d9b66a;border-radius:10px;background:#2e5159;color:#fff5db}.journey-guidance small{color:#edd493;letter-spacing:.08em}.journey-guidance h3{margin:8px 0}.journey-guidance p{line-height:1.5}

/* battle-command.css */
#overlay:has(.battle-command){background:#071b2cba;backdrop-filter:none;padding:12px}
#sheet.rpg-screen.battle-command{height:auto;max-height:94%;max-height:94dvh;max-width:680px;padding:0;border:1px solid #61c2c8;border-radius:24px;background:linear-gradient(145deg,#143d58,#0b233b);color:#edfaff;box-shadow:0 18px 50px #02122180;font-family:system-ui,sans-serif;overflow:hidden;animation:command-in .22s ease-out}
#sheet.rpg-screen.battle-command .rpg-head{min-height:58px;background:#102e47;border:0;padding:14px 18px;color:#effaff;gap:10px}#sheet.rpg-screen.battle-command .rpg-head h2{font:800 18px/1.2 system-ui,sans-serif;color:#effaff;text-transform:none}#sheet.rpg-screen.battle-command .screen-marker{color:#ffce65;font-size:14px}#sheet.rpg-screen.battle-command .rpg-back{min-width:44px;height:40px;border:1px solid #497e94;border-radius:12px;background:#24506a;color:#ecfaff;box-shadow:none;font:700 22px system-ui,sans-serif}
#sheet.rpg-screen.battle-command .rpg-body{padding:0 16px 16px;background:none;color:#effaff;max-height:calc(94dvh - 60px);overflow-y:auto;flex:initial;overscroll-behavior:contain}#sheet.rpg-screen.battle-command .rpg-footer{display:none}
#sheet.rpg-screen.battle-command .command-hero{display:flex;align-items:center;gap:12px;padding:12px 0 16px;border-bottom:1px solid #50869c66;margin-bottom:16px}#sheet.rpg-screen.battle-command .command-hero img{width:68px;height:68px;image-rendering:pixelated;object-fit:contain;filter:drop-shadow(0 5px 6px #06192970)}#sheet.rpg-screen.battle-command .command-hero>div{flex:1}#sheet.rpg-screen.battle-command .command-hero small{font:800 9px system-ui;color:#65d9d2;letter-spacing:.15em}#sheet.rpg-screen.battle-command .command-hero h3{font:850 22px/1.2 system-ui;margin:5px 0;color:#fff}#sheet.rpg-screen.battle-command .command-hero p{font:12px/1.4 system-ui;color:#b7d8e7}#sheet.rpg-screen.battle-command .command-level{font:750 11px system-ui;color:#ffdd93;border:1px solid #9a864d;padding:7px;border-radius:9px;white-space:nowrap}
#sheet.rpg-screen.battle-command .command-moves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#sheet.rpg-screen.battle-command .command-move{position:relative;text-align:left;padding:14px 12px 12px;border:1px solid #6295a5;border-top:4px solid var(--attack-color);border-radius:16px;color:#eefaff;background:linear-gradient(140deg,#2a5269,#17364f);box-shadow:0 4px 0 #081d32;min-width:0;font-family:system-ui;animation:command-in .3s both;animation-delay:calc(var(--entry)*45ms)}#sheet.rpg-screen.battle-command .command-move:active{transform:translateY(2px);box-shadow:0 1px 0 #081d32}#sheet.rpg-screen.battle-command .command-move-top{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:10px}#sheet.rpg-screen.battle-command .command-move-top>span:last-child{font:800 8px system-ui;color:#bfd6e1;letter-spacing:.04em}#sheet.rpg-screen.battle-command .type{font-size:10px;padding:4px 7px;border-radius:6px}#sheet.rpg-screen.battle-command .command-move>strong{display:block;font:850 18px/1.15 system-ui;color:#fff;overflow-wrap:anywhere;min-height:22px}#sheet.rpg-screen.battle-command .command-numbers{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 10px}#sheet.rpg-screen.battle-command .command-numbers span{font:700 8px system-ui;color:#94b9ca;letter-spacing:.04em}#sheet.rpg-screen.battle-command .command-numbers b{display:block;font:850 15px system-ui;color:#f5faff;margin-top:2px}#sheet.rpg-screen.battle-command .command-numbers span:last-child{grid-column:1/-1;display:flex;gap:7px;align-items:baseline}#sheet.rpg-screen.battle-command .command-numbers span:last-child b{color:#ffdc8c}#sheet.rpg-screen.battle-command .command-move p{font:11px/1.45 system-ui;color:#c2dee9;min-height:33px}#sheet.rpg-screen.battle-command .command-use{display:block;margin-top:12px;padding-top:9px;border-top:1px solid #6c9caf55;font:800 11px system-ui;color:#ffe099}#sheet.rpg-screen.battle-command button:disabled{opacity:1;filter:saturate(.35);border-color:#54707c;background:#233c4d;color:#9eafba;box-shadow:none}#sheet.rpg-screen.battle-command button:disabled strong{color:#a9bbc7}
#sheet.rpg-screen.battle-command .command-tip{margin:16px 0 0;padding:10px 12px;border-radius:10px;background:#0a2136;border:1px solid #33586f;font:12px/1.45 system-ui;color:#a9cedd}
#sheet.rpg-screen.battle-command .command-items{display:grid;gap:14px}#sheet.rpg-screen.battle-command .command-item{display:flex;align-items:center;gap:14px;position:relative;text-align:left;padding:18px 14px;border-radius:18px;border:1px solid #63a5b8;background:linear-gradient(115deg,#245d74,#193d56);font-family:system-ui;min-height:150px;animation:command-in .3s ease-out}.command-item+.command-item{animation-delay:.07s!important}#sheet.rpg-screen.battle-command .potion-item{border-left:4px solid #dc8bff}#sheet.rpg-screen.battle-command .ball-item{border-left:4px solid #ff9267}#sheet.rpg-screen.battle-command .item-copy{flex:1}#sheet.rpg-screen.battle-command .item-copy small{font:800 9px system-ui;letter-spacing:.1em;color:#81dbe1}#sheet.rpg-screen.battle-command .item-copy strong{display:block;font:850 23px system-ui;color:white;margin:4px 0 8px}#sheet.rpg-screen.battle-command .item-copy p{font:12px/1.4 system-ui;color:#c0dce8}#sheet.rpg-screen.battle-command .item-copy em{display:block;margin-top:10px;color:#ffe1a0;font:750 11px/1.4 system-ui}#sheet.rpg-screen.battle-command .item-stock{align-self:flex-start;padding:6px 9px;border-radius:9px;color:#ffdd88;background:#102c43;font:850 16px system-ui}
.item-art{flex:none;position:relative;width:52px;height:60px;display:block;animation:item-arrival .65s ease-out}.potion-art{width:43px;height:49px;border-radius:12px 12px 9px 9px;background:linear-gradient(120deg,#eec4ff,#aa4ed7 60%,#642f99);border:2px solid #eed9ff;box-shadow:inset 5px 0 #ffffff44,0 6px 12px #0b1c3866;margin:8px 4px 0}.potion-art:before{content:'';position:absolute;width:26px;height:12px;top:-12px;left:6px;border:2px solid #e2d8ff;border-radius:5px;background:#7f69c0}.potion-art:after{content:'+';position:absolute;inset:10px 0;text-align:center;color:#fff5ff;font:900 24px/24px system-ui}.ball-art{width:54px;height:54px;border:3px solid #d5edf2;border-radius:50%;background:linear-gradient(#ff715c 0 44%,#294860 44% 56%,#f6f4e3 56%);box-shadow:inset -6px -5px #0c334733,0 6px 12px #0b1c3866}.ball-art:after{content:'';position:absolute;width:16px;height:16px;left:16px;top:16px;border:4px solid #294860;border-radius:50%;background:#f2fff8}
.trainer-name-form{margin:14px 0;padding:14px;border:1px solid #72a999;border-radius:14px;background:#e4f3e8;color:#183d40}.trainer-name-form label{display:block;font:800 14px system-ui;margin-bottom:9px}.trainer-name-form>div{display:flex;gap:8px}.trainer-name-form input{width:100%;min-width:0;border:1px solid #6b9c9a;border-radius:9px;background:#fff;color:#173f4d;padding:11px;font:700 16px system-ui;min-height:44px}.trainer-name-form button{white-space:nowrap;border-radius:9px!important;background:#236b71!important;color:white!important;font:750 12px system-ui!important;padding:9px!important}.trainer-name-form small{display:block;margin-top:8px;font:12px/1.4 system-ui;color:#3d6c68}.identity-card{padding:20px;border-radius:18px;background:linear-gradient(130deg,#154e71,#267a7a);color:#fff;margin-bottom:18px}.identity-card small{color:#8de3d4;letter-spacing:.12em}.identity-card h3{font:850 30px system-ui;margin:8px 0;overflow-wrap:anywhere}.identity-card span{display:block;font:13px system-ui;color:#c5eae9}.identity-card button{margin-top:14px;background:#ffd27e!important;color:#244659!important;border-radius:10px!important}
@keyframes command-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes item-arrival{0%{transform:translateY(5px) rotate(-7deg)}60%{transform:translateY(-3px) rotate(4deg)}100%{transform:none}}@media(max-height:640px){#sheet.rpg-screen.battle-command .command-hero{padding:8px 0;margin-bottom:10px}#sheet.rpg-screen.battle-command .command-hero img{width:46px;height:46px}#sheet.rpg-screen.battle-command .command-move{padding:10px}#sheet.rpg-screen.battle-command .command-numbers{margin:8px 0}#sheet.rpg-screen.battle-command .command-item{min-height:120px;padding:12px}#sheet.rpg-screen.battle-command .command-hero h3{font-size:18px}}@media(prefers-reduced-motion:reduce){#sheet.rpg-screen.battle-command,#sheet.rpg-screen.battle-command .command-move,#sheet.rpg-screen.battle-command .command-item,.item-art{animation:none!important}}

/* combat-experience.css */
/* Current 2D combat, with lightweight static habitat layers and brief effects. */
#battle .battle-field{background:linear-gradient(#78bfc6 0%,#cce9ce 43%,#69a969 44%,#99c67b 72%,#c3d897 100%);overflow:hidden}#battle .battle-field[data-habitat=water]{background:linear-gradient(#81c6df,#d4edf0 43%,#43a4c6 44%,#8fd7cf 68%,#d7d69b)}#battle .battle-field[data-habitat=cave]{background:linear-gradient(#324b60,#74847f 43%,#777f70 44%,#b3ad8d)}#battle .battle-field[data-habitat=gym]{background:repeating-linear-gradient(90deg,transparent 0 63px,#e3d5a433 64px 65px),linear-gradient(#3d6478,#91ada6 43%,#869d86 44%,#c1bd95)}#battle .battle-field[data-habitat=archive]{background:linear-gradient(#234458,#577b8b 43%,#719493 44%,#a9b5a0)}
#battle .enemy-base,#battle .ally-base{background:radial-gradient(ellipse,#2f694d55,transparent 68%);border:0;box-shadow:none;filter:none}#battle .enemy-base{width:40%;height:13%;right:8%;top:41%}#battle .ally-base{width:48%;height:15%;left:0;bottom:10%}#battle #enemy-sprite{width:clamp(100px,28vw,155px);height:clamp(100px,28vw,155px);right:12%;top:24%;object-fit:contain;filter:drop-shadow(0 6px 2px #21453555)}#battle #ally-sprite{width:clamp(118px,33vw,180px);height:clamp(118px,33vw,180px);left:5%;bottom:13%;object-fit:contain;filter:drop-shadow(0 7px 2px #21453555)}#battle .monster-hud{border:1px solid #e5f5d0;border-radius:15px;background:linear-gradient(130deg,#fbfff1,#def0d6);box-shadow:0 4px 12px #12374625}#battle .battle-heading{background:#102f48;color:#b6f3df}#battle #battle-label{font:800 12px/1.4 system-ui;text-transform:none;letter-spacing:.04em}#battle .battle-console{background:#112f46;border-color:#487b87;padding:12px}#battle #battle-message{font:650 14px/1.45 system-ui;border:1px solid #577f95;border-radius:12px;background:#163c55;color:#f1faff;min-height:55px}#battle #battle-actions button{font:800 14px system-ui;border-radius:12px;border:1px solid #6d9ca9;background:#24516a;color:#f0faff;min-height:52px}#battle #battle-actions .fight{background:linear-gradient(#e57c64,#bc514c);border-color:#ffa78a}#battle #battle-actions .ball{background:linear-gradient(#42a89c,#287a7e);border-color:#80dac6}#battle #battle-actions small,#battle #battle-actions p{color:#bfdee5;font-family:system-ui}#battle #battle-actions small{font-size:10px}.flight-active #battle-effect .type-projectile,.flight-active #battle-effect .impact-ring{display:none}#battle #attack-flight{position:absolute;inset:0;width:100%;height:100%;z-index:8;pointer-events:none}
#sheet.rpg-screen.battle-command .party-intro{padding:18px 0 14px;border-bottom:1px solid #528599;margin-bottom:14px}#sheet.rpg-screen.battle-command .party-intro small{font:800 10px system-ui;color:#7ee1ce;letter-spacing:.1em}#sheet.rpg-screen.battle-command .party-intro h3{font:850 22px/1.2 system-ui;color:white;margin:8px 0}#sheet.rpg-screen.battle-command .party-intro p{font:12px/1.5 system-ui;color:#bfdde5}#sheet.rpg-screen.battle-command .experience-party{display:grid;gap:11px}#sheet.rpg-screen.battle-command .experience-partner{display:flex;align-items:center;gap:12px;text-align:left;min-height:100px;padding:10px 12px;border:1px solid #6c9cac;border-radius:16px;background:linear-gradient(110deg,#2b5a71,#173a53);color:#f3fcff;font-family:system-ui;animation:command-in .25s both;animation-delay:calc(var(--entry)*35ms)}#sheet.rpg-screen.battle-command .experience-partner img{width:75px;height:75px;object-fit:contain;image-rendering:pixelated}#sheet.rpg-screen.battle-command .experience-mon{flex:1;min-width:0}#sheet.rpg-screen.battle-command .experience-mon>strong{display:block;font:850 19px/1.3 system-ui;color:white}#sheet.rpg-screen.battle-command .experience-mon>small{display:block;font:11px/1.5 system-ui;color:#c3dce6;margin:3px 0}#sheet.rpg-screen.battle-command .experience-mon .hp-label{font:10px system-ui;color:#d3eaf0}#sheet.rpg-screen.battle-command .experience-mon .hp{margin-top:8px}#sheet.rpg-screen.battle-command .experience-arrow{color:#ffda81;font-size:22px}#sheet.rpg-screen.battle-command .experience-partner.in-field{border-color:#e5c46c}#sheet.rpg-screen.battle-command .experience-partner:disabled{background:#243d51;color:#afc2cf;opacity:1}#sheet.rpg-screen.battle-command .rpg-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}#sheet.rpg-screen.battle-command .rpg-actions button{flex:1;background:#2e6579;color:#ecffff;border:1px solid #74a5b2;border-radius:10px;font:750 12px system-ui}
@media(max-height:600px){#battle #enemy-sprite{height:90px;width:90px}#battle #ally-sprite{height:105px;width:105px}#battle .battle-console{padding:8px}#battle #battle-message{font-size:12px;min-height:43px}#battle #battle-actions button{min-height:45px;font-size:12px}}@media(prefers-reduced-motion:reduce){#sheet.rpg-screen.battle-command .experience-partner{animation:none}}
/* Stability revision: bounded DOM sprites replace the animated canvas layer. */
#battle #attack-flight{overflow:hidden;contain:layout paint;pointer-events:none}#attack-flight .light-projectile{display:block;position:absolute;left:0;top:0;width:var(--size);height:var(--size);background:#f9e7b4;border-radius:50%;opacity:0;animation:light-flight var(--flight-duration) ease-out var(--delay) both}#attack-flight .fx-fire{background:linear-gradient(90deg,#ff6346,#ffb23f 60%,#fff1a1);border-radius:65% 25% 65% 25%;height:calc(var(--size)*.7)}#attack-flight .fx-water{background:#72deff;border:1px solid #d7fbff;border-radius:65% 15% 65% 65%;height:calc(var(--size)*1.4)}#attack-flight .fx-electric{background:#fff280;border-radius:0;clip-path:polygon(50% 0,100% 0,60% 40%,90% 40%,0 100%,35% 50%,10% 50%)}#attack-flight .fx-grass{background:#91e777;border-radius:90% 5% 90% 5%}#attack-flight .fx-ice{background:#bcf4ff;border-radius:1px}#attack-flight .fx-psychic,#attack-flight .fx-ghost,#attack-flight .fx-fairy{background:#dba7ff;border:2px solid #fae5ff}#attack-flight .fx-physical{border:3px solid #fff4bf;background:transparent;border-radius:4px;animation-name:light-impact}@keyframes light-flight{0%{transform:translate(var(--sx),var(--sy)) rotate(var(--angle)) scale(.4);opacity:0}12%{opacity:1}80%{transform:translate(calc(var(--sx) + var(--dx)),calc(var(--sy) + var(--dy))) rotate(var(--angle)) scale(1);opacity:1}100%{transform:translate(calc(var(--sx) + var(--dx)),calc(var(--sy) + var(--dy))) rotate(var(--angle)) scale(1.5);opacity:0}}@keyframes light-impact{0%,45%{transform:translate(calc(var(--sx) + var(--dx)),calc(var(--sy) + var(--dy))) rotate(45deg) scale(.2);opacity:0}65%{opacity:1}100%{transform:translate(calc(var(--sx) + var(--dx)),calc(var(--sy) + var(--dy))) rotate(70deg) scale(1.6);opacity:0}}@media(prefers-reduced-motion:reduce){#battle #attack-flight{display:none!important}.light-projectile{animation:none!important}}
#battle .battle-sprite{filter:none!important}#battle .battle-sprite.hit{animation:light-hit .22s linear}@keyframes light-hit{25%,75%{opacity:.3}0%,50%,100%{opacity:1}}

/* capture-experience.css */
/* Larger combat sprites; HUDs keep their own clear corners. */
#battle #enemy-sprite{width:clamp(170px,46vw,245px);height:clamp(170px,46vw,245px);top:23%;right:5%}#battle #ally-sprite{width:clamp(190px,52vw,280px);height:clamp(190px,52vw,280px);bottom:9%;left:1%}#battle #enemy-hud{max-width:57%}#battle #ally-hud{max-width:57%}#battle-field #capture-moment{position:absolute;inset:0;z-index:10;pointer-events:none;overflow:hidden;contain:layout paint}.catch-ball{position:absolute;left:0;top:0;width:32px;height:32px;border:3px solid #e8f6f5;border-radius:50%;background:linear-gradient(#ef5c52 0 44%,#29495b 44% 56%,#fff9db 56%);opacity:0;animation:catch-throw var(--catch-duration) linear both}.catch-ball:after{content:'';position:absolute;left:8px;top:8px;width:10px;height:10px;background:#f5fff5;border:3px solid #29495b;border-radius:50%}.capture-sequence #enemy-sprite{animation:catch-in var(--catch-duration,2200ms) ease-in-out both;transform-origin:50% 65%}.capture-failed #enemy-sprite{animation-name:catch-escape}.capture-failed .catch-ball{animation-name:catch-break}.catch-ripple{position:absolute;left:var(--catch-x);top:var(--catch-y);width:40px;height:40px;margin:-20px;border:2px solid #bdf4f1;border-radius:50%;opacity:0;animation:catch-ring var(--catch-duration) ease-out both}.catch-stars{position:absolute;left:var(--catch-x);top:var(--catch-y);display:flex;gap:8px;transform:translate(-50%,-110%);color:#ffe17d;font:25px system-ui;opacity:0}.capture-success .catch-stars{animation:catch-stars var(--catch-duration) ease-out both}.catch-stars i{font-style:normal}.catch-caption{position:absolute;left:10%;right:10%;bottom:4%;padding:9px;text-align:center;font:800 13px system-ui;color:#fff0ae;background:#153b4ad9;border:1px solid #a3c7bc;border-radius:12px;animation:catch-caption var(--catch-duration) linear both}#battle #battle-message.capture-result{background:linear-gradient(120deg,#20635e,#184d67);border-color:#e6c56e;color:#fff5cf}
@keyframes catch-throw{0%{opacity:0;transform:translate(var(--catch-from-x),var(--catch-from-y)) scale(.6)}8%{opacity:1}22%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 55px)) rotate(260deg)}32%,42%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}49%,64%,79%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(345deg)}55%,70%,85%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(375deg)}92%,100%{opacity:1;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}}
@keyframes catch-break{0%{opacity:0;transform:translate(var(--catch-from-x),var(--catch-from-y)) scale(.6)}8%{opacity:1}25%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 55px)) rotate(260deg)}35%,45%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}55%,70%{opacity:1;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(340deg)}62%,78%{opacity:1;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(380deg)}90%,100%{opacity:0;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) scale(1.5)}}
@keyframes catch-in{0%,22%{opacity:1;transform:scale(1)}34%,100%{opacity:0;transform:scale(.08)}}@keyframes catch-escape{0%,22%,96%,100%{opacity:1;transform:scale(1)}35%,78%{opacity:0;transform:scale(.08)}}@keyframes catch-ring{0%,24%,100%{opacity:0;transform:scale(.4)}32%,86%{opacity:.8;transform:scale(1.6)}40%,94%{opacity:0;transform:scale(2.2)}}@keyframes catch-stars{0%,82%,100%{opacity:0}89%,96%{opacity:1;transform:translate(-50%,-140%)}}@keyframes catch-caption{0%,15%{opacity:0}24%,100%{opacity:1}}
@media(max-height:600px){#battle #enemy-sprite{width:120px;height:120px;top:19%}#battle #ally-sprite{width:135px;height:135px;bottom:4%}.catch-caption{font-size:11px;padding:6px}}@media(prefers-reduced-motion:reduce){.capture-sequence #enemy-sprite,.catch-ball,.catch-ripple,.catch-stars,.catch-caption{animation:none!important}.catch-ball{opacity:1;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px))}.catch-caption{opacity:1}}

/* field-bag.css */
#sheet.rpg-screen.battle-command .field-wallet{display:flex;justify-content:space-between;align-items:center;padding:16px 0;color:#ffda90}#sheet.rpg-screen.battle-command .field-wallet span{font:800 9px system-ui;letter-spacing:.12em;color:#93d8d2}#sheet.rpg-screen.battle-command .field-wallet b{font:850 19px system-ui}.field-pockets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:16px}#sheet.rpg-screen.battle-command .field-pockets button{display:flex;flex-direction:column;gap:5px;align-items:center;border-radius:12px;background:#1b425b;border:1px solid #50798c;color:#c5e2e8;min-width:0;padding:10px 3px;font:750 11px system-ui;min-height:66px}#sheet.rpg-screen.battle-command .field-pockets button span{font-size:21px;color:#93d8d2}#sheet.rpg-screen.battle-command .field-pockets button[aria-pressed=true]{background:linear-gradient(#efc571,#dca14d);color:#183c4c;border-color:#ffe6a4}#sheet.rpg-screen.battle-command .field-pockets button[aria-pressed=true] span{color:#265268}.field-content{display:grid;gap:11px}#sheet.rpg-screen.battle-command .field-item{display:flex;align-items:center;gap:13px;padding:16px 12px;border:1px solid #628c9c;border-radius:15px;background:linear-gradient(115deg,#29566d,#193c55);animation:command-in .2s ease-out}#sheet.rpg-screen.battle-command .field-item>div{flex:1;min-width:0}#sheet.rpg-screen.battle-command .field-item small{font:800 8px system-ui;letter-spacing:.08em;color:#89d7d6}#sheet.rpg-screen.battle-command .field-item h3{display:flex;justify-content:space-between;gap:8px;font:850 19px system-ui;color:#fff;margin:4px 0 7px}#sheet.rpg-screen.battle-command .field-item h3 b{font:800 15px system-ui;color:#ffda8b;white-space:nowrap}#sheet.rpg-screen.battle-command .field-item p{font:12px/1.5 system-ui;color:#c4dfe8}#sheet.rpg-screen.battle-command .field-item button{align-self:flex-end;min-height:42px;padding:9px;border:1px solid #8cc7bd;border-radius:10px;background:#347c7c;color:#effff9;font:800 11px system-ui}#sheet.rpg-screen.battle-command .field-item button:disabled{background:#254558;color:#9db5c3;border-color:#527386}.field-object{flex:none;width:37px;height:48px;border-radius:10px 10px 8px 8px;border:2px solid #e8d9ff;background:linear-gradient(110deg,#db9bf1,#8543b6);display:grid;place-items:center;position:relative;color:#fff;font:900 25px system-ui;box-shadow:inset 5px 0 #ffffff2b}.field-object:before{content:'';position:absolute;left:7px;right:7px;top:-7px;height:8px;border-radius:3px;background:#b9b1d7;border:1px solid #eee9ff}.object-antidote{background:linear-gradient(110deg,#ffcaa3,#de7445);border-color:#fff2d0}.object-ether{background:linear-gradient(110deg,#a9d9ff,#477fc8);border-color:#e2f8ff}.object-balls{height:38px;width:38px;border-radius:50%;border:2px solid #192d3e;background:radial-gradient(circle at 32% 24%,#ffffff85,transparent 32%),linear-gradient(#e84f4b 0 44%,#203b4d 44% 56%,#f9f4df 56%)}.object-balls:before{height:12px;width:12px;left:10px;top:10px;right:auto;border-radius:50%;background:#f4ffff;border:3px solid #294556}.field-key-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}#sheet.rpg-screen.battle-command .field-key-grid button{position:relative;padding:14px 12px 28px;border-radius:13px;background:#214b64;color:#f0fbff;border:1px solid #6c95a7;text-align:left;font-family:system-ui}#sheet.rpg-screen.battle-command .field-key-grid strong{display:block;font-size:14px}#sheet.rpg-screen.battle-command .field-key-grid small{display:block;color:#b6d4df;font-size:11px;margin-top:5px}#sheet.rpg-screen.battle-command .field-key-grid b{position:absolute;bottom:8px;right:11px;color:#ffda87}.field-owned{padding:14px;background:#123148;border-radius:12px}.field-equipment{display:grid;gap:9px}#sheet.rpg-screen.battle-command .field-equipment button{display:flex;align-items:center;gap:10px;border-radius:13px;background:#244e66;color:#f1fcff;font-family:system-ui;text-align:left}.field-equipment img{width:54px;height:54px;object-fit:contain;image-rendering:pixelated}.field-equipment span{flex:1}.field-equipment small{display:block;color:#b9dce5;margin-top:5px}#sheet.rpg-screen.battle-command .field-team{width:100%;margin-top:15px;border-radius:12px;background:#edc576;color:#234753;font:800 13px system-ui}
/* A lit spherical shell, dark equator and recessed central latch. */
#capture-moment .catch-ball{width:36px;height:36px;border:2px solid #263b4b;background:radial-gradient(ellipse at 30% 17%,#fff9 0 9%,#fff2 17%,transparent 38%),linear-gradient(#f9645a 0%,#c62f3d 44%,#192e3c 45% 55%,#fffef4 56%,#b6c8ce 100%);box-shadow:inset -4px -3px #0e293338,inset 3px 2px #ffffff35}#capture-moment .catch-ball:after{width:12px;height:12px;left:10px;top:10px;background:radial-gradient(circle at 35% 30%,#fff,#d3e9e9);border:3px solid #253b4a}#capture-moment .catch-ball:before{content:'';position:absolute;left:4px;right:3px;bottom:-7px;height:4px;border-radius:50%;background:#163b4938}#capture-moment .catch-caption{font-size:14px}#capture-moment .catch-ripple{border-color:#fff4c0}.capture-success .catch-ball:after{animation:catch-latch var(--catch-duration) linear both}@keyframes catch-latch{0%,80%{border-color:#253b4a}86%,94%{border-color:#cbae51;background:#f9ed9b}100%{border-color:#253b4a}}
@media(prefers-reduced-motion:reduce){#sheet.rpg-screen.battle-command .field-item,.capture-success .catch-ball:after{animation:none}}
#sheet.rpg-screen.battle-command .storage-row{border:1px solid #658e9e;border-radius:13px;background:#245069;color:#f3fcff;padding:12px}#sheet.rpg-screen.battle-command .storage-row strong,#sheet.rpg-screen.battle-command .storage-row b{color:#fff}#sheet.rpg-screen.battle-command .storage-row button{border-radius:10px;background:#398582;color:#f6ffff;border:1px solid #8ed2c5;font:750 12px system-ui}#sheet.rpg-screen.battle-command .storage-row button:disabled{color:#a7bcc8;background:#294455}.command-audio label{display:block;padding:12px;border:1px solid #568193;border-radius:12px;background:#1c445c;font:700 14px system-ui}.command-audio input[type=range]{width:100%;margin-top:12px;accent-color:#79dac1;min-height:34px}
@keyframes catch-throw{0%{opacity:0;transform:translate(var(--catch-from-x),var(--catch-from-y)) rotate(-30deg) scale(.6)}8%{opacity:1}18%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 85px)) rotate(260deg)}30%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 10px)) rotate(360deg) scale(1.03,.92)}36%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 31px)) rotate(360deg) scale(1)}42%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}49%,64%,79%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(348deg)}55%,70%,85%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(372deg)}92%,100%{opacity:1;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}}

@keyframes catch-break{0%{opacity:0;transform:translate(var(--catch-from-x),var(--catch-from-y)) rotate(-30deg) scale(.6)}8%{opacity:1}18%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 85px)) rotate(260deg)}30%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 10px)) rotate(360deg) scale(1.03,.92)}36%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 31px)) rotate(360deg) scale(1)}42%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}49%,64%,79%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(348deg)}55%,70%,85%{transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(372deg)}92%,100%{opacity:0;transform:translate(calc(var(--catch-x) - 18px),calc(var(--catch-y) - 18px)) rotate(360deg)}}

/* menu-consistency.css */
/* Shared adventure panels: navy, turquoise, gold, readable touch controls. */
#sheet.rpg-screen.command-panel .rpg-body{font:500 14px/1.55 system-ui,sans-serif;padding-top:16px}
#sheet.rpg-screen.command-panel .rpg-body>p{margin:0 0 14px;color:#d7eaf3;font-weight:500}
#sheet.rpg-screen.command-panel .rpg-body h3{color:#fff;font-family:system-ui}
#sheet.rpg-screen.command-panel .rpg-body button{min-height:46px;border:1px solid #6196a7;border-radius:12px;background:#27556e;color:#f5fbff;font:750 14px/1.35 system-ui;padding:12px 14px;box-shadow:none;overflow-wrap:normal;word-break:normal}
#sheet.rpg-screen.command-panel .rpg-body>button{display:block;width:100%;margin-top:10px;text-align:center}
#sheet.rpg-screen.command-panel .rpg-body button.primary{background:linear-gradient(#ffda8b,#e9b658);border-color:#ffe6a6;color:#183b50}
#sheet.rpg-screen.command-panel .rpg-body button:disabled{background:#213f53;color:#a4bdca;border-color:#456475;opacity:1}
#sheet.rpg-screen.command-panel .rpg-body button:not(:disabled):active,#sheet.rpg-screen.trainer-invitation button:not(:disabled):active{transform:scale(.98)}
#sheet.rpg-screen.command-panel .story-checklist{border:1px solid #598d9e;border-radius:15px;background:#163c55;padding:12px 16px;margin:16px 0;color:#c9eee6}
#sheet.rpg-screen.command-panel .story-checklist p{padding:8px 0;margin:0;border-bottom:1px solid #79b3bd30;font:700 14px/1.4 system-ui}
#sheet.rpg-screen.command-panel .story-checklist p:last-child{border:0}
.market-intro>span{font:800 9px system-ui;letter-spacing:.14em;color:#81dfd2}.market-intro p{color:#d5eaf3;margin:7px 0 16px}.market-wallet{display:flex;justify-content:space-between;align-items:center;padding:14px;border-radius:13px;background:#102e45;border:1px solid #528595;margin-bottom:14px}.market-wallet span{color:#bbdae7}.market-wallet b{color:#ffda8b;font:850 22px system-ui}.market-stock{display:grid;gap:10px}
#sheet.rpg-screen.command-panel .market-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:15px 12px;background:linear-gradient(115deg,#28596f,#193c54);border-radius:15px;animation:command-in .2s ease-out}
.market-copy{flex:1;min-width:0}.market-copy strong{display:block;color:#fff;font:800 17px system-ui}.market-copy small{display:block;color:#d0e6ef;font:12px/1.45 system-ui;margin:6px 0}.market-copy em{color:#8edbd0;font:700 11px system-ui}.market-price{flex:none;text-align:right}.market-price b{display:block;color:#ffda8b;font:850 16px system-ui}.market-price small{display:block;font:700 10px system-ui;color:#bee6ed;margin-top:8px}
#sheet.rpg-screen.trainer-invitation .rpg-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}
#sheet.rpg-screen.trainer-invitation .rpg-actions button{min-height:48px;border-radius:12px;border:1px solid #79b5c2;background:#285c76;color:#fff;font:750 14px/1.35 system-ui;padding:12px;box-shadow:none}
#sheet.rpg-screen.trainer-invitation .rpg-actions button:first-child{background:linear-gradient(#ffda8b,#e9b658);border-color:#ffe4a5;color:#173c50}
#sheet.rpg-screen.trainer-invitation .dialogue-text{font:500 16px/1.5 system-ui;color:#f2faff}
@media(max-width:370px){#sheet.rpg-screen.command-panel .market-item{gap:8px;padding:12px 9px}.market-item .field-object{transform:scale(.8);width:30px;flex-basis:30px}.market-copy strong{font-size:15px}.market-price b{font-size:14px}}
@media(prefers-reduced-motion:reduce){#sheet.rpg-screen.command-panel .market-item{animation:none}}

#sheet.rpg-screen.rpg-dialog.trainer-invitation{max-height:min(62dvh,480px)}#sheet.rpg-screen.rpg-dialog.trainer-invitation .rpg-body{max-height:calc(62dvh - 65px);overflow-y:auto;overscroll-behavior:contain}#sheet.rpg-screen.trainer-invitation .rpg-head{background:#14364d;color:#f4fbff}

#sheet.rpg-screen.command-panel .story-checklist p{display:flex;gap:12px;align-items:center}.story-checklist p>span{display:grid;place-items:center;width:26px;height:26px;flex:none;border:1px solid #618d9e;border-radius:50%;font:800 11px system-ui;color:#b9d9e6}#sheet.rpg-screen.command-panel .story-checklist .mission-current{color:#ffda8b}.mission-current>span{background:#e9b658;color:#173c50;border-color:#ffda8b}.mission-done>span{background:#286f6d;color:#baffdf;border-color:#72c8b5}.mission-pending{color:#afcbd7}

/* nevoa-negra.css */
#world.nevoa-world:after{content:'';position:absolute;inset:-4% -10%;pointer-events:none;background:radial-gradient(ellipse at 20% 40%,#bbcfeb20,transparent 55%),linear-gradient(110deg,transparent 30%,#ccd5ea23 50%,transparent 70%);background-size:140% 100%;z-index:1;animation:nevoa-drift 18s ease-in-out infinite alternate;opacity:.7}#world.nevoa-haunted:after{background:radial-gradient(ellipse at 70% 35%,#a991df38,transparent 55%),linear-gradient(110deg,transparent 25%,#8bc4ed30 50%,transparent 75%);background-size:140% 100%;opacity:.9}#world.fog-paused:after{animation-play-state:paused}.darkrai-reveal{text-align:center;max-height:170px;overflow:hidden}.darkrai-reveal img{width:150px;height:150px;object-fit:contain;image-rendering:pixelated;animation:darkrai-arrival 1.8s ease-out both}#sheet.rpg-screen.legend-manifest{max-height:85dvh;background:#171e38}#sheet.legend-manifest .dialogue-portrait{display:none}#sheet.legend-manifest .rpg-body{max-height:calc(85dvh - 55px);overflow:auto}@keyframes nevoa-drift{from{transform:translate3d(-3%,0,0)}to{transform:translate3d(3%,0,0)}}@keyframes darkrai-arrival{from{opacity:0;transform:translateY(12px) scale(.9)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){#world.nevoa-world:after,.darkrai-reveal img{animation:none}}

#sheet.legend-manifest .dialogue-scene{display:block}

/* living-systems.css */
.shiny-symbol{color:#e5b841;font-weight:900;text-shadow:0 1px #54351e;white-space:nowrap}.shiny-portrait{display:inline-grid;position:relative;flex:none;align-items:center}.shiny-portrait>.shiny-symbol{position:absolute;bottom:0;right:2px;background:#102f48;border:1px solid #f4cc5d;border-radius:50%;width:23px;height:23px;display:grid;place-items:center;font:900 16px system-ui}.shiny-mon,.shiny-evolution img{filter:sepia(.55) saturate(2.1) hue-rotate(135deg)!important}
#sheet.rpg-screen.command-living .living-hero{padding:20px 0;border-bottom:1px solid #558b9a;margin-bottom:16px}.living-hero>small{font:800 10px system-ui;color:#81e2c6;letter-spacing:.15em}.living-hero>h3{font:850 26px/1.1 system-ui;color:#fff2c3!important;margin:10px 0}.living-hero p{color:#c8e1ea!important;font:13px/1.5 system-ui}.living-cards{display:grid;gap:13px}.living-card{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:16px;border:1px solid #4d718a;border-radius:14px;background:linear-gradient(125deg,#21475b,#142e46);font-family:system-ui}.living-card>div{min-width:0}.living-card h3{margin:0 0 6px;color:#effaff!important;font:800 17px system-ui}.living-card p{color:#b9d4df!important;font:12px/1.5 system-ui}.living-card small{display:block;color:#f1d58a;font-size:11px;line-height:1.5}.living-card button{grid-column:1/-1;min-height:44px!important;background:#2e776f!important;color:#fff3c3!important;border:1px solid #87c6aa!important}.living-card button:disabled{background:#203f51!important;color:#97b2bd!important;border-color:#496472!important}.living-card.unlocked{border-color:#c4aa5a;background:linear-gradient(125deg,#294c55,#153a4a)}.living-emblem{font-size:29px;color:#f4d77e}.living-cards>button{padding:18px;text-align:left;background:#21546b!important;color:#fff2c2!important;border-color:#76b4b5!important}.living-cards>button small{display:block;color:#c3dfe8;margin-top:5px}.living-menu{border-color:#d5bd70!important}
#battle #shiny-entry{position:absolute;inset:0;pointer-events:none;z-index:11;opacity:0;contain:layout paint}#shiny-entry.shiny-arrival{animation:shiny-entry 1.4s both}#shiny-entry i{position:absolute;color:#fff4a1;font:900 45px system-ui;right:22%;top:27%;text-shadow:0 0 14px #fff1a2}#shiny-entry i:nth-child(2){right:12%;top:35%;font-size:30px}#shiny-entry i:nth-child(3){right:38%;top:39%;font-size:23px}#shiny-entry span{position:absolute;top:62%;left:20%;right:20%;text-align:center;border:1px solid #f3cf6b;border-radius:20px;background:#15364be8;color:#fff0a0;padding:8px;font:800 12px system-ui}@keyframes shiny-entry{0%{opacity:0;transform:scale(.85)}20%,65%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.05)}}
@media(prefers-reduced-motion:reduce){#shiny-entry.shiny-arrival{animation:shiny-entry 1s both}#shiny-entry i{font-size:30px}@keyframes shiny-entry{0%,80%{opacity:1}100%{opacity:0}}}
.alpha-portrait{display:inline-grid;position:relative;flex:none}.alpha-portrait>.alpha-symbol{position:absolute;top:0;left:1px;background:#613941;border:1px solid #f3b59c;border-radius:50%;width:21px;height:21px;display:grid;place-items:center;font:900 14px system-ui;color:#ffe6bf}.alpha-symbol{color:#a65e43;font:900 15px system-ui}.trainer-title{padding:10px;border:1px solid #bba35e;background:#21495b;color:#ffe9a4;font-weight:800}.living-card .shiny-portrait img{width:110px;height:110px;object-fit:contain;image-rendering:pixelated}.living-card .living-cards{margin-top:10px}#sheet.command-living .living-cards{min-width:0}#sheet .dex-filters{flex-wrap:wrap}#sheet .dex-filters select{max-width:100%;min-width:0}#sheet.command-living .summary-hero{min-width:0}#sheet.command-living .summary-hero p{font:13px/1.5 system-ui;color:#d3e6ec}

/* battle-landscapes.css */
/* Six static, local landscapes. No extra render loop or animated full-screen filters. */
#battle #battle-field[data-living-habitat]{background-size:100% 100%;background-repeat:no-repeat;background-color:#304c55}#battle #battle-field[data-living-habitat=forest]{background-image:url('assets/battle/forest.svg')}#battle #battle-field[data-living-habitat=water]{background-image:url('assets/battle/water.svg')}#battle #battle-field[data-living-habitat=cave]{background-image:url('assets/battle/cave.svg')}#battle #battle-field[data-living-habitat=mountain]{background-image:url('assets/battle/mountain.svg')}#battle #battle-field[data-living-habitat=haunted]{background-image:url('assets/battle/haunted.svg')}#battle #battle-field[data-living-habitat=gym]{background-image:url('assets/battle/gym.svg')}
#battle #battle-field[data-living-habitat] .distant-trees,#battle #battle-field[data-living-habitat] .enemy-base,#battle #battle-field[data-living-habitat] .ally-base{display:none}#battle #battle-field #enemy-sprite{width:clamp(104px,31vw,170px);height:clamp(104px,31vw,170px);right:12%;top:auto;bottom:43%;max-height:32%;object-fit:contain;object-position:center bottom}#battle #battle-field #ally-sprite{width:clamp(120px,36vw,195px);height:clamp(120px,36vw,195px);left:3%;bottom:14%;max-height:38%;object-fit:contain;object-position:center bottom}#battle #battle-field .monster-hud{padding:9px 10px;background:linear-gradient(110deg,#fffdea,#dfefdb);border:2px solid #e9f1c7;box-shadow:0 3px 0 #1b384860;border-radius:12px;max-width:55%}#battle #enemy-hud{top:5%;left:3%}#battle #ally-hud{right:3%;bottom:4%}#battle .battle-sprite.shiny-mon{filter:sepia(.55) saturate(2.1) hue-rotate(135deg)!important}#battle #battle-field .hp{height:9px;border-radius:5px;border-color:#2c5650}#battle #battle-field .xp{height:4px;background:#b3cdce}#battle #battle-field .xp i{background:#55b4dc}#battle .monster-hud strong{font:850 14px system-ui}#battle .monster-hud .combat-types{min-height:16px;margin:4px 0}#battle .monster-hud .hp-label{font:700 10px system-ui}#battle .battle-heading{border-bottom:2px solid #619c9a}
@media(max-height:600px){#battle #battle-field #enemy-sprite{width:90px;height:90px;max-height:40%}#battle #battle-field #ally-sprite{width:110px;height:110px;max-height:42%}#battle #battle-field .monster-hud{padding:5px 8px}#battle .monster-hud .combat-types{display:none}#battle .monster-hud strong{font-size:12px}}

/* battle-cinema.css */
/* Only transforms/opacity move. Effects are bounded to one small DOM layer. */
#combat-cinema{position:absolute;inset:0;z-index:9;pointer-events:none;overflow:hidden;contain:layout paint}#battle-field.cinema-motion[data-phase=await]:not(.cinema-busy):not(.cinema-reveal):not(.capture-sequence) #enemy-sprite{animation:mon-breathe 2.7s ease-in-out infinite}#battle-field.cinema-motion[data-phase=await]:not(.cinema-busy):not(.cinema-reveal):not(.capture-sequence) #ally-sprite{animation:mon-breathe 3.1s ease-in-out .2s infinite}@keyframes mon-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
#battle #battle-field.cinema-reveal #enemy-sprite{animation:enemy-reveal var(--entry-time,550ms) both}#battle #battle-field.cinema-reveal #ally-sprite{animation:ally-reveal var(--entry-time,550ms) both}@keyframes enemy-reveal{from{opacity:0;transform:translate(30px,-7px) scale(.82)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes ally-reveal{from{opacity:0;transform:translate(-35px,15px) scale(.9)}to{opacity:1;transform:translate(0) scale(1)}}
#battle-field.cinema-busy.cinema-lunge[data-cinema-actor=ally] #ally-sprite{animation:ally-lunge var(--scene-ms) both}#battle-field.cinema-busy.cinema-lunge[data-cinema-actor=enemy] #enemy-sprite{animation:enemy-lunge var(--scene-ms) both}@keyframes ally-lunge{35%{transform:translate(16px,-10px) rotate(-4deg)}65%{transform:translate(10px,-5px)}}@keyframes enemy-lunge{35%{transform:translate(-15px,10px) rotate(4deg)}65%{transform:translate(-10px,5px)}}
#battle #battle-field.cinema-hit[data-cinema-actor=ally] #ally-sprite,#battle #battle-field.cinema-hit[data-cinema-actor=enemy] #enemy-sprite{animation:mon-recoil .26s both}@keyframes mon-recoil{20%,60%{opacity:.5;transform:translateX(5px)}40%,80%{opacity:1;transform:translateX(-4px)}100%{opacity:1;transform:translateX(0)}}#battle-field.cinema-switch[data-cinema-actor=ally] #ally-sprite,#battle-field.cinema-switch[data-cinema-actor=enemy] #enemy-sprite{animation:mon-switch .3s both}@keyframes mon-switch{from{opacity:0;transform:scale(.3) translateY(10px)}to{opacity:1;transform:scale(1)}}#battle-field.cinema-faint[data-cinema-actor=ally] #ally-sprite,#battle-field.cinema-faint[data-cinema-actor=enemy] #enemy-sprite{animation:mon-faint .3s both}@keyframes mon-faint{to{opacity:0;transform:translateY(25px) scale(.8)}}
.cinema-fx{position:absolute;inset:0}.cinema-shot{position:absolute;left:0;top:0;width:20px;height:20px;border-radius:50%;opacity:0;background:var(--tone);animation:scene-shot var(--scene-ms) ease-in calc(var(--i)*var(--scene-step)) both}.shot-flame{width:30px;height:18px;border-radius:80% 15% 80% 15%;background:linear-gradient(90deg,#ff613b,#ffa32f 55%,#fff8ad);box-shadow:inset 0 -3px #de472d}.shot-water{width:13px;height:25px;border:2px solid #d9ffff;background:#4abce8;border-radius:65% 15% 65% 65%}.shot-shards{width:18px;height:17px;border-radius:1px;clip-path:polygon(50% 0,100% 38%,75% 100%,8% 78%,0 30%);border:2px solid #effac7}.shot-pulse{background:transparent;border:4px solid var(--tone)}@keyframes scene-shot{0%{opacity:0;transform:translate(var(--sx),var(--sy)) rotate(var(--angle)) scale(.5)}12%{opacity:1}88%{opacity:1}100%{opacity:0;transform:translate(var(--tx),var(--ty)) rotate(var(--angle)) scale(1.3)}}
.cinema-impact{position:absolute;left:var(--tx);top:var(--ty);width:40px;height:40px;margin:-20px;border:3px solid var(--tone);border-radius:50%;animation:scene-impact var(--scene-ms) ease-out both;opacity:0}@keyframes scene-impact{0%,50%{opacity:0;transform:scale(.3)}75%{opacity:.9}100%{opacity:0;transform:scale(1.7)}}.cinema-bolt{position:absolute;left:var(--sx);top:var(--sy);width:var(--ray);height:26px;transform-origin:0 50%;transform:rotate(var(--angle));background:#fff289;clip-path:polygon(0 48%,28% 0,25% 45%,60% 18%,52% 49%,100% 35%,70% 80%,73% 55%,35% 95%,40% 57%,0 70%);animation:scene-bolt var(--scene-ms) steps(2) both}@keyframes scene-bolt{0%,100%{opacity:0}20%,60%{opacity:1}40%,80%{opacity:.3}}
.cinema-jaw{position:absolute;left:var(--tx);top:var(--ty);width:60px;height:26px;margin-left:-30px;background:#f3f6e8;clip-path:polygon(0 0,100% 0,100% 45%,82% 100%,67% 42%,50% 100%,32% 42%,15% 100%,0 45%);animation:jaw-close var(--scene-ms) both;--jaw:-28px}.jaw-bottom{--jaw:16px;scale:1 -1}@keyframes jaw-close{0%{opacity:0;translate:0 var(--jaw)}25%{opacity:1}65%{opacity:1;translate:0 -10px}100%{opacity:0;translate:0 -10px}}.cinema-slash{position:absolute;left:var(--tx);top:var(--ty);height:5px;width:64px;margin-left:-30px;background:#fff6cb;box-shadow:0 3px var(--tone);border-radius:100%;rotate:-42deg;translate:calc(var(--i)*8px) calc(var(--i)*8px);animation:scene-slash var(--scene-ms) ease-out calc(var(--i)*var(--scene-step)) both}@keyframes scene-slash{0%,15%{opacity:0;scale:.1 1}55%{opacity:1;scale:1 1}100%{opacity:0;scale:1.15 1}}.cinema-strike{position:absolute;left:var(--tx);top:var(--ty);margin:-32px;color:#ffeda2;font:65px/1 system-ui;animation:scene-impact var(--scene-ms) both}
.cinema-result{position:absolute;left:8%;right:8%;top:28%;display:flex;align-items:center;gap:12px;padding:14px;border:2px solid #f6d98c;border-radius:16px;background:linear-gradient(110deg,#1c5668f5,#102e4bf5);box-shadow:0 5px 0 #092b3c55;color:#fff3c3;font-family:system-ui;animation:result-arrive .35s ease-out both}.cinema-result>img,.cinema-result .shiny-portrait img,.cinema-result .alpha-portrait img{width:65px;height:65px;object-fit:contain;image-rendering:pixelated}.cinema-result strong{display:block;font:850 22px/1.15 system-ui;margin:5px 0}.cinema-result small{font:800 8px system-ui;letter-spacing:.13em;color:#92e8d5}.cinema-result span{font-size:11px}.cinema-result .result-seal{font-size:40px;color:#ffe29c}.result-end{border-color:#91b7c2}.result-end strong{font-size:17px}@keyframes result-arrive{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
#capture-moment.cinema-capture .catch-ball{width:28px;height:28px;border:2px solid #233e51;box-shadow:inset -4px -3px 0 #24394a25,0 2px 0 #173b4d33;background:linear-gradient(#f16b56 0 44%,#233e51 44% 55%,#fff6de 55%);animation-name:orb-catch}.cinema-capture .catch-ball:after{left:8px;top:8px;width:8px;height:8px;border-width:2px;box-shadow:inset 0 0 0 2px #d1e4e2}.cinema-capture .catch-ball>b{position:absolute;left:4px;top:3px;width:8px;height:4px;background:#fff9d2;border-radius:50%;opacity:.8}.capture-failed #capture-moment.cinema-capture .catch-ball{animation-name:orb-break}#capture-moment .orb-shadow{position:absolute;left:var(--orb-x);top:var(--orb-floor);margin:5px -19px;width:38px;height:9px;background:#162e4855;border-radius:50%;animation:orb-ground var(--catch-duration) both}.orb-flash,.orb-lock{position:absolute;left:var(--orb-x);top:var(--orb-hit);margin:-26px;width:52px;height:52px;border-radius:50%;border:3px solid #fff1ba;animation:orb-flash var(--catch-duration) both;opacity:0}.orb-lock{top:var(--orb-floor);font:35px system-ui;text-align:center;border:0;color:#fff1a1;animation-name:orb-lock}.capture-failed .orb-lock{display:none}.orb-caption{position:absolute;bottom:4%;left:10%;right:10%;text-align:center;color:#ffedab;background:#12334be6;border:1px solid #a4c5b4;border-radius:12px;padding:9px;font:800 12px system-ui}
@keyframes orb-catch{0%{opacity:0;transform:translate(var(--orb-fromX),var(--orb-fromY)) scale(.65)}4%{opacity:1}16%{transform:translate(var(--orb-arcX),var(--orb-arcY)) rotate(180deg)}24%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-hit) - 16px)) rotate(360deg)}34%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(360deg)}40%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 29px)) rotate(360deg)}46%,60%,74%,88%,100%{opacity:1;transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(360deg)}52%,66%,80%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(338deg)}56%,70%,84%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(382deg)}}
@keyframes orb-break{0%{opacity:0;transform:translate(var(--orb-fromX),var(--orb-fromY)) scale(.65)}4%{opacity:1}16%{transform:translate(var(--orb-arcX),var(--orb-arcY)) rotate(180deg)}24%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-hit) - 16px)) rotate(360deg)}35%,48%,64%,80%{opacity:1;transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(360deg)}54%,70%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(337deg)}60%,76%{transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) rotate(383deg)}88%,100%{opacity:0;transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px)) scale(1.8)}}@keyframes orb-ground{0%,33%{opacity:0;scale:.3}40%,100%{opacity:1;scale:1}}@keyframes orb-flash{0%,20%,38%,82%,100%{opacity:0;scale:.3}26%,88%{opacity:1;scale:1.4}}@keyframes orb-lock{0%,86%,100%{opacity:0;transform:translateY(0)}91%,95%{opacity:1;transform:translateY(-28px)}}
@media(prefers-reduced-motion:reduce){#battle-field.cinema-motion .battle-sprite,.cinema-result,.cinema-capture *{animation:none!important}.cinema-capture .catch-ball{opacity:1;transform:translate(calc(var(--orb-x) - 16px),calc(var(--orb-floor) - 16px))}.orb-shadow{opacity:1}.cinema-result{opacity:1}.orb-flash,.orb-lock{display:none}}
.cinema-alpha{position:absolute;top:24%;left:15%;right:15%;text-align:center;color:#ffdfad;background:#643c4ae8;border:1px solid #e9af7c;border-radius:12px;padding:8px;font:800 12px system-ui;animation:result-arrive .3s both}#battle-field:not(.cinema-busy){--scene-ms:390ms}

#battle-field.cinema-motion[data-cinema-result=win] #ally-sprite{animation:mon-victory .5s ease-out both}@keyframes mon-victory{25%{transform:translateY(-9px) rotate(-3deg)}55%{transform:translateY(0) rotate(2deg)}75%{transform:translateY(-4px)}100%{transform:translateY(0)}}

@media(max-height:600px){.cinema-result{top:15%;padding:8px}.cinema-result strong{font-size:17px}.cinema-result>img,.cinema-result .shiny-portrait img,.cinema-result .alpha-portrait img{width:45px;height:45px}}

/* forest-palette.css */
/* Shared Forest Legacy palette. Presentation only: no gameplay or save hooks. */
#sheet{--forest-ink:#102e38;--forest-panel:#153e49;--forest-card:#20535b;--forest-border:#568a86;--forest-text:#fff6e3;--forest-muted:#c0d9d2;--forest-gold:#f3c569}
#sheet.rpg-screen:not(.partner-menu){background:linear-gradient(145deg,#153e49,#102e38)!important;color:var(--forest-text);border-color:#8da994;box-shadow:0 8px 24px #071e2a66}
#sheet.rpg-screen .rpg-head{background:#102f3b!important;border-bottom:1px solid #638e82;color:var(--forest-text)}
#sheet.rpg-screen .rpg-head h2{color:#ffdc91!important;letter-spacing:.3px}
#sheet.rpg-screen .rpg-body{background:transparent;color:var(--forest-text);scrollbar-color:#639d8d #102e38}
#sheet.rpg-screen .rpg-footer{background:#102e38;border-color:#456f6b;color:#c0d9d2}
#sheet.rpg-screen .rpg-body :where(p,small,.muted,label){color:var(--forest-muted)}
#sheet.rpg-screen .rpg-body :where(h3,strong){color:var(--forest-text)}
#sheet.rpg-screen .rpg-body :where(.card,.summary-hero,.summary-lines,.stats-grid,.move-panel,.evo-route,.dex-evolutions,.field-row,.training-row,.trainer-banner,.bag-content,.wallet,.rpg-prompt,.dex-count){background:#1a4650;border-color:#568a86;color:var(--forest-text);box-shadow:none;border-radius:12px}
#sheet.rpg-screen .rpg-body :where(.stats-grid b,.evo-route small,.field-row label,.dex-number,.pause-list small){color:#c0d9d2}
#sheet.rpg-screen .rpg-body button{background:#20535b;color:#fff6e3;border-color:#63988f;border-radius:10px;transition:transform .12s ease-out,border-color .12s ease-out,background-color .12s ease-out}
#sheet.rpg-screen .rpg-body button:not(:disabled):active{transform:translateY(1px);border-color:#ffdc91}
#sheet.rpg-screen button:focus-visible,#sheet.rpg-screen :is(input,select):focus-visible{outline:3px solid #ffdc91;outline-offset:-3px}
#sheet.rpg-screen .rpg-body :is(button.primary,#dialogue-next,.field-team),#sheet.rpg-screen.trainer-invitation .rpg-actions button:first-child{background:linear-gradient(#ffdc91,#eab753)!important;color:#17353d!important;border-color:#ffe4a7;box-shadow:0 2px 0 #886433}
#sheet.rpg-screen .rpg-body :is(button.selected,button.active,button[aria-pressed=true]){background:#efc46d;color:#17353d;border-color:#ffe4a7}
#sheet.rpg-screen .rpg-body button:disabled{background:#263e48!important;color:#b6c7cc!important;border-color:#6b7e85!important;opacity:1;box-shadow:none;filter:none}
#sheet.rpg-screen .rpg-body button:disabled :is(strong,small,span,p){color:#b6c7cc!important}
#sheet.rpg-screen .rpg-back{background:#24535b;color:#fff6e3;border-color:#6a9a91;box-shadow:none}
#sheet.rpg-screen .rpg-body :is(input,select){background:#102e38;color:#fff6e3;border-color:#63988f;border-radius:8px;accent-color:#f3c569}
#sheet.rpg-screen .rpg-body option{background:#102e38;color:#fff6e3}
#sheet.rpg-screen .party-slot{background:#20535b!important;border-color:#63988f!important;color:#fff6e3}
#sheet.rpg-screen .party-slot:first-child{background:#28594e!important;border-color:#f3c569!important}
#sheet.rpg-screen .party-empty{background:#153e49;border-color:#568a86;color:#c0d9d2}
#sheet.rpg-screen .dex-list{background:#153e49;border-color:#568a86}
#sheet.rpg-screen .dex-list button:nth-child(even),#sheet.rpg-screen .dex-learnset>div{background:#1a4650;color:#fff6e3;border-color:#456f6b}
#sheet.rpg-screen .rpg-bottom-back{background:#1b4550!important;color:#c0d9d2}
#sheet.rpg-screen .trainer-name-form{background:#1a4650;color:#fff6e3;border-color:#63988f}
#sheet.rpg-screen.rpg-dialog{background:linear-gradient(120deg,#103544,#194c53)!important;border:1px solid #bfa66b}
#sheet.rpg-screen.rpg-dialog .rpg-head{background:transparent!important;border-bottom:1px solid #638e824d}
#sheet.rpg-screen.rpg-dialog .dialogue-text{color:#fff6e3!important}
#sheet.rpg-screen.rpg-dialog .dialogue-portrait{border-color:#8eaaa0;background:#244e51;box-shadow:none}
#sheet.rpg-screen :is(.market-wallet b,.field-wallet b,.living-emblem,.command-use){color:#ffdc91}
/* Keep type badges, item illustrations, HP bars and Shiny palettes intact. */
#sheet.rpg-screen .command-move{border-top-color:var(--attack-color);background:linear-gradient(140deg,#24515a,#173d49)}
#sheet.rpg-screen .command-tip{background:#102e38;color:#c0d9d2;border-color:#456f6b}
#sheet.rpg-screen:not(.partner-menu){animation:forest-panel-in .18s ease-out}
@keyframes forest-panel-in{from{opacity:.6;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#sheet.rpg-screen:not(.partner-menu){animation:none}#sheet.rpg-screen .rpg-body button{transition:none}}
/* Partner selection keeps its clearing composition with the same forest UI. */
#sheet.partner-menu{background:linear-gradient(155deg,#194c43,#102e38)!important;color:#fff6e3;--partner-accent:#f3c569;--partner-light:#6baf77}
#sheet.partner-menu .rpg-head{background:transparent!important;border-bottom:0}
#sheet.partner-menu :is(.partner-heading h3,.partner-region select,.partner-pick span,.partner-gift strong,dd){color:#fff6e3!important}
#sheet.partner-menu :is(.partner-heading p,.partner-personality,.partner-fineprint,.partner-secondary,.partner-number,.partner-region small,.partner-gift span,dt){color:#c0d9d2!important}
#sheet.partner-menu .partner-pick.selected{background:#31594e;color:#fff6e3;border-color:#f3c569}
#sheet.partner-menu .partner-primary{background:linear-gradient(#ffdc91,#eab753);color:#17353d;border-color:#ffe4a7}
#sheet.partner-menu .partner-region option{background:#102e38;color:#fff6e3}
#sheet.partner-menu .partner-clearing{background:radial-gradient(ellipse,#70ad7266,transparent 70%)}

/* trainer-career.css */
/* Compact trainer card, within the established game panel and safe scrolling area. */
#sheet .career-card{border:1px solid #c7ac6b;border-radius:16px;padding:16px;background:linear-gradient(125deg,#285b52,#143d49);margin:16px 0;overflow:hidden}
.career-identity{display:flex;gap:14px;align-items:center}.career-identity>img{width:72px;height:86px;object-fit:cover;border:1px solid #8da994;border-radius:12px;background:#245351;flex:none}.career-identity>div{min-width:0}.career-identity small{font:800 9px/1.5 system-ui;letter-spacing:.08em;color:#ffdc91!important}.career-identity h3{font:850 26px/1.15 system-ui!important;margin:8px 0;overflow-wrap:anywhere}.career-identity p{font:12px/1.4 system-ui;margin:0}
.career-badges{display:flex;justify-content:space-between;gap:5px;margin-top:18px;border-top:1px solid #709d8a77;padding-top:14px}.career-badges>span{text-align:center;font-size:22px;color:#829b9c}.career-badges>span.earned{color:#ffcf73;text-shadow:0 2px #785c35}.career-badges small{display:block;font:700 9px/1.4 system-ui;color:#c0d9d2!important;text-shadow:none}.career-card>p{font-size:12px;margin:14px 0 0}
.career-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.career-stats>div{min-width:0;padding:12px;border:1px solid #4d7e79;background:#19444d;border-radius:12px}.career-stats span{display:block;font:600 11px/1.4 system-ui;color:#c0d9d2}.career-stats strong{display:block;font:850 20px/1.3 system-ui;margin-top:6px;overflow-wrap:anywhere}#sheet .living-card progress{display:block;width:100%;height:8px;margin-top:12px;accent-color:#edc46d}#sheet.career-screen .living-cards{margin-top:16px}
@media(max-width:350px){.career-card{padding:12px!important}.career-identity{gap:10px}.career-identity>img{width:58px;height:72px}.career-identity h3{font-size:22px!important}.career-badges small{font-size:8px}.career-stats>div{padding:10px}}

/* battle-depth.css */
/* Sculpted 2D battle stages: local art, perspective platforms, no WebGL or new loop. */
#battle #battle-field{isolation:isolate;overflow:hidden;--stage-rim:#b5d387;--stage-top:#7cae66;--stage-side:#42674f;--stage-light:#ffedbd}
#battle #battle-field[data-living-habitat=water]{--stage-rim:#b3f2e9;--stage-top:#6cb6c6;--stage-side:#286d95;--stage-light:#d4ffff}
#battle #battle-field[data-living-habitat=cave],#battle #battle-field[data-living-habitat=mountain]{--stage-rim:#c8c3bc;--stage-top:#8e9399;--stage-side:#4c586c;--stage-light:#d7e7ff}
#battle #battle-field[data-living-habitat=haunted]{--stage-rim:#bb9bd1;--stage-top:#666488;--stage-side:#37344f;--stage-light:#b7b4ed}
#battle #battle-field[data-living-habitat=gym]{--stage-rim:#f5d995;--stage-top:#5b8796;--stage-side:#25485f;--stage-light:#e1f7ff}
#battle #battle-field:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(ellipse at 32% 0%,#fff4ce55,transparent 50%),linear-gradient(180deg,transparent 42%,#092e331a 70%,#081e3455)}
#battle #battle-field:after{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;box-shadow:inset 0 0 45px #10233138,inset 0 -18px 35px #09263833}
#battle #battle-field[data-living-habitat] :is(.enemy-base,.ally-base){display:block;position:absolute;z-index:0;border-radius:50%;background:radial-gradient(ellipse at 40% 28%,#ffffff33,transparent 64%),var(--stage-top);border:2px solid var(--stage-rim);box-shadow:0 7px 0 var(--stage-side),0 14px 9px #0b253b33,inset 0 -5px 0 #122e3b22;pointer-events:none}
#battle #battle-field .enemy-base{width:37%;height:10%;right:9%;top:auto;bottom:42%;transform:rotate(-3deg)}
#battle #battle-field .ally-base{width:49%;height:13%;left:-3%;top:auto;bottom:12%;transform:rotate(-3deg)}
#battle #battle-field :is(#ally-sprite,#enemy-sprite){z-index:2;filter:drop-shadow(3px 8px 2px #122d415c);image-rendering:pixelated}
#battle #battle-field .battle-sprite.shiny-mon{filter:sepia(.55) saturate(2.1) hue-rotate(135deg) drop-shadow(3px 8px 2px #122d415c)!important}
#battle #battle-field .monster-hud{z-index:4;background:linear-gradient(145deg,#fffbea,#e0eddd);border:1px solid #fff6c9;box-shadow:0 4px 0 #25515c66,inset 0 1px #fff;}
#battle #battle-field .hp{box-shadow:inset 0 2px 2px #0d3a4633}
#battle #battle-field .hp i{background:linear-gradient(#b2f38b,#44b879 60%,#278b72)}
#battle #battle-field .hp.low i{background:linear-gradient(#ffdf8b,#dfad4e)}
#battle #battle-field .hp.critical i{background:linear-gradient(#ffa48a,#df5158)}
#battle-field .shot-flame{background:radial-gradient(ellipse at 70% 40%,#fff9c4 0 14%,#ffc144 34%,#fa693b 67%,#b83736);box-shadow:inset 0 -3px #b9402f,0 0 8px #ffbe6155}
#battle-field .shot-water{background:radial-gradient(ellipse at 30% 24%,#f7ffff 0 12%,#97f4ff 18%,#39b4e3 55%,#2672b7);border-color:#b4f5ff;box-shadow:inset -3px -3px #285ba344}
#battle-field .shot-shards{background:linear-gradient(140deg,#fff9c3,var(--tone) 40%,#233951);box-shadow:inset -4px -2px #20334455}
#battle-field .cinema-impact{box-shadow:0 0 12px #fff2bb55,inset 0 0 10px #fff1bd44}
#battle-field .cinema-bolt{background:linear-gradient(#fff9df,#ffef73 55%,#e7a646)}
#battle-field.cinema-busy.cinema-lunge .ally-base,#battle-field.cinema-busy.cinema-lunge .enemy-base{border-color:var(--stage-light)}
#capture-moment.cinema-capture .catch-ball{background:radial-gradient(ellipse at 29% 19%,#fff 0 5%,#ffffff77 7%,transparent 28%),linear-gradient(100deg,#ffffff25,transparent 45%,#102b4050),linear-gradient(#ff7765 0%,#d33340 44%,#1d3345 45% 55%,#fff8e6 56%,#b6c8d2 100%);box-shadow:inset -4px -3px #142a3d30,inset 2px 2px #fff6,0 3px 5px #152d4055}
@media(prefers-reduced-motion:reduce){#battle-field .cinema-impact{box-shadow:none}}
#sheet .lumina-circuit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0}#sheet .lumina-circuit button{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:14px 6px;border:1px solid #7bcac3;background:#1c4b5c;border-radius:12px;color:#fff6dc}#sheet .lumina-circuit span{display:grid;place-items:center;width:48px;height:48px;font:900 39px/1 monospace;border:2px solid #76d9c8;border-radius:50%;color:#ffda82;box-shadow:inset 0 0 0 5px #133849}#sheet .lumina-circuit b{font:800 12px system-ui}#sheet .lumina-circuit small{font:11px system-ui}

/* partner-static.css */
/* Fixed confirmation: all essential controls remain inside the game viewport. */
#overlay:has(.partner-confirm){padding:0;background:#102e38;align-items:stretch}
#sheet.partner-confirm{width:100%!important;max-width:780px;height:100%!important;max-height:100%!important;margin:auto;overflow:hidden!important}
#sheet.partner-confirm .rpg-head{min-height:48px;padding:6px 14px;flex:0 0 48px}
#sheet.partner-confirm .rpg-body{display:grid;grid-template-rows:minmax(105px,1fr) auto;gap:6px;padding:4px 16px max(10px,env(safe-area-inset-bottom));overflow:hidden!important;max-height:none;min-height:0;flex:1}
#sheet.partner-confirm .partner-hero{min-height:0;display:grid;grid-template-rows:auto minmax(55px,1fr);gap:0;overflow:hidden}
#sheet.partner-confirm .partner-heading{margin:0}#sheet.partner-confirm .partner-heading h3{font-size:clamp(24px,6vw,34px);margin:2px 0 5px}
#sheet.partner-confirm .partner-kicker,#sheet.partner-confirm .partner-personality,#sheet.partner-confirm .partner-orbit,#sheet.partner-confirm .partner-leaf{display:none}
#sheet.partner-confirm .partner-clearing{min-height:0;max-height:none;height:100%;margin:0}
#sheet.partner-confirm .partner-hero-art{width:100%;height:100%;max-width:240px;max-height:190px;min-height:0;animation:none}
#sheet.partner-confirm .partner-bottom{display:grid;grid-template-rows:auto auto auto auto;gap:8px;max-width:460px;min-width:0}
#sheet.partner-confirm .partner-attributes{padding:7px 0;margin:0;min-height:48px}#sheet.partner-confirm dd{font-size:20px;margin:2px 0 0}#sheet.partner-confirm dt{font-size:10px}
#sheet.partner-confirm .trainer-name-form{padding:10px 12px;margin:0;border-radius:12px}#sheet.partner-confirm .trainer-name-form label{font:800 14px/1.3 system-ui;margin-bottom:7px}
#sheet.partner-confirm .trainer-name-form>div{display:grid;grid-template-columns:minmax(0,1fr) 105px;gap:8px}
#sheet.partner-confirm .trainer-name-form input{font:700 16px system-ui;min-height:44px;height:44px;padding:9px;max-width:100%;margin:0}
#sheet.partner-confirm .trainer-name-form button{height:44px;min-height:44px;font:750 12px system-ui!important;padding:8px!important}
#sheet.partner-confirm .trainer-name-form small{font:11px/1.3 system-ui;min-height:15px;margin-top:6px}
#sheet.partner-confirm .partner-primary{min-height:46px;padding:10px 14px;font:800 14px/1.25 system-ui}
#sheet.partner-confirm .partner-secondary{min-height:36px;margin:0;padding:6px;font:700 12px/1.2 system-ui}
#sheet .mother-gift{text-align:center;padding:12px}#sheet .mother-gift img{width:115px;height:115px;object-fit:contain;image-rendering:pixelated}#sheet .mother-gift p{margin:9px 0}
@media(max-height:570px){#sheet.partner-confirm .rpg-head{min-height:40px;flex-basis:40px}#sheet.partner-confirm .rpg-body{gap:3px;padding:0 12px max(6px,env(safe-area-inset-bottom));grid-template-rows:minmax(65px,1fr) auto}#sheet.partner-confirm .partner-hero{grid-template-columns:1fr 1fr;grid-template-rows:1fr;align-items:center}#sheet.partner-confirm .partner-heading h3{font-size:24px}#sheet.partner-confirm .partner-hero-art{max-height:100px}#sheet.partner-confirm .partner-bottom{gap:5px}#sheet.partner-confirm .partner-attributes{padding:3px;min-height:39px}#sheet.partner-confirm dd{font-size:17px}#sheet.partner-confirm .trainer-name-form{padding:7px 10px}#sheet.partner-confirm .trainer-name-form small{display:none}#sheet.partner-confirm .partner-primary{min-height:44px}#sheet.partner-confirm .partner-secondary{min-height:30px}}
@media(max-height:390px){#sheet.partner-confirm .rpg-body{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);grid-template-rows:1fr;gap:12px}#sheet.partner-confirm .partner-hero{display:flex;flex-direction:column;justify-content:center}#sheet.partner-confirm .partner-bottom{align-self:center}#sheet.partner-confirm .partner-attributes{display:none}}

/* battle-finish.css */
/* Bounded local details; the simulator and animation clock are unchanged. */
#battle #battle-field #enemy-sprite{width:clamp(116px,33vw,183px);height:clamp(116px,33vw,183px);max-height:35%}
#battle #battle-field #ally-sprite{width:clamp(135px,39vw,210px);height:clamp(135px,39vw,210px);max-height:40%}
#battle #battle-field .monster-hud{border-radius:14px 5px 14px 5px;border-top:3px solid #fff2be;background:linear-gradient(115deg,#fffbea 0 72%,#cce2d8);box-shadow:0 4px 0 #153c5066,inset 0 -1px #aecbc6}
#battle .monster-hud .combat-types .type{border-radius:4px;font:750 9px system-ui;padding:3px 6px}
#battle .battle-console{background:linear-gradient(145deg,#194555,#102f42);border-top:2px solid #9bbf9f;box-shadow:0 -6px 15px #122e3b22}
#battle #battle-message{background:#102f43;border-color:#709e99;border-left:3px solid #f4ce83;border-radius:10px;color:#fff6e5}
#battle #battle-actions button{background:linear-gradient(#2d6675,#20475f);border:1px solid #8eb7b4;box-shadow:inset 0 1px #ffffff33,0 3px 0 #0b2e42;letter-spacing:.03em}
#battle #battle-actions button.fight{background:linear-gradient(#d67a59,#a74948);border-color:#ffc298}
#battle #battle-actions button.ball{background:linear-gradient(#46a699,#266d77);border-color:#a1e4ca}
#battle #battle-actions button:not(:disabled):active{transform:translateY(2px);box-shadow:inset 0 1px #ffffff33,0 1px 0 #0b2e42}
#battle-field .cinema-impact:after{content:'';position:absolute;inset:-15px;border-radius:50%;background:radial-gradient(circle,#fffbd988,var(--tone) 26%,transparent 68%);opacity:.5}
#battle-field .shot-water:after{content:'';position:absolute;left:-6px;top:-8px;width:10px;height:18px;background:linear-gradient(transparent,#b6f9ff88);border-radius:50%}
#battle-field .shot-flame:after{content:'';position:absolute;left:-13px;top:5px;width:21px;height:9px;border-radius:90% 10%;background:linear-gradient(90deg,transparent,#ffad4d)}
@media(max-height:600px){#battle #battle-field #enemy-sprite{width:102px;height:102px;max-height:42%}#battle #battle-field #ally-sprite{width:122px;height:122px;max-height:44%}}
/* Surface texture is local to each stage, with stronger foreground separation. */
#battle #battle-field .enemy-base{background:radial-gradient(ellipse at 35% 20%,#f2f4bb55,transparent 60%),repeating-linear-gradient(172deg,transparent 0 7px,#122e4012 8px 9px),var(--stage-top);border-top-color:#e4f5c2;box-shadow:0 5px 0 var(--stage-side),0 10px 9px #0a263b33,inset 0 -3px #12334822}
#battle #battle-field .ally-base{background:radial-gradient(ellipse at 35% 20%,#fff4c044,transparent 65%),repeating-linear-gradient(172deg,transparent 0 10px,#122e4012 11px 12px),var(--stage-top);border-top-color:#d6eeb6;box-shadow:0 7px 0 var(--stage-side),0 13px 10px #0a263b33,inset 0 -3px #12334822}
#battle-field .shot-flame{border:1px solid #ffcf6377}.cinema-jaw{background:linear-gradient(#e7d7b3,#fffdf1 55%,#d9c5ad)}
#battle-field .cinema-slash{background:linear-gradient(90deg,transparent,#fff8e5 35%,#fff 75%,transparent)}

/* battle-dock.css */
/* Arena remains visible while the fixed console changes commands. No modal or scroll. */
#battle{overflow:hidden;background:#102f43}
#battle .battle-heading{min-height:40px;flex:0 0 40px;padding:6px 14px;display:flex;align-items:center;justify-content:space-between}
#battle .battle-heading button{width:34px;height:30px;min-height:30px;padding:2px;font-size:18px}
#battle .battle-field{flex:1 1 auto;min-height:0}
#battle .battle-console{flex:0 0 auto;min-height:0;padding:10px 12px max(10px,env(safe-area-inset-bottom));overflow:hidden}
#battle #battle-message{min-height:42px;margin:0 0 8px;padding:9px 11px;font:650 13px/1.4 system-ui}
#battle #battle-actions>button{min-height:48px;padding:9px 12px;font:800 13px system-ui}
#battle #battle-actions>button small{font:11px/1.3 system-ui;margin-top:3px}
#battle #battle-actions.dock-actions{display:block}
.battle-dock{width:100%;min-width:0}.dock-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}.dock-head>strong{font:800 13px system-ui;color:#ffe3a0}
#battle #battle-actions .dock-head button{min-height:32px;padding:5px 9px;font:750 11px system-ui;border-radius:8px;background:#1c4c60;box-shadow:none}
.dock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#battle #battle-actions .dock-move,#battle #battle-actions .dock-item{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:72px;padding:9px 10px;border:1px solid #699da5;border-left:4px solid var(--move-color,#80d9c9);border-radius:10px;background:linear-gradient(125deg,#2c5c70,#1d405b);box-shadow:inset 0 1px #ffffff16,0 2px #092b41;text-align:left;color:#f9f5e8}
#battle #battle-actions .dock-move strong,#battle #battle-actions .dock-item strong{font:850 14px/1.2 system-ui;overflow-wrap:anywhere}
#battle #battle-actions .dock-move>span{display:flex;justify-content:space-between;gap:4px;align-items:center}
#battle #battle-actions .dock-move .type{font:750 9px/1.2 system-ui;padding:2px 5px;border-radius:4px}
#battle #battle-actions .dock-move b{font:800 10px system-ui;color:#ffdf98;white-space:nowrap}
#battle #battle-actions .dock-move small,#battle #battle-actions .dock-item small{font:10px/1.3 system-ui;color:#d0e5e8}
#battle #battle-actions .dock-move:disabled,#battle #battle-actions .dock-item:disabled{opacity:1;background:#2b414e;color:#b3c5cc;border-color:#617b87;box-shadow:none}
#battle #battle-actions .dock-move:disabled strong{color:#b3c5cc}
#battle #battle-actions .dock-hint{font:10px/1.3 system-ui;color:#bcdbdc;margin:7px 0 0;min-height:13px}
#battle .dock-item-icon{font-size:25px;color:#ffe3a0}
#battle #battle-field #enemy-sprite{right:10%;bottom:43%;max-height:36%;width:clamp(110px,32vw,180px);height:clamp(110px,32vw,180px)}
#battle #battle-field #ally-sprite{left:3%;bottom:12%;max-height:41%;width:clamp(130px,37vw,210px);height:clamp(130px,37vw,210px)}
#battle #battle-field .monster-hud{max-width:54%;padding:8px 10px}
#battle #battle-field .monster-hud strong{font-size:13px}#battle #battle-field .monster-hud .hp+small{font:10px/1.3 system-ui}
#battle #enemy-hud{top:4%;left:3%}#battle #ally-hud{right:3%;bottom:3%}
@media(max-height:680px){#battle .battle-heading{flex-basis:34px;min-height:34px}#battle .battle-console{padding:7px 9px max(7px,env(safe-area-inset-bottom))}#battle #battle-message{font-size:12px;min-height:35px;padding:7px 9px;margin-bottom:6px}#battle #battle-actions .dock-move{min-height:65px;padding:7px 8px;gap:3px}#battle #battle-actions .dock-move strong{font-size:13px}#battle #battle-field .monster-hud{padding:5px 8px}#battle .monster-hud .combat-types{display:none}#battle #battle-field #enemy-sprite{max-height:38%}#battle #battle-field #ally-sprite{max-height:43%}}
@media(max-height:500px) and (orientation:landscape){#battle{display:grid;grid-template-columns:minmax(0,1fr) 42%;grid-template-rows:32px minmax(0,1fr)}#battle .battle-heading{grid-column:1/-1}#battle .battle-field{height:100%}#battle .battle-console{height:100%;padding:7px;display:flex;flex-direction:column;border-top:0;border-left:1px solid #699e9e}#battle #battle-actions{min-height:0}#battle #battle-message{font-size:11px}#battle #battle-actions .dock-move{min-height:59px;padding:6px}#battle #battle-actions .dock-move strong{font-size:12px}#battle #battle-actions .dock-move small{font-size:9px}#battle #battle-actions .dock-hint{font-size:9px}#battle #battle-field #ally-sprite{max-height:47%}#battle #battle-field #enemy-sprite{max-height:43%}}
/* Reserve the same console space so opening attacks does not move the arena. */
#battle .battle-console{display:flex;flex-direction:column;flex-basis:308px}
#battle #battle-actions{flex:1;min-height:0}
#battle #battle-actions.dock-actions .battle-dock{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
#battle #battle-actions .dock-grid{min-height:0}
#battle .battle-heading{padding-top:calc(6px + env(safe-area-inset-top));flex-basis:calc(40px + env(safe-area-inset-top))}
@media(max-height:680px){#battle .battle-console{flex-basis:276px}#battle #battle-actions .dock-hint{display:none}#battle .battle-heading{flex-basis:calc(34px + env(safe-area-inset-top))}}
@media(max-height:500px) and (orientation:landscape){#battle .battle-console{flex-basis:auto}#battle{grid-template-rows:calc(32px + env(safe-area-inset-top)) minmax(0,1fr)}#battle .battle-heading{min-height:32px;flex-basis:auto}}

/* A single stable panel geometry for commands, techniques and turn resolution. */
#game #battle{--console-height311:272px;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#game #battle .battle-console{flex:0 0 var(--console-height311)!important;height:var(--console-height311)!important;min-height:0!important;max-height:var(--console-height311)!important;box-sizing:border-box;display:grid!important;grid-template-rows:52px minmax(0,1fr);grid-template-columns:minmax(0,1fr);justify-content:stretch;align-content:stretch;gap:8px;padding:10px 12px max(10px,env(safe-area-inset-bottom));animation:none!important;transform:none!important;overflow:hidden}
#game #battle #battle-message{height:52px!important;min-height:0!important;max-height:52px!important;margin:0!important;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}
#game #battle #battle-actions{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;align-content:stretch;grid-auto-rows:minmax(0,1fr)}
#game #battle #battle-actions>button{min-height:44px;animation:none!important;transform:none!important}
#game #battle #battle-actions button:disabled{cursor:default}
#game #battle .battle-heading button,#game #battle #battle-actions .dock-head button{min-width:44px;min-height:44px}
@media(max-height:680px){#game #battle{--console-height311:246px}#game #battle .battle-console{grid-template-rows:44px minmax(0,1fr);gap:6px;padding:7px 9px max(7px,env(safe-area-inset-bottom))}#game #battle #battle-message{height:44px!important;max-height:44px!important}}
@media(max-height:500px) and (orientation:landscape){#game #battle{display:grid;grid-template-columns:minmax(0,1fr) 42%;grid-template-rows:calc(44px + env(safe-area-inset-top)) minmax(0,1fr)}#game #battle .battle-heading{grid-column:1/-1}#game #battle .battle-console{height:100%!important;max-height:100%!important;grid-template-rows:44px minmax(0,1fr);padding:7px max(7px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) 7px}#game #battle #battle-actions .dock-hint{display:none!important}#game #battle #battle-actions .dock-move small{font-size:9px!important}}

/* animation-touch.css */
.support-wave{position:absolute;width:60px;height:60px;margin:-30px;pointer-events:none;color:var(--support-tone);animation:support-rise .45s ease-out both}.support-wave i{position:absolute;inset:4px;border:3px solid var(--support-tone);border-radius:50%;box-shadow:inset 0 0 0 5px #ffffff18}.support-wave b{display:block;text-align:center;font:40px/60px system-ui;color:#fff4d3}@keyframes support-rise{from{opacity:0;transform:scale(.45) translateY(7px)}35%{opacity:1}to{opacity:0;transform:scale(1.3) translateY(-14px)}}
#battle .status-tag{border:1px solid #ffffff55;border-radius:5px;padding:2px 5px;animation:status-appear .2s ease-out}@keyframes status-appear{from{opacity:.3;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.support-wave,#battle .status-tag{animation:none}}

/* game-options.css */
/* Menu skins share contrast and hierarchy; species, type badges and world art keep their colours. */
#game[data-menu-theme] #sheet{--forest-ink:var(--ui-base);--forest-panel:var(--ui-panel);--forest-card:var(--ui-card);--forest-border:var(--ui-border);--forest-text:var(--ui-text);--forest-muted:var(--ui-muted);--forest-gold:var(--ui-accent)}
#game[data-menu-theme] #sheet.rpg-screen,#game[data-menu-theme] #sheet.partner-menu{background:linear-gradient(145deg,var(--ui-panel),var(--ui-base))!important;color:var(--ui-text);border-color:var(--ui-border)}
#game[data-menu-theme] #sheet .rpg-head,#game[data-menu-theme] #sheet .rpg-footer{background:var(--ui-base)!important;color:var(--ui-text);border-color:var(--ui-border)}
#game[data-menu-theme] #sheet .rpg-head h2{color:var(--ui-accent)!important}
#game[data-menu-theme] #sheet .rpg-body{color:var(--ui-text)}
#game[data-menu-theme] #sheet .rpg-body :is(p,small,label,.muted){color:var(--ui-muted)}
#game[data-menu-theme] #sheet .rpg-body :is(h3,strong){color:var(--ui-text)}
#game[data-menu-theme] #sheet .rpg-body button:not(:disabled),#game[data-menu-theme] #sheet .rpg-back{background:var(--ui-card);border-color:var(--ui-border);color:var(--ui-text)}
#game[data-menu-theme] #sheet .rpg-body :is(button.primary,#dialogue-next,button[aria-pressed=true],.partner-primary){background:var(--ui-accent)!important;color:#172c35!important;border-color:var(--ui-accent);box-shadow:0 2px 0 #101e3033}
#game[data-menu-theme] #sheet .rpg-body :is(.card,.living-card,.story-checklist,.summary-hero,.summary-lines,.stats-grid,.field-item,.market-item,.field-key-grid button,.identity-card,.trainer-name-form,.command-tip,.career-card,.career-stats>div,.market-wallet){background:var(--ui-panel)!important;border-color:var(--ui-border);color:var(--ui-text)}
#game[data-menu-theme] #sheet .rpg-body :is(input,select){background:var(--ui-base);color:var(--ui-text);border-color:var(--ui-border);accent-color:var(--ui-accent)}
#game[data-menu-theme] #sheet.rpg-dialog .dialogue-text{color:var(--ui-text)!important}
#game[data-menu-theme] #sheet .rpg-body button:focus-visible,#game[data-menu-theme] #sheet :is(input,select):focus-visible{outline-color:var(--ui-accent)}
#game[data-menu-theme] #battle .battle-console{background:linear-gradient(145deg,var(--ui-panel),var(--ui-base));border-color:var(--ui-border)}
#game[data-menu-theme] #battle #battle-message,#game[data-menu-theme] #battle .battle-heading{background:var(--ui-base);color:var(--ui-text);border-color:var(--ui-border)}
#game[data-menu-theme] #battle #battle-actions :is(.dock-move,.dock-item){background:linear-gradient(145deg,var(--ui-card),var(--ui-panel));color:var(--ui-text);border-color:var(--ui-border);border-left-color:var(--move-color,var(--ui-border))}
#game[data-menu-theme] #battle .dock-head>strong,#game[data-menu-theme] #battle .dock-move b{color:var(--ui-accent)}
#game[data-menu-theme] #battle .dock-hint{color:var(--ui-muted)}
#game[data-menu-theme] .forest-menu>button,#game[data-menu-theme] .forest-secondary>button{border-color:var(--ui-border);color:var(--ui-text)}
#game[data-menu-theme] .forest-secondary>button{background:var(--ui-panel)}
#game #sheet.game-options .rpg-body{padding:12px 16px 18px}
.options-intro{padding:5px 0 12px}.options-intro>small{font:800 9px system-ui;letter-spacing:.15em}.options-intro h3{font:850 23px/1.2 system-ui;margin-top:6px}
#sheet.game-options .options-label{display:block;font:800 13px system-ui;margin:8px 0}#sheet.game-options #game-language{width:100%;min-height:44px;font-size:16px}
#sheet.game-options .options-note{font:11px/1.45 system-ui;margin:8px 0 12px}
.theme-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#game #sheet.game-options .theme-choices button{display:flex;align-items:center;gap:8px;min-width:0;min-height:56px;padding:9px;border:1px solid var(--ui-border);border-radius:12px;text-align:left}
.theme-choices strong{font:800 12px system-ui;overflow-wrap:anywhere}.theme-choices em{margin-left:auto;font:900 16px system-ui}
.theme-swatch{flex:none;width:32px;height:32px;border:1px solid #ffffff66;border-radius:8px;background:var(--swatch-base);display:flex;flex-direction:column;gap:4px;padding:6px}.theme-swatch i{height:5px;border-radius:2px;background:var(--swatch-accent)}.theme-swatch b{height:9px;border-radius:2px;background:var(--swatch-card)}
.theme-preview{margin:12px 0;padding:12px;border:1px solid var(--ui-border);border-left:4px solid var(--ui-accent);border-radius:12px;background:var(--ui-base);display:grid;gap:5px}.theme-preview strong{font:750 14px/1.4 system-ui}.theme-preview small{font:800 8px system-ui;letter-spacing:.12em;color:var(--ui-accent)!important}.theme-preview span{font:11px system-ui;color:var(--ui-muted)}
#sheet.game-options .options-motion{width:100%;margin:0 0 9px;min-height:44px}#sheet.game-options .rpg-body>button.primary{width:100%;min-height:44px}
#game[data-ui-motion=off] :is(.forest-breath,.forest-firefly,.partner-hero-art,.battle-sprite,.cinema-result,.status-tag){animation:none!important}
#game[data-ui-motion=off] .forest-firefly{opacity:.3}
#game[data-menu-theme] #sheet .rpg-body :is(button.primary,button[aria-pressed=true]) :is(strong,small,em){color:#172c35!important}
#game[data-menu-theme] .forest-menu button{background:linear-gradient(var(--ui-card),var(--ui-base))!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}
#game[data-menu-theme] .forest-menu #continue{background:var(--ui-accent)!important;color:#172c35!important}
#game[data-menu-theme] #sheet .rpg-body :is(.living-card,.career-card) button:not(:disabled){background:var(--ui-card)!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}

/* battle-artisan.css */
/* Richer elemental silhouettes use the same five projectiles and cleanup clock. */
#battle-field .cinema-fx.kind-flame:before,#battle-field .cinema-fx.kind-water:before{content:'';position:absolute;left:var(--sx);top:var(--sy);width:var(--ray);height:22px;transform-origin:0 50%;rotate:var(--angle);opacity:0;animation:element-stream var(--scene-ms) ease-out both;pointer-events:none}
#battle-field .kind-flame:before{background:linear-gradient(90deg,#fffaaf,#ffd45d 25%,#f87d34 70%,transparent);clip-path:polygon(0 36%,20% 28%,31% 10%,43% 32%,65% 3%,72% 25%,100% 50%,73% 71%,64% 98%,44% 66%,31% 85%,18% 63%,0 60%)}
#battle-field .kind-water:before{background:linear-gradient(0deg,#318dc266,#5bd8ef,#ebffff,#62d1ea,#2d93cc55);clip-path:polygon(0 38%,15% 28%,30% 38%,50% 18%,70% 28%,93% 8%,100% 50%,92% 92%,70% 71%,48% 85%,29% 63%,14% 72%,0 60%)}
@keyframes element-stream{0%,8%{opacity:0;scale:.05 .45}20%{opacity:.85;scale:.45 .65}60%{opacity:.85;scale:1 1}100%{opacity:0;scale:1 .3}}
#battle-field .shot-flame{width:32px;height:19px;background:radial-gradient(ellipse at 66% 40%,#fffdd3 0 15%,#ffcf55 30%,#ff763a 65%,#bc3b3b 95%);border-radius:75% 15% 60% 35%;box-shadow:0 0 4px #ffb94d66}
#battle-field .shot-water{width:18px;height:25px;background:radial-gradient(ellipse at 35% 30%,#f0ffff 0 8%,#8aeeff 20%,#2ba9df 70%,#2372ad);border:1px solid #a6f8ff;box-shadow:inset -3px -2px #2a83bc55}
#battle-field .cinema-fx[data-element=grass] .shot-shards{width:23px;height:13px;clip-path:none;border-radius:95% 0 95% 0;background:linear-gradient(140deg,#d9f990,#64bc55 47%,#d4f4a3 50%,#298759 57%);border:1px solid #aee97b}
#battle-field .cinema-fx[data-element=ice] .shot-shards{width:17px;height:28px;clip-path:polygon(50% 0,90% 20%,100% 70%,50% 100%,0 70%,10% 20%);background:linear-gradient(100deg,#dcffff,#7ad5ee 45%,#f7ffff 48%,#80b8e0);border:0}
#battle-field .cinema-fx[data-element=rock] .shot-shards,#battle-field .cinema-fx[data-element=ground] .shot-shards{background:linear-gradient(135deg,#d6bd8b 0 35%,#9b866d 36% 65%,#6b665f 66%);border:0}
#battle-field .cinema-fx[data-element=ghost] .shot-pulse{background:radial-gradient(ellipse,#ead2ff,#9375cc 40%,transparent 65%);border:1px solid #baa4e8;border-radius:60% 50% 15% 65%;width:29px;height:31px}
#battle-field .cinema-fx[data-element=poison] .shot-pulse{background:radial-gradient(circle at 35% 30%,#eed5f7,#b76ac6 45%,#6b448c);border:1px solid #db9ce7;width:22px;height:25px}
#battle-field .cinema-fx[data-element=psychic] .shot-pulse{border:3px solid #fbb8e0;box-shadow:inset 0 0 0 3px #9f72c3;width:29px;height:29px}
#battle-field .cinema-bolt:after{content:'';position:absolute;inset:7px 0;background:#fffbea;clip-path:inherit}
#battle-field .kind-water .cinema-impact{border-top:4px solid #e6ffff;border-bottom:5px solid #60cde5;transform-origin:center}
#battle-field .kind-flame .cinema-impact{border-color:#ffcd65;background:radial-gradient(circle,#fff9c3 0 12%,#ff9e4c77 38%,transparent 68%)}
#battle-field .cinema-fx[data-element=grass] .cinema-impact{border-style:dashed;border-color:#b8e989}
@media(prefers-reduced-motion:reduce){#battle-field .cinema-fx:before{animation:none!important;display:none}}
#game[data-ui-motion=off] #battle-field .cinema-fx:before{animation:none!important;display:none}

/* aurora-life.css */
/* Mood and victory are layered only when no attack or capture owns the sprite. */
#battle-field.cinema-motion[data-phase=await][data-ally-mood=weary]:not(.cinema-busy):not(.capture-sequence) #ally-sprite,#battle-field.cinema-motion[data-phase=await][data-enemy-mood=weary]:not(.cinema-busy):not(.capture-sequence) #enemy-sprite{animation:weary-breath 2.6s ease-in-out infinite;transform-origin:50% 95%}
@keyframes weary-breath{0%,100%{transform:translateY(2px) scaleY(.98)}50%{transform:translateY(4px) scaleY(.95)}}
#battle-field.cinema-motion[data-life-win=yes]:not(.capture-sequence) #ally-sprite{animation:partner-cheer .7s ease-out 1}
@keyframes partner-cheer{0%,100%{transform:translateY(0)}30%{transform:translateY(-11px) rotate(-3deg)}65%{transform:translateY(-3px) rotate(2deg)}}
#battle-field .cinema-fx[data-style=ember]:before,#battle-field .cinema-fx[data-style=bubble]:before{display:none}
#battle-field .cinema-fx[data-style=ember] .shot-flame{width:15px;height:13px}
#battle-field .cinema-fx[data-style=flamethrower]:before{height:32px}
#battle-field .cinema-fx[data-style=hydro]:before{height:34px}
#battle-field .cinema-fx[data-style=bubble] .shot-water{width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#fff 0 6%,transparent 12%),radial-gradient(circle,transparent 35%,#8ce5ff88 65%,#d2fbff);border:1px solid #d3ffff;box-shadow:inset -3px -3px #44b8d955}
#battle-field .cinema-fx[data-style=quick] .cinema-strike{font-size:48px;color:#fff2c9}
#battle-field .cinema-fx[data-style=heavy] .cinema-strike{font-size:78px;color:#ffd093}
#capture-moment .orb-caption{display:grid;place-items:center;min-height:30px;padding:5px 10px;border-radius:12px;background:#102e43db;border:1px solid #8ab8ae;color:#fff2d8;font:700 12px/1.3 system-ui}
#capture-moment .orb-caption>*{grid-area:1/1;text-align:center}
#capture-moment .capture-wait{animation:catch-wait var(--catch-duration) linear both}
#capture-moment .capture-verdict{color:#ffe5a3;animation:catch-verdict var(--catch-duration) linear both}
@keyframes catch-wait{0%,84%{opacity:1}87%,100%{opacity:0}}
@keyframes catch-verdict{0%,85%{opacity:0;transform:translateY(5px)}90%,100%{opacity:1;transform:translateY(0)}}
.capture-sparks{position:absolute;left:var(--orb-x);top:var(--orb-floor);pointer-events:none}.capture-sparks i{position:absolute;color:#fff1a4;font:22px system-ui;font-style:normal;animation:catch-spark var(--catch-duration) ease-out both;--spark-x:0px}.capture-sparks i:first-child{--spark-x:-32px}.capture-sparks i:last-child{--spark-x:32px}
@keyframes catch-spark{0%,85%{opacity:0;transform:translate(0,0) scale(.3)}91%{opacity:1;transform:translate(var(--spark-x),-35px) scale(1)}100%{opacity:0;transform:translate(var(--spark-x),-52px) scale(.6)}}
#capture-moment.catch-reduced .capture-wait{display:none}#capture-moment.catch-reduced .capture-verdict{animation:none;opacity:1;transform:none}#capture-moment.catch-reduced .capture-sparks{display:none}
@media(prefers-reduced-motion:reduce){#battle-field[data-life-win] .battle-sprite{animation:none!important}}
#game[data-ui-motion=off] #battle-field[data-life-win] .battle-sprite{animation:none!important}

/* journey-polish.css */
#battle .dock-move .move-type-hint{font:750 10px/1.2 system-ui;font-style:normal;color:#f0d68f;display:block;margin-top:2px}
#battle-field .battle-hit-word{position:absolute;z-index:12;padding:4px 8px;color:#fff5d5;background:#173c50db;border:1px solid #dcbf7e;border-radius:6px;font:850 11px/1.2 system-ui;pointer-events:none;animation:hit-word .33s ease-out both;max-width:46%;text-align:center}
.hit-enemy{right:10%;top:37%}.hit-ally{left:10%;bottom:15%}
@keyframes hit-word{from{opacity:0;transform:translateY(6px) scale(.9)}25%{opacity:1}to{opacity:1;transform:translateY(-9px) scale(1)}}
#game[data-ui-motion=off] .battle-hit-word{animation:none}
@media(prefers-reduced-motion:reduce){.battle-hit-word{animation:none!important}}
#game #objective span{display:block;font:600 10px/1.3 system-ui;opacity:.88;margin-top:3px;white-space:normal}

/* battle-recap.css */
.battle-recap{margin:12px 0 0;padding:12px;border-top:1px solid var(--ui-border,#72a69a);color:var(--ui-text,#fff6e3)}
.battle-recap h3{font:800 16px system-ui;margin:0 0 9px}.battle-recap ol{padding-left:20px;margin:0}.battle-recap li{font:500 13px/1.4 system-ui;margin:7px 0}.battle-recap .recap-note{font:500 11px/1.4 system-ui;color:var(--ui-muted,#c0d9d2);margin-top:14px}

/* premium-presentation.css */
/* Dialogue is anchored to the game, with generous type and a framed character portrait. */
#game #sheet.rpg-screen.premium-dialogue{max-width:740px;width:100%;height:auto;max-height:min(48dvh,390px);border:1px solid var(--ui-border);border-top:3px solid var(--ui-accent);border-radius:22px 9px 22px 9px;background:linear-gradient(125deg,var(--ui-panel),var(--ui-base));box-shadow:0 12px 36px #061d3866,inset 0 1px #ffffff22;overflow:auto}
#game #sheet.premium-dialogue .rpg-head{padding:12px 18px 9px;min-height:36px;background:transparent;border-bottom:1px solid #b1d4c52b}
#game #sheet.premium-dialogue .rpg-head h2{font:850 17px/1.2 system-ui!important;color:var(--ui-accent)!important;letter-spacing:.02em}
#game #sheet.premium-dialogue .rpg-body{padding:12px 16px 15px;background:transparent!important}
.premium-conversation{display:grid;grid-template-columns:94px 1fr;gap:16px;align-items:start}.premium-speaker{align-self:start}.premium-speaker img{width:94px;height:108px;object-fit:cover;display:block;border-radius:15px 4px 15px 4px;border:2px solid var(--ui-border);box-shadow:0 4px 0 #071f3444}.premium-speaker>span{display:grid;place-items:center;width:90px;height:96px;background:var(--ui-card);color:var(--ui-accent);font:40px system-ui;border-radius:16px}.premium-speaker small{display:block;font:750 8px/1.3 system-ui;letter-spacing:.1em;color:var(--ui-muted);text-align:center;margin:9px 0 0}.premium-words{min-width:0;display:flex;flex-direction:column}.premium-line-count{align-self:flex-end;font:700 10px system-ui;color:var(--ui-muted)}
#game #sheet.premium-dialogue .dialogue-text{font:550 17px/1.55 system-ui!important;color:var(--ui-text)!important;margin:5px 0 13px!important;min-height:3.1em;overflow-wrap:anywhere}
#game #sheet.premium-dialogue #dialogue-next{align-self:flex-end;min-width:124px;min-height:42px;padding:10px 16px;border:1px solid #ffe9b4;border-radius:11px 4px 11px 4px;font:850 13px system-ui;background:var(--ui-accent);color:#193443;box-shadow:0 3px 0 #071f3444}
#game #toast{border:1px solid var(--ui-border);border-left:4px solid var(--ui-accent);border-radius:12px 5px 12px 5px;padding:12px 18px;background:linear-gradient(110deg,var(--ui-panel),var(--ui-base));color:var(--ui-text);font:700 13px/1.4 system-ui;box-shadow:0 5px 20px #10233844;max-width:min(90vw,480px);overflow-wrap:anywhere}
#game #sheet.rpg-screen.command-panel:not(.premium-dialogue){border:1px solid var(--ui-border);border-top:3px solid var(--ui-accent);border-radius:20px 7px 20px 7px;box-shadow:0 12px 40px #051c3655}
#game #sheet.trainer-editor{max-width:720px;height:auto;max-height:92dvh;overflow:auto;border-radius:22px;border-top:3px solid var(--ui-accent);background:var(--ui-base);color:var(--ui-text)}
.trainer-preview{display:grid;grid-template-columns:130px 1fr;align-items:center;gap:15px;padding:12px;background:linear-gradient(120deg,var(--ui-panel),var(--ui-card));border:1px solid var(--ui-border);border-radius:16px;margin-bottom:16px}.trainer-preview img{width:130px;height:120px;object-fit:contain;border-radius:12px}.trainer-preview h3{font:850 20px/1.2 system-ui;margin:7px 0}.trainer-preview small{font:800 8px system-ui;letter-spacing:.13em;color:var(--ui-accent)}.trainer-preview p{font:500 12px/1.4 system-ui;color:var(--ui-muted)}
#game .trainer-editor fieldset{border:0;padding:0;margin:14px 0}#game .trainer-editor legend{font:800 13px system-ui;color:var(--ui-accent);margin-bottom:8px}.trainer-choices{display:flex;flex-wrap:wrap;gap:7px}#game .trainer-choices button{display:flex;align-items:center;gap:6px;min-height:40px;padding:7px 10px;border:1px solid var(--ui-border);border-radius:9px;background:var(--ui-panel);color:var(--ui-text);font:700 11px system-ui}#game .trainer-choices button[aria-pressed=true]{border:2px solid var(--ui-accent);background:var(--ui-card)}.trainer-choices i{width:16px;height:16px;border-radius:50%;background:var(--choice);border:1px solid #fff7}.trainer-editor-actions{display:flex;gap:8px;margin-top:16px}.trainer-editor-actions button{flex:1;min-height:46px}.customize-trainer{width:100%;margin-top:12px}
@media(max-height:650px){#game #sheet.premium-dialogue{max-height:64dvh}.premium-speaker img{width:70px;height:80px}.premium-conversation{grid-template-columns:70px 1fr;gap:10px}#game #sheet.premium-dialogue .dialogue-text{font-size:14px!important}.trainer-preview img{height:90px}}
@media(prefers-reduced-motion:reduce){#game #sheet.premium-dialogue{animation:none!important}}
/* Anticipation, release and recovery within the original combat clock. */
#battle #battle-field.cinema-busy.cinema-lunge[data-cinema-actor=ally] #ally-sprite{animation:premium-ally-strike var(--scene-ms,390ms) both;transform-origin:50% 90%}
#battle #battle-field.cinema-busy.cinema-lunge[data-cinema-actor=enemy] #enemy-sprite{animation:premium-enemy-strike var(--scene-ms,390ms) both;transform-origin:50% 90%}
@keyframes premium-ally-strike{0%,100%{transform:translate(0) scale(1)}18%{transform:translate(-5px,3px) scale(1.03,.96)}48%{transform:translate(21px,-12px) rotate(-5deg) scale(1.03)}72%{transform:translate(11px,-5px)}90%{transform:translate(-1px,1px)}}
@keyframes premium-enemy-strike{0%,100%{transform:translate(0) scale(1)}18%{transform:translate(4px,-1px) scale(.97,1.02)}48%{transform:translate(-20px,12px) rotate(4deg) scale(1.03)}72%{transform:translate(-8px,4px)}90%{transform:translate(1px,-1px)}}
#battle-field.cinema-busy:not(.cinema-lunge):not(.cinema-hit):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence)[data-cinema-actor=ally] #ally-sprite,#battle-field.cinema-busy:not(.cinema-lunge):not(.cinema-hit):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence)[data-cinema-actor=enemy] #enemy-sprite{animation:premium-cast var(--scene-ms,390ms) both;transform-origin:50% 90%}
@keyframes premium-cast{0%,100%{transform:scale(1)}20%{transform:scale(.97,1.035) translateY(-2px)}50%{transform:scale(1.035,.98) translateY(1px)}75%{transform:scale(1.01)}}
@media(prefers-reduced-motion:reduce){#battle #battle-field.cinema-busy .battle-sprite{animation:none!important}}
#game[data-ui-motion=off] #battle #battle-field.cinema-busy .battle-sprite{animation:none!important}

.trainer-preview canvas{display:block;width:130px;height:120px;object-fit:contain;border-radius:12px;max-width:100%}.trainer-preview #trainer-preview-status{font:600 9px/1.3 system-ui;letter-spacing:0;display:block;margin-top:4px;color:var(--ui-muted)}.trainer-choices button[aria-pressed=true]:after{content:'✓';color:var(--ui-accent)}

/* battle-illustrations.css */
#battle #battle-field .battle-sprite[data-battle-art=illustrated]{image-rendering:auto;filter:none!important;object-fit:contain;object-position:center bottom}
/* No sepia wash on fallback Shiny sprites: eye/outline luminance stays intact. */
#battle #battle-field .battle-sprite.shiny-mon:not([data-battle-art=illustrated]){filter:hue-rotate(100deg) saturate(1.2)!important}
#battle #battle-field .battle-sprite[data-battle-art=illustrated].enemy{width:clamp(135px,38vw,210px);height:clamp(135px,38vw,210px);max-height:40%}
#battle #battle-field .battle-sprite[data-battle-art=illustrated].ally{width:clamp(160px,44vw,245px);height:clamp(160px,44vw,245px);max-height:44%}
@media(max-height:600px){#battle #battle-field .battle-sprite[data-battle-art=illustrated].enemy{width:120px;height:120px;max-height:44%}#battle #battle-field .battle-sprite[data-battle-art=illustrated].ally{width:145px;height:145px;max-height:48%}}
/* Front three-quarter render on both sides when a matching back render is unavailable. */
/* Allied Pokemon use actual rear sprites, never mirrored frontal artwork. */
/* Animated rear renders keep their real pose and palette; no mirroring or hue shift. */
#game #battle #battle-field #ally-sprite[data-rear-animated=yes]{image-rendering:auto!important;filter:drop-shadow(0 6px 4px #153d3c44)!important;object-fit:contain;object-position:center bottom;scale:1 1}

/* field-keys.css */
/* Compact console keys: static artwork, motion only on appearance and interaction. */
#world.classic-world.immersive-world.quiet-hud #quick-nav{left:auto;right:14px;bottom:calc(18px + env(safe-area-inset-bottom));transform:none;width:150px;grid-template-columns:70px 70px;gap:10px;overflow:visible}
#world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key{--key-top:#367d87;--key-bottom:#173f54;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:70px;height:76px;min-height:76px;padding:5px 3px 8px;border:1px solid #a9e0d3;border-bottom:2px solid #68a7a3;border-radius:18px;color:#fff6d9;background:linear-gradient(155deg,var(--key-top),var(--key-bottom));box-shadow:0 5px 0 #102e3e,0 7px 10px #102e3e40,inset 0 2px 0 #ffffff35,inset 0 -3px 0 #102e3e33;font:800 11px/1.1 ui-rounded,'Trebuchet MS',system-ui,sans-serif;letter-spacing:.15px;touch-action:manipulation;transition:transform .12s ease-out,box-shadow .12s ease-out,filter .12s;animation:field-key-arrive .3s ease-out both}
#world.classic-world.immersive-world.quiet-hud #quick-nav>.field-bag{--key-top:#397f6e;--key-bottom:#184a4c;border-color:#b2dba4;animation-delay:.06s}
#quick-nav .field-key-icon{display:block;width:42px;height:42px;pointer-events:none;transform-origin:50% 80%;transition:transform .16s ease-out}
#quick-nav .field-key-icon svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 0 #102e3e66)}
#quick-nav .field-key-label{display:block;white-space:nowrap;text-shadow:0 1px 1px #102e3e;pointer-events:none}
#world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key:active{transform:translateY(4px) scale(.97);box-shadow:0 1px 0 #102e3e,inset 0 2px 0 #ffffff24;filter:brightness(1.12)}
#quick-nav .field-key:active .field-key-icon{transform:rotate(-8deg) scale(1.08)}
#world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key:focus-visible{outline:3px solid #ffdf83;outline-offset:4px}
#world.classic-world.immersive-world.quiet-hud .control-right{transform:translateY(-96px)}
@keyframes field-key-arrive{from{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-height:500px) and (orientation:landscape){#world.classic-world.immersive-world.quiet-hud #quick-nav{bottom:calc(12px + env(safe-area-inset-bottom));width:134px;grid-template-columns:62px 62px}#world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key{width:62px;height:64px;min-height:64px;border-radius:15px;font-size:10px}#quick-nav .field-key-icon{width:34px;height:34px}#world.classic-world.immersive-world.quiet-hud .control-right{transform:translateY(-80px)}}
#game[data-ui-motion="off"] #quick-nav>.field-key,#game[data-ui-motion="off"] #quick-nav .field-key-icon{animation:none;transition:none}
@media(prefers-reduced-motion:reduce){#world #quick-nav>.field-key,#world #quick-nav .field-key-icon{animation:none;transition:none}}

/* trainer-level.css */
.trainer-level-card{padding:14px;margin-top:16px;border:1px solid #f5cd7b88;border-radius:14px;background:linear-gradient(130deg,#143644,#225b59);color:#fff6da}.trainer-level-card>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}.trainer-level-card span{font-size:11px}.trainer-level-card strong{font-size:32px;color:#ffda83}.trainer-level-card strong small{font-size:13px;color:#c5ded7}.trainer-level-card progress{display:block;width:100%;height:12px;margin-top:9px;accent-color:#ffce72}.trainer-level-card p{font-size:11px;line-height:1.5;margin-top:10px;color:#cce1d9}.trainer-perks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px}.trainer-perks span{padding:8px 4px;text-align:center;border-radius:8px;background:#ffffff0d}.trainer-perks b{display:block;color:#ffda83;font-size:15px;margin-top:4px}

/* beta-polish.css */
/* Beta polish reuses existing sprites, timing, panels and menu themes. */
#battle-actions:has(>.beta-xp){display:block;padding:0}.beta-xp{width:100%;min-width:0}.beta-xp-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}.beta-xp-head strong{font-size:12px;color:#fff0c9}.beta-xp-head small{font-size:10px;color:#abd6ce;white-space:nowrap}.beta-xp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:8px}.beta-xp-row{display:flex;gap:5px;align-items:center;background:#ffffff0a;border:1px solid #81b5a73d;border-radius:9px;padding:4px 6px;min-width:0;height:43px}.beta-xp-row img{width:30px;height:30px;object-fit:contain;image-rendering:pixelated}.beta-xp-row>div{flex:1;min-width:0}.beta-xp-row strong{display:flex;justify-content:space-between;gap:4px;font-size:10px;color:#fff6df;white-space:nowrap}.beta-xp-row em{font-size:10px;color:#ffdd8d;font-style:normal}.beta-xp-row small{display:block;font-size:9px;color:#b5d3d0}.beta-xp-track{display:block;height:4px;margin-top:3px;border-radius:4px;overflow:hidden;background:#061e31}.beta-xp-track i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#52bcd4,#e6e79c);transform:scaleX(var(--xp-scale));transform-origin:left;animation:beta-xp-fill .8s ease-out both}.beta-xp>button{width:100%;min-height:40px!important;padding:8px!important;font-size:13px!important}
@keyframes beta-xp-fill{from{transform:scaleX(var(--xp-start,0))}to{transform:scaleX(var(--xp-scale))}}
#sheet .beta-new-move,#sheet .beta-move-grid>section,#sheet .beta-next{border:1px solid var(--ui-border,#79a9a1);border-radius:14px;background:var(--ui-base,#123544);padding:14px;margin:12px 0}.beta-new-move>strong,.beta-move-grid strong{display:block;font-size:19px;margin:8px 0}.beta-move-grid small,.beta-new-move small{display:block;line-height:1.5}.beta-move-grid p,.beta-new-move p{font-size:12px;margin:8px 0;line-height:1.5}.beta-move-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.beta-move-grid>button{min-width:0;text-align:left;padding:13px!important;white-space:normal}.beta-move-grid b{display:block;font-size:11px;color:var(--ui-accent,#f7d485);margin-top:12px}.beta-move-grid>section{margin:0!important;min-width:0}.beta-performance{margin:16px 0;padding-top:16px;border-top:1px solid var(--ui-border)}.beta-performance p,.beta-next p,.beta-visited p{font-size:12px;line-height:1.6;margin:10px 0}.beta-next>small{font-size:10px;letter-spacing:1.8px;color:var(--ui-accent)!important}.beta-visited{padding:12px;border:1px solid var(--ui-border);border-radius:12px;margin:12px 0}
.beta-evolution{text-align:center;padding:18px 8px}.beta-evolution>small{font-size:10px;letter-spacing:2px;color:var(--ui-accent,#f3d287)}.beta-evolution .evolution-pair{position:relative;height:220px;width:100%;isolation:isolate;margin:12px 0}.beta-evolution .evolution-pair img{position:absolute;width:180px;height:180px;object-fit:contain;left:50%;top:20px;margin-left:-90px;image-rendering:pixelated}.beta-evolution .evo-before{animation:beta-evo-before 1.7s ease-in-out both}.beta-evolution .evo-after{animation:beta-evo-after 1.7s ease-out both}.beta-evolution h3{font-size:22px;line-height:1.35}.beta-evolution p{font-size:12px;margin:12px auto;max-width:350px}.beta-evolution button{width:100%;max-width:350px}.beta-evo-aura{position:absolute;inset:8px 10%;border-radius:50%;background:radial-gradient(circle,#faf5c965,#68e4cf30 40%,transparent 70%);animation:beta-evo-aura 1.7s ease-out both;z-index:-1}
@keyframes beta-evo-before{0%,20%{opacity:1;filter:brightness(1)}55%{opacity:1;filter:brightness(0) invert(1);transform:scale(1.1)}65%,100%{opacity:0;transform:scale(.8)}}@keyframes beta-evo-after{0%,55%{opacity:0;filter:brightness(0) invert(1);transform:scale(.75)}72%{opacity:1;filter:brightness(2);transform:scale(1.08)}100%{opacity:1;filter:brightness(1);transform:scale(1)}}@keyframes beta-evo-aura{0%{opacity:.2;transform:scale(.5)}60%{opacity:1;transform:scale(1.15)}100%{opacity:.6;transform:scale(1)}}
#battle-field[data-beta-phase=await][data-beta-motion=on] .battle-sprite:not(.caught):not(.fainted):not(.battle-attack){animation:beta-breathe 2.8s ease-in-out infinite;transform-origin:center bottom}#battle-field[data-beta-phase=await] .battle-sprite[data-beta-health=low]{animation-duration:4s}#battle-field[data-beta-power=strong] .cinema-impact{scale:1.25;filter:brightness(1.15)}
@keyframes beta-breathe{0%,100%{translate:0 0}50%{translate:0 -3px}}
#game[data-ui-motion=off] .beta-xp-track i{animation:none}#game[data-ui-motion=off] .beta-evolution .evo-before{animation:none;opacity:0}#game[data-ui-motion=off] .beta-evolution .evo-after{animation:none;opacity:1}#game[data-ui-motion=off] .beta-evo-aura,#game[data-performance=battery] #battle-field .battle-sprite{animation:none!important}
#sheet[data-beta-evolution-motion=off] .beta-evolution .evo-before{animation:none;opacity:0}#sheet[data-beta-evolution-motion=off] .beta-evolution .evo-after{animation:none;opacity:1}
@media(prefers-reduced-motion:reduce){.beta-xp-track i,.beta-evo-aura,#battle-field .battle-sprite{animation:none!important}.beta-evolution .evo-before{animation:none;opacity:0}.beta-evolution .evo-after{animation:none;opacity:1}}
@media(max-width:350px){.beta-xp-row{padding:4px;gap:3px}.beta-xp-row img{width:24px;height:24px}.beta-xp-row strong{font-size:9px}.beta-move-grid{grid-template-columns:1fr}}
@media(max-height:600px){.beta-xp-row{height:34px}.beta-xp-row img{width:23px;height:23px}.beta-xp-head{margin-bottom:4px}.beta-xp-grid{gap:3px;margin-bottom:4px}.beta-evolution .evolution-pair{height:150px}.beta-evolution .evolution-pair img{width:130px;height:130px;margin-left:-65px;top:10px}}

/* serra-alva.css */
.alva-puzzle{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.alva-puzzle button{min-width:0;padding:14px 5px!important;border-radius:14px!important}.alva-puzzle strong{display:block;font-size:36px;color:var(--ui-accent,#e9d29b)!important}.alva-puzzle span{display:block;font-size:12px;margin:8px 0}.alva-puzzle small{display:block;font-size:10px;white-space:normal}
#battle-field[data-living-habitat=snow]{background-color:#86b2c0}#battle-field[data-living-habitat=snow] .battle-platform{background:radial-gradient(ellipse,#e0f0e6,#8eb9ca);border-color:#d3eee8}

#battle #battle-field[data-living-habitat=snow]{background-image:url('assets/battle/snow.svg')}

/* combat-polish-202.css */
/* Brief animations only: no new game loop or persistent presentation state. */
#sheet.polished-menu .rpg-body{animation:polished-panel .16s ease-out both}@keyframes polished-panel{from{opacity:.4;translate:0 5px}to{opacity:1;translate:0 0}}
.party-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 14px}.party-tools button{font-size:12px!important;padding:10px 4px!important;border-radius:12px!important}.party-arrange article,.party-care article{display:flex;gap:9px;align-items:center;padding:10px;border:1px solid var(--ui-border,#79a7a1);border-radius:14px;background:var(--ui-panel,#1a4854);margin:9px 0}.party-arrange article>img,.party-arrange article>.shiny-portrait,.party-care article>img,.party-care article>.shiny-portrait{width:48px;height:48px;object-fit:contain;flex:none}.party-arrange article>div,.party-care article>div{flex:1;min-width:0}.party-arrange small{display:block;font-size:11px;margin-top:4px}.party-arrange button{width:40px;min-width:40px;padding:8px!important;font-size:20px!important;border-radius:10px!important}.party-arrange strong{font-size:13px}.party-compare-pick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.party-compare-pick button{display:flex;flex-direction:column;align-items:center;min-width:0}.party-compare-pick img{width:60px;height:60px;object-fit:contain}.party-compare-head{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;text-align:center;margin:14px 0}.party-compare-head img{width:90px;height:90px;object-fit:contain}.party-compare-head h3{font-size:17px!important;margin:8px 0!important}.party-compare-head .type{margin:6px 2px}.party-compare-stats{border:1px solid var(--ui-border);border-radius:14px;overflow:hidden}.party-compare-stats>div{display:grid;grid-template-columns:1fr 2fr 1fr;gap:5px;padding:11px;text-align:center;border-bottom:1px solid #8fb8af33}.party-compare-stats span{font-size:12px;color:var(--ui-muted)}.party-compare-stats b{color:var(--ui-accent)}.party-care-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}.party-care-actions button{min-height:38px!important;font-size:10px!important;padding:7px!important}.party-bag-care{width:100%;margin-bottom:12px;border-radius:12px!important}
#capture-moment.polish-capture .catch-ball{width:32px;height:32px;background:radial-gradient(circle at 34% 22%,#fff5df88,transparent 30%),linear-gradient(transparent 0 44%,#20394c 44% 56%,#fff6e5 56%);box-shadow:inset -5px -4px 0 #163b4538,inset 1px 1px 0 #ffffff99,0 3px 4px #163b4544;border-color:#1c3447;transform-origin:50% 85%}
#capture-moment.polish-capture .catch-ball:before{content:'';position:absolute;inset:0 0 50%;border-radius:30px 30px 0 0;background:radial-gradient(ellipse at 32% 28%,#fff8db 0 4%,#ff9f83 12%,#f26b57 42%,#b83e46 100%);border-bottom:2px solid #1c3447;animation:polish-lid var(--catch-duration) ease-out both;z-index:1}
#capture-moment.polish-capture .catch-ball:after{left:9px;top:9px;width:10px;height:10px;background:radial-gradient(circle,#f9fff4 0 38%,#b5dad4 45% 58%,#264c61 63%);border:1px solid #15394d;z-index:2;animation:polish-lock-light var(--catch-duration) linear both}
@keyframes polish-lid{0%,18%,34%,100%{translate:0 0;rotate:0deg}24%,28%{translate:-1px -7px;rotate:-18deg}}@keyframes polish-lock-light{0%,40%{filter:brightness(1)}52%,66%,80%{filter:brightness(1.8)}58%,72%,86%,100%{filter:brightness(1)}}
.polish-capture-aura{position:absolute;left:var(--orb-x);top:var(--orb-hit);margin:-35px;width:70px;height:70px;border:2px solid #dafcf0;border-radius:50%;opacity:0;animation:polish-absorb var(--catch-duration) ease-out both;pointer-events:none}@keyframes polish-absorb{0%,19%{opacity:0;scale:1.15}25%{opacity:.8;scale:1}34%{opacity:0;scale:.15}100%{opacity:0}}
.capture-failed #capture-moment.polish-capture .catch-ball:before{animation-name:polish-lid-failed}@keyframes polish-lid-failed{0%,18%,34%,80%{translate:0 0;rotate:0deg}24%,28%,90%,100%{translate:-1px -7px;rotate:-18deg}}
#game[data-ui-motion=off] #sheet.polished-menu .rpg-body{animation:none}#game[data-ui-motion=off] #capture-moment.polish-capture .catch-ball:before,#game[data-ui-motion=off] #capture-moment.polish-capture .catch-ball:after,#game[data-ui-motion=off] .polish-capture-aura,#capture-moment.catch-reduced.polish-capture .catch-ball:before,#capture-moment.catch-reduced.polish-capture .catch-ball:after{animation:none}.catch-reduced .polish-capture-aura{display:none}
@media(prefers-reduced-motion:reduce){#sheet.polished-menu .rpg-body,#capture-moment.polish-capture .catch-ball:before,#capture-moment.polish-capture .catch-ball:after,.polish-capture-aura{animation:none!important}.polish-capture-aura{display:none}}

.party-arrange .shiny-portrait img,.party-care .shiny-portrait img{width:100%;height:100%;object-fit:contain}

/* qol-203.css */
/* Safe viewport: the head and explicit back bar never scroll with long content. */
#game #overlay:has(#sheet.qol-panel:not(.partner-menu)){padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));overflow:hidden;align-items:center}
#game #overlay #sheet.rpg-screen.qol-panel:not(.partner-menu){display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;max-height:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)))!important;width:min(100%,720px)!important;max-width:720px!important;overflow:hidden!important;margin:auto!important;box-sizing:border-box;translate:none}
#game #sheet.qol-panel:not(.partner-menu)>.rpg-head{position:relative!important;inset:auto!important;flex:0 0 auto;min-height:60px!important;padding:10px 14px!important;display:flex;align-items:center;gap:10px}
#game #sheet.qol-panel:not(.partner-menu)>.rpg-head h2{flex:1;min-width:0;margin:0!important;font-size:clamp(17px,4vw,23px)!important;line-height:1.25!important;overflow-wrap:anywhere}
#game #sheet.qol-panel:not(.partner-menu)>.rpg-head .rpg-back{flex:none;display:flex!important;align-items:center;justify-content:center;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important}
#game #sheet.qol-panel:not(.partner-menu)>.rpg-body{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:14px!important;width:100%;box-sizing:border-box;scroll-padding:12px}
#game #sheet.qol-panel:not(.partner-menu)>.rpg-footer{display:none!important}.qol-backbar{flex:0 0 auto;padding:10px 14px;background:var(--ui-base,#133440);border-top:1px solid var(--ui-border,#6b9890)}.qol-backbar button{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:10px;border:1px solid var(--ui-border,#6b9890);border-radius:12px;background:var(--ui-card,#22545c);color:var(--ui-text,#fff4da);font-size:14px;text-align:center}
#game #sheet.qol-panel .rpg-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:8px;align-items:stretch}#game #sheet.qol-panel .rpg-actions>button,#game #sheet.qol-panel .party-tools>button{display:flex;align-items:center;justify-content:center;min-width:0;width:100%;text-align:center;white-space:normal;overflow-wrap:normal;line-height:1.3;padding:10px 8px!important}
#game #sheet.qol-panel .party-tools{gap:7px;margin-bottom:14px}#game #sheet.qol-panel .party-tools>button{font-size:12px!important;min-height:46px}
.qol-box-filters{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:14px}.qol-box-filters label,.qol-shortcuts label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px}.qol-box-filters select,.qol-shortcuts select{width:100%;min-width:0;min-height:44px;padding:8px}.qol-box-filters>button{grid-column:1/-1;min-height:40px}.qol-shortcuts{border-top:1px solid var(--ui-border);padding-top:14px;margin-top:18px}.qol-shortcuts label{margin:12px 0}.qol-shortcuts p{font-size:12px}
#qol-switch-fx,#qol-status-fx{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:8;contain:layout paint}.qol-recall{position:absolute;object-fit:contain;transform-origin:center;animation:qol-recall var(--qol-switch-ms,330ms) ease-in both}.qol-send-ring{position:absolute;width:65px;height:65px;margin:-32px;border:3px solid #e4fff0;border-radius:50%;box-shadow:0 0 0 9px #93e9df33;animation:qol-send var(--qol-switch-ms,330ms) ease-out both}@keyframes qol-recall{from{opacity:.9;transform:scale(1)}to{opacity:0;transform:scale(.08) translateY(20px)}}@keyframes qol-send{from{opacity:.9;transform:scale(.2)}to{opacity:0;transform:scale(1.4)}}
.qol-status{position:absolute;display:flex;gap:7px;color:#cbb0ef;font:800 15px system-ui;text-shadow:0 1px #173c4b}.qol-status.ally{left:19%;top:60%}.qol-status.enemy{right:17%;top:29%}.qol-status i{font-style:normal;animation:qol-status-rise 3.8s ease-out infinite;animation-delay:calc(var(--i)*.7s);opacity:0}.qol-status.status-par{color:#ffe28b}.qol-status.status-brn{color:#ffba78}.qol-status.status-frz{color:#dbfaff}.qol-status.status-slp{color:#d7e6fc}@keyframes qol-status-rise{0%,100%{opacity:0;translate:0 6px}25%,55%{opacity:.8}85%{opacity:0;translate:0 -17px}}
#game[data-ui-motion=off] #qol-status-fx,#game[data-ui-motion=off] #qol-switch-fx,#game[data-performance=battery] #qol-status-fx,#game[data-performance=battery] #qol-switch-fx{display:none}
@media(prefers-reduced-motion:reduce){#qol-status-fx,#qol-switch-fx{display:none}}
@media(max-height:500px){#game #sheet.qol-panel:not(.partner-menu)>.rpg-head{min-height:48px!important;padding:5px 10px!important}.qol-backbar{padding:5px 10px}#game #sheet.qol-panel:not(.partner-menu)>.rpg-body{padding:10px!important}}

/* safe-passage-save.css */
#game #sheet .rpg-body .manual-save-entry{display:grid;grid-template-columns:34px 1fr;column-gap:10px;align-items:center;width:100%;text-align:left;margin-bottom:14px;padding:14px!important;border:1px solid var(--ui-accent,#f7d184);border-radius:14px;background:linear-gradient(130deg,var(--ui-card,#285961),var(--ui-panel,#173f4e));color:var(--ui-text,#fff4da)}.manual-save-entry>span{grid-row:1/3;font-size:26px;text-align:center;color:var(--ui-accent,#f7d184)}.manual-save-entry>strong{font-size:17px}.manual-save-entry>small{font-size:11px;margin-top:4px}.manual-save-feedback{padding:14px;border:1px solid #91cbb1;border-radius:14px;background:#164b4b;margin-bottom:14px}.manual-save-feedback strong{font-size:17px;color:#e6f5d6!important}.manual-save-feedback p{margin:9px 0;font-size:12px}.manual-save-feedback small{font-size:11px}.manual-save-feedback.save-failed{border-color:#efa49b;background:#53313b}.manual-save-feedback.save-failed strong{color:#ffe3d4!important}

/* premium-dex.css */
/* Fixed Pokédex: pages replace content; the document does not scroll. */
#game #overlay #sheet.dex-premium.qol-panel{height:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)))!important;max-width:720px!important;border-top:3px solid var(--ui-accent);border-radius:20px 8px 20px 8px}
#game #sheet.dex-premium.qol-panel>.rpg-body{display:flex;flex-direction:column;gap:10px;overflow:hidden!important;padding:12px!important;flex:1;min-height:0}.dex-species-hero{display:grid;grid-template-columns:minmax(95px,38%) 1fr;gap:12px;flex:none;align-items:center;padding:10px;border:1px solid var(--ui-border);border-radius:15px;background:radial-gradient(ellipse at 20% 65%,#74cdb42c,transparent 62%),var(--ui-base)}.dex-art-frame{position:relative;height:140px;background:radial-gradient(ellipse at 50% 78%,#b0dfab55,transparent 55%);display:flex;align-items:center;justify-content:center}.dex-art-frame img{width:100%;height:100%;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 5px 2px #071f3740)}.dex-species-hero small{font-size:9px;letter-spacing:1px}.dex-species-hero h3{font-size:clamp(21px,6vw,31px)!important;line-height:1.1;margin:6px 0!important;overflow-wrap:anywhere}.dex-species-hero .type{font-size:10px!important;padding:4px 6px!important}.dex-species-hero p{font-size:11px;margin:7px 0}.dex-variant{min-height:32px!important;padding:6px 9px!important;font-size:11px!important}.dex-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none}.dex-tabs button{font-size:10px!important;padding:7px 3px!important;min-height:32px!important;border-radius:8px!important;white-space:nowrap}.dex-page-data{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px;overflow:hidden}.dex-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.dex-facts span{padding:9px;background:var(--ui-card);border-radius:10px;font-size:10px;color:var(--ui-muted)}.dex-facts b{display:block;font-size:18px;color:var(--ui-text);margin-top:3px}.dex-note{font-size:11px!important;line-height:1.45!important;margin:2px 0!important}.dex-base-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.dex-base-stats>div{display:grid;grid-template-columns:1fr auto;gap:5px;padding:8px;background:var(--ui-card);border-radius:9px}.dex-base-stats span{font-size:11px}.dex-base-stats b{color:var(--ui-accent)}.dex-base-stats i{display:block;grid-column:1/-1;height:5px;border-radius:5px;background:var(--ui-base);overflow:hidden}.dex-base-stats em{display:block;height:100%;background:linear-gradient(90deg,#65cfc8,#e9d69a)}.dex-data-cards{display:flex;flex-direction:column;gap:7px;min-height:0;flex:1}.dex-info-card{padding:12px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:12px;min-width:0}.dex-info-card>small{display:block;font-size:9px;letter-spacing:.7px}.dex-info-card>strong{display:block;font-size:18px;margin:6px 0}.dex-info-card p{font-size:12px;line-height:1.5;margin:6px 0}.dex-info-card>button{min-height:35px!important;padding:7px!important;font-size:12px!important;width:100%}.dex-learn-card>strong{font-size:16px}.dex-inner-pages{display:flex;justify-content:center;align-items:center;gap:14px;flex:none;margin-top:auto}.dex-inner-pages button{width:40px;min-height:34px!important;padding:2px!important;font-size:22px!important}.dex-inner-pages span{font-size:11px;color:var(--ui-muted)}.dex-voice{display:flex;gap:7px;align-items:center;flex:none;border-top:1px solid var(--ui-border);padding-top:8px}.dex-voice button{min-height:35px!important;font-size:11px!important;padding:7px!important;white-space:nowrap}.dex-voice small{font-size:10px;line-height:1.3}.dex-catalog-count{display:flex;justify-content:space-between;gap:6px;font-size:10px;flex:none}.dex-catalog-count b{display:block;font-size:18px;color:var(--ui-accent)}.dex-premium-search{display:grid;grid-template-columns:1fr 1fr;gap:5px;flex:none}.dex-premium-search input{grid-column:1/-1;min-width:0;width:100%}.dex-premium-search select,.dex-premium-search button,.dex-premium-search input{min-height:34px!important;padding:6px!important;font-size:11px!important;min-width:0;width:100%}.dex-catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:7px;flex:1;min-height:0}.dex-catalog-grid>button{min-width:0;min-height:0!important;padding:7px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;overflow:hidden}.dex-catalog-grid img{width:65px;height:65px;object-fit:contain;image-rendering:pixelated;max-height:55%}.dex-catalog-grid strong{font-size:12px}.dex-catalog-grid small{font-size:9px}.dex-catalog-grid>button>span{font-size:11px}.dex-question{font-size:34px!important;color:var(--ui-border)}.dex-undiscovered{text-align:center;margin:auto}.dex-undiscovered>span{font-size:100px;color:var(--ui-border)}.dex-undiscovered p{font-size:13px;margin:15px 0}
#game #sheet .rpg-body .dex-bag-entry{display:grid;grid-template-columns:30px 1fr;gap:4px 10px;align-items:center;width:100%;text-align:left;margin-bottom:12px;padding:13px!important;border:1px solid var(--ui-accent);border-radius:13px;background:linear-gradient(125deg,var(--ui-card),var(--ui-base))}.dex-bag-entry>span{grid-row:1/3;color:var(--ui-accent);font-size:27px}.dex-bag-entry strong{font-size:17px}.dex-bag-entry small{font-size:11px}
@media(max-height:650px){.dex-art-frame{height:95px}.dex-species-hero{padding:7px}.dex-species-hero h3{font-size:22px!important}.dex-info-card{padding:8px}.dex-info-card p{font-size:11px}.dex-facts span{padding:6px}.dex-facts b{font-size:16px}.dex-note{font-size:10px!important}}
@media(max-height:500px){#game #sheet.dex-premium.qol-panel>.rpg-body{gap:5px;padding:7px!important}.dex-species-hero{grid-template-columns:75px 1fr;gap:7px}.dex-art-frame{height:65px}.dex-species-hero h3{font-size:18px!important}.dex-species-hero p,.dex-species-hero small{display:none}.dex-variant{position:absolute;right:22px;top:70px}.dex-tabs button{min-height:26px!important;padding:4px!important;font-size:9px!important}.dex-facts{gap:3px}.dex-facts span{padding:4px}.dex-facts b{font-size:13px}.dex-base-stats{gap:4px}.dex-base-stats>div{padding:4px}.dex-info-card{padding:6px}.dex-info-card>strong{font-size:15px;margin:3px 0}.dex-info-card p{font-size:10px;line-height:1.3}.dex-info-card .dex-note{display:none}.dex-voice{padding-top:3px}.dex-voice small{display:none}.dex-inner-pages button{min-height:26px!important}.dex-catalog-count b{font-size:14px}.dex-premium-search input,.dex-premium-search select,.dex-premium-search button{min-height:27px!important;padding:4px!important}.dex-note{font-size:9px!important;line-height:1.25!important}.dex-premium-search{grid-template-columns:repeat(3,minmax(0,1fr))}.dex-premium-search input{grid-column:1/3}}
@media(max-height:500px) and (min-width:550px){#game #sheet.dex-premium:not(.dex-catalog).qol-panel>.rpg-body{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-rows:auto 1fr auto;gap:7px}.dex-species-hero{grid-column:1;grid-row:1}.dex-tabs{grid-column:1;grid-row:2;align-self:start}.dex-page-data{grid-column:2;grid-row:1/4;align-self:stretch}.dex-voice{grid-column:1;grid-row:3}.dex-variant{position:static}}

.dex-catalog-count .dex-hunt-link{min-height:32px!important;font-size:10px!important;padding:5px 7px!important;align-self:center}

/* objective-eggs.css */
.objective-entry{width:100%;margin-bottom:12px!important;border-color:#efd18b!important}.objective-incubator{display:flex;gap:18px;align-items:center;padding:18px;border:1px solid #88bfae;border-radius:18px;background:linear-gradient(130deg,#214f58,#15363f)}.objective-incubator>div:last-child{flex:1;min-width:0}.objective-egg{flex:none;width:66px;height:84px;display:grid;place-items:center;border-radius:50% 50% 44% 44%;background:radial-gradient(ellipse at 32% 40%,#77ac95 0 10%,transparent 11%),radial-gradient(ellipse at 70% 67%,#77ac95 0 12%,transparent 13%),linear-gradient(110deg,#fff9d9,#c9dfbd);color:#b89645;font-size:28px;box-shadow:inset -7px -5px 8px #254a4430,0 8px 12px #0003}.objective-missions{display:grid;gap:12px;margin:16px 0}.objective-missions article{padding:16px;border-radius:16px;border:1px solid #6e9e9e;background:#ffffff08}.objective-missions h3{margin:0 0 8px}.objective-missions progress,.objective-incubator progress{width:100%;accent-color:#8fd8b2;height:10px;display:block;margin:10px 0}.objective-missions button{width:100%}.objective-hatch{text-align:center;padding:24px 8px}.objective-hatch .objective-egg{margin:0 auto 16px;animation:objective-crack .6s ease-out both}.objective-hatch img{width:140px;height:140px;object-fit:contain;animation:objective-reveal .7s ease-out both}@keyframes objective-crack{40%{transform:rotate(-12deg)}70%{transform:rotate(12deg)}100%{transform:scale(.8);opacity:.35}}@keyframes objective-reveal{from{opacity:0;transform:translateY(16px) scale(.7)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.objective-hatch *{animation:none!important}}

.objective-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.objective-filters button{min-width:0;font-size:.85em}.objective-filters button[aria-pressed=true]{border-color:#f3d183;background:#356b68}.objective-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px}.objective-pagination button{min-width:0;font-size:.85em}.objective-pagination span{white-space:nowrap}

#objective-egg-field{position:absolute;right:12px;bottom:12px;z-index:6;max-width:min(65%,340px);padding:9px 12px;min-height:44px;font-size:12px;line-height:1.35;color:#fff6d9;background:#153d48ee;border:1px solid #8ac0b2;border-radius:12px;box-shadow:0 3px 8px #0003;text-align:left}#objective-egg-field.egg-ready{border-color:#f5d07a;color:#ffe5a0}.objective-track{margin-bottom:8px!important;background:#163a44!important;color:#d3e8df!important;font-size:.85em}

/* partner-premium.css */
/* Local pre-rendered artwork: no live 3D renderer or new image downloads. */
#game #sheet.partner-menu .partner-hero-art[data-partner-art=hd],#game #sheet.partner-menu .partner-card-art[data-partner-art=hd]{image-rendering:auto!important;object-fit:contain;filter:drop-shadow(0 12px 9px #0004)!important}
#game #sheet.partner-menu .partner-clearing{background:radial-gradient(ellipse at 50% 65%,color-mix(in srgb,var(--partner-light) 35%,transparent),transparent 68%)}
#game #sheet.partner-menu .partner-clearing::before{bottom:8%;height:24%;width:72%;background:radial-gradient(ellipse,#c7ecb9aa,#4b8d7d44 55%,transparent 72%);border-bottom:2px solid #c6e8bb66}
#game #sheet.partner-menu .partner-orbit{border:1px solid #9ed4ca44;box-shadow:0 0 35px #89ccbb10,inset 0 0 24px #92dcc210}
#game #sheet.partner-menu .partner-personality{position:relative!important;flex:none;margin:5px 0 12px!important;line-height:1.3!important;text-align:center}
#game #sheet.partner-menu .partner-roster{gap:9px;margin-bottom:12px}
#game #sheet.partner-menu .partner-pick{border:1px solid #91bdb9!important;border-radius:17px!important;background:linear-gradient(150deg,#2a6268,#183c49)!important;box-shadow:inset 0 1px #dbf3e01a,0 4px 8px #0002!important;min-width:0;padding:7px 4px!important;gap:4px!important;transition:transform .15s ease,border-color .15s ease}
#game #sheet.partner-menu .partner-pick.selected{background:linear-gradient(145deg,#f7dc98,#dcb15f)!important;border-color:#ffe7aa!important;box-shadow:0 0 0 2px #f5d08444,0 5px 12px #0003!important}
#game #sheet.partner-menu .partner-pick span{color:#f9f2dd!important;font-size:12px!important;line-height:1.2!important;text-shadow:none!important}
#game #sheet.partner-menu .partner-pick.selected span,#game #sheet.partner-menu .partner-pick.selected i{color:#173f48!important}
#game #sheet.partner-menu .partner-pick img{height:66px!important;width:86px!important;max-width:100%;animation:none!important}
#game #sheet.partner-menu.partner-select .rpg-body{overflow:hidden!important;min-height:0;padding-top:4px!important;padding-bottom:8px!important;gap:0}
#game #sheet.partner-menu.partner-select .partner-region{margin:0 0 4px;gap:14px}
#game #sheet.partner-menu.partner-select .partner-hero{min-height:0!important;flex:1 1 0;justify-content:flex-start}
#game #sheet.partner-menu.partner-select .partner-heading{margin-top:0;flex:none}
#game #sheet.partner-menu.partner-select .partner-clearing{min-height:80px!important;max-height:280px;flex:1 1 0;margin:0}
#game #sheet.partner-menu.partner-select .partner-hero-art{position:absolute;width:min(80%,280px)!important;height:100%!important;max-height:270px;inset:0;margin:auto;animation:partner-arrival .28s ease-out}
#game #sheet.partner-menu.partner-select .partner-bottom{flex:none}
#game #sheet.partner-menu .partner-number{color:#bbd4c7!important;bottom:5%}
#game #sheet.partner-menu .partner-level{color:#c4ddd1!important}
#game #sheet.partner-menu .partner-primary{min-height:48px!important;box-shadow:0 4px 0 #735e3266!important}
@media(max-height:650px){#game #sheet.partner-menu .partner-pick img{height:45px!important;width:64px!important}#game #sheet.partner-menu .partner-pick{min-height:76px!important}#game #sheet.partner-menu .partner-region>button{min-height:36px!important;height:36px!important}#game #sheet.partner-menu .partner-heading h3{font-size:28px!important}#game #sheet.partner-menu .partner-fineprint{font-size:9px!important;margin-top:6px!important}#game #sheet.partner-menu .partner-personality{font-size:11px!important;margin-bottom:7px!important}}
@media(prefers-reduced-motion:reduce){#game #sheet.partner-menu .partner-hero-art{animation:none!important}#game #sheet.partner-menu .partner-pick{transition:none!important}}
/* Explicit rows prevent the featured preview from collapsing beneath the cards. */
#game #overlay #sheet.partner-select{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;align-content:stretch!important;gap:0!important;height:100%!important;min-height:0!important;overflow:hidden!important}
#game #overlay #sheet.partner-select>.rpg-head{position:relative!important;min-height:48px!important;padding:8px 16px!important}
#game #overlay #sheet.partner-select>.rpg-body{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;align-content:stretch!important;gap:8px!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;padding:8px 16px 10px!important}
#game #overlay #sheet.partner-select .partner-hero{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;min-height:0!important;max-height:none!important;height:100%!important;overflow:hidden!important;gap:4px!important;width:100%;align-items:stretch!important;justify-content:stretch!important}
#game #overlay #sheet.partner-select .partner-heading{margin:0!important;text-align:center}
#game #overlay #sheet.partner-select .partner-clearing{display:grid!important;place-items:center!important;min-height:0!important;max-height:none!important;height:100%!important;width:100%;overflow:hidden!important;position:relative!important;margin:0!important}
#game #overlay #sheet.partner-select .partner-hero-art{position:relative!important;inset:auto!important;display:block!important;width:100%!important;max-width:280px!important;height:100%!important;max-height:260px!important;min-height:0!important;margin:0 auto!important;object-fit:contain!important}
#game #overlay #sheet.partner-select .partner-personality{margin:2px 0 4px!important;font-size:11px!important;line-height:1.3!important}
#game #overlay #sheet.partner-select .partner-bottom{display:grid!important;grid-template-rows:auto auto auto!important;gap:8px!important;margin:0 auto!important;min-width:0!important;max-width:460px!important;width:100%}
#game #overlay #sheet.partner-select .partner-roster{margin:0!important;gap:8px!important}
#game #overlay #sheet.partner-select .partner-pick{min-height:90px!important;padding:6px 3px!important;overflow:hidden!important}
#game #overlay #sheet.partner-select .partner-pick img{width:72px!important;height:60px!important;flex:none!important}
#game #overlay #sheet.partner-select .partner-primary{position:relative!important;inset:auto!important;margin:0!important;min-height:46px!important;font-size:14px!important}
#game #overlay #sheet.partner-select .partner-fineprint{margin:0!important;font-size:9px!important;line-height:1.3!important}
#game #overlay #sheet.partner-select>.qol-backbar{position:relative!important;padding:8px 16px!important;margin:0!important}
@media(max-height:600px){#game #overlay #sheet.partner-select .partner-pick{min-height:72px!important}#game #overlay #sheet.partner-select .partner-pick img{height:42px!important;width:60px!important}#game #overlay #sheet.partner-select .partner-personality,#game #overlay #sheet.partner-select .partner-kicker{display:none!important}#game #overlay #sheet.partner-select .partner-heading h3{font-size:25px!important;margin:0 0 3px!important}#game #overlay #sheet.partner-select>.rpg-body{gap:5px!important}#game #overlay #sheet.partner-select .partner-bottom{gap:6px!important}}

/* experience-polish.css */
/* Fixed navigation and readable controls; the content alone may scroll. */
#game #overlay #sheet.qol-panel:not(.partner-menu)>.rpg-head,#game #overlay #sheet.qol-panel>.qol-backbar{flex-shrink:0!important}
#game #sheet.qol-panel .party-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
#game #sheet.qol-panel :is(.rpg-actions,.party-tools,.qol-box-filters,.objective-filters)>button{min-width:0!important;min-height:44px!important;text-align:center!important;justify-content:center!important;overflow-wrap:anywhere}
#game #sheet.qol-panel .rpg-body>p{max-width:100%;overflow-wrap:break-word}
#game #sheet.qol-panel .rpg-body :is(input,select){max-width:100%;min-width:0}
#game #sheet.qol-panel .rpg-head h2{overflow-wrap:normal!important;word-break:normal}
/* Resting pose stops as soon as an action/capture starts. Uses independent translate. */
#game #battle-field[data-resting=yes]:not(.capture-sequence) .battle-sprite:not(.fainted):not(.caught){animation:experience-breathe 3.2s ease-in-out infinite;transform-origin:center bottom}
#game #battle-field[data-resting=yes] #enemy-sprite{animation-delay:-1.6s}
@keyframes experience-breathe{0%,100%{translate:0 0}50%{translate:0 -3px}}
#game #battle .monster-hud{box-shadow:0 5px 12px #071e2938,inset 0 1px #fff8}
#game #battle .monster-hud .hp i{transition:width .28s ease-out}
#game #battle #battle-message{line-height:1.4;box-shadow:inset 0 1px #ffffff0d}
/* A visible seam, specular highlight and a small floor shadow reinforce the existing arc. */
#game #capture-moment .catch-ball{box-shadow:inset -5px -5px 7px #102d4855,inset 2px 2px 3px #ffffffb0,0 8px 8px #102a3b55;backface-visibility:hidden}
#game #capture-moment .catch-ball:after{box-shadow:inset 0 1px 2px #fff,0 0 0 1px #173b4a}
#game #capture-moment .catch-stars i{filter:drop-shadow(0 0 5px #ffdd8e)}
#game #battle-field.capture-success .catch-caption{border-color:#f4d383;background:#143f40ed}
#game #battle-field.capture-failed .catch-caption{border-color:#8bc3c2}
/* Egg reward reveal: crack first, then reveal the already-saved newborn. */
#game #sheet .objective-hatch{position:relative;isolation:isolate;overflow:hidden;padding:20px 12px;background:radial-gradient(ellipse,#91d8b224,transparent 70%);border-radius:20px}
#game #sheet .objective-hatch .objective-egg{position:relative;animation:experience-egg 1s ease-in-out both}
#game #sheet .objective-hatch .objective-egg:after{content:'';position:absolute;left:41%;top:15%;width:19%;height:64%;background:#476f61;clip-path:polygon(50% 0,100% 22%,46% 40%,100% 58%,36% 78%,65% 100%,0 74%,49% 54%,0 36%,61% 19%);animation:experience-crack 1s both}
#game #sheet .objective-hatch>img{width:150px;height:150px;object-fit:contain;animation:experience-born .55s .8s both;filter:drop-shadow(0 8px 6px #0003)}
#game #sheet .objective-hatch>h3,#game #sheet .objective-hatch>p{animation:experience-born .4s 1s both}
@keyframes experience-egg{0%,15%{rotate:0deg}25%,45%{rotate:-9deg}35%,55%{rotate:9deg}65%{rotate:0deg;scale:1}100%{opacity:0;scale:1.15}}
@keyframes experience-crack{0%,25%{opacity:0}40%,100%{opacity:1}}
@keyframes experience-born{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
/* Subtle movement response, on the existing water overlay only; no new particles. */
#game[data-travelling=yes] #nub{box-shadow:0 0 0 5px #d9f8d51a,0 3px 9px #143d4144}
#game[data-ui-motion=off] #battle-field .battle-sprite,#game[data-performance=battery] #battle-field .battle-sprite{animation:none!important}
#game[data-ui-motion=off] .objective-hatch *,#game[data-performance=battery] .objective-hatch *{animation:none!important}
@media(prefers-reduced-motion:reduce){#game #battle-field .battle-sprite,#game #sheet .objective-hatch *{animation:none!important}#game #battle .monster-hud .hp i{transition:none}}
/* Accurate local rear Shiny palette must not receive the generic hue filter. */
#game #battle #battle-field #ally-sprite[data-rear-palette=faithful]{filter:drop-shadow(0 5px 3px #153b3d44)!important;image-rendering:pixelated;object-fit:contain;object-position:center bottom}

/* profile-dex-polish.css */
/* Four catalogue entries leave room for complete names and centered touch targets. */
#game #overlay #sheet.dex-catalog>.rpg-body{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;gap:8px!important;overflow:hidden!important;min-height:0!important}
#game #sheet.dex-catalog .dex-catalog-count{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:center;text-align:center;gap:6px}
#game #sheet.dex-catalog .dex-catalog-count span,#game #sheet.dex-catalog .dex-catalog-count b{text-align:center;line-height:1.25}
#game #sheet.dex-catalog .dex-premium-search{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-items:stretch}
#game #sheet.dex-catalog .dex-premium-search :is(input,select,button){width:100%;min-width:0;text-align:center!important;text-align-last:center;padding:6px 8px!important;margin:0!important;font:600 11px/1.2 system-ui!important;height:34px!important;min-height:34px!important}
#game #sheet.dex-catalog .dex-premium-search input{grid-column:1/-1}
#game #sheet.dex-catalog .dex-catalog-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;min-height:0;overflow:hidden}
#game #sheet.dex-catalog .dex-catalog-grid>button{display:grid!important;grid-template-rows:auto minmax(20px,1fr) auto auto!important;align-content:center;justify-items:center;align-items:center;gap:2px!important;padding:6px!important;min-height:0!important;height:100%;text-align:center!important;line-height:1.2!important;overflow:hidden;border-radius:14px!important}
#game #sheet.dex-catalog .dex-catalog-grid :is(small,strong,span){display:block;min-width:0;max-width:100%;margin:0!important;text-align:center!important;line-height:1.15!important}
#game #sheet.dex-catalog .dex-catalog-grid small{font:600 9px/1.1 system-ui!important}
#game #sheet.dex-catalog .dex-catalog-grid strong{font:750 12px/1.15 system-ui!important;overflow-wrap:anywhere}
#game #sheet.dex-catalog .dex-catalog-grid img{width:60px!important;height:100%!important;max-height:65px!important;min-height:0;object-fit:contain}
#game #sheet.dex-catalog .dex-question{font-size:30px!important;line-height:1!important}
#game #sheet.dex-catalog .dex-inner-pages{display:flex;justify-content:center;align-items:center;gap:16px;margin:0!important;min-height:36px}
/* Party profile: a bounded game panel with a featured creature and animated meters. */
#game #overlay #sheet.profile-premium.qol-panel{height:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)))!important;max-width:720px!important}
#game #sheet.profile-premium>.rpg-body{display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:9px!important;overflow:hidden!important;min-height:0!important}
#game #sheet.profile-premium .summary-hero{display:grid;grid-template-columns:minmax(100px,42%) minmax(0,1fr);align-items:center;gap:12px;padding:10px!important;min-height:0!important;border-radius:18px;background:radial-gradient(ellipse at 22% 60%,#85d8bf33,transparent 64%),var(--ui-base)!important;border:1px solid var(--ui-border)!important}
#game #sheet.profile-premium .summary-hero h3{font:850 clamp(21px,5.7vw,30px)/1.1 system-ui!important;margin:5px 0!important;overflow-wrap:anywhere}
#game #sheet.profile-premium .summary-hero small{font-size:10px!important}
#game #sheet.profile-premium .summary-hero span{font-size:12px}
#game #sheet.profile-premium .profile-stage{height:145px;position:relative;display:grid;place-items:center;isolation:isolate}
#game #sheet.profile-premium .profile-stage i{position:absolute;bottom:7%;width:90%;height:23%;border-radius:50%;background:radial-gradient(ellipse,#c5e7ae77,#76bfa833 60%,transparent 72%);border-bottom:1px solid #bfe6c36b;z-index:-1}
#game #sheet.profile-premium .profile-stage img{width:100%;height:100%;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 7px 5px #082e3b44);animation:profile-float 3.2s ease-in-out infinite}
.profile-shiny{position:absolute;left:0;bottom:0;color:#f8da80;font-size:10px!important}
#game #sheet.profile-premium .profile-cry{min-height:30px!important;margin-top:7px;padding:5px 12px!important;border-radius:16px!important;font-size:11px!important}
#game #sheet.profile-premium .rpg-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0!important;padding:0!important;border:0!important}
#game #sheet.profile-premium .rpg-tabs button{min-width:0;min-height:36px!important;padding:7px!important;text-align:center;font-size:12px!important;border-radius:12px!important}
#game #sheet.profile-premium .rpg-tabs button.active{border-color:var(--ui-accent);box-shadow:inset 0 -3px var(--ui-accent)}
#game #sheet.profile-premium .profile-panel{min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:10px;padding:2px 1px 8px}
#game #sheet.profile-premium .profile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px!important;border-radius:15px!important}
.profile-stats>div{display:grid;grid-template-columns:1fr auto;gap:4px;min-width:0;font-size:11px}
.profile-stats b{color:var(--ui-accent)}.profile-stats i{grid-column:1/-1;height:5px;border-radius:6px;background:var(--ui-base);overflow:hidden}.profile-stats em{display:block;width:var(--stat-fill);height:100%;background:linear-gradient(90deg,#60caba,#e8d394);transform-origin:left;animation:profile-meter .4s ease-out both}
#game #sheet.profile-premium .summary-lines{padding:12px!important;border-radius:15px!important;margin:0!important}
#game #sheet.profile-premium .summary-lines p{font-size:12px!important;margin:4px 0!important;display:flex;justify-content:space-between;gap:8px}
#game #sheet.profile-premium .summary-lines progress{display:block;width:100%;height:7px;accent-color:#87d2b5}
#game #sheet.profile-premium .rpg-bottom-back{display:none!important}
@keyframes profile-float{0%,100%{translate:0 0}50%{translate:0 -4px}}@keyframes profile-meter{from{scale:0 1}to{scale:1 1}}
@media(max-height:620px){#game #sheet.profile-premium .profile-stage{height:100px}#game #sheet.profile-premium .summary-hero{padding:7px!important}#game #sheet.profile-premium .summary-hero h3{font-size:22px!important}#game #sheet.dex-catalog .dex-premium-search{grid-template-columns:repeat(3,minmax(0,1fr))}#game #sheet.dex-catalog .dex-premium-search input{grid-column:1/3}}
#game[data-ui-motion=off] .profile-stage img,#game[data-ui-motion=off] .profile-stats em,#game[data-performance=battery] .profile-stage img{animation:none!important}@media(prefers-reduced-motion:reduce){.profile-stage img,.profile-stats em{animation:none!important}}
/* Keep catalogue labels centered within their own tracks, not at clipped edges. */
#game #overlay #sheet.dex-catalog .dex-catalog-grid>button{grid-template-rows:12px minmax(18px,1fr) minmax(28px,auto) 12px!important}
#game #overlay #sheet.dex-catalog .dex-catalog-grid strong{display:flex!important;align-items:center;justify-content:center;align-self:stretch;width:100%}
#game #overlay #sheet.profile-premium .profile-panel .rpg-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
#game #overlay #sheet.profile-premium .profile-panel .rpg-actions button{min-width:0;font-size:12px!important;line-height:1.25!important}

/* battle-consistency.css */
/* A dedicated hint row prevents attack buttons colliding with the help text. */
#game #battle #battle-actions.dock-actions .battle-dock{grid-template-rows:auto minmax(0,1fr) auto;gap:8px;min-height:0}
#game #battle #battle-actions .dock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;overflow:hidden;min-height:0}
#game #battle #battle-actions .dock-move,#game #battle #battle-actions .dock-item{min-height:0!important;min-width:0!important;padding:9px!important;overflow:hidden;border-radius:13px}
#game #battle #battle-actions .dock-move strong{font-size:clamp(12px,3.4vw,16px)!important;line-height:1.2!important}
#game #battle #battle-actions .dock-move small{font-size:10px!important;line-height:1.2!important}
#game #battle #battle-actions .dock-hint{position:relative!important;margin:0!important;padding:0 2px;font-size:10px!important;line-height:1.3!important}
#game #battle-field[data-resting=yes]:not(.capture-sequence) .battle-sprite[data-battle-art=illustrated]:not(.caught):not(.fainted){animation:battle-render-rest 2.8s ease-in-out infinite;transform-origin:center bottom}
#game #battle-field[data-resting=yes] #enemy-sprite[data-battle-art=illustrated]{animation-delay:-1.4s}
@keyframes battle-render-rest{0%,100%{translate:0 0;scale:1 1}50%{translate:0 -4px;scale:1.012 1.018}}
#game[data-performance=battery] #battle-field .battle-sprite,#game[data-ui-motion=off] #battle-field .battle-sprite{animation:none!important}@media(prefers-reduced-motion:reduce){#game #battle-field .battle-sprite{animation:none!important}}
@media(max-height:680px){#game #battle #battle-actions .dock-hint{display:none!important}}
/* Matching front/rear render family on supported battles; smaller enlargement keeps edges clearer. */
#game #battle #battle-field #ally-sprite[data-rear-animated=yes]{width:clamp(155px,42vw,215px);height:clamp(155px,42vw,215px);max-height:43%;image-rendering:auto!important}
#game #battle #battle-field #enemy-sprite[data-front-animated=yes]{width:clamp(145px,38vw,195px);height:clamp(145px,38vw,195px);max-height:39%;image-rendering:auto!important;filter:drop-shadow(0 6px 4px #153d3c44)!important}

/* rear-hd.css */
#game #battle #battle-field #ally-sprite[data-rear-hd=yes]{width:clamp(180px,48vw,255px);height:clamp(180px,48vw,255px);max-height:45%;object-fit:contain;object-position:center bottom;image-rendering:auto!important;filter:drop-shadow(0 7px 5px #153d3c44)!important;scale:1 1}
@media(max-height:600px){#game #battle #battle-field #ally-sprite[data-rear-hd=yes]{width:150px;height:150px;max-height:43%}}

/* story-scenes.css */
/* Keep the map in view; regular menus retain their original layout and low frame rate. */
#game.story-scene-active #overlay{background:transparent!important;backdrop-filter:none!important;align-items:flex-end;padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
#game.story-scene-active #objective,#game.story-scene-active #map-button,#game.story-scene-active #nearby,#game.story-scene-active #world-hint,#game.story-scene-active #objective-egg-field{opacity:0;pointer-events:none}
#game.story-scene-active #quick-nav,#game.story-scene-active #controls,#game.story-scene-active #world>header{opacity:0;pointer-events:none}
#game.story-scene-active #sheet.premium-dialogue{max-height:min(43dvh,350px);width:min(100%,720px);margin:0 auto;box-shadow:0 -6px 36px #081e3899,inset 0 1px #fff3;border-color:var(--scene-color,var(--ui-border));border-radius:16px 6px 16px 6px;animation:story-dialogue-arrive .2s ease-out both}
#game.story-scene-active #sheet .premium-speaker img{width:64px;height:76px}
#game.story-scene-active #sheet .premium-speaker>span{width:64px;height:76px;font-size:38px;box-shadow:inset 0 0 20px #8ae5dc22}
#game.story-scene-active #sheet .premium-conversation{grid-template-columns:64px 1fr;gap:12px}
#game.story-scene-active #sheet .premium-speaker small{font-size:8px;letter-spacing:.04em;overflow-wrap:anywhere}
#game.story-scene-active #sheet .rpg-head{padding:10px 14px 6px;min-height:28px}
#game.story-scene-active #sheet .rpg-body{padding:8px 14px 12px}
#game.story-scene-active #sheet .dialogue-text{font-size:16px!important;line-height:1.45!important;min-height:2.9em;max-height:22dvh;overflow:auto;margin:2px 0 10px!important}
#game.story-scene-active #sheet .rpg-footer{display:none}
#game.story-scene-active #sheet #dialogue-next{min-height:42px;padding:8px 15px}
#game.story-scene-active #sheet .darkrai-reveal{display:none}
#game.story-scene-active #viewport{box-shadow:inset 0 22px 34px #0a203d44,inset 0 -22px 34px #0a203d66}
#game.story-scene-active #sheet .premium-speaker{animation:story-speaker-breathe 3s ease-in-out infinite}
@keyframes story-dialogue-arrive{from{opacity:.2;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@keyframes story-speaker-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.5px)}}
#game[data-performance=battery].story-scene-active #sheet .premium-speaker,#game[data-ui-motion=off].story-scene-active #sheet .premium-speaker{animation:none}
@media(max-height:600px){#game.story-scene-active #sheet.premium-dialogue{max-height:49dvh}#game.story-scene-active #sheet .premium-speaker img{width:48px;height:58px}#game.story-scene-active #sheet .premium-conversation{grid-template-columns:48px 1fr;gap:9px}#game.story-scene-active #sheet .dialogue-text{font-size:13px!important;max-height:20dvh}#game.story-scene-active #sheet .rpg-head h2{font-size:14px!important}}
@media(prefers-reduced-motion:reduce){#game.story-scene-active #sheet.premium-dialogue,#game.story-scene-active #sheet .premium-speaker{animation:none!important}}

/* exploration-finish.css */
/* A compact field objective keeps entrances and the map visible. */
#game #world #objective{max-width:calc(100% - 78px);text-align:left;padding:9px 12px;border-radius:12px;min-height:36px}
#game #world #objective b{font-size:12px;line-height:1.35}
#game #world #objective span{font-size:10px}
#game #world #objective.objective-folded{max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:7px 10px}
#game #world #objective.objective-folded b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#game #world #objective.objective-folded span{display:none}
#game #quick-nav .field-key{touch-action:manipulation}
#game #battle .battle-sprite{object-fit:contain;object-position:center bottom}

#game #battle #battle-field .battle-sprite.expedition-silhouette{filter:brightness(0)!important}

/* battle-clarity.css */
/* About twelve percent less visual mass, with smooth sampling for true HD sources. */
#game #battle #battle-field .battle-sprite{object-fit:contain;object-position:center bottom}
#game #battle #battle-field #ally-sprite{width:clamp(140px,38vw,210px)!important;height:clamp(140px,38vw,210px)!important;max-height:39%!important}
#game #battle #battle-field #enemy-sprite{width:clamp(125px,33vw,182px)!important;height:clamp(125px,33vw,182px)!important;max-height:35%!important}
#game #battle #battle-field .battle-sprite[data-battle-art=illustrated]{image-rendering:auto!important}
#game #battle #battle-field .battle-sprite[data-battle-art=sprite]{image-rendering:auto!important}
@media(max-height:600px){#game #battle #battle-field #ally-sprite{width:128px!important;height:128px!important}#game #battle #battle-field #enemy-sprite{width:110px!important;height:110px!important}}

/* battle-perspective.css */
/* Foreground ally is 20% larger in visible silhouette than the distant opponent. */
#game #battle #battle-field #ally-sprite{width:clamp(145px,40vw,220px)!important;height:clamp(145px,40vw,220px)!important;max-height:none!important}
#game #battle #battle-field #enemy-sprite{width:clamp(120px,33vw,181px)!important;height:clamp(120px,33vw,181px)!important;max-height:none!important}
@media(max-height:600px){#game #battle #battle-field #ally-sprite{width:132px!important;height:132px!important}#game #battle #battle-field #enemy-sprite{width:110px!important;height:110px!important}}

#game #battle #battle-field .battle-sprite{scale:var(--perspective-fill,1)!important;transform-origin:center bottom!important}

/* game-menus.css */
/* Two compact game screens, scoped so story and battle interfaces keep their rules. */
#game #overlay:has(#sheet.game-menu){padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));overflow:hidden;align-items:center}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu){--menu-gold:#f6d17c;--menu-line:#6a9c98;--menu-muted:#b2cfcc;display:flex!important;flex-direction:column!important;height:min(720px,100%)!important;max-height:100%!important;width:min(100%,600px)!important;min-height:0!important;overflow:hidden!important;padding:0!important;margin:auto!important;border:1px solid #7da99c!important;border-top:3px solid var(--menu-gold)!important;border-radius:23px!important;background:radial-gradient(ellipse at 90% 0,#285960,#132f3b 65%)!important;box-shadow:0 20px 60px #0008,inset 0 0 0 3px #122f3b!important;font-family:system-ui,sans-serif!important;color:#f7f1d9}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu)>.rpg-head{flex:none;min-height:52px!important;padding:8px 12px!important;background:#122e39!important;gap:8px!important;border-bottom:1px solid #70a69a44!important}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu)>.rpg-head h2{font:800 clamp(16px,4.3vw,21px)/1.15 system-ui!important;letter-spacing:.1px!important;text-transform:none!important;color:#f5d180!important}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu) .screen-marker{font-size:13px!important}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu)>.rpg-head .rpg-back{width:40px!important;height:40px!important;min-height:40px!important;border-radius:12px!important;border:1px solid #80b3aa!important;background:#29535c!important;color:#fff4d9!important;font:700 24px system-ui!important}
#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu)>.rpg-body{flex:1!important;min-height:0!important;max-height:none!important;overflow:hidden!important;padding:11px!important;display:flex!important;flex-direction:column!important;gap:10px!important;width:100%;color:#f7f1dc}
#game #overlay #sheet.game-menu>.rpg-footer,#game #overlay #sheet.game-menu>.qol-backbar{display:none!important}
#game #overlay #sheet.game-menu button{font-family:system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;min-height:44px!important;border-radius:13px!important;touch-action:manipulation;transition:transform .14s,background .14s,box-shadow .14s!important;box-sizing:border-box}
#game #overlay #sheet.game-menu button:active:not(:disabled){transform:translateY(2px) scale(.97)!important;filter:brightness(1.12)}
#game #overlay #sheet.game-menu button:focus-visible{outline:3px solid #f6d17c!important;outline-offset:-3px!important}
#game #overlay #sheet.game-menu button:disabled{opacity:.5!important;filter:saturate(.5)}
#game #overlay #sheet.game-menu .game-menu-primary{background:linear-gradient(#f9dc96,#dfb760)!important;border:1px solid #ffe6a7!important;box-shadow:0 3px 0 #9b7a3b!important;color:#203d48!important;font-weight:850!important}
#game #overlay #sheet.game-menu .game-menu-actions{display:flex;align-items:center;gap:9px;flex:none;border-top:1px solid #7eada644;padding-top:10px;margin-top:auto}
#game #overlay #sheet.game-menu .game-menu-actions button{margin:0!important;padding:10px 12px!important;font-size:13px!important;background:#28555e;color:#eff7e8;border:1px solid #6c9f9b;flex:1}
#game #overlay #sheet.game-menu .game-menu-actions .game-menu-primary{flex:1.8}
#game #overlay #sheet.game-menu .game-menu-actions b{margin-left:7px}
#game #overlay #sheet.game-menu .game-menu-actions small{font-size:10px;opacity:.75}
#game #overlay #sheet.game-menu .gamebag-status{display:flex;align-items:center;gap:10px;flex:none;padding:1px 3px}
#game #overlay #sheet.game-menu .gamebag-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;color:#f6d17c;background:linear-gradient(145deg,#438883,#25495b);border:1px solid #84b7aa;font-size:28px;box-shadow:inset 0 2px #cee7bc33}
#game #overlay #sheet.game-menu .gamebag-status>div{flex:1}
#game #overlay #sheet.game-menu .gamebag-status small{display:block;font-size:9px;letter-spacing:1.2px;color:var(--menu-muted)}
#game #overlay #sheet.game-menu .gamebag-status strong{display:block;font-size:20px;color:#fff2c8}
#game #overlay #sheet.game-menu .gamebag-wallet{font-size:21px;font-weight:850;color:#f6d17c;text-align:right}
#game #overlay #sheet.game-menu .gamebag-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:none}
#game #overlay #sheet.game-menu .gamebag-tabs button{display:flex;flex-direction:column;align-items:center;gap:3px;background:#234951;border:1px solid #598786;color:#b9d9d5;font-size:11px!important;padding:7px 3px!important;min-height:54px!important;margin:0!important;box-shadow:0 3px #0d2730}
#game #overlay #sheet.game-menu .gamebag-tabs b{font-size:18px;line-height:1}
#game #overlay #sheet.game-menu .gamebag-tabs button[aria-pressed=true]{background:linear-gradient(#e9cf86,#bd9b53);color:#193a42;border-color:#ffe6a6;box-shadow:0 3px #866a35,inset 0 1px #fff7c5}
#game #overlay #sheet.game-menu .gamebag-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}
#game #overlay #sheet.game-menu .gamebag-shortcuts button{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px!important;background:#204952;color:#ebf3df;border:1px solid #527f83;font-size:11px!important;min-height:40px!important;margin:0!important}
#game #overlay #sheet.game-menu .gamebag-shortcuts b{font-size:17px;color:#f6d17c}
#game #overlay #sheet.game-menu .gamebag-shortcuts span{color:#9bccc2}
#game #overlay #sheet.game-menu .gamebag-pages{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scrollbar-color:#83b8ac transparent;padding:2px}
#game #overlay #sheet.game-menu .gamebag-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:none}
#game #overlay #sheet.game-menu .gamebag-slot{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:100px!important;padding:13px 4px 8px!important;background:radial-gradient(ellipse at 50% 35%,#3f6d76,#193c48);border:1px solid #527e88;color:#f6edcf;margin:0!important}
#game #overlay #sheet.game-menu .gamebag-slot.selected{border:2px solid #f5d17b;box-shadow:inset 0 0 18px #e7d18d18,0 0 0 2px #f6d17c16}
#game #overlay #sheet.game-menu .gamebag-slot.selected:after{content:'▼';position:absolute;top:-5px;font-size:12px;color:#f6d17c;text-shadow:0 2px #10303b}
#game #overlay #sheet.game-menu .gamebag-slot strong{font-size:12px}
#game #overlay #sheet.game-menu .gamebag-slot small{position:absolute;top:6px;right:7px;background:#122f3c;border-radius:6px;padding:2px 4px;font-size:10px;color:#ffe1a0}
#game #overlay #sheet.game-menu .field-object{flex:none;width:30px!important;height:39px!important;font-size:22px!important;display:grid;place-items:center;position:relative;border-radius:10px!important;box-shadow:inset 4px 0 #fff3,0 5px 6px #071e3c55}
#game #overlay #sheet.game-menu .object-balls{width:38px!important;height:38px!important;border-radius:50%!important}
#game #overlay #sheet.game-menu .gamebag-detail{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:9px;padding:12px;background:linear-gradient(145deg,#2c5860,#1c3e4c);border:1px solid #719c99;border-radius:15px;flex:none;box-shadow:inset 0 1px #bce0ce19}
#game #overlay #sheet.game-menu .gamebag-detail small{font-size:8px;letter-spacing:1px;color:#9ecbc4}
#game #overlay #sheet.game-menu .gamebag-detail h3{font-size:17px;margin:3px 0;color:#fff0c4;line-height:1.2}
#game #overlay #sheet.game-menu .gamebag-detail h3 em{float:right;font-style:normal;font-size:13px;color:#f5d17c}
#game #overlay #sheet.game-menu .gamebag-detail p{font:12px/1.4 system-ui;margin:4px 0 0;color:#bad6d1}
#game #overlay #sheet.game-menu .gamebag-detail button{grid-column:1/-1;padding:8px 12px!important;margin:2px 0 0!important;font-size:13px!important;min-height:40px!important}
#game #overlay #sheet.game-menu .gamebag-note{grid-column:1/-1;font-size:11px;color:#e7d698;text-align:center;padding-top:6px}
#game #overlay #sheet.game-menu .gamebag-capture{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:19px 8px 8px;flex:1;min-height:135px}
#game #overlay #sheet.game-menu .gamebag-capture .object-balls{width:58px!important;height:58px!important;z-index:1}
#game #overlay #sheet.game-menu .gamebag-capture strong{font-size:15px;z-index:1}
#game #overlay #sheet.game-menu .gamebag-capture small{color:#b2cfca;font-size:11px}
#game #overlay #sheet.game-menu .gamebag-orbit{position:absolute;top:11px;width:96px;height:74px;border:1px solid #cbe8bd44;border-radius:50%;rotate:-15deg;box-shadow:0 0 25px #91d4b114}
#game #overlay #sheet.game-menu .gamebag-party{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#game #overlay #sheet.game-menu .gamebag-party button{display:flex;align-items:center;gap:5px;padding:7px!important;background:#29535e;border:1px solid #63928f;color:#f4f3da;text-align:left;font-size:12px!important;margin:0!important}
#game #overlay #sheet.game-menu .gamebag-party img{width:43px;height:49px;object-fit:contain}
#game #overlay #sheet.game-menu .gamebag-party span{min-width:0;flex:1}
#game #overlay #sheet.game-menu .gamebag-party strong{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis}
#game #overlay #sheet.game-menu .gamebag-party small{font-size:9px;color:#afceca;display:block}
#game #overlay #sheet.game-menu .game-menu-hint{font-size:11px;color:#abcfc8;margin:0}
#game #overlay #sheet.game-menu .gamebag-tools{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#game #overlay #sheet.game-menu .gamebag-tools button{display:flex;align-items:center;gap:8px;background:#274f5c;border:1px solid #618d8e;color:#eef1d7;padding:10px 8px!important;text-align:left;margin:0!important}
#game #overlay #sheet.game-menu .gamebag-tools button>b{font-size:23px;color:#e7c774}
#game #overlay #sheet.game-menu .gamebag-tools strong{display:block;font-size:12px}
#game #overlay #sheet.game-menu .gamebag-tools small{font-size:9px;display:block;color:#abccc8;margin-top:3px}
#game #overlay #sheet.game-menu .gamebag-owned{font-size:11px;color:#c4dcd5;border-top:1px solid #63938944;padding-top:9px}
#game #overlay #sheet.game-menu .gamebag-owned p{font-size:11px;margin:7px 0}
#game #overlay #sheet.game-menu .gamebag-owned button{font-size:11px!important;padding:7px!important;background:#355e62;color:#fff2d0;border:1px solid #78a49b}
/* Campaign: one character on a stage, clear lock and a separate deliberate confirmation. */
#game #overlay #sheet.game-menu .game-campaign-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}
#game #overlay #sheet.game-menu .game-campaign-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;padding:8px!important;background:#234651;border:1px solid #527d83;color:#bfd4cb;font-size:13px!important;margin:0!important}
#game #overlay #sheet.game-menu .game-campaign-tabs small{font-size:10px;opacity:.65}
#game #overlay #sheet.game-menu .game-campaign-tabs button[aria-pressed=true]{color:#ffe6a0;border-color:#edcf7e;background:linear-gradient(145deg,#486769,#254b58);box-shadow:inset 0 -3px #dfc074}
#game #overlay #sheet.game-menu .game-campaign-stage{position:relative;flex:1;min-height:180px;overflow:hidden;isolation:isolate;display:flex;align-items:center;border:1px solid #81b6a66b;border-radius:18px;background:radial-gradient(ellipse at 24% 40%,#8ba59566,transparent 57%),linear-gradient(145deg,#3e6d68,#1b4555 65%,#122f44)}
#game #overlay #sheet.game-menu .game-campaign-stage.rocket{background:radial-gradient(ellipse at 25% 40%,#866d8377,transparent 57%),linear-gradient(145deg,#485269,#243c53 70%,#192f43)}
#game #overlay #sheet.game-menu .game-campaign-art{position:relative;align-self:stretch;flex:0 0 43%;min-width:0;display:flex;align-items:center;justify-content:center;padding:13px 0;z-index:1}
#game #overlay #sheet.game-menu .game-campaign-art svg{height:100%;width:100%;max-height:310px;filter:drop-shadow(0 12px 8px #0d233a77);mask-image:linear-gradient(90deg,transparent,#000 12% 88%,transparent);-webkit-mask-image:linear-gradient(90deg,transparent,#000 12% 88%,transparent)}
#game #overlay #sheet.game-menu .game-campaign-copy{padding:17px 12px 17px 0;z-index:1;min-width:0;flex:1}
#game #overlay #sheet.game-menu .game-campaign-copy>small{font-size:8px;letter-spacing:1.4px;color:#b8d5c6}
#game #overlay #sheet.game-menu .game-campaign-copy h3{font:850 clamp(21px,6vw,29px)/1.04 system-ui;margin:10px 0;color:#fff0c7;letter-spacing:-.5px}
#game #overlay #sheet.game-menu .game-campaign-copy p{font:12px/1.5 system-ui;color:#c2d9d2;margin:10px 0}
#game #overlay #sheet.game-menu .game-campaign-badges{display:flex;flex-wrap:wrap;gap:5px}
#game #overlay #sheet.game-menu .game-campaign-badges span{font-size:8px;border:1px solid #b7d9b944;border-radius:8px;padding:4px 6px;background:#09263855;color:#e9dba9}
#game #overlay #sheet.game-menu .game-campaign-glow{position:absolute;left:5%;bottom:5%;width:40%;height:12%;border:1px solid #cbdfbc66;background:radial-gradient(ellipse,#d5e7ba33,transparent 70%);border-radius:50%;rotate:-8deg}
#game #overlay #sheet.game-menu .game-campaign-save{display:flex;gap:10px;align-items:center;flex:none;padding:10px 12px;border:1px solid #88ab9b55;border-radius:13px;background:#254b53}
#game #overlay #sheet.game-menu .game-campaign-save>b{color:#f5cf7d;font-size:23px}
#game #overlay #sheet.game-menu .game-campaign-save strong{display:block;font-size:12px;color:#f2e9c7}
#game #overlay #sheet.game-menu .game-campaign-save small{display:block;font-size:10px;line-height:1.4;color:#b5d0c8;margin-top:3px}
#game #overlay #sheet.game-menu .game-campaign-options{display:grid;grid-template-columns:1fr 1fr;gap:7px;flex:none}
#game #overlay #sheet.game-menu .game-campaign-options button{background:#254b58;border:1px solid #638f94;color:#daebd6;font-size:11px!important;padding:8px!important;margin:0!important}
#game #overlay #sheet.game-menu .game-campaign-counter{font-size:25px;color:#edce85;font-weight:800;padding:0 9px}
#game #overlay #sheet.game-menu .game-campaign-counter small{font-size:12px;color:#89ada8}
#game #overlay #sheet.game-menu .game-campaign-spark{position:absolute;width:4px;height:4px;border-radius:50%;background:#f1d590;box-shadow:0 0 8px #f6d17c66;pointer-events:none;left:12%;top:17%}
#game #overlay #sheet.game-menu .game-campaign-spark.spark-2{left:46%;top:75%;width:3px;height:3px}
/* Small finite transitions; continuous character motion is opt-in via existing settings. */
#game #overlay #sheet.game-menu[data-menu-motion=on] .gamebag-pages,#game #overlay #sheet.game-menu[data-menu-motion=on] .game-campaign-stage{animation:game-menu-arrive .23s ease-out both}
#game #overlay #sheet.game-menu[data-menu-motion=on] .gamebag-slot.selected .field-object{animation:game-menu-object 2.6s ease-in-out infinite}
#game #overlay #sheet.game-menu[data-menu-motion=on] .game-campaign-art svg{animation:game-menu-character 4s ease-in-out infinite;transform-origin:50% 90%}
#game #overlay #sheet.game-menu[data-menu-motion=on] .game-campaign-spark{animation:game-menu-spark 3.2s ease-in-out infinite alternate}
@keyframes game-menu-arrive{from{opacity:.35;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes game-menu-object{0%,100%{translate:0 0;rotate:-3deg}50%{translate:0 -3px;rotate:3deg}}
@keyframes game-menu-character{0%,100%{translate:0 0;scale:1}50%{translate:0 -3px;scale:1.015}}
@keyframes game-menu-spark{from{opacity:.25;translate:0 4px}to{opacity:.9;translate:6px -7px}}
#game #overlay #sheet.rpg-screen.game-menu.game-menu-target>.rpg-body,#game #overlay #sheet.rpg-screen.game-menu.game-menu-confirm>.rpg-body{overflow-y:auto!important}
#game #overlay #sheet.game-menu.game-menu-target .storage-row{padding:9px!important;margin:0!important;border-radius:13px;background:#28525d;border:1px solid #63918f;color:#f0ebd0;font-size:12px}
#game #overlay #sheet.game-menu.game-menu-target .storage-row img{width:48px;height:48px}
#game #overlay #sheet.game-menu.game-menu-target .storage-row button{font-size:11px!important;padding:8px!important;background:#dec078;color:#173844}
#game #overlay #sheet.game-menu.game-menu-confirm .rpg-body{justify-content:center;text-align:center;align-items:center}
#game #overlay #sheet.game-menu.game-menu-confirm .field-object{width:44px!important;height:58px!important;font-size:30px!important;margin:15px}
#game #overlay #sheet.game-menu.game-menu-confirm .rpg-prompt{font-size:16px;color:#f2e7c5}
#game #overlay #sheet.game-menu.game-menu-confirm .rpg-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:9px}
@media(max-height:610px){#game #overlay #sheet.rpg-screen.game-menu:not(.partner-menu)>.rpg-body{gap:7px!important;padding:9px!important}#game #overlay #sheet.game-menu .gamebag-status{display:none}#game #overlay #sheet.game-menu .game-campaign-stage{min-height:150px}#game #overlay #sheet.game-menu .game-campaign-copy p{font-size:11px;line-height:1.3}#game #overlay #sheet.game-menu .gamebag-slot{min-height:86px!important}#game #overlay #sheet.game-menu .game-campaign-copy h3{font-size:22px}}
@media(prefers-reduced-motion:reduce){#game #overlay #sheet.game-menu *,#game #overlay #sheet.game-menu *:after{animation:none!important;transition:none!important}}
@media(max-height:610px){#game #overlay #sheet.game-menu .game-campaign-stage{min-height:120px}#game #overlay #sheet.game-menu .game-campaign-options button{min-height:36px!important}#game #overlay #sheet.game-menu .game-campaign-save{padding:8px 10px}#game #overlay #sheet.game-menu .game-campaign-badges{display:none}}
@media(max-height:490px){#game #overlay #sheet.rpg-screen.game-menu.game-menu-campaign>.rpg-body{overflow-y:auto!important}#game #overlay #sheet.game-menu .game-campaign-stage{flex:none;min-height:130px}}
#game #overlay #sheet.game-menu .game-menu-healed{animation:game-menu-heal .55s ease-out}
@keyframes game-menu-heal{0%{box-shadow:inset 0 0 0 2px #cbf5b8,0 0 17px #9debbb66;translate:0 -2px}100%{box-shadow:inset 0 0 0 0 transparent,0 0 0 transparent;translate:0 0}}

/* Discovered native palettes use the existing Pokédex cards. */
.habitat-record-portrait301{height:140px;display:grid;place-items:center}.habitat-record-portrait301 img{width:128px;height:128px;object-fit:contain}.habitat-record-portrait301>span{display:contents}

.habitat-portrait302{display:inline-grid;position:relative;place-items:center}.habitat-symbol302{color:#8fe1ce;font:900 20px/1 system-ui;vertical-align:middle}.habitat-portrait302>.habitat-symbol302,.profile-stage>.habitat-symbol302{position:absolute;right:3px;top:3px;min-width:20px;min-height:20px;text-align:center;border-radius:50%;background:#143b48}

/* static-team.css */
/* No entrances, floating images or moving selection in the party overview. */
#game #overlay #sheet.rpg-screen.game-menu.game-menu-team{max-width:620px!important;background:linear-gradient(155deg,#203f4c,#142d38)!important}
#game #overlay #sheet.game-menu-team *,#game #overlay #sheet.game-menu-team *:before,#game #overlay #sheet.game-menu-team *:after{animation:none!important;transition:none!important;translate:none!important;rotate:none!important;scale:none!important;transform:none!important}
#game #overlay #sheet.game-menu-team button:active:not(:disabled){transform:none!important;filter:none!important;background-color:#355d68!important}
#game #overlay #sheet.game-menu-team .static-team-summary{display:flex;justify-content:space-between;align-items:center;padding:3px 3px 7px;border-bottom:1px solid #72958e44;flex:none}
#game #overlay #sheet.game-menu-team .static-team-summary strong{display:block;font-size:14px;color:#f1eacb}
#game #overlay #sheet.game-menu-team .static-team-summary span small{font-size:10px;color:#a8c6c1;display:block;margin-top:3px}
#game #overlay #sheet.game-menu-team .static-team-summary>b{font-size:25px;color:#f1d28b;font-weight:750}
#game #overlay #sheet.game-menu-team .static-team-summary>b small{font-size:12px;color:#9cbbb9}
#game #overlay #sheet.game-menu-team .static-team-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:none}
#game #overlay #sheet.game-menu-team .static-team-tools button{min-height:40px!important;padding:8px 3px!important;border:1px solid #638d8d;background:#284c58;color:#e1e9d8;font-size:11px!important;font-weight:650;margin:0!important}
#game #overlay #sheet.game-menu-team .static-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(80px,1fr));gap:8px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#709d96 transparent;padding:1px}
#game #overlay #sheet.game-menu-team .static-team-card{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:1fr auto;column-gap:5px;row-gap:4px;min-width:0;min-height:80px!important;padding:10px 8px 7px!important;text-align:left;background:#284b57!important;border:1px solid #64868b;color:#f5efd8;margin:0!important;box-shadow:none!important;border-radius:14px!important;overflow:hidden}
#game #overlay #sheet.game-menu-team .static-team-card:first-child{border-color:#c3b784;background:#2b4e57!important}
#game #overlay #sheet.game-menu-team .static-team-card.fainted{border-color:#80636d;opacity:.75}
#game #overlay #sheet.game-menu-team .static-team-index{position:absolute;left:7px;top:4px;color:#a7c2bc;font-size:8px;letter-spacing:1px}
#game #overlay #sheet.game-menu-team .static-team-card img{width:44px;height:48px;object-fit:contain;align-self:center;image-rendering:auto!important;filter:none!important}
#game #overlay #sheet.game-menu-team .static-team-copy{min-width:0;align-self:center}
#game #overlay #sheet.game-menu-team .static-team-copy>strong{font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f4edcf}
#game #overlay #sheet.game-menu-team .static-team-copy>small{font-size:9px;display:block;margin-top:4px;color:#b7ccc7}
#game #overlay #sheet.game-menu-team .static-team-types{display:flex;flex-wrap:wrap;gap:3px;margin-top:5px}
#game #overlay #sheet.game-menu-team .static-team-types .type{font:650 7px/1 system-ui!important;padding:3px 4px!important;border-radius:5px!important;letter-spacing:0!important;margin:0!important;max-width:100%}
#game #overlay #sheet.game-menu-team .static-team-health{grid-column:1/-1;display:flex;align-items:center;gap:6px}
#game #overlay #sheet.game-menu-team .static-team-track{height:5px;flex:1;min-width:0;overflow:hidden;border-radius:9px;background:#132e3a}
#game #overlay #sheet.game-menu-team .static-team-track i{display:block;height:100%;border-radius:9px;background:#8ab6a3}
#game #overlay #sheet.game-menu-team .static-team-track.low i{background:#d4bc78}
#game #overlay #sheet.game-menu-team .static-team-track.critical i{background:#d58c87}
#game #overlay #sheet.game-menu-team .static-team-health>small{font-size:8px;white-space:nowrap;color:#bfd4cb}
#game #overlay #sheet.game-menu-team .static-team-empty{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px dashed #62808066;border-radius:14px;background:#17333f66;color:#789b99;min-height:80px}
#game #overlay #sheet.game-menu-team .static-team-empty>span{font-size:15px;opacity:.6}
#game #overlay #sheet.game-menu-team .static-team-empty>small{font-size:10px}
#game #overlay #sheet.game-menu-team .static-team-secondary{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}
#game #overlay #sheet.game-menu-team .static-team-secondary button{display:flex;align-items:center;justify-content:space-between;min-height:40px!important;background:#23434f;border:1px solid #587b81;color:#dce5d4;font-size:12px!important;padding:8px 11px!important;margin:0!important}
#game #overlay #sheet.game-menu-team .static-team-secondary b{background:#132e3a;border-radius:6px;padding:3px 6px;color:#e7cd8c;font-size:10px}
#game #overlay #sheet.game-menu-team .static-team-tip{flex:1;color:#9fbeb7;font-size:10px;line-height:1.4;max-width:42%}
#game #overlay #sheet.game-menu-team .game-menu-actions button{flex:1!important;font-size:12px!important}
@media(max-height:580px){#game #overlay #sheet.game-menu-team .static-team-grid{grid-template-rows:repeat(3,minmax(72px,1fr));gap:6px}#game #overlay #sheet.game-menu-team .static-team-card,#game #overlay #sheet.game-menu-team .static-team-empty{min-height:72px!important}#game #overlay #sheet.game-menu-team .static-team-card{padding:7px 6px!important;grid-template-columns:37px minmax(0,1fr)}#game #overlay #sheet.game-menu-team .static-team-card img{width:37px;height:39px}#game #overlay #sheet.game-menu-team .static-team-copy>strong{font-size:11px}#game #overlay #sheet.game-menu-team .static-team-summary{padding:0 3px 5px}}

/* battle-readable.css */
/* Intrinsic move cards: never squeeze the efficacy row out of its button.
   The console alone can scroll on short viewports or with enlarged text. */
#game #battle .battle-console{
  flex:0 1 352px;max-height:66%;min-height:0;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;
  padding:10px 12px max(10px,env(safe-area-inset-bottom));
}
#game #battle #battle-actions{flex:0 0 auto;min-height:0}
#game #battle #battle-actions.dock-actions .battle-dock{
  height:100%;display:grid;grid-template-rows:44px minmax(0,1fr) auto;gap:8px;
}
#game #battle #battle-actions .dock-head{margin:0;min-height:32px}
#game #battle #battle-actions .dock-grid{
  grid-auto-rows:auto;align-items:stretch;gap:8px;overflow:visible;min-height:0;
}
#game #battle #battle-actions .dock-move{
  display:grid;grid-template-rows:auto auto auto auto;align-content:start;gap:5px;
  min-height:0!important;height:auto!important;max-height:none!important;
  padding:10px!important;overflow:visible;border-radius:12px;text-transform:none;
  background:#204854;box-shadow:inset 0 1px #ffffff12;text-align:left;
}
#game #battle #battle-actions .dock-move strong{
  font:750 13px/1.25 system-ui!important;letter-spacing:.02em;white-space:normal;overflow-wrap:anywhere;
}
#game #battle #battle-actions .dock-move>span{flex-wrap:wrap;row-gap:3px}
#game #battle #battle-actions .dock-move small{
  font:400 10px/1.4 system-ui!important;letter-spacing:0;white-space:normal;
}
#game #battle #battle-actions .dock-move .move-type-hint{
  display:block;position:static;margin:0;padding:4px 0 0;border-top:1px solid #ffffff1c;
  font:750 10px/1.4 system-ui;font-style:normal;letter-spacing:0;color:#f3d58c;
  white-space:normal;overflow-wrap:anywhere;
}
#game #battle #battle-actions .dock-hint{display:block!important;font:400 10px/1.4 system-ui!important}
#game #battle #battle-message{flex-shrink:0}
@media(max-width:360px){
  #game #battle .battle-console{padding-inline:8px}
  #game #battle #battle-actions .dock-move{padding:8px!important}
}
@media(max-height:500px) and (orientation:landscape){
  #game #battle .battle-console{flex-basis:auto;max-height:100%;height:100%}
}

/* adventure-moments.css */
/* Battle retains .screen absolute positioning and full viewport height. */
#game #level-celebration{
 position:absolute;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
 padding:max(16px,env(safe-area-inset-top)) 18px max(16px,env(safe-area-inset-bottom));
 overflow:auto;overscroll-behavior:contain;background:radial-gradient(ellipse at 50% 20%,#2b6258f5,#102c39fa 75%);color:#f9f4df;
}
#game #level-celebration.hidden{display:none}
.level-panel{width:min(100%,400px);margin:auto;font-family:system-ui;text-align:center}
.level-heading{display:flex;align-items:center;justify-content:space-between;color:#edcf83;font-size:10px;font-weight:750;letter-spacing:.17em}
.level-heading small{letter-spacing:0;color:#b6d5cd;font-size:11px}
.level-portrait{position:relative;width:132px;height:132px;margin:12px auto 0;display:grid;place-items:center}
.level-portrait i{position:absolute;inset:10px;border:1px solid #ecd68d66;border-radius:50%;box-shadow:0 0 0 10px #e9d78c08,0 0 38px #d7ec9a22}
.level-portrait img{width:110px;height:110px;object-fit:contain;position:relative;image-rendering:auto;filter:drop-shadow(0 5px 8px #001c2a66)}
.level-portrait b{position:absolute;right:8px;top:16px;color:#f4dc91;font-size:23px}
.level-panel h2{margin:3px 0;font:750 25px/1.2 system-ui;color:#fff7dd}
.level-number{display:flex;justify-content:center;align-items:center;gap:14px;margin:10px 0 7px;font:600 16px system-ui;color:#b9d4cb}
.level-number>span{color:#d9bc77}.level-number strong{font:800 30px/1 system-ui;color:#f7dc8e}
.level-subtitle{font:400 12px/1.4 system-ui;color:#bcd3cb;margin:0 0 18px}
.level-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;text-align:left}
.level-stats>div{background:#e4f5db09;border:1px solid #8eb8a938;border-radius:10px;padding:10px 12px}
.level-stats>div>span{font:600 11px system-ui;color:#c0d9d0}
.level-stats p{display:flex;align-items:center;gap:6px;margin:5px 0 0;font:500 15px system-ui;font-variant-numeric:tabular-nums;color:#9dbeb5}
.level-stats p>span{font-size:11px;color:#89afa6}.level-stats strong{color:#f8f0db;font-weight:750}
.level-stats b{margin-left:auto;font:800 13px system-ui;color:#bde6a3}
#game #battle .level-next{width:100%;margin-top:16px;border:1px solid #ffe7a3;border-radius:11px;padding:13px;background:#efd28a;color:#243b3b;font:750 14px system-ui;min-height:46px;box-shadow:none}
#game #battle .level-skip{display:block;margin:5px auto 0;min-height:36px;padding:8px 14px;border:0;background:none;box-shadow:none;color:#c2d8cf;font:500 11px system-ui}
.level-saved{display:block;margin-top:12px;font:400 10px system-ui;color:#91b5aa}
.level-animate .level-panel{animation:level-arrival .4s ease-out both}
.level-animate .level-portrait img{animation:level-partner .8s ease-out both}
.level-animate .level-portrait i{animation:level-ring 1s ease-out both}
.level-animate .level-stats>div{animation:level-stat .45s ease-out both;animation-delay:calc(.18s + var(--stat-order)*.055s)}
@keyframes level-arrival{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes level-partner{0%{transform:scale(.9)}45%{transform:scale(1.07)}100%{transform:scale(1)}}
@keyframes level-ring{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes level-stat{from{background:#ebd58d30;transform:translateY(4px);opacity:0}to{transform:none;opacity:1}}
@media(max-height:600px){.level-portrait{width:90px;height:90px;margin-top:4px}.level-portrait img{width:82px;height:82px}.level-panel h2{font-size:21px}.level-subtitle{margin-bottom:10px}.level-stats>div{padding:7px 10px}.level-saved{margin-top:8px}}
@media(prefers-reduced-motion:reduce){#game .level-celebration *{animation:none!important}}

/* shop-quantity.css */
.quantity-card{max-width:440px;margin:auto;text-align:center;padding:10px 0;font-family:system-ui}
.quantity-card>small{font-size:10px;letter-spacing:.14em;color:#ebcc83;font-weight:750}
.quantity-card h3{font-size:25px;margin:10px 0}.quantity-card>p{font-size:13px;color:#bdd3ca}
.quantity-card label{display:block;margin:25px 0 10px;font-size:12px;color:#c5dbd1}
.quantity-stepper{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;gap:12px;align-items:center}
#sheet .quantity-stepper button{min-height:52px;padding:8px;font:700 25px system-ui}
.quantity-stepper input{width:100%;min-width:0;height:58px;border:1px solid #9cc4b6;border-radius:12px;background:#122f39;color:#fff6d9;text-align:center;font:750 27px system-ui;appearance:textfield}
.quantity-stepper input::-webkit-inner-spin-button{appearance:none}
.quantity-shortcuts{display:flex;gap:10px;margin:12px 0 22px}.quantity-shortcuts button{flex:1}
.quantity-receipt{padding:16px;border:1px solid #7ea99a66;border-radius:12px;background:#ffffff06;text-align:left}
.quantity-receipt p{display:flex;justify-content:space-between;gap:10px;font-size:13px}.quantity-receipt p+p{margin-top:12px}.quantity-receipt strong{color:#f5d68e;font-size:18px}.quantity-receipt b{color:#d7e7d9}
#sheet .quantity-confirm{width:100%;margin-top:20px;background:#edcf87;color:#233d3d;border-color:#f8e2a1}
#sheet .quantity-cancel{width:100%;margin-top:10px;background:transparent;box-shadow:none}
#quantity-feedback{margin-top:12px;font-size:12px;color:#f1d399}

/* exploration-guide.css */
#game #world #viewport #atlas-minimap{
 position:absolute;top:calc(56px + env(safe-area-inset-top));right:10px;width:104px;height:auto;
 padding:7px;border:1px solid #a8c1ad;border-radius:12px;background:#183b43;box-shadow:0 3px 9px #163a3b33;
 opacity:.58;transition:opacity .16s ease;z-index:6;text-align:left;color:#f5eed7;overflow:hidden;touch-action:manipulation;
}
#atlas-minimap #guide-map{display:block;width:86px;height:102px;border-radius:4px;margin:auto;image-rendering:pixelated}
#game #world #viewport #objective{right:126px;left:10px;top:calc(56px + env(safe-area-inset-top));padding:10px 11px;min-height:46px;background:#eff2dfe8;backdrop-filter:none;border:1px solid #e0e6cd;border-radius:11px;text-align:left}
#game #world #viewport #objective b{display:block;font:650 12px/1.4 system-ui!important;white-space:normal;text-overflow:clip;overflow:visible}
#game #world #viewport #map-button{display:none}
@media(max-width:360px){#game #world #viewport #atlas-minimap{width:94px;padding:6px;right:7px}#atlas-minimap #guide-map{width:78px;height:92.6px}#game #world #viewport #objective{right:111px;left:7px;font-size:11px}#game #world #viewport #objective b{font-size:11px!important}}
@media(max-height:500px) and (orientation:landscape){#game #world #viewport #atlas-minimap{top:8px;width:90px;padding:6px}#atlas-minimap #guide-map{width:64px;height:76px;margin:auto}#game #world #viewport #objective{top:8px;right:110px;max-width:310px}}
#game #world #viewport #atlas-minimap:is(.guide-focused,:active,:focus-visible){opacity:1}
#game.story-scene-active #world #viewport #atlas-minimap{opacity:0;pointer-events:none}
@media(prefers-reduced-motion:reduce){#game #world #viewport #atlas-minimap{transition:none}}
#game #world #interact small{font:650 10px/1.2 system-ui;color:#294c52;max-width:100%;overflow-wrap:anywhere}
#game #world.aurora-hd header strong::after{display:none}
#game #world #viewport #objective #guide-destination{display:block;margin-top:5px;font:500 11px/1.35 system-ui;color:#36595b;white-space:normal;overflow-wrap:anywhere}

/* world-finish-240.css */
#game #world #viewport #objective{padding:8px 10px;min-height:40px;border-radius:10px;background:#f2f2e1e0}
#game #world #viewport #objective b{font-size:12px!important;line-height:1.3!important}
#game #world #viewport #objective #guide-destination{font-size:10px;margin-top:3px;line-height:1.25}
#game #world #viewport #atlas-minimap{padding:5px;border-radius:9px;border-color:#b6d6c588;box-shadow:0 2px 6px #163a3b22}
#game #world.classic-world.immersive-world.quiet-hud #quick-nav{width:136px;grid-template-columns:64px 64px;gap:8px}
#game #world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key{width:64px;height:68px;min-height:68px;border-radius:16px;font-size:10px}
#game #quick-nav .field-key-icon{width:36px;height:36px}
@media(max-height:600px){#game #world.classic-world.immersive-world.quiet-hud #quick-nav{width:120px;grid-template-columns:56px 56px}#game #world.classic-world.immersive-world.quiet-hud #quick-nav>.field-key{width:56px;height:60px;min-height:60px}}

/* smooth-world-241.css */
/* Smooth only people portraits; Pokémon pixel assets retain their own rendering rules. */
#game #sheet .premium-speaker img,#game #sheet img.dialogue-portrait,#game #sheet .dialogue-scene>.dialogue-portrait{image-rendering:auto!important;object-fit:cover;backface-visibility:hidden;filter:none}
#game #sheet .premium-speaker img{border:1px solid #acd9c6;border-radius:12px 4px 12px 4px;box-shadow:0 3px 9px #071f3444,inset 0 1px #fff5}

/* battle-space-242.css */
/* Fill the actual game viewport. Intrinsic console height removes the reserved empty rows. */
#game #battle{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:calc(40px + env(safe-area-inset-top)) minmax(0,1fr) auto;gap:0;min-height:0}
#game #battle .battle-heading{min-height:0;height:100%;padding:calc(5px + env(safe-area-inset-top)) 13px 5px;box-sizing:border-box}
#game #battle #battle-field{height:auto;min-height:0;max-height:none;width:100%;flex:none}
#game #battle .battle-console{height:auto;min-height:0;max-height:56dvh;flex:none;padding:9px 12px max(10px,env(safe-area-inset-bottom));overflow-y:auto;display:flex;flex-direction:column;justify-content:flex-end}
#game #battle #battle-actions{flex:0 0 auto;min-height:0}
#game #battle #battle-message{margin:0 0 8px;min-height:40px;padding:9px 11px;font-size:13px;line-height:1.35}
#game #battle #battle-actions>button{min-height:52px;padding:9px 12px}
#game #battle #battle-actions.dock-actions .battle-dock{height:100%;grid-template-rows:44px minmax(0,1fr) auto}
#game #battle #battle-actions .dock-move{min-height:0!important;padding:8px 10px!important;gap:3px}
#game #battle #battle-actions .dock-hint{margin-top:1px!important;font-size:9px!important;line-height:1.3!important}
#game #battle #battle-field #ally-sprite{left:1.5%;top:auto;bottom:10%;width:clamp(142px,44vw,235px)!important;height:clamp(142px,44vw,235px)!important;max-height:43%!important}
#game #battle #battle-field #enemy-sprite{right:8%;top:auto;bottom:45%;width:clamp(120px,36vw,196px)!important;height:clamp(120px,36vw,196px)!important;max-height:37%!important}
#game #battle #battle-field .ally-base{bottom:9%;left:-2%;height:10%;width:48%}
#game #battle #battle-field .enemy-base{bottom:44%;right:7%;height:8%;width:37%}
#game #battle #enemy-hud{top:3%;left:3%;width:49%;max-width:235px}
#game #battle #ally-hud{bottom:2%;right:3%;width:49%;max-width:235px}
#game #battle #battle-field .monster-hud{padding:8px 10px}
@media(max-height:650px){#game #battle .battle-console{padding:7px 9px max(7px,env(safe-area-inset-bottom));max-height:58dvh}#game #battle #battle-message{font-size:12px;min-height:34px;padding:7px 9px;margin-bottom:6px}#game #battle #battle-actions .dock-move{min-height:0!important;padding:7px!important}#game #battle #battle-actions .dock-hint{display:none!important}#game #battle #battle-field .monster-hud{padding:5px 7px}#game #battle #battle-field .combat-types{display:none}}
@media(max-height:500px) and (orientation:landscape){#game #battle{grid-template-columns:minmax(0,1fr) 42%;grid-template-rows:calc(44px + env(safe-area-inset-top)) minmax(0,1fr)}#game #battle .battle-heading{grid-column:1/-1}#game #battle .battle-console{height:100%;max-height:100%;grid-column:2;grid-row:2;justify-content:flex-start}#game #battle #battle-field{grid-column:1;grid-row:2}#game #battle #battle-actions .dock-move{min-height:0!important}#game #battle #ally-hud,#game #battle #enemy-hud{width:48%;max-width:190px}}

/* city-finish-244.css */
#game #world #interact{display:flex;align-items:center;justify-content:center;white-space:nowrap;word-break:normal;overflow-wrap:normal;font:700 14px/1 system-ui;letter-spacing:.01em;padding:8px;box-shadow:0 4px 0 #90663e55,0 6px 13px #183b4530,inset 0 1px 0 #fff8d9;border:2px solid #ffe7a8}
#game #world #interact{position:relative;overflow:visible}
#game #world #interact[data-contact-name]:not([data-contact-name=""])::after{content:attr(data-contact-name);position:absolute;right:0;bottom:calc(100% + 7px);width:126px;max-width:36vw;padding:5px 8px;border:1px solid #e4d49c;border-radius:9px;background:#173e49ed;color:#fff2cd;text-align:center;font:600 11px/1.25 system-ui;white-space:normal;overflow-wrap:break-word;pointer-events:none;box-shadow:0 2px 7px #18343c2b}

/* trainer-fixed-246.css */
/* One fixed editor with a large retina canvas and a single scrollable options panel. */
#game #overlay #sheet.trainer-editor{width:calc(100% - 16px)!important;max-width:820px!important;height:calc(100% - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;max-height:900px!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;align-self:center;border-radius:18px!important;margin:0 auto!important}
#game #sheet.trainer-editor .rpg-head,#game #sheet.trainer-editor .sheet-head{flex:0 0 48px;min-height:48px!important;padding:6px 12px!important}
#game #sheet.trainer-editor .rpg-body{flex:1;min-height:0;overflow:hidden!important;display:grid;grid-template-rows:minmax(180px,1fr) 44px minmax(140px,200px) 48px;gap:8px;padding:10px!important}
#game #sheet.trainer-editor .rpg-footer{display:none!important}
#game #sheet.trainer-editor .trainer-fixed-preview{min-height:0;display:flex;align-items:center;justify-content:center;flex-direction:column;min-width:0;border:1px solid var(--ui-border);border-radius:14px;background:#102b38;overflow:hidden}
#trainer-preview-canvas{display:block;width:100%;max-width:100%;height:calc(100% - 118px);min-height:0;aspect-ratio:12/7;object-fit:contain;image-rendering:auto}
#trainer-preview-status{font:600 12px/1.3 system-ui;white-space:normal;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box;color:var(--ui-muted);padding:2px 6px;text-align:center}
.trainer-preview-actions302{display:flex;gap:5px;flex-shrink:0;width:100%;justify-content:center;padding:4px 6px}.trainer-preview-actions302 select{min-height:44px;min-width:0;max-width:none;flex:1;width:0;padding:4px;font:650 16px system-ui;color:var(--ui-text);background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:9px}
#game #sheet.trainer-editor .trainer-preview-actions302 button{min-height:44px;padding:5px 14px;margin:0;font:650 16px system-ui;background:var(--ui-panel);border:1px solid var(--ui-border)}
#game #sheet.trainer-editor .trainer-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#game #sheet.trainer-editor .trainer-tabs button{min-height:44px;padding:5px 2px;font:750 12px system-ui;background:var(--ui-panel);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:9px}
#game #sheet.trainer-editor .trainer-tabs button[aria-pressed=true]{background:var(--ui-card);border:2px solid var(--ui-accent);color:var(--ui-accent)}
.trainer-fixed-options{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.trainer-panel{min-height:100%;display:flex;flex-direction:column;justify-content:flex-start;gap:7px;padding:2px}
#game #sheet.trainer-editor .trainer-cycle{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:6px;min-height:52px;padding:4px 7px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:10px;flex-shrink:0}
.trainer-cycle>span{font:650 14px/1.2 system-ui;color:var(--ui-muted)}.trainer-cycle>div{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:3px;align-items:center}
#game #sheet.trainer-editor .trainer-cycle button{min-width:44px;min-height:44px;padding:0;border:1px solid var(--ui-border);background:var(--ui-card);color:var(--ui-accent);font:800 24px/1 system-ui;border-radius:8px}
.trainer-cycle strong{font:750 14px/1.25 system-ui;text-align:center;color:var(--ui-text);overflow-wrap:anywhere;min-width:0}.trainer-cycle strong:before{content:'';display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px;background:var(--choice);vertical-align:baseline}
#game #sheet.trainer-editor #trainer-glasses{min-height:44px;font:700 12px system-ui;padding:6px;border:1px solid var(--ui-border);background:var(--ui-panel);color:var(--ui-text)}#game #sheet.trainer-editor #trainer-glasses[aria-pressed=true]{border:2px solid var(--ui-accent);color:var(--ui-accent)}
#game #sheet.trainer-editor .trainer-editor-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;min-height:0}#game #sheet.trainer-editor .trainer-editor-actions button{min-height:44px;padding:6px;font:750 13px system-ui}
#game #sheet.trainer-editor *,#game #sheet.trainer-editor *:before,#game #sheet.trainer-editor *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-height:650px){#game #sheet.trainer-editor .rpg-body{grid-template-rows:minmax(110px,1fr) 44px minmax(110px,190px) 44px;gap:5px;padding:7px!important}#game #sheet.trainer-editor .trainer-cycle{grid-template-columns:88px minmax(0,1fr);padding:3px 5px}.trainer-panel{gap:4px}#game #sheet.trainer-editor .rpg-head{flex-basis:42px;min-height:42px!important}}
@media(max-height:480px) and (orientation:landscape){#game #sheet.trainer-editor .rpg-body{grid-template-columns:40% minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 44px}.trainer-fixed-preview{grid-column:1;grid-row:1/4}.trainer-tabs{grid-column:2;grid-row:1}.trainer-fixed-options{grid-column:2;grid-row:2}.trainer-editor-actions{grid-column:2;grid-row:3}#game #sheet.trainer-editor .trainer-cycle{grid-template-columns:80px minmax(0,1fr)}}

.trainer-art-toolbar328{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;width:100%;padding:3px 8px;box-sizing:border-box;font:650 13px system-ui;flex-shrink:0}.trainer-art-toolbar328 select{min-width:0;max-width:78%;min-height:44px;font:650 16px system-ui;color:var(--ui-text);background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:9px;padding:5px 9px}.trainer-art-info328{padding:12px;color:var(--ui-text);font:14px/1.5 system-ui}.trainer-art-info328 p{margin:6px 0 0;font:14px/1.45 system-ui}.trainer-art-info328 strong{color:var(--ui-accent)}#trainer-expression-wrap328{display:contents}#trainer-expression-wrap328.hidden{display:none!important}

#game #sheet.trainer-editor>.qol-backbar{display:none!important}

/* scooter-246.css */
#game #world #scooter-button{position:absolute;right:12px;bottom:calc(14px + env(safe-area-inset-bottom));width:60px;height:70px;min-height:70px;padding:6px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px solid #9bc5b3;border-radius:17px;background:linear-gradient(150deg,#387887,#153c4d);color:#fff0c7;box-shadow:0 4px 0 #112f3e;z-index:8;touch-action:manipulation;animation:none!important;transition:none!important}
#scooter-button svg{width:34px;height:31px;flex:none}#scooter-charge{font:750 10px/1 system-ui;white-space:nowrap}#game #world #scooter-button[data-riding=true]{border-color:#ffe49a;background:linear-gradient(150deg,#529d8f,#266e73)}
#game #world #quick-nav{right:82px!important;width:150px!important;gap:7px!important;display:grid!important;grid-template-columns:1fr 1fr!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;height:70px!important;padding:0!important}
#game #world #quick-nav>button{min-width:0!important;min-height:70px!important;height:70px!important;padding:5px 3px!important;border-radius:16px!important;font-size:10px!important}#game #world #quick-nav .field-key-icon{width:32px!important;height:32px!important;margin:0 auto 2px!important}#game #world #quick-nav svg{width:32px!important;height:32px!important}
@media(max-width:360px){#game #world #quick-nav{width:132px!important;right:78px!important}#game #world #scooter-button{right:8px}}

/* campaign-elegant-247.css */
/* Landscape journey screen; matches the title, with real save information. */
#game #overlay:has(#sheet.legacy-path-menu){padding:0;background:#071d27;backdrop-filter:none;align-items:stretch;justify-content:center}
#game #overlay #sheet.rpg-screen.game-menu.legacy-path-menu{width:100%;max-width:none!important;height:100%;max-height:100%;border:0!important;border-radius:0!important;background:linear-gradient(#031b23b8,#031b2340 45%,#031b23d9),url('assets/forest/journey-landscape-v291.webp') center 40%/cover!important;box-shadow:none!important;color:#fff;overflow:hidden;display:flex;flex-direction:column}
#game #overlay #sheet.legacy-path-menu>.rpg-head,#game #overlay #sheet.legacy-path-menu>.rpg-footer{display:none!important}
#game #overlay #sheet.legacy-path-menu>.rpg-body{display:flex!important;flex-direction:column;gap:10px!important;padding:calc(12px + env(safe-area-inset-top)) max(13px,env(safe-area-inset-right)) max(13px,env(safe-area-inset-bottom)) max(13px,env(safe-area-inset-left))!important;width:100%;height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;max-width:860px;margin:0 auto}
#sheet.legacy-path-menu svg{width:25px;height:25px;flex:none}#sheet.legacy-path-menu button{touch-action:manipulation;min-height:44px;transition:transform .14s,filter .14s}#sheet.legacy-path-menu button:active{transform:scale(.978)}#sheet.legacy-path-menu button:focus-visible{outline:3px solid #ffe29a;outline-offset:3px}#sheet.legacy-path-menu button:disabled{opacity:.52;cursor:default}
.journey-header291{background:none;border:0;padding:0;height:auto;display:flex;gap:15px;align-items:center;flex:none;min-height:47px}.journey-header291>div{flex:1;text-align:center;padding-right:52px}.journey-header291 h2{font:750 15px/1.3 system-ui!important;letter-spacing:.08em!important;text-transform:uppercase;color:#fff!important;margin:4px 0!important}.journey-rule291{display:flex;align-items:center;justify-content:center;gap:8px;color:#e9ca7f}.journey-rule291:before,.journey-rule291:after{content:'';height:1px;background:#e9ca7f80;width:20%}.journey-rule291 svg{width:18px!important;height:18px!important}
#sheet.legacy-path-menu .journey-back291{width:45px;height:45px;display:grid;place-items:center;padding:8px;border:1px solid #7195b4;border-radius:9px;background:#0a2b47;color:#fff}
#sheet.legacy-path-menu .legacy-path-tabs{display:grid!important;grid-template-columns:1fr 1fr;background:#092537e8;border:1px solid #63818f;border-radius:14px;padding:0;gap:0;min-height:52px;flex:none}
#sheet.legacy-path-menu .legacy-path-tabs button{display:flex;gap:10px;align-items:center;justify-content:center;padding:9px 10px;background:none;color:#d4dce0;border:0;border-radius:13px;font:750 13px/1.15 system-ui;text-transform:uppercase;letter-spacing:.06em;min-width:0}
#sheet.legacy-path-menu .legacy-path-tabs button[aria-pressed=true]{background:linear-gradient(#ffec9c,#f1b84b);color:#131f26;box-shadow:inset 0 0 0 1px #fff1b5,0 2px 10px #b18a3b55}.legacy-path-tabs small{display:block;font:400 11px/1.4 system-ui;text-transform:none;letter-spacing:0;margin-top:3px}.journey-rocket291{font:1000 30px/1 system-ui;color:#cc2636}
#sheet.legacy-path-menu .legacy-path-hero{position:relative;min-height:180px;flex:1;display:flex;align-items:center;justify-content:flex-end;padding:10px 0;margin:0;background:none;border:0;overflow:hidden}
.journey-hero-copy291{width:65%;z-index:2;text-align:right;padding-right:5px;text-shadow:0 2px 7px #00161d}.journey-hero-copy291 h3{font:750 clamp(23px,6.7vw,40px)/1.12 Georgia,serif!important;text-transform:uppercase;color:#fff!important;margin:0!important;letter-spacing:-.025em!important}.journey-hero-copy291 em{color:#ffe093;font-style:normal}.legacy-path-rule{color:#edc875;font-size:22px;margin:10px 0}.journey-hero-copy291 p{font:400 12px/1.6 system-ui;color:#f3f6f1!important;margin:0}#sheet.legacy-path-menu .forest-legends291{width:52%;right:auto;z-index:1;overflow:visible}#sheet.legacy-path-menu .forest-legends291 .legend-lugia291{left:0;top:2%;width:90%;height:43%}#sheet.legacy-path-menu .forest-legends291 .legend-rayquaza291{right:0;top:18%;width:90%;height:57%}#sheet.legacy-path-menu .forest-legends291 .legend-mew291{left:1%;top:62%;width:60%;height:38%}#sheet.legacy-path-menu .forest-legends291 .legend-celebi291{right:2%;top:68%;width:53%;height:32%}

.journey-panel291{display:flex;flex-direction:column;gap:10px;border:1px solid #668492;border-radius:16px;padding:10px;background:#041d28eb;box-shadow:0 6px 22px #00121999;flex:none}
#sheet.legacy-path-menu .journey-save291{display:flex;align-items:center;gap:11px;width:100%;min-height:94px;border:1px solid #355563;background:#0c2733c9;border-radius:11px;padding:9px;text-align:left;color:#fff;font:400 12px/1.4 system-ui;box-shadow:none}
.journey-save291>div:nth-child(2){flex:1;min-width:0}.journey-save291 strong{display:block;font-size:14px;line-height:1.3;font-weight:750}.journey-save291 small{display:block;font-size:10px;color:#c2d2d7;margin-top:4px}.journey-save291>svg{width:16px!important}.journey-save-team291{width:82px;min-width:82px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;border:1px solid #608273;border-radius:9px;min-height:72px;background:linear-gradient(#305b48c9,#132c35d9),url('assets/forest/journey-landscape-v291.webp') center/cover}.journey-save-team291 img{width:34px;height:34px;object-fit:contain}.journey-stats291{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:8px;font-size:10px}.journey-stats291 span{display:flex;gap:4px;align-items:center}.journey-stats291 svg{width:15px!important;height:15px!important;color:#eed88c}.journey-empty291>img{width:66px;height:70px;object-fit:contain}.journey-empty291 span{display:block;font-size:10px;color:#e7d494;margin-top:6px}
#sheet.legacy-path-menu .legacy-path-options{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0}#sheet.legacy-path-menu .legacy-path-options button{min-height:59px;display:flex;gap:7px;align-items:center;text-align:left;background:linear-gradient(#16394be6,#0a2635);border:1px solid #658395;border-radius:10px;color:#fff;padding:9px 8px;font:650 11px/1.25 system-ui;min-width:0}#sheet.legacy-path-menu .legacy-path-options button>span{flex:1}#sheet.legacy-path-menu .legacy-path-options button>svg:last-child{width:12px}.legacy-path-options small{display:block;font-size:9px;font-weight:400;color:#bacecf;margin-top:4px}
#sheet.legacy-path-menu .legacy-path-footer{display:flex;flex-direction:column;gap:9px;padding:2px 0 0;margin:0;border:0;background:none}#sheet.legacy-path-menu .game-menu-primary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 17px;border:2px solid #ffe4a0;background:linear-gradient(#ffeb9c,#ffd070 55%,#efb34c);border-radius:14px;color:#172029;font:850 15px/1.2 system-ui;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 0 0 3px #a17e3a40,inset 0 1px #fff9d3;min-height:57px;width:100%}.legacy-path-footer small{text-align:center;font:10px/1.4 system-ui;color:#c2d1d1}
@media(min-width:600px) and (min-height:650px){#sheet.legacy-path-menu .legacy-path-hero{min-height:290px}.journey-hero-copy291 h3{font-size:44px!important}.journey-hero-copy291 p{font-size:15px}.journey-panel291{padding:16px}.journey-save291 strong{font-size:18px}.journey-save-team291{width:130px}.journey-stats291{font-size:13px}.journey-save291 small{font-size:12px}}
@media(orientation:landscape) and (max-height:650px){#game #overlay #sheet.legacy-path-menu>.rpg-body{display:grid!important;grid-template-columns:1fr 1.1fr;grid-template-rows:auto auto 1fr;gap:8px 18px!important;max-width:1000px;padding-top:8px!important}.journey-header291{grid-column:1/-1;min-height:40px}.journey-header291 h2{font-size:13px!important}#sheet.legacy-path-menu .legacy-path-tabs{grid-column:1;grid-row:2;min-height:44px}#sheet.legacy-path-menu .legacy-path-hero{grid-column:1;grid-row:3;min-height:145px;padding:0}.journey-panel291{grid-column:2;grid-row:2/4;padding:8px;gap:7px;align-self:center}.journey-hero-copy291 h3{font-size:25px!important}.journey-hero-copy291 p{font-size:10px}.journey-hero-copy291{width:72%}.legacy-path-rule{margin:5px 0}#sheet.legacy-path-menu .journey-save291{min-height:76px;padding:6px}.journey-save-team291{min-height:60px;width:68px;min-width:68px}.journey-save-team291 img{width:28px;height:28px}.journey-save291 strong{font-size:12px}#sheet.legacy-path-menu .legacy-path-options button{min-height:48px;padding:6px;font-size:10px}.legacy-path-options small{font-size:9px}#sheet.legacy-path-menu .game-menu-primary{min-height:48px;padding:9px 12px;font-size:13px}.legacy-path-footer small{font-size:9px}.journey-stats291{margin-top:4px}}
@media(prefers-reduced-motion:reduce){#sheet.legacy-path-menu button{transition:none}.forest-legends291 img{animation:none}}

/* battle-scenes-251.css */
/* Stylised scenery: match the readable illustrated world rather than realistic textures. */
#game #battle #battle-field[data-living-habitat=forest]{background-image:url('assets/battle/forest.svg');background-size:100% 100%;background-position:center;background-repeat:no-repeat;background-color:#407853}
#game #battle #battle-field[data-living-habitat=cave]{background-image:url('assets/battle/cave.svg');background-size:100% 100%;background-position:center;background-repeat:no-repeat;background-color:#29434d}
#game #battle #battle-field:is([data-living-habitat=forest],[data-living-habitat=cave]):before{background:linear-gradient(180deg,#fff1bc0d,transparent 40%,#102d3b12);pointer-events:none}
#game #battle #battle-field:is([data-living-habitat=forest],[data-living-habitat=cave]):after{box-shadow:inset 0 0 24px #102b3b26;pointer-events:none}
#game #battle #battle-field:is([data-living-habitat=forest],[data-living-habitat=cave]) :is(.ally-base,.enemy-base){display:block;border:0!important;box-shadow:none!important;background:radial-gradient(ellipse,#17313e66 0,#17313e3b 30%,#17313e14 57%,transparent 74%)!important;transform:none!important;pointer-events:none}
#game #battle #battle-field:is([data-living-habitat=forest],[data-living-habitat=cave]) .ally-base{left:2%;bottom:8%;width:42%;height:5%}
#game #battle #battle-field:is([data-living-habitat=forest],[data-living-habitat=cave]) .enemy-base{right:12%;bottom:43%;width:28%;height:4%}
#game #battle #battle-field .cinema-impact{box-shadow:0 0 8px var(--tone,#e8dfa9),0 0 18px #fff2cb33}

/* Keep distant opponents smaller without overriding battle transforms or animations. */
#game #battle #battle-field #enemy-sprite{right:12%;width:clamp(88px,27vw,147px)!important;height:clamp(88px,27vw,147px)!important;max-height:28%!important}

/* polish-254.css */
/* Size via dimensions: capture, recoil and lunge retain their transform animations. */
#game #battle #battle-field #enemy-sprite[data-visual-size=small]{width:clamp(72px,22vw,120px)!important;height:clamp(72px,22vw,120px)!important;max-height:24%!important}
#game #battle #battle-field #enemy-sprite[data-visual-size=large]{width:clamp(102px,30vw,163px)!important;height:clamp(102px,30vw,163px)!important;max-height:31%!important}
#game #battle #battle-field #ally-sprite[data-visual-size=small]{width:clamp(120px,37vw,198px)!important;height:clamp(120px,37vw,198px)!important;max-height:38%!important}
#battle-field.cinema-busy:not(.cinema-lunge)[data-cinema-actor=ally] #ally-sprite{animation:focus254 var(--scene-ms) ease-out both}
#battle-field.cinema-busy:not(.cinema-lunge)[data-cinema-actor=enemy] #enemy-sprite{animation:focus254 var(--scene-ms) ease-out both}
@keyframes focus254{0%,100%{transform:translateY(0)}25%{transform:translateY(3px) scale(.97)}65%{transform:translateY(-3px) scale(1.025)}}
#combat-cinema .shot-flame{filter:drop-shadow(0 0 3px #ffb632)}
#combat-cinema .shot-water{box-shadow:inset 3px 0 #eaffff88}
#combat-cinema .kind-shards[data-element=grass] .shot-shards{border-radius:90% 0;clip-path:none}
#game[data-performance=battery] #combat-cinema .cinema-shot:nth-child(n+3){display:none}
#game[data-performance=battery] #combat-cinema *{filter:none!important;box-shadow:none!important}
#game[data-performance=battery] #battle-field.cinema-motion:not(.cinema-busy) .battle-sprite{animation:none!important}
#game #sheet .rpg-head{position:relative;flex-shrink:0}
#game #sheet .rpg-head h2{min-width:0;text-align:center;overflow-wrap:break-word}
#game #sheet .rpg-back{flex:0 0 44px;display:grid;place-items:center;line-height:1;padding:0}
#game #sheet .rpg-actions{align-items:stretch;justify-content:center;gap:8px}
#game #sheet .rpg-actions>button{min-width:0;text-align:center;display:flex;align-items:center;justify-content:center;gap:6px;white-space:normal}
#game #sheet button{touch-action:manipulation}
#game #sheet button:not(:disabled):active{filter:brightness(1.1)}
#game[data-ui-motion=off] #combat-cinema *,#game[data-ui-motion=off] #battle-field .battle-sprite{animation:none!important}
@media(prefers-reduced-motion:reduce){#game #battle-field .battle-sprite,#combat-cinema *{animation:none!important;filter:none!important}}

/* convenience-255.css */
#save-feedback,#fps-feedback{position:absolute;z-index:90;pointer-events:none;padding:5px 9px;border:1px solid #87c4b4;border-radius:9px;background:#14383bef;color:#e3f8e6;font:700 11px/1.3 system-ui;max-width:80%;box-shadow:0 2px 8px #102d3433}
#save-feedback{top:calc(72px + env(safe-area-inset-top));left:12px}#save-feedback[data-state=error]{background:#62383c;color:#fff0d5;border-color:#e8b47d}#fps-feedback{top:calc(48px + env(safe-area-inset-top));left:12px}
#save-feedback[hidden],#fps-feedback[hidden]{display:none}
#game #sheet .drag-team255{touch-action:none;min-width:36px;cursor:grab;padding:5px}.dragging255{outline:2px solid #f2cc70;background:#42776c!important}
#game #sheet .party-arrange article{min-width:0}.party-arrange article>div{min-width:0;flex:1}.next-level255{display:block;color:#bce9da;font-size:10px;margin-top:3px}.result-note255{font:11px/1.4 system-ui;color:#c5ddd5;margin:7px 0 0}.status-guide255{padding:10px;border:1px solid #65998e;border-radius:10px;margin-top:12px}

/* exploration-rewards-256.css */
#game #world #objective-egg-field{left:12px;right:auto;bottom:auto;top:calc(145px + env(safe-area-inset-top));max-width:min(47%,280px);padding:7px 9px;font:650 10px/1.3 system-ui;background:#153d48df;backdrop-filter:none}
.tracked-row256{display:block}.tracked-row256+.tracked-row256{margin-top:6px}.tracked-row256 progress{display:block;width:100%;height:5px;margin-top:4px;accent-color:#a6dfb6}
.evolution-stats256{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:12px 0}.evolution-stats256 span{display:flex;justify-content:space-between;gap:8px;padding:7px;border-radius:8px;background:#ffffff0b;font:11px system-ui}.evolution-stats256 b{color:#edcf83;white-space:nowrap}
.hatch-finish256{position:relative;isolation:isolate;overflow:hidden}.hatch-halo256{display:block;color:#f1ce80;font:48px system-ui;animation:hatch-halo256 .7s ease-out both}.hatch-finish256>img{animation:hatch-rise256 .65s ease-out both!important}
@keyframes hatch-halo256{from{opacity:0;transform:scale(.4) rotate(-40deg)}50%{opacity:1}to{opacity:.65;transform:scale(1) rotate(0)}}@keyframes hatch-rise256{from{opacity:0;transform:translateY(10px) scale(.8)}to{opacity:1;transform:none}}
#game[data-ui-motion=off] .hatch-finish256 *,#game[data-performance=battery] .hatch-finish256 *{animation:none!important}
@media(prefers-reduced-motion:reduce){.hatch-finish256 *{animation:none!important}}
@media(max-height:650px){#game #world #objective-egg-field{top:calc(118px + env(safe-area-inset-top));font-size:9px;max-width:44%}}

/* actors-level-257.css */
/* Centre both stat presentations. Scope prevents generic menu rules pushing gains sideways. */
#game #level-celebration{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
#game #level-celebration .level-panel{box-sizing:border-box;min-width:0;width:min(100%,400px);margin:auto;text-align:center}
#game #level-celebration .level-stats{width:100%;box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));text-align:center}
#game #level-celebration .level-stats>div{min-width:0;box-sizing:border-box;padding:10px 6px}
#game #level-celebration .level-stats p{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;text-align:center}
#game #level-celebration .level-stats b{margin-left:0;background:#bde6a31a;border-radius:5px;padding:2px 4px}
#game #level-celebration .level-heading{justify-content:center;gap:14px;flex-wrap:wrap;text-align:center}
#game #level-celebration .level-next,#game #level-celebration .level-skip{margin-left:auto;margin-right:auto;text-align:center}
#game #sheet .evolution-stage{width:100%;max-width:440px;box-sizing:border-box;margin-inline:auto;text-align:center}
#game #sheet .evolution-stats256{width:100%;box-sizing:border-box;margin-inline:auto;text-align:center}
#game #sheet .evolution-stats256 span{flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}
@media(max-height:650px){#game #level-celebration{padding:10px 12px}#game #level-celebration .level-portrait{width:86px;height:86px;margin-top:5px}#game #level-celebration .level-portrait img{width:78px;height:78px}#game #level-celebration .level-subtitle{margin-bottom:8px}#game #level-celebration .level-stats>div{padding:6px}#game #level-celebration .level-panel h2{font-size:21px}}

/* battle-result-258.css */
/* Result console uses content-driven heights: the remaining-XP line must fit inside each card. */
#game #battle #battle-actions:has(>.beta-xp){display:block;width:100%;min-width:0;box-sizing:border-box}
#game #battle .beta-xp{width:100%;max-width:620px;margin-inline:auto;box-sizing:border-box;text-align:center}
#game #battle .beta-xp-head{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;margin:4px 0 10px}
#game #battle .beta-xp-head strong{font:750 14px/1.3 system-ui;white-space:normal}
#game #battle .beta-xp-head small{white-space:normal;line-height:1.4}
#game #battle .beta-xp-grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:8px;width:100%;margin:0 auto 10px}
#game #battle .beta-xp-row{flex:0 1 calc(50% - 4px);width:auto;max-width:300px;min-width:0;height:auto;min-height:76px;box-sizing:border-box;padding:9px;gap:9px;text-align:center}
#game #battle .beta-xp-row>img{flex:0 0 42px;width:42px;height:42px;image-rendering:auto}
#game #battle .beta-xp-row>div{min-width:0;text-align:center}
#game #battle .beta-xp-row strong{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px;white-space:normal;font:750 12px/1.3 system-ui}
#game #battle .beta-xp-row small{line-height:1.4;white-space:normal;overflow-wrap:break-word}
#game #battle .beta-xp-row .next-level255{margin-top:5px;font:600 10px/1.35 system-ui}
#game #battle .beta-xp>.fight{display:flex;align-items:center;justify-content:center;text-align:center;margin-inline:auto;width:100%;min-height:46px!important}
#game #battle .beta-xp .result-note255{text-align:center;margin:7px auto 0;max-width:42ch;line-height:1.4}
@media(max-width:430px){#game #battle .beta-xp-row{flex-basis:100%;max-width:340px}}
@media(max-height:600px){#game #battle .beta-xp-head{margin-bottom:6px}#game #battle .beta-xp-row{min-height:68px;padding:6px}#game #battle .beta-xp-grid{gap:5px;margin-bottom:6px}}

/* battle-idle-259.css */
/* Idle only: resolving, damage, capture and entry own the transforms at all other times. */
#game #battle #battle-field[data-idle259=yes]:not(.cinema-busy):not(.cinema-hit):not(.cinema-reveal):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence) .battle-sprite:not(.caught):not(.fainted){animation:idle-breathe259 var(--idle-duration,3s) ease-in-out infinite;transform-origin:50% 92%}
#game #battle #battle-field[data-idle259=yes]:not(.cinema-busy):not(.cinema-hit):not(.cinema-reveal):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence) .battle-sprite[data-idle-kind=float]{animation-name:idle-float259}
#game #battle #battle-field[data-idle259=yes]:not(.cinema-busy):not(.cinema-hit):not(.cinema-reveal):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence) .battle-sprite:is([data-idle-kind=leaf],[data-idle-kind=fire]){animation-name:idle-sway259}
#game #battle #battle-field[data-idle259=yes]:not(.cinema-busy):not(.cinema-hit):not(.cinema-reveal):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence) #enemy-sprite{animation-delay:-1.25s}
@keyframes idle-breathe259{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-1px) scale(1.012,1.022)}}
@keyframes idle-float259{0%,100%{transform:translateY(0) rotate(-.5deg)}50%{transform:translateY(-4px) rotate(.5deg)}}
@keyframes idle-sway259{0%,100%{transform:rotate(-.6deg) scaleY(1)}50%{transform:rotate(.6deg) scaleY(1.018)}}
.idle-light259{position:absolute;pointer-events:none;z-index:1;background:radial-gradient(ellipse,#ffc56835,#ee672519 40%,transparent 72%);border-radius:50%;width:26%;height:12%;opacity:0}
.idle-light259.ally{left:9%;bottom:8%}.idle-light259.enemy{right:13%;bottom:43%;width:22%;height:9%}
#game #battle #battle-field[data-idle259=yes]:not(.cinema-busy):not(.capture-sequence) .idle-light259:not([hidden]){animation:idle-fire259 1.7s ease-in-out infinite}
@keyframes idle-fire259{0%,100%{opacity:.35;transform:scale(.9)}50%{opacity:.8;transform:scale(1.12)}}
#game #battle .idle-light259[hidden]{display:none}
#game[data-performance=battery] #battle-field .battle-sprite,#game[data-ui-motion=off] #battle-field .battle-sprite{animation:none!important}
#game[data-performance=battery] .idle-light259,#game[data-ui-motion=off] .idle-light259{display:none}
@media(prefers-reduced-motion:reduce){#game #battle-field .battle-sprite{animation:none!important}.idle-light259{display:none}}

/* battle-idle-260.css */
/* Native animation owns the idle transform; CSS attack/capture animations stay intact. */
#game #battle #battle-field[data-idle260=yes]:not(.cinema-busy):not(.cinema-hit):not(.cinema-reveal):not(.cinema-switch):not(.cinema-faint):not(.capture-sequence) .battle-sprite{animation:none!important}
#game #battle #battle-field[data-idle260=yes]:not(.cinema-busy):not(.capture-sequence) .idle-light259:not([hidden]){display:block;animation:idle-fire259 1.5s ease-in-out infinite}
.idle-help260{padding:12px;border:1px solid #76a99d;border-radius:12px;margin-bottom:12px}.idle-help260 small{display:block;margin-top:7px}

/* title-actions-262.css */
/* Modal is always above the title artwork; decorative title layers never intercept taps. */
#game #overlay:not(.hidden){z-index:1000;pointer-events:auto}
#game #title .forest-menu{pointer-events:auto;touch-action:manipulation}
#game #title .forest-menu button{position:relative;pointer-events:auto;touch-action:manipulation}
#game #title :is(#forest-artwork,.forest-bottom-shade,.forest-breath,.forest-firefly){pointer-events:none}

/* flame-starters-264.css */
#game #sheet.partner-menu .partner-hero-art{animation:starter-idle264 2.4s ease-in-out infinite;transform-origin:center 88%}
#game #sheet.partner-menu .partner-pick img{animation:starter-small264 3s ease-in-out infinite;transform-origin:center bottom}
#game #sheet.partner-menu .partner-pick:nth-child(2) img{animation-delay:-1s}#game #sheet.partner-menu .partner-pick:nth-child(3) img{animation-delay:-2s}
@keyframes starter-idle264{0%,100%{transform:translateY(0) rotate(-1deg) scale(1)}50%{transform:translateY(-5px) rotate(1deg) scale(1.025)}}
@keyframes starter-small264{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
#game #battle-field .tail-flame264{z-index:3;animation:tail-fire264 .75s ease-in-out infinite;image-rendering:auto}
@keyframes tail-fire264{0%,100%{filter:brightness(1.08) saturate(1.15)}25%{filter:brightness(1.55) saturate(1.3) drop-shadow(0 0 2px #ffc84a)}60%{filter:brightness(1.2) saturate(1.4)}}
#game[data-performance=battery] #battle-field .tail-flame264{animation-duration:1.3s}
#game[data-ui-motion=off] #sheet.partner-menu img,#game[data-performance=battery] #sheet.partner-menu .partner-pick img{animation:none!important}
#game:has(#battle:not(.hidden)) #save-feedback[data-state=ok]{display:none}
@media(prefers-reduced-motion:reduce){#game #sheet.partner-menu img{animation:none!important}}

/* title-viewport-265.css */
/* Retired: viewport and responsive title layout are owned by forest-title.css (2.0.91). */

/* trainer-storage-273.css */
/* Dedicated layouts prevent generic dex and button rules from squeezing storage. */
#sheet.storage-screen273 .rpg-body{padding:16px;gap:16px}
#sheet.storage-screen273 .qol-box-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
#sheet.storage-screen273 .qol-box-filters label{display:grid;gap:7px;min-width:0}
#sheet.storage-screen273 .qol-box-filters>button{grid-column:1/-1}
#sheet.storage-screen273 .dex-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.6fr);gap:10px;align-items:stretch;margin:0 0 16px}
#sheet.storage-screen273 .dex-filters input{grid-column:1/-1;width:100%;box-sizing:border-box}
#sheet.storage-screen273 button,#sheet.storage-screen273 select{min-width:0;min-height:46px;height:auto;white-space:normal;text-align:center;padding:12px;font:700 14px/1.3 system-ui}
#sheet.storage-screen273 .page-controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:center;text-align:center;margin:16px 0}
#sheet.storage-screen273 .storage-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;padding:16px;border-radius:18px;background:linear-gradient(140deg,var(--ui-card),var(--ui-panel));border:1px solid var(--ui-border);align-items:center}
#sheet.storage-screen273 .storage-row>div{min-width:0}#sheet.storage-screen273 .storage-row img{width:56px;height:56px;object-fit:contain}#sheet.storage-screen273 .storage-row b{display:block;overflow-wrap:anywhere}
#sheet.storage-screen273 .storage-list{display:grid;gap:12px}#sheet.storage-screen273 .rpg-prompt{font-size:14px;line-height:1.5}
.trainer-tools273{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}.trainer-tools273 button:last-child{grid-column:1/-1}
/* Keep the new shortcut above the bag: no overlap with the stick or fixed scooter. */
#game #world #quick-nav>.field-trainer{display:flex!important;position:absolute;right:0;bottom:80px;width:71px!important;height:70px!important;background:linear-gradient(145deg,#497f82,#163e50);color:#ffe1a0}

/* title-performance-274.css */
/* Retired: viewport and responsive title layout are owned by forest-title.css (2.0.91). */

/* compact-field-275.css */
/* Four aligned touch targets, anchored independently of the joystick. */
#game #world #quick-nav{left:auto!important;right:68px!important;transform:none!important;width:154px!important;height:58px!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
#game #world #quick-nav>.field-key{position:static!important;inset:auto!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:48px!important;height:58px!important;min-height:58px!important;padding:4px 2px!important;gap:2px;border-radius:13px!important;font:700 9px/1.15 system-ui!important}
#game #world #quick-nav .field-key-icon,#game #world #quick-nav .field-key-icon svg{width:26px!important;height:26px!important;margin:0!important}
#game #world #quick-nav .field-key-label{font:700 9px/1.15 system-ui!important;white-space:nowrap}
#game #world #scooter-button{right:12px;width:48px;height:58px;min-height:58px;padding:4px 2px;gap:3px;border-radius:13px;bottom:calc(14px + env(safe-area-inset-bottom))}
#game #world #scooter-button svg{width:28px;height:26px}#game #world #scooter-charge{font-size:9px}
@media(max-width:360px){
 #game #world #quick-nav{right:62px!important;width:140px!important;gap:4px!important}
 #game #world #quick-nav>.field-key{width:44px!important}
 #game #world #scooter-button{width:44px;right:10px}
 #game #world.immersive-world.quiet-hud #stick{width:96px;height:96px}
}
/* Exploration hierarchy: readable location, compact objective and optional map. */
#game #world>header{height:52px;min-height:52px;padding:6px 12px;background:#133941;color:#f4f0d9;border-bottom:1px solid #88af9c55;box-shadow:0 2px 8px #102e3e26}
#game #world>header #region{display:block;color:#b8d7bd;font:700 9px/1.3 system-ui;letter-spacing:.12em}
#game #world>header #location{display:block;color:#fff4db;font:700 14px/1.3 system-ui;text-shadow:none}
#game #world>header .icon-button{width:44px;height:44px;min-height:44px;border-radius:12px;background:#234d55;border:1px solid #83aaa2;color:#fff3ce;box-shadow:none;font-size:22px}
#game #world>header .icon-button small{display:none}
#game #world #objective{top:10px;left:12px;right:102px;width:auto;max-width:420px;min-height:44px;padding:8px 12px;background:#153f43ed;border:1px solid #b6ccb27a;border-left:3px solid #efd28a;border-radius:12px;color:#fff6df;box-shadow:0 3px 8px #173c3d28;font-size:12px;line-height:1.35;text-shadow:none}
#game #world #objective :is(small,span){font-size:10px;color:#c8dbce}
#game #world #map-button{top:10px;right:12px;width:78px;height:78px;min-height:44px;border-radius:12px;opacity:.88;box-shadow:0 2px 8px #183e3c30}
#game #world #nearby{max-width:65%;font-size:11px;line-height:1.35}
#game #world #stick{opacity:.7}
@media(orientation:landscape) and (max-height:500px){#game #world>header{height:44px;min-height:44px}#game #world #objective{max-width:340px}#game #world #map-button{width:64px;height:64px}}
#game #world[data-field-travel=walk] #objective{max-height:44px;min-height:44px;overflow:hidden}
#game #world[data-field-travel=walk] #objective span{display:none}
#game #world[data-field-travel=walk] #map-button{width:44px;height:44px;opacity:.7}
#game #world[data-field-travel=walk] #stick{opacity:.52}
@media(prefers-reduced-motion:no-preference){#game #world #map-button,#game #world #stick{transition:opacity .16s ease-out}}
/* The immersive map has its own viewport below the location bar. */
#game #world>header{height:calc(52px + env(safe-area-inset-top));min-height:calc(52px + env(safe-area-inset-top));padding-top:calc(6px + env(safe-area-inset-top))}
#game #world #viewport{top:calc(52px + env(safe-area-inset-top));bottom:0}
#game #world #objective{backdrop-filter:none;-webkit-backdrop-filter:none}
#game #world #atlas-minimap{top:10px;right:12px;width:72px;height:78px;min-height:44px;border-radius:12px;opacity:.8}
#game #world[data-field-travel=walk] #atlas-minimap{width:44px;height:48px;opacity:.65}
#game #world[data-minimap=on] #map-button{visibility:hidden}
@media(orientation:landscape) and (max-height:500px){#game #world>header{height:calc(44px + env(safe-area-inset-top));min-height:calc(44px + env(safe-area-inset-top))}#game #world #viewport{top:calc(44px + env(safe-area-inset-top))}}
#game #world[data-field-travel=walk] #objective b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Exploration finish: stable, compact controls; full labels remain available at rest. */
#game #world #quick-nav button{min-height:48px;min-width:48px}
#game #world[data-field-travel=walk] #quick-nav button{background:#163d48e8;box-shadow:0 2px 4px #09252b30}
#game #world[data-field-travel=walk] #quick-nav{opacity:.72}
#game #world[data-field-travel=walk] #phone-toggle303{opacity:.76}
#game #world #viewport #objective{max-width:calc(100% - 104px);top:10px;padding:8px 10px;background:#153d49eb;color:#fff5df;border-color:#91aaa4;font-size:12px}
#game #world #viewport #objective b{color:#fff5df!important;font-size:12px!important;line-height:1.4!important}
#game #world #viewport #objective span{color:#bdd3cc!important;font-size:11px!important}
#game #world[data-field-travel=walk] #viewport #objective{max-width:calc(100% - 72px);opacity:.82}
#game #world #viewport #atlas-minimap{overflow:hidden}
#game #world[data-field-travel=walk] #atlas-minimap #guide-map{width:28px;height:32px}
@media(prefers-reduced-motion:no-preference){#game #world #quick-nav,#game #world #phone-toggle303,#game #world #objective{transition:opacity .16s ease-out}}
@media(orientation:landscape) and (max-height:500px){#game #world #viewport #objective{max-width:300px;top:8px}}

#game #world #viewport #atlas-minimap{width:76px!important;height:82px!important;padding:5px!important;top:10px!important;right:10px!important}
#game #world #viewport #atlas-minimap #guide-map{width:62px!important;height:70px!important}
#game #world[data-field-travel=walk] #viewport #atlas-minimap{width:44px!important;height:48px!important}
#game #world[data-field-travel=walk] #viewport #atlas-minimap #guide-map{width:30px!important;height:34px!important}

/* league-277.css */
.hall-team277{padding:16px;border:1px solid var(--ui-border);background:linear-gradient(140deg,var(--ui-card),var(--ui-panel));border-radius:18px;margin:12px 0}.hall-team277>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}.hall-team277 article{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;min-width:0}.hall-team277 img{width:80px;height:80px;max-width:100%;object-fit:contain}.hall-team277 strong{font-size:12px;overflow-wrap:anywhere}.hall-team277 span,.hall-team277 small{font-size:11px;color:var(--ui-muted)}
#sheet.evolution-hd277 .evolution-pair img{image-rendering:auto!important;object-fit:contain;filter:drop-shadow(0 8px 12px #061e3a50)}
.heal-orbs277{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%);z-index:80;display:flex;gap:8px;pointer-events:none;animation:heal-end277 1.3s both}.heal-orbs277 i{width:18px;height:18px;border:2px solid #fff7cf;border-radius:50%;background:linear-gradient(#f28575 45%,#163f4c 46%,#163f4c 54%,#fff6dc 55%);box-shadow:0 0 12px #8ff4dc;animation:heal-light277 .55s calc(var(--orb)*.08s) 2 alternate}@keyframes heal-light277{to{transform:translateY(-8px);filter:brightness(1.5)}}@keyframes heal-end277{0%,85%{opacity:1}100%{opacity:0}}@media(prefers-reduced-motion:reduce){.heal-orbs277{display:none}.heal-orbs277 i{animation:none}}
.post-portrait278{width:180px;height:180px;max-width:65vw;object-fit:contain;image-rendering:auto!important}
#sheet .atlas-pin.main{background:#ffe294;color:#17333d;border:2px solid #17333d;font-weight:900;box-shadow:0 0 0 2px #fff5d7}

/* beta-finish-280.css */
/* Keep real Shiny colours and smooth HD portraits throughout the menus. */
#game img[data-hd-portrait280=yes]{image-rendering:auto!important;filter:none!important;object-fit:contain}
#game #battle #battle-field #ally-sprite[data-hd-facing280=front]{scale:-1 1!important;image-rendering:auto!important}
#game #battle #battle-field .battle-feature280{position:absolute;z-index:3;pointer-events:none;scale:1;contain:layout style}
#game #battle #battle-field .battle-feature280[data-facing=front]{scale:-1 1}
.battle-feature280 .feature-art280{position:absolute;display:block;pointer-events:none}
.battle-feature280 .feature-art280>img{display:block;width:100%;height:100%;image-rendering:auto;object-fit:fill}
.battle-feature280 .feature-art280.fire>img{animation:living-flame280 .46s ease-in-out infinite alternate}
.battle-feature280 .feature-art280.feather>img{animation:living-feather280 1.8s ease-in-out infinite alternate}
.fire-core280{position:absolute;left:var(--flame-x);top:var(--flame-y);width:7%;height:14%;border-radius:60% 35% 65% 40%;background:radial-gradient(ellipse at 50% 80%,#fff5ba 0,#ffe67a 35%,#ffb33699 65%,#ff742500 78%);transform:translate(-50%,-35%);mix-blend-mode:screen;animation:flame-core280 .38s ease-in-out infinite alternate}
.fire-ember280{position:absolute;left:var(--flame-x);top:calc(var(--flame-y) - 10%);width:2px;height:4px;border-radius:60%;background:#ffe39c;animation:fire-ember280 1.1s ease-out infinite}
@keyframes living-flame280{0%{transform:scale(.95,.91) skewX(-3deg);opacity:.9}45%{transform:scale(1.04,1.11) skewX(2deg);opacity:1}100%{transform:scale(.99,1.18) skewX(-1deg);opacity:.96}}
@keyframes flame-core280{from{transform:translate(-50%,-30%) scale(.8,.9);opacity:.6}to{transform:translate(-50%,-42%) scale(1.12,1.2);opacity:1}}
@keyframes fire-ember280{0%{transform:translate(0,0);opacity:0}20%{opacity:.9}100%{transform:translate(3px,-12px) scale(.3);opacity:0}}
@keyframes living-feather280{from{transform:rotate(-2deg) skewX(-1deg)}to{transform:rotate(2deg) skewX(1deg)}}
.journey-progress280{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}.journey-progress280>div{display:grid;gap:6px;text-align:center;padding:14px 6px;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-panel)}.journey-progress280 strong{font:800 24px/1.2 system-ui;color:var(--ui-accent)}.journey-progress280 span{font:650 11px/1.3 system-ui;color:var(--ui-muted)}
#game #sheet .premium-speaker img{aspect-ratio:8/9;height:auto;image-rendering:auto!important;object-fit:cover}
#game #sheet.premium-dialogue .premium-speaker small{overflow-wrap:normal;word-break:normal;hyphens:auto;letter-spacing:.04em}
#game #sheet.storage-screen273 .storage-row img{image-rendering:auto!important}
#game #sheet.storage-screen273 .page-controls button{padding-inline:8px;overflow-wrap:normal;word-break:normal}
#boot-feedback261 [hidden]{display:none!important}
#game[data-ui-motion=off] .battle-feature280{display:none!important}
@media(prefers-reduced-motion:reduce){#game #battle-field[data-idle260=no] .battle-feature280{display:none!important}}

/* Feature images overlap in their original box; both wings keep one outer handle. */
.battle-feature280 .feature-art280>img.detail-part281{position:absolute;inset:0}
.battle-feature280 .feature-art280.wing>img{animation:detail-wing281 1.3s ease-in-out infinite alternate}
.battle-feature280 .feature-art280.ear>img{animation:detail-ear281 2.3s ease-in-out infinite alternate}
.battle-feature280 .feature-art280.leaf>img,.battle-feature280 .feature-art280.tail>img,.battle-feature280 .feature-art280.fin>img{animation:detail-sway281 2.1s ease-in-out infinite alternate}
.battle-feature280 .feature-art280.soft>img{animation:detail-soft281 2.2s ease-in-out infinite alternate}
.battle-feature280 .feature-art280>img.part-1{animation-direction:alternate-reverse;animation-delay:-.35s}
@keyframes detail-wing281{from{transform:rotate(-1deg) scaleX(.985)}to{transform:rotate(1.5deg) scaleX(1.015)}}
@keyframes detail-ear281{0%,65%{transform:rotate(-.5deg)}85%,100%{transform:rotate(1.5deg)}}
@keyframes detail-sway281{from{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg)}}
@keyframes detail-soft281{from{transform:translateY(0) scale(1)}to{transform:translateY(-.6px) scale(1.015)}}
.device-results281{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}.device-results281>div{display:grid;gap:5px;padding:12px 5px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:12px;text-align:center}.device-results281 strong{font:800 21px system-ui;color:var(--ui-accent)}.device-results281 span{font:600 10px/1.4 system-ui;color:var(--ui-muted)}#device-report281{width:100%;min-height:150px;box-sizing:border-box;resize:vertical;background:var(--ui-panel);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:10px;padding:10px;font:12px/1.4 ui-monospace,monospace}

/* next-level-283.css */
/* Isolated capture presentation: no inherited 28px legacy-ball rules. */
#capture-moment.legacy-capture283{position:absolute;inset:0;overflow:hidden;contain:layout paint;pointer-events:none;z-index:14;--orb-size:44px}
.legacy-capture283 .capture-vignette283{position:absolute;inset:0;background:radial-gradient(ellipse at 65% 38%,#c9f2e300 25%,#09293666 100%);animation:veil283 var(--catch-duration) both}
.capture-orbit283{position:absolute;left:0;top:0;width:44px;height:44px;margin:-22px;transform-origin:50% 80%;animation:flight283 var(--catch-duration) cubic-bezier(.35,.1,.4,1) both}
.legacy-ball283{width:44px;height:44px;position:relative;isolation:isolate;border-radius:50%;background:#1c2e3e;box-shadow:0 4px 7px #09243466,inset 0 0 0 1px #eefff8;transform-style:preserve-3d}
.ball-top283{position:absolute;inset:1px 1px 49%;z-index:4;border-radius:40px 40px 3px 3px;background:radial-gradient(ellipse at 28% 21%,#fff9dc 0 3%,#ffffff77 8%,#ffb59d33 23%,transparent 40%),linear-gradient(125deg,#ff9b79,#ed5353 48%,#9d233e);border:1px solid #573c48;border-bottom:3px solid #192e3b;transform-origin:85% 100%;animation:lid283 var(--catch-duration) both}
.ball-top283 i{position:absolute;left:5px;top:4px;right:8px;height:7px;border-top:1px solid #ffcfad;border-radius:50%;opacity:.9}.ball-top283 b{position:absolute;right:3px;top:8px;width:3px;height:5px;border-radius:40%;background:#a42b3d88}
.ball-bottom283{position:absolute;inset:50% 1px 1px;border:1px solid #a5b9bd;border-radius:1px 1px 40px 40px;background:radial-gradient(ellipse at 33% 12%,#fffdf4 20%,#e8eee8 52%,#94b3bf 100%)}
.ball-inside283{position:absolute;inset:7px 3px 30%;border-radius:50%;background:radial-gradient(ellipse,#fff 8%,#f6ffba 24%,#88efde 52%,#203b57 70%);animation:core283 var(--catch-duration) both;z-index:2}
.ball-band283{position:absolute;left:1px;right:1px;top:45%;height:6px;background:linear-gradient(#40505c,#112a39 45%,#60727b);z-index:3}
.ball-button283{position:absolute;width:15px;height:15px;left:14px;top:15px;z-index:6;border:3px solid #243a48;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff,#d2e7e6 55%,#759caa);box-shadow:0 1px 1px #102b3880;animation:latch283 var(--catch-duration) both}.ball-button283 i{position:absolute;inset:2px;border:1px solid #94b7bd;border-radius:50%}
.capture-beam283{position:absolute;left:var(--orb-x);top:var(--orb-hit);width:90px;height:110px;margin:-55px -45px;background:radial-gradient(ellipse,#f7ffdc99,#9ef4e333 45%,transparent 70%);border-radius:50%;animation:beam283 var(--catch-duration) both;transform-origin:50% 10%}
.capture-shock283{position:absolute;left:var(--orb-x);top:var(--orb-hit);width:90px;height:90px;margin:-45px;border:2px solid #efffdc;border-radius:50%;box-shadow:0 0 15px #e4ffb533;animation:shock283 var(--catch-duration) both}
.capture-trail283{position:absolute;left:var(--orb-arcX);top:var(--orb-arcY);width:65px;height:6px;border-radius:50%;background:linear-gradient(90deg,transparent,#fff0ac);transform:rotate(-24deg);animation:trail283 var(--catch-duration) both}
.capture-floor283{position:absolute;left:var(--orb-x);top:var(--orb-floor);margin:15px -24px;width:48px;height:11px;border-radius:50%;background:#102e4066;animation:floor283 var(--catch-duration) both}
.capture-seal283{position:absolute;left:var(--orb-x);top:var(--orb-floor);margin:-35px -30px;width:60px;text-align:center;font:38px system-ui;color:#ffe4a2;text-shadow:0 0 12px #ffe9b288;animation:seal283 var(--catch-duration) both}
.capture-dust283{position:absolute;left:var(--orb-x);top:var(--orb-floor)}.capture-dust283 i{position:absolute;width:5px;height:5px;border-radius:1px;background:#ffebad;rotate:45deg;--sx:calc((var(--i) - 2.5)*16px);--sy:calc(-18px - var(--i)*5px);animation:dust283 var(--catch-duration) both}.capture-failed .capture-dust283 i{background:#b7f7f1}.capture-failed .capture-seal283{display:none}
.capture-caption283{position:absolute;left:8%;right:8%;bottom:4%;display:grid;place-items:center;min-height:36px;padding:8px 12px;border:1px solid #d9d59c99;border-radius:14px;background:linear-gradient(110deg,#103849ed,#113846ed);color:#fff0ca;font:700 13px/1.3 system-ui;box-shadow:0 5px 18px #08263044}.capture-caption283>*{grid-area:1/1}.capture-wait283{animation:waiting283 var(--catch-duration) both}.capture-final283{color:#fff1ab;animation:final283 var(--catch-duration) both}
#battle-field.capture283-active.capture-sequence #enemy-sprite{animation:absorb283 var(--catch-duration) ease-in-out both;transform-origin:50% 55%}#battle-field.capture283-active.capture-failed #enemy-sprite{animation-name:escape283}
@keyframes flight283{0%{opacity:0;transform:translate(var(--orb-fromX),var(--orb-fromY)) scale(.6) rotate(-60deg)}3%{opacity:1}15%{transform:translate(var(--orb-arcX),var(--orb-arcY)) scale(1.15) rotate(250deg)}23%{transform:translate(var(--orb-x),var(--orb-hit)) rotate(360deg)}34%{transform:translate(var(--orb-x),var(--orb-hit)) rotate(360deg)}43%{transform:translate(var(--orb-x),var(--orb-floor)) rotate(360deg)}47%{transform:translate(var(--orb-x),calc(var(--orb-floor) - 13px)) rotate(360deg)}50%,62%,75%,88%,100%{opacity:1;transform:translate(var(--orb-x),var(--orb-floor)) rotate(360deg)}54%,67%,80%{transform:translate(calc(var(--orb-x) - 3px),var(--orb-floor)) rotate(339deg)}58%,71%,84%{transform:translate(calc(var(--orb-x) + 3px),var(--orb-floor)) rotate(381deg)}}
@keyframes lid283{0%,20%,35%,85%,100%{translate:0 0;rotate:0deg}25%,30%{translate:-1px -12px;rotate:-34deg}}.capture-failed .ball-top283{animation-name:lid-escape283}.capture-failed .capture-orbit283{animation-name:flight-escape283}
@keyframes flight-escape283{0%{opacity:0;transform:translate(var(--orb-fromX),var(--orb-fromY)) scale(.6)}3%{opacity:1}15%{transform:translate(var(--orb-arcX),var(--orb-arcY)) rotate(220deg)}23%,34%{transform:translate(var(--orb-x),var(--orb-hit)) rotate(360deg)}43%,50%,62%,75%,87%{opacity:1;transform:translate(var(--orb-x),var(--orb-floor)) rotate(360deg)}54%,67%,80%{transform:translate(var(--orb-x),var(--orb-floor)) rotate(338deg)}58%,71%,84%{transform:translate(var(--orb-x),var(--orb-floor)) rotate(382deg)}94%,100%{opacity:0;transform:translate(var(--orb-x),var(--orb-floor)) scale(1.25)}}
@keyframes lid-escape283{0%,20%,35%,85%{translate:0 0;rotate:0deg}25%,30%,90%,100%{translate:-1px -12px;rotate:-34deg}}
@keyframes absorb283{0%,22%{opacity:1;filter:brightness(1);scale:1}26%{filter:brightness(2);scale:1.03}34%,100%{opacity:0;filter:brightness(1.5);scale:.05}}
@keyframes escape283{0%,22%,98%,100%{opacity:1;filter:brightness(1);scale:1}26%{filter:brightness(2)}34%,87%{opacity:0;scale:.05}92%{opacity:.8;filter:brightness(1.8);scale:1.06}}
@keyframes core283{0%,20%,36%,85%,100%{opacity:0}24%,31%{opacity:1}}
@keyframes latch283{0%,49%,62%,75%,88%,100%{box-shadow:0 0 0 #ffe5a200}54%,67%,80%{box-shadow:0 0 9px #ffc45ddd;background:#ffcb77}92%,96%{background:#fff8b4;box-shadow:0 0 14px #ffed9bcc}}
@keyframes beam283{0%,22%,37%,86%,100%{opacity:0;scale:1}26%{opacity:1;scale:1.2}33%{opacity:.8;scale:.15}}
@keyframes shock283{0%,22%,37%,87%,100%{opacity:0;scale:.2}27%{opacity:.8;scale:1}34%{opacity:0;scale:1.65}91%{opacity:.6;scale:1.2}97%{opacity:0;scale:2}}
@keyframes floor283{0%,40%{opacity:0;scale:.4}45%,100%{opacity:1;scale:1}}
@keyframes seal283{0%,88%,100%{opacity:0;translate:0 0;scale:.7}93%,97%{opacity:1;translate:0 -15px;scale:1}}
@keyframes dust283{0%,88%,100%{opacity:0;translate:0 0;scale:.4}92%{opacity:1;translate:var(--sx) var(--sy);scale:1}99%{opacity:0;translate:var(--sx) calc(var(--sy) - 15px)}}
@keyframes trail283{0%,7%,23%,100%{opacity:0}14%{opacity:.75}}
@keyframes waiting283{0%,88%{opacity:1}92%,100%{opacity:0}}@keyframes final283{0%,88%{opacity:0;translate:0 5px}94%,100%{opacity:1;translate:0 0}}@keyframes veil283{0%,100%{opacity:0}15%,90%{opacity:1}}
#impact283{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:12;contain:layout paint}.hit-ring283,.hit-spark283{position:absolute;left:var(--hit-x);top:var(--hit-y);background:var(--hit-color);pointer-events:none}.hit-ring283{width:58px;height:58px;margin:-29px;border:3px solid #fff2d4;border-radius:50%;background:transparent;animation:hit-ring283 var(--hit-ms) ease-out both}.hit-spark283{width:5px;height:14px;margin:-7px -2px;border-radius:50%;rotate:var(--a);transform-origin:2px 7px;animation:hit-spark283 var(--hit-ms) ease-out both}@keyframes hit-ring283{0%{opacity:.9;scale:.2}100%{opacity:0;scale:1.6}}@keyframes hit-spark283{0%{opacity:1;transform:translateY(0) scale(.5)}100%{opacity:0;transform:translateY(-48px) scale(1)}}
.arrival283{position:absolute;z-index:5;display:grid;justify-items:center;gap:6px;pointer-events:none;color:#e1f0cf;font:600 10px system-ui}.arrival283.ally{left:12%;bottom:13%}.arrival283.enemy{right:12%;top:42%}.arrival283[hidden]{display:none}.arrival283 i{width:34px;height:34px;border:2px solid #e5dba7;border-bottom-color:#74b6ad;border-radius:50%;box-shadow:inset 0 0 0 8px #1d4a5755;animation:arrival283 1.4s ease-in-out infinite}.arrival283 span{padding:4px 8px;border-radius:8px;background:#123a4ad9}.sprite-pending283{opacity:0!important}@keyframes arrival283{0%,100%{scale:.88;opacity:.45}50%{scale:1;opacity:1}}
/* Encounters use a compact dialogue card; ordinary menus retain their own shell. */
#game #overlay:has(#sheet.approach-sheet283){align-items:flex-end!important;justify-content:center;padding:12px 0 max(12px,env(safe-area-inset-bottom))!important;background:#071d2929!important;backdrop-filter:none!important}
#game #overlay #sheet.approach-sheet283{width:calc(100% - 24px);max-width:480px;height:auto!important;min-height:0!important;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:0;border:1px solid #cbd5cb;border-radius:22px;background:#f7f3e8!important;color:#213e49!important;box-shadow:0 8px 28px #0b273b33;overflow:auto;animation:approach-enter308 .16s ease-out}
#game #overlay #sheet.approach-sheet283>.rpg-head,#game #overlay #sheet.approach-sheet283>.rpg-footer,#game #overlay #sheet.approach-sheet283>.sheet-head{display:none!important}
#game #overlay #sheet.approach-sheet283>.rpg-body{padding:0!important;overflow:visible;background:none!important;max-height:none}
#game #overlay #sheet.approach-sheet283 .approach-card283{position:relative;padding:20px;text-align:left}
.approach-identity308{display:flex;align-items:center;gap:14px;padding-right:34px}.approach-identity308>img,.approach-avatar308{width:66px;height:76px;flex:0 0 66px;object-fit:cover;object-position:center 25%;border-radius:16px;background:#d7e3df;border:1px solid #becfc8}.approach-avatar308{display:grid;place-items:center;color:#527578}.approach-avatar308 svg{width:32px;height:40px}
#game #overlay #sheet.approach-sheet283 .approach-identity308 small{display:block;font:750 9px/1.4 system-ui;letter-spacing:.09em;color:#527772!important;margin-bottom:5px}
#game #overlay #sheet.approach-sheet283 .approach-identity308 h3{font:800 19px/1.2 system-ui;color:#203e48!important;margin:0;overflow-wrap:anywhere}
#game #overlay #sheet.approach-sheet283 .approach-card283>p{font:500 16px/1.5 system-ui;color:#3e5962!important;margin:17px 0 20px}
#game #overlay #sheet.approach-sheet283 .approach-dismiss308{position:absolute;right:9px;top:9px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:50%;box-shadow:none;background:transparent!important;color:#607b7d!important;font:400 29px/1 system-ui}
.approach-actions308{display:grid;grid-template-columns:1.2fr 1fr;gap:10px}
#game #overlay #sheet.approach-sheet283 .approach-actions308>button{min-width:44px;min-height:48px;margin:0;padding:12px;border:1px solid #bbceca;border-radius:13px;background:transparent!important;color:#315760!important;font:750 14px/1.25 system-ui;box-shadow:none}
#game #overlay #sheet.approach-sheet283 .approach-actions308>.primary{display:flex;justify-content:space-between;align-items:center;background:#236871!important;color:#fffaf0!important;border-color:#236871}
#game #overlay #sheet.approach-sheet283 button:focus-visible{outline:3px solid #d5a34a;outline-offset:2px}
@keyframes approach-enter308{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#game #overlay #sheet.approach-sheet283{animation:none}}
@media(orientation:landscape) and (max-height:500px){#game #overlay #sheet.approach-sheet283{max-width:540px}#game #overlay #sheet.approach-sheet283 .approach-card283{padding:14px 18px}.approach-identity308>img,.approach-avatar308{width:52px;height:58px;flex-basis:52px}#game #overlay #sheet.approach-sheet283 .approach-card283>p{margin:10px 0 12px}}

#capture-moment.catch-reduced .capture-orbit283{animation:none;opacity:1;transform:translate(var(--orb-x),var(--orb-floor))}#capture-moment.catch-reduced .legacy-ball283 *{animation:none}#capture-moment.catch-reduced .capture-final283{animation:none;opacity:1}#capture-moment.catch-reduced .capture-wait283,#capture-moment.catch-reduced .capture-beam283,#capture-moment.catch-reduced .capture-shock283,#capture-moment.catch-reduced .capture-dust283,#capture-moment.catch-reduced .capture-trail283,#capture-moment.catch-reduced .capture-vignette283,#capture-moment.catch-reduced .capture-seal283{display:none}
@media(prefers-reduced-motion:reduce){.arrival283 i{animation:none}.capture283-active #enemy-sprite{animation:none!important}.legacy-capture283 *{animation:none!important}.capture-orbit283{opacity:1;transform:translate(var(--orb-x),var(--orb-floor))}.capture-final283{opacity:1}.capture-wait283,.capture-beam283,.capture-shock283,.capture-dust283,.capture-trail283,.capture-vignette283,.capture-seal283{display:none}}

#battle-field.capture283-static.capture-sequence #enemy-sprite{animation:none!important;filter:none}#game[data-ui-motion=off] .arrival283 i{animation:none}
#battle-field .kind-flame .cinema-shot{background:radial-gradient(ellipse at 30% 35%,#fff8b8,#ffc646 32%,#f27335 64%,#cf3c3d 90%);box-shadow:0 0 9px #ffd76b55,inset 2px 1px 3px #fff5bc77;border-radius:65% 35% 60% 40%}
#battle-field .kind-water .cinema-shot{background:radial-gradient(circle at 30% 20%,#f0fff9 0 7%,#a7e9ed 18%,#42b5d8 60%,#2c72ad);border:1px solid #d4f8f0aa;box-shadow:0 2px 6px #236d9d44,inset 0 -3px 5px #205e9655}
#battle-field .kind-shards .cinema-shot{border:1px solid #fff1c988;box-shadow:inset 2px 1px 1px #fff6c455,0 3px 5px #153d4a33}
#battle-field .kind-pulse .cinema-shot{background:radial-gradient(circle,#fff7d9,var(--tone) 48%,transparent 75%);box-shadow:none}

#game #overlay #sheet.approach-sheet283 .approach-meta308{display:block;margin:-8px 0 16px;color:#527772!important;font:650 12px/1.4 system-ui}

/* battle-presence-284.css */
/* Species-aware boxes and contact shadows share one ground anchor. */
#game #battle #battle-field #ally-sprite[data-presence284]{left:var(--ally-left284)!important;right:auto!important;top:auto!important;bottom:var(--ally-bottom284)!important;width:var(--ally-size284)!important;height:var(--ally-size284)!important;max-height:none!important;object-fit:contain;object-position:50% 100%;transform-origin:50% 95%;filter:drop-shadow(1px 3px 1px #173a3d33)!important}
#game #battle #battle-field #enemy-sprite[data-presence284]{left:var(--enemy-left284)!important;right:auto!important;top:auto!important;bottom:var(--enemy-bottom284)!important;width:var(--enemy-size284)!important;height:var(--enemy-size284)!important;max-height:none!important;object-fit:contain;object-position:50% 100%;transform-origin:50% 95%;filter:drop-shadow(1px 2px 1px #173a3d33)!important}
#game #battle #battle-field[data-living-habitat] :is(.ally-base,.enemy-base){display:block!important;top:auto!important;border:0!important;border-radius:50%;transform:none!important;box-shadow:none!important;pointer-events:none;background:radial-gradient(ellipse,#142f3b60 0,#183f3d30 38%,#153b3c0d 65%,transparent 76%)!important;z-index:1}
#game #battle #battle-field[data-living-habitat] .ally-base{left:var(--ally-shadowX284)!important;bottom:var(--ally-shadowY284)!important;width:var(--ally-shadowW284)!important;height:var(--ally-shadowH284)!important}
#game #battle #battle-field[data-living-habitat] .enemy-base{left:var(--enemy-shadowX284)!important;right:auto!important;bottom:var(--enemy-shadowY284)!important;width:var(--enemy-shadowW284)!important;height:var(--enemy-shadowH284)!important}
#game #battle #battle-field[data-living-habitat=town]{background-image:url('assets/battle/style-b316-town.webp')}
#game #battle #battle-field[data-living-habitat=forest]{background-image:url('assets/battle/style-b316-forest.webp')}
#game #battle #battle-field[data-living-habitat=cave]{background-image:url('assets/battle/style-b316-cave.webp')}
#game #battle #battle-field[data-living-habitat=water]{background-image:url('assets/battle/style-b316-coast.webp')}
#game #battle #battle-field[data-living-habitat=mountain]{background-image:url('assets/battle/style-b316-mountain.webp')}
#game #battle #battle-field[data-living-habitat=haunted]{background-image:url('assets/battle/style-b316-haunted.webp')}
#game #battle #battle-field[data-living-habitat=gym]{background-image:url('assets/battle/style-b316-gym.webp')}
#game #battle #battle-field[data-living-habitat=snow]{background-image:url('assets/battle/style-b316-snow.webp')}
#game #battle #battle-field[data-living-habitat]{background-size:cover;background-position:center 60%;background-repeat:no-repeat}
/* A brief eyelid, colour-matched to verified normal front poses. */
.eyelid284{position:absolute;display:block;border-radius:52%;background:var(--lid-color284);opacity:0;transform-origin:50% 50%;animation:blink284 5.2s ease-in-out var(--blink-delay284,0s) infinite;pointer-events:none}
.eyelid284:after{content:'';position:absolute;left:7%;right:7%;top:52%;height:10%;background:#263d44;border-radius:50%}
@keyframes blink284{0%,92%,98%,100%{opacity:0;transform:scaleY(.05)}93%,96%{opacity:1;transform:scaleY(1)}94.5%{opacity:1;transform:scaleY(1.03)}}
#game #battle #battle-field .idle-light259{display:none!important}
#game #battle #battle-field.presence-action284 .battle-sprite{animation:none!important}
.attack284{position:absolute;inset:0;pointer-events:none;--attack-ms284:470ms}
#battle-field .attack284{--attack-ms284:inherit}
.attack284 :is(.ribbon284,.ribbon-core284){position:absolute;left:var(--sx);top:var(--sy);width:var(--ray);height:12px;margin-top:-6px;rotate:var(--angle);transform-origin:0 50%;border-radius:45%;background:linear-gradient(0deg,#2577b9,#66d5ef 30%,#e4fffa 52%,#59c9e2 75%,#287eac);animation:ribbon284 var(--attack-ms284,470ms) ease-out both}
.attack284 .ribbon-core284{height:3px;margin-top:-1.5px;background:#f0ffedcc;animation-delay:15ms}
.attack-blaze .ribbon284{height:26px;margin-top:-13px;background:linear-gradient(0deg,#e75232,#ffb03e 30%,#fff3a9 50%,#ffc14a 65%,#e95f35);clip-path:polygon(0 43%,13% 20%,26% 32%,43% 0,58% 25%,75% 10%,100% 50%,78% 95%,60% 73%,43% 100%,25% 72%,10% 80%,0 58%)}
.attack-blaze .ribbon-core284{background:#fff1a4;height:7px;margin-top:-3.5px}
.attack-torrent .ribbon284{height:30px;margin-top:-15px}.attack-torrent .ribbon-core284{height:8px;margin-top:-4px}
@keyframes ribbon284{0%,12%{opacity:0;transform:scaleX(.03) scaleY(.45)}26%{opacity:.95;transform:scaleX(.35) scaleY(.8)}72%{opacity:1;transform:scaleX(1) scaleY(1)}100%{opacity:0;transform:scaleX(1) scaleY(.4)}}
.piece284{position:absolute;left:0;top:0;width:17px;height:17px;margin:-8px;border-radius:50%;opacity:0;background:radial-gradient(circle,#fff3c7,var(--tone));animation:piece284 var(--attack-ms284,470ms) ease-in calc(var(--i)*12ms) both}
.attack-embers .piece284{width:18px;height:12px;border-radius:70% 20% 60% 40%;background:radial-gradient(ellipse at 65% 40%,#fff7b0 5%,#ffc246 35%,#e76835 72%,#c94434);box-shadow:0 0 4px #ffc45033}
.attack-bubbles .piece284{width:20px;height:20px;border:1.5px solid #d1fff7;background:radial-gradient(circle at 30% 25%,#fff 0 7%,#a8eff04d 15%,#5ac0e555 60%,#93e4ea88 80%,#e4fff2);box-shadow:inset -2px -2px #75cee788}
.attack-leaves .piece284{width:20px;height:11px;border-radius:90% 0 90% 0;background:linear-gradient(150deg,#c7ef85,#61b45b 45%,#daf4a5 50%,#3a8b59 58%)}
.attack-shards .piece284{border-radius:0;clip-path:polygon(50% 0,100% 30%,75% 100%,0 75%);background:linear-gradient(135deg,#e2d7b5,var(--tone) 45%,#576b75)}
.attack-pulse .piece284{background:radial-gradient(circle,#fff1cb,var(--tone) 30%,transparent 70%);width:30px;height:30px}
@keyframes piece284{0%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.45) rotate(var(--angle))}15%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(var(--tx),calc(var(--ty) + (var(--i) - 1.5)*5px)) scale(1.1) rotate(calc(var(--angle) + 35deg))}}
.lightning284{position:absolute;left:var(--sx);top:calc(var(--sy) - 16px);width:var(--ray);height:32px;rotate:var(--angle);transform-origin:0 50%;overflow:visible;animation:lightning284 var(--attack-ms284,470ms) steps(1) both}.lightning284 path{fill:none;stroke:#ffe98d;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.lightning284 path+path{stroke:#fff8d5;stroke-width:1.4}
@keyframes lightning284{0%,100%{opacity:0}24%,46%,72%{opacity:1}36%,59%,87%{opacity:.15}}
.slash284{position:absolute;left:var(--tx);top:var(--ty);width:55px;height:4px;margin:-2px -28px;border-radius:50%;background:#fff6ca;box-shadow:0 2px var(--tone);rotate:-42deg;translate:calc(var(--i)*7px) calc(var(--i)*7px);animation:slash284 var(--attack-ms284,470ms) ease-out calc(var(--i)*18ms) both}@keyframes slash284{0%,26%{opacity:0;transform:scaleX(.05)}58%{opacity:1;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1.15)}}
.fang284{position:absolute;left:var(--tx);top:var(--ty);width:55px;height:22px;margin:-28px -28px;background:linear-gradient(#fffce4,#d2e5dc);clip-path:polygon(0 0,100% 0,100% 45%,83% 100%,65% 40%,50% 100%,32% 40%,16% 100%,0 45%);animation:fang284 var(--attack-ms284,470ms) ease-out both}.lower284{scale:1 -1;margin-top:9px;--jaw284:-10px}.upper284{--jaw284:10px}@keyframes fang284{0%,15%{opacity:0;transform:translateY(0)}35%{opacity:1}70%{opacity:1;transform:translateY(var(--jaw284))}100%{opacity:0;transform:translateY(var(--jaw284))}}
.speed284{position:absolute;left:var(--sx);top:var(--sy);height:2px;width:45px;border-radius:50%;background:linear-gradient(90deg,transparent,#f1edc6aa);rotate:var(--angle);animation:speed284 var(--attack-ms284,470ms) both}.second284{margin-top:9px;width:33px;animation-delay:25ms}@keyframes speed284{0%,15%,100%{opacity:0;transform:translateX(0) scaleX(.2)}45%{opacity:.7;transform:translateX(25px) scaleX(1)}}
#game[data-performance=battery] #battle-field :is(.attack284,.eyelid284){display:none!important}
#game[data-performance=battery] #battle-field .battle-sprite[data-presence284]{filter:none!important}
#game[data-ui-motion=off] #battle-field :is(.attack284,.eyelid284){display:none!important}
@media(prefers-reduced-motion:reduce){#battle-field .attack284{display:none!important}#battle-field[data-idle260=no] .eyelid284{display:none!important}}

/* Native poses own these beats, so a legacy CSS animation cannot restart afterwards. */
#game #battle #battle-field:is(.cinema-hit,.cinema-lunge) .battle-sprite,#game #battle #battle-field[data-cinema-result=win] #ally-sprite{animation:none!important}

#game #battle #battle-field[data-art316]{background-image:var(--stage-art316)!important;background-size:cover;background-position:center 30%;background-repeat:no-repeat}

/* world-presence-285.css */
/* Non-blocking world beats leave joystick, actions and dialogue ownership intact. */
#encounter-intro285{position:absolute;left:6%;right:6%;top:35%;z-index:30;display:flex;align-items:center;gap:14px;box-sizing:border-box;padding:16px;border:1px solid #c9ddbd;border-left:4px solid #f4d27c;border-radius:19px;background:linear-gradient(120deg,#153c4bf5,#225761f5);box-shadow:0 12px 30px #12333c44;pointer-events:none;color:#fff3cf;animation:intro285 .76s ease-in-out both}
#encounter-intro285 .intro-art285{width:76px;height:86px;flex:none;overflow:hidden;border-radius:14px;background:linear-gradient(135deg,#8dc5b47d,#244c5966);border:1px solid #a2c2ae66;display:grid;place-items:center}
#encounter-intro285 img{width:100%;height:100%;object-fit:contain;image-rendering:auto!important;filter:none!important}
#encounter-intro285 strong{display:block;font:800 clamp(18px,5vw,27px)/1.15 system-ui;margin:8px 0;overflow-wrap:anywhere}
#encounter-intro285 small{display:block;font:800 9px/1.4 system-ui;letter-spacing:.12em;color:#eacb82}
#encounter-intro285 span{font:500 12px/1.4 system-ui;color:#d3e6d5}
#encounter-intro285.legend285{border-left-color:#bba5f1;background:linear-gradient(120deg,#233f58f5,#3f5272f5)}
@keyframes intro285{0%{opacity:0;transform:translateY(9px) scale(.97)}22%,82%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-5px)}}
#zone-reveal285{position:absolute;inset:0;z-index:10;pointer-events:none;background:radial-gradient(ellipse at 50% 55%,transparent 35%,#102e3a55);animation:zone285 .32s ease-out both}#zone-reveal285 i{position:absolute;inset:0;background:#f5e9bb;animation:zone-light285 .32s both}@keyframes zone285{from{opacity:.7}to{opacity:0}}@keyframes zone-light285{from{opacity:.15}to{opacity:0}}
#badge-moment285{position:absolute;left:7%;right:7%;top:25%;z-index:29;pointer-events:none;display:flex;gap:14px;align-items:center;padding:18px;box-sizing:border-box;border:1px solid #f1d48a;border-radius:20px;background:linear-gradient(125deg,#194855f5,#173749f5);box-shadow:0 10px 28px #143a4844;color:#fff1c1}
#badge-moment285 strong{display:block;font:800 clamp(19px,5vw,26px)/1.2 system-ui;margin:6px 0}#badge-moment285 small{font:750 8px/1.5 system-ui;letter-spacing:.12em;color:#b7d9c7}#badge-moment285 div>span{font:500 12px/1.4 system-ui;color:#cfe3d2}
.badge-emblem285{position:relative;display:grid;place-items:center;width:66px;height:72px;flex:none}.badge-emblem285 i{position:absolute;inset:5px 2px;background:linear-gradient(135deg,#fff0ad,#edbc68 50%,#b77b46);clip-path:polygon(50% 0,95% 24%,85% 75%,50% 100%,15% 75%,5% 24%);box-shadow:inset 0 0 0 5px #f9e7b477}.badge-emblem285 b{position:relative;font:40px/1 system-ui;color:#244d5b;text-shadow:0 1px #fff2b6}
.badge-motion285{animation:badge285 4.8s ease-in-out both}.badge-motion285 .badge-emblem285{animation:emblem285 .85s ease-out both}@keyframes badge285{0%{opacity:0;transform:translateY(10px)}8%,90%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-4px)}}@keyframes emblem285{0%{transform:rotate(-15deg) scale(.7)}65%{transform:rotate(4deg) scale(1.05)}100%{transform:rotate(0) scale(1)}}
#game #sheet.evolution285 .evolution-stage{position:relative;isolation:isolate;gap:14px;padding:20px 12px;text-align:center;max-width:440px;margin-inline:auto;overflow:hidden;border:1px solid #9cbfb655;border-radius:22px;background:radial-gradient(ellipse at 50% 31%,#467b7966,transparent 65%),linear-gradient(150deg,#173b4a,#224f58);box-sizing:border-box}
.evolution-kicker285{position:relative;z-index:2;font:750 9px/1.4 system-ui!important;letter-spacing:.12em;color:#e5c981!important}
#game #sheet.evolution285 .evolution-pair{position:relative;z-index:2;width:min(230px,62vw);height:auto;aspect-ratio:1;border:0;border-radius:50%;overflow:visible;background:radial-gradient(ellipse at 50% 85%,#a5e1c844,transparent 50%)}
#game #sheet.evolution285 .evolution-pair img{image-rendering:auto!important;filter:none;object-fit:contain}
#game #sheet.evolution285 .evo-before{animation:evolution-before285 2.2s ease-in-out both}#game #sheet.evolution285 .evo-after{animation:evolution-after285 2.2s ease-in-out both}
@keyframes evolution-before285{0%,22%{opacity:1;transform:scale(1)}48%{opacity:.85;transform:scale(.84)}65%,100%{opacity:0;transform:scale(.65)}}@keyframes evolution-after285{0%,51%{opacity:0;transform:scale(.65)}72%{opacity:1;transform:scale(1.06)}100%{opacity:1;transform:scale(1)}}
.evolution-orbit285{position:absolute;left:50%;top:58px;width:min(250px,68vw);height:min(250px,68vw);margin-left:calc(min(250px,68vw)/-2);pointer-events:none;z-index:1}
.evolution-orbit285>i{position:absolute;inset:7%;border:1px solid #f0df9b99;border-radius:50%;transform:rotateX(56deg) rotate(-18deg);animation:evolution-ring285 2.2s ease-in-out both}.evolution-orbit285>i+i{inset:0;border-color:#b5e5d588;transform:rotateX(55deg) rotate(28deg);animation-delay:60ms}
.evolution-orbit285>b{position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:1px;background:#ffe29a;--angle285:calc(var(--i)*60deg);transform:rotate(var(--angle285)) translateX(100px);animation:evolution-spark285 2.2s ease-out both}
@keyframes evolution-ring285{0%{opacity:0;scale:.5}45%,70%{opacity:1;scale:1.12}100%{opacity:.3;scale:1}}@keyframes evolution-spark285{0%,20%{opacity:0;rotate:0deg;scale:.4}55%{opacity:.9;rotate:35deg;scale:1}100%{opacity:0;rotate:75deg;scale:1.15}}
#game #sheet.evolution285 .evolution-stage h3{position:relative;z-index:2;font:800 22px/1.25 system-ui;color:#fff1c4;margin:0;text-align:center}#game #sheet.evolution285 .evolution-stats256{position:relative;z-index:2}#game #sheet.evolution285 #evo-done{position:relative;z-index:2;width:100%;max-width:320px;min-height:48px;text-align:center;border-radius:13px;background:linear-gradient(#f6d784,#dfb85f);color:#254a52;border:1px solid #fff1b8}
#game #sheet.evolution285[data-motion285=off] .evo-before{animation:none!important;opacity:0}#game #sheet.evolution285[data-motion285=off] .evo-after{animation:none!important;opacity:1}#game #sheet.evolution285[data-motion285=off] .evolution-orbit285{display:none}
@media(max-height:650px){#game #sheet.evolution285 .evolution-stage{gap:9px;padding:14px 10px}#game #sheet.evolution285 .evolution-pair{width:145px}.evolution-orbit285{width:155px;height:155px;top:48px;margin-left:-77.5px}#badge-moment285{top:15%;padding:12px}#encounter-intro285{top:28%;padding:12px}}
@media(prefers-reduced-motion:reduce){#encounter-intro285,#zone-reveal285,.badge-motion285,.badge-motion285 *{animation:none!important}#game #sheet.evolution285 .evo-before{opacity:0;animation:none!important}#game #sheet.evolution285 .evo-after{opacity:1;animation:none!important}.evolution-orbit285{display:none}}

/* phone-weather-303.css */
/* Compact permanent field shortcut; the phone reuses the single paused game panel. */
#game #world>header>div:first-child{min-width:0;flex:1}#game #world>header #location{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#game #world>#phone-toggle303{position:absolute;left:auto;right:230px;bottom:calc(14px + env(safe-area-inset-bottom));transform:none;z-index:5;width:48px;height:58px;min-height:44px;min-width:44px;margin:0;padding:6px;display:flex;pointer-events:auto;touch-action:manipulation;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#163c50;border:1px solid #a0d9d2;border-radius:13px;color:#e2f9ed;box-shadow:0 3px 10px #071f3b50}#game #world>#phone-toggle303:active{transform:scale(.96)}
#phone-toggle303 svg{width:23px;height:23px}#phone-field-time303{font:750 9px/1 system-ui;white-space:nowrap}
#game #overlay #sheet.phone-sheet303{width:min(100%,440px);max-width:440px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));background:linear-gradient(155deg,#143b60,#263c67 55%,#4b4767);color:#edf5e9;border:1px solid #6d9da6;border-radius:30px}.phone-sheet303 .rpg-body{overflow-y:auto;overscroll-behavior:contain}
.phone-tabs303,.phone-topics303{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 16px}.phone-tabs303 button,.phone-topics303 button{min-height:44px;min-width:44px;padding:6px 3px!important;font:700 11px system-ui!important;background:#1c3d4b!important;color:#e4f2e8!important;border:1px solid #527877!important;border-radius:10px!important}.phone-tabs303 button[aria-pressed=true],.phone-topics303 button[aria-pressed=true]{border-color:#9ce6ce!important;background:#28544f!important}
.phone-clock303{text-align:center;padding:12px 8px 24px}.phone-clock303>time{font:350 clamp(42px,12vw,68px)/1 system-ui;letter-spacing:-.04em}.phone-clock303 p{font:650 14px/1.5 system-ui;margin:10px 0 3px}.phone-clock303>small{color:#a7c5c4;font:500 11px system-ui}
.phone-weather303{display:flex;align-items:center;gap:12px;margin:9px 0;padding:15px 12px;border-radius:16px;border:1px solid #547879;background:#1a3b49}.phone-weather303>svg{width:36px;height:36px;flex:0 0 36px;color:#a8e1cf}.phone-weather303>div{flex:1;min-width:0}.phone-weather303 small{font:700 9px/1.4 system-ui;letter-spacing:.08em;color:#abc8c5}.phone-weather303 strong{display:block;font:750 19px/1.3 system-ui}.phone-weather303 p{font:550 12px/1.4 system-ui;margin:4px 0 0;color:#c1d8cf}.phone-weather303>time{font:650 10px/1.3 system-ui;color:#b7cfcb;white-space:nowrap}
.phone-apps303{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 9px;margin:22px 0}.phone-apps303>button{min-height:94px;min-width:0;padding:3px;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;gap:7px;background:none!important;border:0!important;border-radius:16px!important;box-shadow:none!important;color:#fff!important}.phone-app-icon305{width:58px;height:58px;display:grid;place-items:center;border-radius:16px;background:#2980c4;box-shadow:0 3px 7px #06182f30}.phone-apps303 svg{width:31px;height:31px}.phone-apps303 strong{font:650 11px/1.3 system-ui;text-align:center;overflow-wrap:anywhere}.phone-apps303 small{font:600 10px system-ui;color:#d8e8f7}.phone-apps303 [data-app=contacts] .phone-app-icon305,.phone-apps303 [data-app=messages] .phone-app-icon305{background:#269b64}.phone-apps303 [data-app=news] .phone-app-icon305{background:#d25565}.phone-apps303 [data-app=weather] .phone-app-icon305{background:#287fc1}.phone-apps303 [data-app=alerts] .phone-app-icon305{background:#ad7444}.phone-apps303 [data-app=rematches] .phone-app-icon305{background:#9264b6}.phone-apps303 [data-app=support] .phone-app-icon305{background:#418d93}.phone-apps303 [data-app=history] .phone-app-icon305{background:#546778}
.phone-weather-widget305{display:block;width:100%;padding:0 0 12px;background:#183a55!important;color:#eff9ff!important;border:1px solid #6493ad!important;border-radius:20px!important;text-align:left}.phone-weather-widget305 .phone-weather303{margin:0;border:0;background:none}.phone-weather-widget305>span{display:block;padding:0 12px;font:600 11px system-ui;color:#d0e8f7}.phone-sheet303 .rpg-footer{display:none}#game #overlay #sheet.phone-sheet303 .rpg-head{background:none;border:0;padding:14px 18px 4px}.phone-sheet303 .rpg-head h2{font:750 16px system-ui}.phone-sheet303 .screen-marker{display:none}.phone-sheet303 .rpg-body{padding:12px 18px 18px}.phone-tabs303{position:sticky;top:0;z-index:1;padding:6px;background:#203b5b;border-radius:14px}.phone-sheet303 .phone-tabs303{grid-template-columns:repeat(4,minmax(0,1fr))}
.phone-contacts303{display:flex;flex-direction:column;gap:9px;margin:14px 0}.phone-contacts303>button{display:flex;align-items:center;gap:12px;min-height:64px;text-align:left;padding:10px 12px;background:#1b3d4b!important;border:1px solid #517774!important;border-radius:13px!important;color:#e9f5e9!important}.phone-contacts303>button>span{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:50%;background:#37685f;font:750 18px system-ui}.phone-contacts303 strong{flex:1;font:700 14px system-ui}.phone-contacts303 small{display:block;margin-top:4px;font:500 10px system-ui;color:#b1ccc5}.phone-contacts303 svg{width:24px;height:24px;flex:0 0 24px;color:#9cdfc7}
.phone-call303{text-align:center;padding:4px 5px 16px}.phone-call303>img{display:block;width:110px;height:124px;object-fit:cover;border-radius:18px;border:2px solid #9cdbc4;margin:0 auto 16px}.phone-call303>svg{width:64px;height:64px;margin:10px}.phone-call303>small{font:750 10px system-ui;color:#a0dfc3;letter-spacing:.12em}.phone-call303>h3{margin:7px 0 16px;font:800 25px system-ui}.phone-call303>p{padding:17px;border:1px solid #507875;border-radius:15px;background:#1c404c;font:550 15px/1.6 system-ui;text-align:left}.phone-hangup303{background:#753e4c!important;border-color:#b3747a!important;color:#fff!important;min-height:48px}.phone-sheet303 summary{min-height:44px;display:flex;align-items:center;font-weight:750;cursor:pointer}.phone-sheet303 details p{font-size:13px;line-height:1.6}.phone-sheet303 button:focus-visible,#phone-toggle303:focus-visible{outline:2px solid #b7f3d1;outline-offset:2px}
@media(max-width:370px){.phone-weather303{gap:8px;padding:12px 9px}.phone-weather303 strong{font-size:17px}.phone-weather303>time{font-size:9px}.phone-tabs303 button{font-size:10px!important}}
@media(orientation:landscape) and (max-height:500px){.phone-clock303{padding:5px}.phone-clock303>time{font-size:42px}.phone-weather303{padding:10px}.phone-apps303{margin:10px 0}.phone-apps303{grid-template-columns:repeat(4,minmax(0,1fr))}.phone-apps303>button{min-height:88px}#game #overlay #sheet.phone-sheet303{width:min(92%,680px);max-width:680px}.phone-call303>img{width:72px;height:82px;float:left;margin:0 14px 8px 0}.phone-call303>p{clear:both}.phone-call303>h3{font-size:22px}}
/* Social apps share the existing phone layout. */
#phone-unread304{position:absolute;right:-5px;top:-4px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:#f0c46d;color:#152c37;font:850 10px/1 system-ui;pointer-events:none}
.phone-tabs303{grid-template-columns:repeat(5,minmax(0,1fr))}.phone-tabs303 button{font-size:10px!important}
.phone-message-list304{display:flex;flex-direction:column;gap:10px;margin:12px 0}.phone-message-list304>button{min-height:72px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:6px;padding:13px;background:#1a3b49!important;border:1px solid #527877!important;border-radius:13px!important}.phone-message-list304>button.unread304{border-left:4px solid #9de1c7!important}.phone-message-list304 strong{font:750 15px/1.3 system-ui}.phone-message-list304 small{font:550 11px/1.4 system-ui;color:#bad3cb}.phone-message-list304 span{font:750 10px system-ui;color:#a5e4c6}
.phone-message304,.phone-intel304{margin:12px 0;padding:16px;border:1px solid #577e7a;border-radius:15px;background:#193b49}.phone-message304 h3,.phone-intel304 h3{font:800 21px/1.3 system-ui;margin:8px 0 12px}.phone-message304 p,.phone-intel304 p{font:550 14px/1.65 system-ui;white-space:pre-line}.phone-message304>small,.phone-intel304>small{font:700 10px/1.4 system-ui;color:#b2d6c6}.phone-intel304.expired304{border-style:dashed;background:#18343f}.phone-intel304 button,.phone-message304 button{min-height:44px}
.phone-rematch-team304{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:14px 0}.phone-rematch-team304>div{display:flex;flex-direction:column;align-items:center;max-width:140px;padding:8px;background:#254755;border-radius:12px}.phone-rematch-team304 img{width:96px;height:96px;object-fit:contain}.phone-rematch-team304 strong{font:750 13px system-ui}.phone-rematch-team304 small{font:600 11px system-ui;color:#c1dbcf;margin-top:4px}
@media(max-width:370px){.phone-tabs303{gap:3px}.phone-tabs303 button{font-size:9px!important;padding:6px 1px!important}}

@media(max-width:360px){#game #world>#phone-toggle303{right:210px;width:44px}#game #world.immersive-world.quiet-hud #stick{width:82px;height:82px}}

/* Leave space between the movement pad and the five lower shortcuts. */
#game #world.immersive-world.quiet-hud #stick{width:88px;height:88px}
@media(max-width:360px){#game #world.immersive-world.quiet-hud #stick{width:82px;height:82px}}

/* menu-clarity-309.css */
/* Shared quiet shell for field menus. Battle and challenge screens are excluded in JS. */
#game #overlay:has(#sheet.clarity-menu309){padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))!important;align-items:center!important;background:#0b243b66!important;backdrop-filter:none!important}
#game #overlay #sheet.clarity-menu309{--ui-text:#28434f;--ui-muted:#5e787d;--ui-panel:#fffdf7;--ui-card:#edf2eb;--ui-border:#ccd8cf;--ui-accent:#246b70;display:flex!important;flex-direction:column!important;width:min(100%,700px)!important;height:min(760px,100%)!important;max-height:100%!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;border:1px solid #a6c5be!important;border-radius:22px!important;background:#f4f1e7!important;color:#28434f!important;box-shadow:0 12px 36px #081e3b40!important;font:500 15px/1.5 system-ui!important}
#game #overlay #sheet.clarity-menu309>.rpg-head{flex:none!important;min-height:58px!important;padding:8px 16px!important;gap:10px!important;background:#153d49!important;border:0!important}
#game #overlay #sheet.clarity-menu309>.rpg-head h2{color:#fff6de!important;font:750 20px/1.2 system-ui!important;letter-spacing:0!important;text-transform:none!important;margin:0!important}
#game #overlay #sheet.clarity-menu309 .rpg-back{height:44px!important;min-height:44px!important;width:44px!important;padding:0!important;background:#ffffff12!important;border:1px solid #a1c5bd!important;color:#fff7e1!important;border-radius:12px!important;font-size:25px!important}
#game #overlay #sheet.clarity-menu309>.rpg-footer,#game #overlay #sheet.clarity-menu309>.qol-backbar{display:none!important}
#game #overlay #sheet.clarity-menu309>.rpg-body{display:block!important;flex:1!important;min-height:0!important;max-height:none!important;padding:16px!important;overflow:auto!important;overscroll-behavior:contain;background:none!important;color:#28434f!important}
#game #overlay #sheet.clarity-menu309 p,#game #overlay #sheet.clarity-menu309 small{color:#5c7479!important}
#game #overlay #sheet.clarity-menu309 h3,#game #overlay #sheet.clarity-menu309 strong,#game #overlay #sheet.clarity-menu309 b{color:#28434f!important}
#game #overlay #sheet.clarity-menu309 button{min-width:44px!important;min-height:44px!important;font-family:system-ui!important;letter-spacing:0!important;text-transform:none!important;border-radius:12px!important;border:1px solid #c5d4ca!important;background:#fffdf7!important;color:#31545d!important;box-shadow:none!important;touch-action:manipulation;transition:transform .12s!important}
#game #overlay #sheet.clarity-menu309 button:active{transform:scale(.98)!important}
#game #overlay #sheet.clarity-menu309 button:focus-visible{outline:3px solid #d4a957!important;outline-offset:2px!important}
#game #overlay #sheet.clarity-menu309 button:disabled{opacity:.48!important}
#game #overlay #sheet.clarity-menu309 .primary,#game #overlay #sheet.clarity-menu309 .game-menu-primary{background:#246b70!important;border-color:#246b70!important;color:#fffaf0!important}
#game #overlay #sheet.clarity-menu309 .primary b,#game #overlay #sheet.clarity-menu309 .game-menu-primary b{color:inherit!important}
#game #overlay #sheet.clarity-menu309 .game-menu-actions{display:flex!important;align-items:center;gap:10px;margin-top:16px;padding-top:12px;border-top:1px solid #c9d5cd}
/* Party overview: one readable list, no six-slot dashboard. */
#game #overlay #sheet.clarity-team .static-team-summary{display:flex;align-items:center;justify-content:space-between;padding:2px 0 14px;background:none;border:0}.static-team-summary>span{display:flex;flex-direction:column;gap:3px}
#game #overlay #sheet.clarity-team .static-team-tools,#game #overlay #sheet.clarity-team .static-team-secondary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 14px}
#game #overlay #sheet.clarity-team .static-team-secondary{grid-template-columns:1fr 1fr;margin:14px 0 0}
#game #overlay #sheet.clarity-team .static-team-grid{display:grid;grid-template-columns:1fr;gap:10px;overflow:visible;min-height:0;flex:none}
#game #overlay #sheet.clarity-team .static-team-card{position:relative;display:grid!important;grid-template-columns:86px minmax(0,1fr);grid-template-rows:auto auto!important;column-gap:12px;row-gap:8px;min-height:128px!important;height:auto!important;padding:16px 14px 13px!important;text-align:left;align-items:center!important;overflow:hidden}
#game #overlay #sheet.clarity-team .static-team-card>.team-art309,#game #overlay #sheet.clarity-team .static-team-card>img{grid-column:1;grid-row:1/3;width:86px!important;height:86px!important;object-fit:contain;justify-self:center;margin:0!important}
#game #overlay #sheet.clarity-team .static-team-card img{width:86px!important;height:86px!important;object-fit:contain;max-width:100%}
#game #overlay #sheet.clarity-team .static-team-copy{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:4px;padding:0!important;text-align:left!important}
#game #overlay #sheet.clarity-team .static-team-copy strong{font:800 18px/1.15 system-ui!important;overflow-wrap:anywhere}
#game #overlay #sheet.clarity-team .static-team-copy small{font:600 12px/1.4 system-ui!important}
#game #overlay #sheet.clarity-team .static-team-types{display:flex;gap:4px;flex-wrap:wrap}
#game #overlay #sheet.clarity-team .static-team-health{grid-column:2;grid-row:2;width:100%;display:flex;flex-direction:column;gap:3px;margin:0;padding:0}
#game #overlay #sheet.clarity-team .static-team-track{display:block;width:100%;height:7px;border:0;background:#d4dfd6;border-radius:6px;overflow:hidden}
#game #overlay #sheet.clarity-team .static-team-track i{display:block;height:100%;background:#3b9a7b}.static-team-track.low i{background:#d5a24e!important}.static-team-track.critical i{background:#bc6470!important}
#game #overlay #sheet.clarity-team .static-team-index{position:absolute;top:5px;left:9px;font:700 10px system-ui;color:#75918b}
#game #overlay #sheet.clarity-team .team-leader309{position:absolute;right:10px;top:7px;color:#236871;font:750 10px system-ui;letter-spacing:.03em}
#game #overlay #sheet.clarity-team .static-team-card.selected309{border:2px solid #388b88!important;padding:15px 13px 12px!important;background:#eaf4ec!important}
#game #overlay #sheet.clarity-team .static-team-card.fainted{background:#eee8e3!important}
#game #overlay #sheet.clarity-team .team-space309{font:500 12px/1.5 system-ui;margin:12px 0}
/* Inventory: selection and explicit use remain separate actions. */
#game #overlay #sheet.clarity-bag .gamebag-status{display:flex;align-items:center;justify-content:space-between;padding:0 0 12px;border:0;background:none}.gamebag-status>div{display:flex;flex-direction:column}
#game #overlay #sheet.clarity-bag .gamebag-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:none;margin-bottom:14px}
#game #overlay #sheet.clarity-bag .gamebag-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 3px!important;min-height:54px!important;gap:2px;font-size:12px!important}
#game #overlay #sheet.clarity-bag .gamebag-tabs button[aria-pressed=true]{background:#dcefe7!important;border:2px solid #398d89!important}
#game #overlay #sheet.clarity-bag .gamebag-shortcuts{display:flex;gap:8px;margin-bottom:14px}.gamebag-shortcuts>button{flex:1}
#game #overlay #sheet.clarity-bag .gamebag-pages{overflow:visible;flex:none}
#game #overlay #sheet.clarity-bag .gamebag-slots{display:flex;flex-direction:column;gap:8px}
#game #overlay #sheet.clarity-bag .gamebag-slot{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;min-height:68px!important;padding:10px!important;gap:10px;text-align:left}
#game #overlay #sheet.clarity-bag .gamebag-slot .field-object{width:32px;height:40px;margin:0!important;transform:scale(.8)}
#game #overlay #sheet.clarity-bag .gamebag-slot.selected{background:#e8f2e9!important;border:2px solid #428c86!important}
#game #overlay #sheet.clarity-bag .gamebag-detail{display:grid;grid-template-columns:46px 1fr;gap:12px;padding:18px 14px;margin:14px 0 0;border:1px solid #c3d7cc;border-radius:16px;background:#e7eee5;color:#28434f}
#game #overlay #sheet.clarity-bag .gamebag-detail .field-object{width:36px;height:48px;transform:scale(.8);margin:0}
#game #overlay #sheet.clarity-bag .gamebag-detail h3{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:20px!important}
#game #overlay #sheet.clarity-bag .gamebag-detail em{font:650 14px system-ui;color:#5c7479!important}
#game #overlay #sheet.clarity-bag .gamebag-detail p{font:500 14px/1.5 system-ui!important;margin-top:8px}
#game #overlay #sheet.clarity-bag .gamebag-detail>button,#game #overlay #sheet.clarity-bag .gamebag-note{grid-column:1/3;min-height:46px!important;display:block;text-align:center}
#game #overlay #sheet.clarity-bag .manual-save-entry{display:flex;gap:10px;align-items:center;width:100%;margin-bottom:12px;padding:10px!important;background:#e7eee5!important}.manual-save-entry small{display:none!important}
#game #overlay #sheet.clarity-bag .gamebag-party{display:flex;flex-direction:column;gap:8px}.gamebag-party>button{display:flex;gap:10px;align-items:center;text-align:left}.gamebag-party img{width:64px;height:64px;object-fit:contain}.gamebag-party strong,.gamebag-party small{display:block}
#game #overlay #sheet.clarity-menu309 .living-hero,#game #overlay #sheet.clarity-menu309 .beta-next,#game #overlay #sheet.clarity-menu309 .journey-guidance,#game #overlay #sheet.clarity-menu309 .market-wallet{background:#e6eee5!important;color:#28434f!important;border:1px solid #c4d5c9!important;border-radius:14px;padding:15px;margin-bottom:14px}
#game #overlay #sheet.clarity-menu309 .market-stock{display:flex;flex-direction:column;gap:10px}#game #overlay #sheet.clarity-menu309 .market-item{display:flex;align-items:center;gap:12px;padding:14px!important;text-align:left!important}
#game #overlay #sheet.clarity-menu309 .market-copy{flex:1;min-width:0}#game #overlay #sheet.clarity-menu309 .market-copy>*{display:block}#game #overlay #sheet.clarity-menu309 .market-price{flex:none;text-align:right}
#game #overlay #sheet.clarity-menu309 .profile-stage{height:180px;background:#e4eee6!important;border-radius:18px;box-shadow:none}.profile-stage img{object-fit:contain}
#game #overlay #sheet.clarity-menu309 .profile-stats>div,#game #overlay #sheet.clarity-menu309 .card,#game #overlay #sheet.clarity-menu309 .storage-row{background:#fffdf7!important;border:1px solid #ccd8cf!important;color:#28434f!important}
#game #overlay #sheet.clarity-menu309 .profile-tabs button,#game #overlay #sheet.clarity-menu309 .detail-tabs button{flex:1}
#game #world>header{background:#143c49!important;border:0!important;color:#fff4dc!important}#game #world>header #location{color:#fff4dc!important;text-shadow:none!important}#game #world>header #region{color:#abc9c2!important}
@media(min-width:700px){#game #overlay #sheet.clarity-team .static-team-grid{grid-template-columns:1fr 1fr}}
@media(max-height:500px) and (orientation:landscape){#game #overlay #sheet.clarity-menu309{max-width:780px!important}#game #overlay #sheet.clarity-menu309>.rpg-body{padding:12px!important}#game #overlay #sheet.clarity-team .static-team-grid{grid-template-columns:1fr 1fr}#game #overlay #sheet.clarity-bag .gamebag-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}#game #overlay #sheet.clarity-bag .gamebag-slot{display:flex!important;flex-direction:column;gap:5px;text-align:center}}
@media(prefers-reduced-motion:reduce){#game #overlay #sheet.clarity-menu309 *{animation:none!important;transition:none!important}}

#game #overlay #sheet.clarity-team .team-art309{position:relative;display:grid;place-items:center}#game #overlay #sheet.clarity-menu309 .alpha-symbol{color:#ffe6bf!important}#game #overlay #sheet.clarity-menu309 .habitat-symbol302{color:#8fe1ce!important}
/* Existing shared cards also host optional quest information. */
#game #sheet .echo-card312{padding:14px;margin:0 0 14px;border:1px solid #80a59c;border-radius:14px;background:#153d49;color:#fff3d7}#game #sheet .echo-card312 h3,#game #sheet .echo-card312 p,#game #sheet .echo-card312 small{color:inherit!important}#game #sheet .echo-card312 small{font:700 10px system-ui}#game #sheet .echo-card312 button{min-height:44px;margin:6px 4px 0 0}
#game #battle #battle-actions .battle-team312{height:100%;display:grid;grid-template-rows:44px minmax(0,1fr);gap:8px;min-height:0}#game #battle .battle-team-list312{overflow-y:auto;overscroll-behavior:contain;min-height:0;display:flex;flex-direction:column;gap:6px}#game #battle .battle-team-list312>button{display:flex;align-items:center;gap:10px;min-height:58px;flex:none;width:100%;text-align:left;padding:6px 10px;box-shadow:none;background:#24515d;color:#fff4dc;border:1px solid #86a8a4;border-radius:10px}#game #battle .battle-team-list312 img{width:44px;height:44px;object-fit:contain}#game #battle .battle-team-list312>button>span{flex:1}#game #battle .battle-team-list312 strong{font-size:12px}#game #battle .battle-team-list312 small{display:block;font-size:11px}#game #battle .battle-team-list312 b{font-size:11px}

/* Read-only world introduction, using the existing sheet and its scroll container. */
.world-intro325{max-width:680px;margin:0 auto;font:16px/1.55 system-ui;color:#e8f1ec}
.world-intro325 figure{margin:0;position:relative;border-radius:16px;overflow:hidden;background:#163d46}
.world-intro325 figure img{display:block;width:100%;height:clamp(150px,26dvh,250px);object-fit:cover;object-position:center 40%}
.world-intro325 figcaption{padding:12px 16px;color:#ffdc8c;font:700 22px/1.3 Georgia,serif}
.world-chapters325{display:grid;gap:10px;margin:18px 0}
.world-chapters325 article{display:flex;align-items:flex-start;gap:14px;padding:16px;border:1px solid #426973;border-radius:14px;background:#153943}
.world-chapters325 svg,.world-back325 svg{width:25px;height:25px;flex:none;color:#f4ce7c}
.world-intro325 h3{font-size:17px;margin:0 0 6px}.world-intro325 article p{margin:0;color:#c8dbda}
.world-note325{font-size:14px;color:#bdd1cf}.world-back325{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;touch-action:manipulation}
#sheet.world-presentation325 :focus-visible{outline:2px solid #ffdc8c;outline-offset:3px}
