@font-face{font-family:Pixel;src:url('/assets/pixel.ttf')}*{box-sizing:border-box} :root{--ink:#263c35;--paper:#f6f0da;--muted:#7b8972;--red:#be5145;--green:#426b52;--line:#d3cfb7}body{margin:0;background:#182e28;color:var(--ink);font:20px Pixel,monospace;min-height:100svh;display:flex;align-items:center;justify-content:center;background-image:repeating-linear-gradient(45deg,transparent,transparent 8px,#ffffff02 8px,#ffffff02 9px)}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid #e8ae48;outline-offset:3px}button{touch-action:manipulation}kbd{font:15px Pixel,monospace;border:1px solid #899485;border-bottom-width:2px;padding:1px 5px;border-radius:2px}button:hover:not(:disabled){filter:brightness(1.08)}.hidden{display:none!important}#game{width:min(1440px,100%);padding:20px 26px 12px}.topbar{height:69px;display:flex;align-items:center;justify-content:space-between;color:#eee8cc;padding:0 2px 17px;gap:20px}.wordmark{font-size:32px;color:inherit;text-decoration:none;letter-spacing:1px;display:flex;align-items:center;gap:10px;position:relative}.edition{font:11px monospace;letter-spacing:2px;color:#99ad98;position:absolute;left:41px;top:34px;white-space:nowrap}.pokeball{display:inline-block;width:27px;height:27px;border:3px solid #263c35;background:linear-gradient(#dc6a56 0 44%,#263c35 44% 56%,#f8efd4 56%);border-radius:50%;position:relative;flex-shrink:0}.pokeball:after{content:'';position:absolute;left:6px;top:6px;width:9px;height:9px;border:2px solid #263c35;background:#f6f0da;border-radius:50%}#area{display:grid;grid-template-columns:12px auto;column-gap:10px;line-height:1.1}#area-name{font-size:21px;letter-spacing:1px}#area-sub{grid-column:2;font-size:16px;color:#9fb098}.location-dot{width:7px;height:7px;background:#f4c86d;margin-top:6px;transform:rotate(45deg)}.connection{display:flex;align-items:center;gap:8px;font-size:16px;color:#bdc8b0}.connection>span:first-child{width:6px;height:6px;background:#c6a16d;border-radius:50%}.connection>span.live:first-child{background:#94c892}.connection button{margin-left:10px;background:#29453a;border:1px solid #536957;color:#d5ddc5;font-size:24px;width:35px;height:33px}.viewport{position:relative;aspect-ratio:5/3;border:4px solid #0f241e;outline:1px solid #5d7055;overflow:hidden;background:#8eb779;box-shadow:0 8px 24px #0004}#world{display:block;width:100%;height:100%;image-rendering:pixelated;outline:0}.vignette{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 90px #183d2428}.world-tag{position:absolute;right:17px;top:15px;background:#193629d9;color:#e6ebcf;padding:7px 10px;font-size:14px;letter-spacing:.6px;border:1px solid #7b986555;pointer-events:none}.world-tag i{display:inline-block;width:5px;height:5px;background:#b3d48b;margin-right:4px}.quest{position:absolute;top:19px;left:19px;width:220px;background:#f4efd9ef;border:2px solid #354b38;box-shadow:3px 3px #213b2b45;padding:12px}.eyebrow{display:block;font-size:12px;letter-spacing:1px;color:#6b7d5a;margin-bottom:5px}.quest strong{font-size:22px;font-weight:normal}.quest p{margin:4px 0 10px;font-size:17px;line-height:1.15;color:#697758}.quest button{background:none;border:0;border-top:1px solid #c6cbb3;width:100%;text-align:left;padding:8px 0 0;font-size:15px}.quest button span{float:right}.context{position:absolute;bottom:19px;left:50%;transform:translateX(-50%);padding:8px 13px;background:#f7efdce8;border:2px solid #344c3a;white-space:nowrap;box-shadow:2px 2px #263a3044;font-size:21px}.context kbd{background:#304d3a;color:#fff1d2;border-color:#304d3a;margin-right:6px}.region-toast{position:absolute;left:50%;top:19px;transform:translateX(-50%);background:#f7f0db;border:2px solid #354b38;padding:10px 30px;letter-spacing:1px;box-shadow:4px 4px #20392644;pointer-events:none}.pixel-panel{background:var(--paper);border:3px solid #33493a;outline:1px solid #e5e3c9;box-shadow:5px 5px 0 #14281c66;position:relative}.pixel-panel:before{content:'';position:absolute;inset:4px;border:1px solid #bcbfa1;pointer-events:none}.welcome{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0a211d38;padding:15px;backdrop-filter:brightness(.82)}.welcome-title{text-align:center;color:#fff9dc;text-shadow:2px 2px #233c2c;margin-bottom:18px}.welcome-title>span{font-size:13px;letter-spacing:3px;color:#e9dc9e}.welcome h1{font-size:56px;line-height:.9;font-weight:normal;margin:10px 0}.welcome-title p{font-size:21px;margin:0;color:#e8edce}.starter-panel{width:520px;max-width:100%;padding:18px 22px 12px}.professor{display:flex;gap:15px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:13px}.professor p{margin:0;font-size:19px;line-height:1.15}.portrait{width:42px;height:45px;background:#a9b9a0;border:2px solid #576952;color:#f4efd5;display:grid;place-items:center;font-size:34px;box-shadow:inset 0 -8px #7f9777}.trainer-form{display:flex;align-items:center;gap:10px;margin:13px 0 9px}.trainer-form label{font-size:14px;color:#6f795d;white-space:nowrap}.trainer-form input{min-width:0;width:150px;background:#fffbed;border:1px solid #9fa68a;padding:5px 8px;color:#304533;outline-color:#68896a}.colors{display:flex;gap:5px;margin-left:auto}.colors button{width:17px;height:17px;padding:0;border:2px solid #fff0ce;outline:1px solid #abb69d}.colors button.selected{outline:2px solid #354d39}.colors [data-color=red]{background:#bb544b}.colors [data-color=blue]{background:#5385a7}.colors [data-color=green]{background:#5d936b}.colors [data-color=purple]{background:#966495}.starter-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:10px 0 13px}.starter-card{position:relative;background:#ebe8cf;border:2px solid #bdc2a5;min-width:0;padding:6px 3px 10px;text-align:center;transition:transform .12s}.starter-card.selected{background:#e0e9ca;border-color:#537c4f;box-shadow:inset 0 0 0 2px #fff8dc;transform:translateY(-3px)}.starter-card.selected:after{content:'▼';position:absolute;top:-13px;left:calc(50% - 6px);font-size:16px;color:#385e3d}.starter-card img{width:80px;height:80px;display:block;margin:0 auto;image-rendering:pixelated}.starter-card strong{display:block;font-weight:normal;font-size:23px}.type{display:inline-block;font-size:12px;padding:2px 5px;color:#fff8e4;background:#7e9c69;margin:4px 2px 0;border:1px solid #0002;line-height:1}.type.fire{background:#be6b49}.type.water{background:#5b8ea3}.type.electric{background:#bd9b3e}.type.poison{background:#946b91}.type.flying{background:#8291a1}.type.normal{background:#969478}.type.bug{background:#929c4c}.type.rock,.type.ground{background:#a48c5c}.type.psychic{background:#bc7388}.type.ghost{background:#7c739b}.primary{display:flex;justify-content:center;gap:15px;align-items:center;width:100%;padding:11px;background:#355e46;color:#fff2d6;border:2px solid #213c2c;box-shadow:inset 0 2px #789572;font-size:23px}.primary span{margin-left:auto}.primary:disabled{background:#7d8a6d}.guest-note{text-align:center;color:#7c8269;font-size:16px;margin-top:10px}.guest-note span{color:#788b5d;margin-right:5px}.welcome-foot{font-size:13px;color:#d9e4c4;letter-spacing:1px;margin-top:18px}.welcome-foot span{padding:0 12px;color:#dec278}.loading{position:absolute;inset:0;background:#edf0d8;display:grid;place-content:center;text-align:center}.loading .pokeball{margin:auto;animation:bob 1s infinite}.loading p{font-size:30px;margin-bottom:8px}.loading small{font-size:18px;color:#78866b}@keyframes bob{50%{transform:translateY(-5px)}}#toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;background:#ece9d1;border:3px solid #11271e;border-top:0;min-height:76px;padding:10px 13px}#party-strip{display:flex;gap:5px}.party-slot{width:49px;height:49px;background:#dedfc3;border:1px solid #a4ae8e;padding:0;position:relative}.party-slot.empty{opacity:.5;background:radial-gradient(circle,#bec5a9 2px,transparent 3px) center/8px 8px}.party-slot img{width:46px;height:46px;image-rendering:pixelated}.party-slot .hp{position:absolute;bottom:2px;left:5px;width:37px;height:3px}.hp{height:6px;background:#d4d5bd;border:1px solid #91a080}.hp i{display:block;height:100%;background:#74a568;transition:width .45s}.hp i.low{background:#bf6655}nav{display:flex;gap:5px}nav button{display:flex;align-items:center;gap:7px;background:transparent;border:1px solid #babfa4;padding:10px 10px;font-size:18px}nav button>span{color:#718762;font-size:22px}nav kbd{font-size:12px;min-width:18px;text-align:center;color:#8f977b;border-color:#bec5aa;margin-left:4px}.below{display:flex;align-items:center;justify-content:space-between;padding-top:12px;color:#8ca08b;font-size:13px;letter-spacing:.5px}.below b{padding:0 7px;font-weight:normal;color:#546e57}.below kbd{font-size:12px;border-color:#4f6855}.below button{background:none;border:0;color:#9eb19a;font-size:13px}.toast{position:absolute;bottom:70px;left:50%;transform:translateX(-50%);max-width:85%;background:#f5e9ca;border:2px solid #374f3a;box-shadow:3px 3px #263e3344;padding:12px 18px;z-index:60;text-align:center;font-size:21px}.toast.error{background:#f5d9c8}.dialog-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #aeb79a;margin:0 0 15px;padding:0 0 12px}.dialog-head small{font-size:13px;letter-spacing:2px;color:#7a856a}.dialog-head h2{font-size:34px;line-height:1;margin:5px 0 0;font-weight:normal}.dialog-head button{border:1px solid #a9b394;background:#e9e5cb;width:32px;height:32px;font-size:28px}.dialog-foot{display:flex;justify-content:space-between;margin-top:18px;padding-top:10px;border-top:1px solid #c5c9ae;font-size:14px;color:#889176}dialog{padding:25px;width:700px;max-width:94vw;max-height:87svh;color:var(--ink)}dialog::backdrop{background:#0c211bbd;backdrop-filter:blur(2px)}#menu-body{max-height:64svh;overflow:auto;scrollbar-color:#889d75 #e7e8d0;scrollbar-width:thin;padding:1px 3px}#menu-body p{line-height:1.3}#menu-body button{background:#e5e8ce;border:1px solid #9eac8d;padding:7px 12px}#menu-body button.primary{background:#355e46;color:#fff2d6}.section-label{font-size:14px;color:#78886a;letter-spacing:1px;margin:16px 0 8px}.team-card{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:12px;background:#ebe9d2;border:1px solid #c2c8ad;padding:8px 12px;margin-bottom:8px}.team-card img{width:64px;height:64px;image-rendering:pixelated}.team-card h3{margin:0;font-size:25px;font-weight:normal}.team-card small{font-size:16px;color:#7c866c}.team-card .hp{margin:6px 0;width:160px}.team-card button{font-size:16px}.team-actions{display:flex;flex-direction:column;gap:5px}.dex-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.dex-entry{padding:5px!important;display:flex;align-items:center;flex-direction:column;font-size:15px;min-height:103px}.dex-entry img{width:64px;height:64px;image-rendering:pixelated}.dex-entry.unseen img{filter:brightness(0);opacity:.15}.dex-entry small{font-size:12px;color:#879575}.dex-summary{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.dex-summary input{width:170px;padding:6px;border:1px solid #a6b195;background:#fff8e2}.bag-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #c8cdb2;padding:12px 3px}.bag-row strong{font-size:24px;font-weight:normal}.bag-row small{display:block;color:#82916d;font-size:17px}.lab-banner{background:#dfe6c8;border:1px solid #a4b68a;padding:15px;display:flex;justify-content:space-between;gap:20px}.lab-banner strong{font-size:27px;font-weight:normal}.lab-banner p{font-size:18px;color:#677b55;margin:6px 0 0}.demo-label{background:#d7bd76;border:1px solid #af955c;font-size:13px;padding:4px 7px;white-space:nowrap;align-self:flex-start;color:#5e4c2b}.lab-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:13px 0;border:1px solid #b7c1a1}.lab-stats>div{padding:12px;border-right:1px solid #b7c1a1}.lab-stats>div:last-child{border:0}.lab-stats small{font-size:13px;color:#7d8c6a;display:block}.lab-stats strong{font-weight:normal;font-size:28px}.expedition{display:grid;grid-template-columns:60px 1fr auto;gap:13px;align-items:center;padding:12px 0;border-bottom:1px solid #c6ccb2}.expedition img{width:60px;height:60px;image-rendering:pixelated}.expedition h3{font-size:25px;font-weight:normal;margin:0}.expedition p{font-size:17px;margin:3px 0;color:#738464}.expedition button{font-size:17px;min-width:88px}.expedition .actions{display:grid;gap:6px}.milestone{display:flex;gap:15px;align-items:center;padding:8px 0;font-size:20px}.milestone>span{color:#a9b393}.milestone small{display:block;font-size:16px;color:#7c8a6c}.lab-note{font-size:17px;color:#7c8267;border-top:1px solid #c6ccb2;padding-top:10px}.map-view{width:100%;image-rendering:pixelated;border:2px solid #657956}.map-legend{display:flex;gap:18px;font-size:17px;margin-top:9px}.map-legend span:first-child{color:#b14c3d}.chat-log{height:260px;overflow:auto;background:#e9e8d2;border:1px solid #b5c0a0;padding:13px;line-height:1.3}.chat-log p{margin:0 0 10px;font-size:19px}.chat-log strong{font-weight:normal;color:#437253}.chat-form{display:flex;gap:8px;margin-top:12px}.chat-form input{flex:1;min-width:0;padding:9px;background:#fff8e6;border:1px solid #a6b195}.setting-row{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid #c1c8aa}.setting-row input{accent-color:#426b52}.small-note{font-size:17px;color:#7c886b}.rules{font-size:18px;line-height:1.3}.credits a{color:#426b52}#touch{display:none}.battle{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;background:repeating-linear-gradient(#bcdaa3 0 4px,#b8d49b 4px 8px)}.battle-field{position:relative;flex:1;min-height:0;background:linear-gradient(#b6cda4 0 18%,#c9ddb0 18% 20%,#d9e7bb 20% 23%,#d0dda6 23% 26%,#e3e8bd 26% 28%,#dae2b1 28% 100%);overflow:hidden}.battle-field:before{content:'';position:absolute;left:0;right:0;top:0;height:21%;background:repeating-linear-gradient(90deg,#789b7c 0 25px,#97b28a 25px 50px);clip-path:polygon(0 30%,5% 15%,8% 50%,13% 5%,20% 30%,24% 0,30% 50%,38% 20%,43% 40%,50% 10%,58% 35%,63% 0,70% 30%,78% 10%,85% 40%,92% 5%,100% 25%,100% 100%,0 100%)}.battle-sprite{position:absolute;width:180px;height:180px;image-rendering:pixelated;object-fit:contain;z-index:3}.battle-sprite.enemy{right:14%;top:7%;animation:bob 2.5s ease-in-out infinite}.battle-sprite.ally{left:11%;bottom:0;width:230px;height:230px}.battle-platform{position:absolute;border-radius:50%;background:#9cbc81;border:9px solid #bdcf99;height:24%;width:35%}.battle-platform.enemy{right:10%;top:39%}.battle-platform.ally{left:3%;bottom:-11%;width:48%;height:30%}.battle-info{position:absolute;z-index:4;background:#f4f0d7;border:3px solid #52654e;padding:12px 18px;width:260px;box-shadow:5px 5px #8b9c76;font-size:25px}.battle-info.enemy{top:17%;left:7%}.battle-info.ally{bottom:13%;right:7%}.battle-info .name-row{display:flex;justify-content:space-between;gap:12px}.battle-info .hp{height:10px;margin-top:8px;border:2px solid #7b8c6b}.battle-info .hp-label{font-size:15px;text-align:right;color:#6a7c5c;margin-top:3px}.battle-info .xp{height:4px;background:#b1bd9f;margin-top:7px}.battle-info .xp i{display:block;height:100%;background:#649cb2}.battle-console{height:155px;display:grid;grid-template-columns:1.1fr 1fr;border-top:4px solid #334b3b;background:#efe9d0;padding:10px;gap:10px}.battle-log{background:#365b57;color:#fff5d5;border:3px solid #729181;box-shadow:inset 0 0 0 2px #233d3a;padding:12px 16px;font-size:25px;overflow:auto;line-height:1.05}.battle-log p{margin:0 0 5px}.battle-options{display:grid;grid-template-columns:1fr 1fr;gap:6px}.battle-options button{background:#fbf1d6;border:2px solid #849074;text-align:left;padding:7px 13px;font-size:25px;line-height:1}.battle-options button small{display:block;font-size:16px;color:#7d886b;margin-top:5px}.battle-options button:hover{background:#e1e8c7}.battle-options .run{color:#98704f}.battle-options .back{grid-column:1/-1;text-align:center;padding:3px;font-size:18px}.battle-options.moves{gap:4px}.battle-options.moves button{font-size:21px;padding:5px 8px}.battle-options.moves .back{font-size:16px}.battle-ball{position:absolute;top:33%;right:23%;z-index:8;animation:shake .35s infinite}.battle-ball .pokeball{width:35px;height:35px}.battle-ball .pokeball:after{left:10px;top:10px}.battle.busy .battle-sprite.enemy{animation:hit .2s 2}.battle.catching .battle-sprite.enemy{opacity:0;transform:scale(.1);transition:all .25s}.battle.catching .battle-ball{display:block!important}@keyframes shake{25%{transform:rotate(-15deg)}75%{transform:rotate(15deg)}}@keyframes hit{50%{filter:brightness(3);transform:translateX(6px)}}
@media(min-width:1500px){#game{width:min(1440px,95vw)}.welcome-title h1{font-size:65px}.starter-panel{width:560px;padding:23px 26px}.starter-card img{width:96px;height:96px}.welcome-title{margin-bottom:24px}.starter-card{padding-bottom:15px}}
@media(max-width:1050px){#game{padding:12px}.topbar{height:62px}.edition{font-size:9px}.wordmark{font-size:28px}nav kbd{display:none}nav button{padding:9px 8px;font-size:16px}.party-slot{width:39px;height:41px}.party-slot img{width:38px;height:38px}.party-slot .hp{width:29px}.welcome-title h1{font-size:43px}.welcome-title{margin-bottom:10px}.starter-panel{width:470px;padding:12px 20px 9px}.starter-card img{width:64px;height:64px}.welcome-foot{font-size:10px;margin-top:10px}.starter-card strong{font-size:20px}.professor p{font-size:17px}.trainer-form{margin:9px 0}.guest-note{margin-top:7px}.battle-info{width:210px;font-size:22px}.battle-sprite.enemy{width:130px;height:130px}.battle-sprite.ally{width:180px;height:180px}.battle-console{height:140px}.battle-log{font-size:22px}}
@media(max-width:720px){body{display:block}#game{padding:0;min-height:100svh;display:flex;flex-direction:column}.topbar{padding:10px 12px;height:60px;gap:8px}.wordmark{font-size:23px;gap:6px}.wordmark .pokeball{width:23px;height:23px}.wordmark .pokeball:after{left:4px;top:4px}.edition{display:none}#area{display:none}.connection{font-size:13px}.viewport{aspect-ratio:auto;flex:1;min-height:530px;border-width:2px}#world{position:absolute;width:100%;height:100%;object-fit:cover}#toolbar{flex-direction:column;padding:8px;gap:8px}#party-strip{gap:7px}.party-slot{width:43px;height:43px}.party-slot img{width:41px;height:41px}nav{width:100%;justify-content:space-around}nav button{font-size:16px;padding:5px 8px}nav button>span{display:none}.below{padding:8px;font-size:11px}.below>span:first-child{display:none}.quest{width:160px;top:10px;left:10px;padding:8px}.quest strong{font-size:18px}.quest p{font-size:15px}.quest .eyebrow{font-size:11px}.world-tag{top:10px;right:8px;font-size:11px;padding:6px}.welcome{padding:15px 10px}.welcome-title h1{font-size:47px}.welcome-title p{font-size:19px}.starter-panel{padding:14px;max-width:370px}.professor p{font-size:17px}.trainer-form{flex-wrap:wrap;gap:8px}.trainer-form input{width:122px}.trainer-form label{font-size:12px}.colors{gap:4px}.colors button{width:14px;height:14px}.starter-cards{gap:5px}.starter-card strong{font-size:19px}.starter-card img{width:64px;height:64px}.type{font-size:11px}.welcome-foot{max-width:280px;text-align:center;line-height:1.5}.battle-info{width:165px;padding:7px 10px;font-size:20px}.battle-info.enemy{left:4%;top:15%}.battle-info.ally{right:4%;bottom:15%}.battle-sprite.enemy{right:2%;top:23%;width:140px;height:140px}.battle-sprite.ally{left:0;bottom:0;width:170px;height:170px}.battle-platform.enemy{top:48%;right:0;width:45%}.battle-console{height:220px;grid-template-columns:1fr;grid-template-rows:85px 1fr;padding:6px;gap:5px}.battle-log{font-size:20px;padding:8px 12px}.battle-options button{font-size:22px;padding:8px}.battle-options.moves{grid-template-columns:1fr 1fr}.battle-options.moves button{font-size:17px;padding:3px 8px}.battle-options button small{display:inline;margin-left:5px;font-size:13px}.battle-options.moves .back{padding:2px}.dex-grid{grid-template-columns:repeat(3,1fr)}dialog{padding:17px}.team-card{grid-template-columns:48px 1fr;gap:8px;padding:7px}.team-card img{width:48px;height:48px}.team-actions{grid-column:1/-1;flex-direction:row}.lab-stats strong{font-size:23px}.lab-stats small{font-size:11px}.lab-stats>div{padding:8px}.expedition{grid-template-columns:42px 1fr;gap:7px}.expedition img{width:42px;height:42px}.expedition .actions{grid-column:2;display:flex}.lab-banner{gap:8px;padding:10px}.lab-banner strong{font-size:23px}#touch{position:absolute;left:0;right:0;bottom:130px;display:flex;justify-content:space-between;padding:15px;pointer-events:none}.dpad{display:grid;grid-template-columns:repeat(3,37px);grid-template-rows:repeat(2,37px);gap:3px;pointer-events:auto}.dpad button{border:2px solid #ecf0d48f;background:#203c2c88;color:#f8efd5}.dpad button:first-child{grid-column:2}.dpad button:nth-child(2){grid-column:1}.dpad button:nth-child(3){grid-column:2}.dpad button:nth-child(4){grid-column:3}#touch-act{pointer-events:auto;align-self:end;border:2px solid #d9e4c4;background:#426a4bbc;color:#fff1cc;width:48px;height:48px;font-size:30px;border-radius:50%}.context{font-size:17px;bottom:110px}.region-toast{font-size:17px;top:115px}.toast{bottom:195px;font-size:18px}#game:has(.welcome:not(.hidden)) #touch,#game:has(.battle:not(.hidden)) #touch{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.portrait canvas{width:36px;height:45px;image-rendering:pixelated}

.battle-sprite.enemy{top:24%}.battle-field:before{height:29%;clip-path:none;background-image:var(--battle-forest);background-size:100% 100%;image-rendering:pixelated}
@media(max-width:720px){.battle-sprite.enemy{top:23%}}

.battle.caught .battle-sprite.enemy,.battle.won .battle-sprite.enemy{visibility:hidden}.battle.caught .battle-ball{display:block!important;animation:none;top:46%}.evolution{display:flex;justify-content:center;align-items:center;gap:22px;font-size:40px}.evolution img{width:128px;height:128px;image-rendering:pixelated}.evolution img:last-child{animation:bob 1.2s ease-in-out infinite}

/* Classic handheld framing over the HD-2D stage. */
:root{--ink:#353943;--paper:#fafaf4;--line:#aaaeb3}
body{background:#17252e;background-image:none;color:var(--ink)}
#world{image-rendering:auto}.viewport{border:4px solid #454952;outline:2px solid #a7aab3}.vignette{box-shadow:inset 0 0 70px #36594b1c}
.pixel-panel,.quest,.context,.region-toast{background:#fafaf4;border:3px solid #4c4d59;outline:2px solid #b8b8c5;box-shadow:inset 0 0 0 3px #dedfe6,3px 4px #20252d55;border-radius:5px}
.quest{width:196px;padding:11px;top:65px;opacity:.94}.quest strong{font-size:20px}.quest p{font-size:16px}.quest .eyebrow{font-size:11px}.quest button{font-size:14px}
.region-toast{left:14px;top:14px;transform:none;padding:9px 28px;font-size:25px;text-transform:uppercase;letter-spacing:1px}.world-tag{background:#454952dc;border:2px solid #c5c8cc;color:#fff}
#toolbar{background:#fafaf4;border-color:#454952}nav button{border:2px solid #777b84;background:#fafaf4;box-shadow:inset 0 0 0 2px #dedfe6;color:#353943}.party-slot{background:#e6e9ed;border-color:#a4a9b1}.wordmark{text-transform:uppercase;font-variant:normal}
.battle{background:#f8f8f8}.battle-field{background:linear-gradient(#d9e9f0 0%,#edf4eb 21%,#9fb6a2 32%,#abb48e 43%,#d7d7b4 66%,#aaba8c 100%)}
.battle-field:before{opacity:.6;height:35%;filter:blur(2px);background-position:center bottom}.battle-platform{border:5px solid #778064;background:radial-gradient(ellipse,#c9cf9c 0 54%,#8f9c67 55% 61%,#bfc78e 62%);height:22%;width:35%;box-shadow:0 4px #65715b55}.battle-platform.enemy{top:51%;right:7%}.battle-platform.ally{bottom:-8%;left:-5%;height:31%;width:48%}
.battle-sprite.enemy{width:29%;height:47%;right:10%;top:22%;animation:bob 2.8s ease-in-out infinite}.battle-sprite.ally{width:37%;height:65%;left:3%;bottom:-5%}.battle.busy .battle-sprite.enemy{animation:none}
.battle-info{width:32%;border:3px solid #53585b;background:linear-gradient(#f5f5ee 0 76%,#c8cbcb 76%);box-shadow:5px 5px #4a505755,inset 0 0 0 2px #fff;border-radius:4px 12px 3px 12px;padding:11px 15px 9px;font-size:clamp(18px,2.2vw,29px);color:#373c40}.battle-info.enemy{top:9%;left:4%}.battle-info.ally{bottom:7%;right:3%}.battle-info .hp{position:relative;margin-left:26%;height:12px;border:3px solid #4a5150;border-radius:5px;background:#faf8ed;box-shadow:0 1px #fff}.battle-info .hp:before{content:'HP';position:absolute;right:calc(100% + 6px);top:-5px;font-size:18px;color:#e2b630;text-shadow:1px 1px #6e6230}.battle-info .hp i{background:linear-gradient(#37905d 0 45%,#58ca8d 45%);transition:width .4s}.battle-info .hp i.low{background:#df6156}.battle-info .hp-label{font-size:23px;color:#373c40}.battle-info .xp{background:#697575;border-bottom:1px solid #fff;height:5px}.battle-info .xp i{background:#64b8ea}
.battle-console{height:25%;min-height:130px;grid-template-columns:1.15fr 1fr;padding:5px;gap:5px;border-top:3px solid #373e46;background:#e1e3e4}.battle-log{border:3px solid #555c64;background:#fcfcf7;color:#34383d;box-shadow:inset 0 0 0 2px #b6bbc6;padding:13px 17px;font-size:clamp(21px,2.6vw,32px);line-height:1.15}.battle-log p:not(:first-child){font-size:.75em}.battle-options{border:3px solid #555c64;background:#fcfcf7;box-shadow:inset 0 0 0 2px #b6bbc6;gap:0;padding:6px}.battle-options button{border:0;background:none;font-size:clamp(21px,2.6vw,31px);color:#34383d;padding:8px 10px 8px 23px;position:relative}.battle-options button:hover,.battle-options button:focus-visible{background:#e7e9e9;outline:0}.battle-options button:hover:before,.battle-options button:focus-visible:before{content:'▶';position:absolute;left:5px;font-size:16px;top:35%}.battle-options button small{font-size:13px;color:#6c747c}.battle-options .run{color:#34383d}
.battle-console.move-select{grid-template-columns:1fr 27%}.move-select .battle-log{display:none}.move-select .battle-options{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr 22px}.move-select .battle-options button{font-size:clamp(18px,2.5vw,30px)}.move-select .battle-options button small{display:none}.move-select .battle-options .back{font-size:16px;padding:0}.move-detail{background:#fcfcf7;border:3px solid #555c64;box-shadow:inset 0 0 0 2px #b6bbc6;padding:12px;font-size:clamp(20px,2.5vw,31px);line-height:1.6}.move-detail strong{float:right;font-weight:normal}
.battle[data-terrain=rock] .battle-field{background:linear-gradient(#d7dfe5,#9babae 26%,#a39983 40%,#b69c7d 70%,#8d8b74)}.battle[data-terrain=rock] .battle-field:before{opacity:.12}.battle[data-terrain=rock] .battle-platform{background:radial-gradient(ellipse,#aaa286,#777c6b);border-color:#5d635c}.battle[data-terrain=water] .battle-field{background:linear-gradient(#cfe7ed,#9cc6cd 35%,#77b9cc 60%,#91ced6)}.battle[data-terrain=water] .battle-platform{background:#bed8bd;border-color:#92bdbb}.battle[data-terrain=indoor] .battle-field{background:repeating-linear-gradient(0deg,#d1d9d5 0 36px,#bcc9c5 37px 39px)}.battle[data-terrain=indoor] .battle-field:before{display:none}
.battle-effects{position:absolute;inset:0;z-index:6;pointer-events:none}.attack-particle{position:absolute;width:12px;height:12px;box-shadow:0 0 7px currentColor;animation:particle-burst .65s ease-out both;animation-delay:var(--delay)}.attack-particle.water{border-radius:50% 50% 50% 0}.attack-particle.grass{border-radius:70% 0; width:18px;height:9px}.attack-particle.electric{clip-path:polygon(50% 0,100% 0,65% 45%,100% 45%,0 100%,33% 53%,0 53%);height:30px}.attack-particle.fire{border-radius:60% 15%;width:15px;height:23px}@keyframes particle-burst{0%{opacity:0;transform:translate(calc(var(--dx)*-.5),calc(var(--dy)*-.5)) scale(.3)}30%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.4) rotate(90deg)}}
@media(max-width:720px){.quest{top:55px;width:145px}.region-toast{top:9px;left:9px;font-size:18px;padding:6px 13px}.world-tag{top:9px;right:8px}.battle-console{height:27%;min-height:155px;grid-template-columns:1fr 1fr;grid-template-rows:1fr}.battle-info{width:46%;font-size:19px;padding:7px 9px}.battle-info.enemy{top:7%;left:3%}.battle-info.ally{bottom:10%;right:3%}.battle-sprite.enemy{width:46%;height:42%;right:0;top:26%}.battle-sprite.ally{width:56%;height:55%;left:-5%;bottom:-3%}.battle-options button{font-size:21px;padding:4px 7px}.battle-options button small{display:none}.battle-log{font-size:21px;padding:10px}.battle-console.move-select{grid-template-columns:1fr 30%}.move-detail{font-size:19px;padding:8px}.move-select .battle-options button{font-size:20px;padding:6px}.battle-platform.enemy{width:48%;right:0;top:52%}}

.scratch-slash{position:absolute;width:5px;height:65px;background:#fff7dd;box-shadow:3px 0 #e07b58;transform:rotate(35deg);animation:slash-strike .45s ease-out both}@keyframes slash-strike{0%{opacity:0;clip-path:inset(0 0 100% 0)}25%{opacity:1;clip-path:inset(0)}100%{opacity:0;clip-path:inset(100% 0 0 0)}}

.quest{width:225px;background:#fffef2f5;top:18px;padding:13px}.quest strong{font-size:23px;line-height:1.05;display:block}.quest p{font-size:16px;color:#627067;line-height:1.25}.quest .eyebrow{color:#9a6a28;font-size:12px}.quest button{font-size:15px;color:#414b52}.story-intro{display:flex;gap:18px;align-items:flex-start;padding:8px 0 18px;border-bottom:2px solid #c9ced0}.chapter-emblem{display:grid;place-items:center;min-width:52px;height:58px;background:#ead391;color:#725728;border:3px double #7f7353;font-size:34px}.story-intro h3{margin:0 0 8px;font-size:28px;font-weight:normal}.story-intro p{margin:0;font-size:22px;color:#58636b}.chapter-steps{list-style:none;padding:0;margin:18px 0}.chapter-steps li{display:flex;align-items:center;gap:13px;padding:10px 12px;border-bottom:1px solid #d7dbd8}.chapter-steps li>span{font-size:22px;color:#8a9399;min-width:26px}.chapter-steps strong{font-size:22px;font-weight:normal}.chapter-steps small{display:block;font-size:12px;letter-spacing:1px;color:#98702c;margin-top:4px}.chapter-steps .current{background:#f1e7bc;border-left:4px solid #a98436}.chapter-steps .complete{color:#508264}.chapter-steps .complete>span{color:#508264}.chapter-steps .future{color:#90969a}.chapter-reward{padding:12px;background:#e5ebdf;color:#52765c;font-size:18px;margin-bottom:16px}#journal-map,#journal-research{width:100%;margin:4px 0;padding:12px!important}.region-toast{left:50%;transform:translateX(-50%)}
@media(max-width:720px){.quest{width:174px;top:12px;left:10px;padding:9px}.quest strong{font-size:20px}.quest p{font-size:14px}.quest button{font-size:12px}.story-intro{gap:10px}.story-intro p{font-size:19px}.chapter-steps strong{font-size:20px}.region-toast{top:180px}}

/* Battle console: compact handheld command layout and native-pixel terrain. */
.battle{container-type:inline-size}.battle-console{flex:0 0 25%;min-height:132px;height:auto;grid-template-columns:1fr 44%;gap:0;padding:7px;background:#b8bac6;border-top:4px solid #414455;box-shadow:inset 0 3px #f4f3e7}.battle-log{margin:0;border:4px solid #efe2a1;background:#28525d;color:#fffcef;box-shadow:0 0 0 2px #454457,inset 0 0 0 3px #112e43;padding:18px 24px;line-height:1.25;letter-spacing:.5px;font-size:clamp(24px,3.3cqw,42px);overflow:auto;text-shadow:2px 2px #193744}.battle-log p{margin:0}.battle-log strong{font-weight:normal}.battle-log p:not(:first-child){font-size:1em}.battle-options{border:4px solid #454457;background:#fffef1;box-shadow:inset 0 0 0 3px #b5bac5;padding:12px 15px;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;margin-left:7px}.battle-options button{border:0;box-shadow:none;border-radius:0;background:transparent;padding:4px 5px 4px 26px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;font-size:clamp(24px,3.3cqw,42px);line-height:1.1;letter-spacing:.3px;color:#353746;text-shadow:1px 1px #35374633}.battle-options button:hover:not(:disabled),.battle-options button:focus-visible{background:#ececd9;filter:none;outline:0}.battle-options button:hover:before,.battle-options button:focus-visible:before{content:'';width:0;height:0;border-left:11px solid #343444;border-top:8px solid transparent;border-bottom:8px solid transparent;position:absolute;left:7px;top:calc(50% - 8px)}.battle-options button small{font-size:clamp(12px,1.5cqw,18px);text-shadow:none;margin-top:4px}.battle-options .empty-move{opacity:1;color:#a6a99e;pointer-events:none}.battle-options .back{grid-column:1/-1;font-size:18px;padding:3px;align-items:center}
.battle-console.move-select{grid-template-columns:1fr 29%;padding:7px;gap:7px;background:#b8bac6}.move-select .battle-options{margin:0;grid-template-rows:1fr 1fr;padding:12px 16px}.move-select .battle-options button{font-size:clamp(21px,3cqw,37px);padding:6px 7px 6px 25px}.move-sidebar{border:4px solid #454457;background:#fffef1;box-shadow:inset 0 0 0 3px #b5bac5;display:flex;flex-direction:column;min-width:0}.move-detail{border:0;box-shadow:none;background:none;padding:12px 18px 6px;font-size:clamp(22px,3cqw,36px);line-height:1.25;flex:1}.pp-row{display:flex;justify-content:space-between;gap:5px}.pp-row strong{float:none;font-weight:normal}.move-type-label{font-size:.7em;margin-top:12px;white-space:nowrap}.move-type-label b{font-weight:normal}.battle-return{background:none;border:0;border-top:2px solid #d3d4c8;padding:7px 12px;margin:0 8px 5px;text-align:right;font-size:17px;color:#71757c}.battle-return kbd{font-size:12px;margin-left:8px}.battle-return:hover{background:#edecdd}
.battle .battle-platform{border:0!important;border-radius:0!important;box-shadow:none!important;background-color:transparent!important;background-image:url('/assets/battle/grass.png')!important;background-size:100% 100%!important;background-repeat:no-repeat!important;image-rendering:pixelated}.battle[data-terrain=rock] .battle-platform{background-image:url('/assets/battle/rock.png')!important}.battle[data-terrain=water] .battle-platform{background-image:url('/assets/battle/water.png')!important}.battle[data-terrain=indoor] .battle-platform{background-image:url('/assets/battle/indoor.png')!important}.battle-platform.enemy{width:37%;height:29%;right:7%;top:46%}.battle-platform.ally{width:55%;height:39%;left:-8%;bottom:-15%}.battle-field:before{filter:none;opacity:.36}.battle-info{border-radius:0 12px 0 12px;box-shadow:4px 4px #49514c99,inset 0 0 0 2px #fff}.battle-info .name-row{font-size:clamp(19px,2.6cqw,30px)}.battle-info.enemy{top:10%;left:4%;width:34%}.battle-info.ally{right:3%;bottom:7%;width:34%}.battle-info .hp-label{font-size:clamp(20px,2.5cqw,28px)}
#game:has(.battle:not(.hidden)) #toolbar{visibility:hidden}#game:has(.battle:not(.hidden)) .below{visibility:hidden}
@media(max-width:720px){.battle-console{flex-basis:26%;min-height:148px;grid-template-columns:1fr 47%;padding:5px}.battle-log{font-size:24px;padding:12px 14px;border-width:3px}.battle-options{margin-left:5px;padding:6px;border-width:3px}.battle-options button{font-size:23px;padding-left:17px}.battle-options button:hover:before,.battle-options button:focus-visible:before{left:3px;border-left-width:8px;border-top-width:6px;border-bottom-width:6px;top:calc(50% - 6px)}.battle-console.move-select{grid-template-columns:1fr 31%;gap:4px;padding:5px}.move-select .battle-options{padding:6px}.move-select .battle-options button{font-size:20px;padding-left:16px}.move-detail{padding:11px 9px;font-size:23px}.move-type-label{font-size:14px;white-space:normal}.battle-return{font-size:14px;padding:6px;margin:0 4px 3px}.battle-return kbd{display:none}.battle-info.enemy,.battle-info.ally{width:46%}.battle-info .name-row{font-size:20px}.battle-platform.enemy{width:52%;right:0;top:48%}.battle-platform.ally{width:65%;left:-10%;bottom:-9%}}

/* Exploration hints never cover a battle command. */
#game:has(.battle:not(.hidden)) #toast,#game:has(.battle:not(.hidden)) #region-toast{display:none!important}

/* Crisp, restrained RPG windows. */
dialog{border-radius:0;border:4px solid #3e4654;outline:3px solid #f8f8ef;background:#f8f8ef;box-shadow:inset 0 0 0 2px #a7acaf,4px 5px 0 #17202c80}dialog::backdrop{backdrop-filter:none;background:#14202d66}dialog button{border-radius:0}dialog button:focus-visible{outline:3px solid #cc7044;outline-offset:2px}#menu-kicker{color:#596773}#world{image-rendering:auto}

/* Shared native-resolution pixel art across UI and capture effects. */
.pokeball,.wordmark .pokeball{border:0!important;border-radius:0!important;background:transparent url('/assets/ui/pokeball.png') center/100% 100% no-repeat!important;width:32px;height:32px;image-rendering:pixelated;box-shadow:none!important}
.pokeball:after{display:none!important}.loading .pokeball{width:48px;height:48px}.battle-ball .pokeball{width:32px;height:32px}
#world,canvas,img,.battle-field,.battle-platform{image-rendering:pixelated}
body{background-image:none}.vignette{box-shadow:none}.viewport{box-shadow:4px 4px #101e28}
.pixel-panel,.quest,.context,.region-toast,.battle-info,.battle-info .hp,kbd,.connection>span:first-child,#touch-act{border-radius:0}
.party-slot.empty{background:#dfe3d0;box-shadow:inset 2px 2px #a9b59a,inset -2px -2px #f7f4e5}
.battle .battle-field{background:#cbd3a7 url('/assets/ui/grass-field.png') center/100% 100% no-repeat}
.battle[data-terrain=rock] .battle-field{background-image:url('/assets/ui/rock-field.png')}.battle[data-terrain=water] .battle-field{background-image:url('/assets/ui/water-field.png')}.battle[data-terrain=indoor] .battle-field{background-image:url('/assets/ui/indoor-field.png')}
.battle-info{background:#f3f3e9}.battle-info .hp i{background:#58bd80;box-shadow:inset 0 3px #36845b}.battle-info .hp i.low{background:#da6557;box-shadow:inset 0 3px #a24444}
.attack-particle,.attack-particle.water,.attack-particle.fire,.attack-particle.grass{border-radius:0;box-shadow:none;filter:none;clip-path:polygon(25% 0,75% 0,75% 25%,100% 25%,100% 75%,75% 75%,75% 100%,25% 100%,25% 75%,0 75%,0 25%,25% 25%);animation-timing-function:steps(8,end)}
.scratch-slash{border-radius:0;box-shadow:none;animation-timing-function:steps(5,end)}
.battle-options button:hover:before,.battle-options button:focus-visible:before{border:0;width:12px;height:16px;background:#343444;clip-path:polygon(0 0,33% 0,33% 25%,66% 25%,66% 37.5%,100% 37.5%,100% 62.5%,66% 62.5%,66% 75%,33% 75%,33% 100%,0 100%)}

/* Capture animation is sequenced from the authoritative result. */
.battle-ball{animation:none;transform-origin:50% 85%}.battle.busy .battle-sprite.enemy{animation:none}.battle.capture-sequence .battle-ball:not(.hidden){display:block}.capture-spark{position:absolute;width:8px;height:8px;background:#fff2a1;box-shadow:0 -4px #fff2a1,0 4px #fff2a1,-4px 0 #fff2a1,4px 0 #fff2a1}.battle.entering .battle-options{visibility:hidden}.battle.entering .battle-platform{animation:platform-arrive .65s steps(10,end) both}@keyframes platform-arrive{from{transform:translateX(100px);opacity:0}to{transform:translateX(0);opacity:1}}@media(prefers-reduced-motion:reduce){.battle.entering .battle-platform{animation:none}}

.battle .battle-field{background-size:100% 100%!important;background-repeat:no-repeat!important}

.move-matchup{display:block;font-size:clamp(12px,1.6cqw,18px);line-height:1.2;margin-top:5px;color:#46534d}

.swarm-notice{position:absolute;right:16px;top:55px;max-width:260px;padding:8px 10px;background:#fff0a9;color:#343849;border:3px solid #55526a;box-shadow:3px 3px #20252d77;font-size:17px;text-align:left;z-index:4}.swarm-card{padding:16px;border:3px solid #5c5a6e;background:#fff4cc;text-align:center}.swarm-card h3{font-size:28px;margin:12px 0}.swarm-mons{display:flex;justify-content:center}.swarm-mons img{width:80px;height:80px;image-rendering:pixelated}.swarm-clock{display:block;font-size:44px;letter-spacing:4px}.token-address{overflow-wrap:anywhere;font-size:16px}@media(max-width:720px){.swarm-notice{top:55px;max-width:155px;font-size:13px}}
.research-supply{background:#e6eddb;border:2px solid #62795e;padding:14px;margin-bottom:18px}.research-supply progress{display:block;width:100%;height:18px;accent-color:#58855e}.research-supply p{font-size:19px}.research-supply details{margin-top:12px}.research-supply a{color:#315d55}
/* One scrolling region per dialog, including short laptop viewports. */
dialog[open]{display:flex;flex-direction:column;overflow:hidden}#menu-body{min-height:0;max-height:none;overflow-y:auto;flex:1}.dialog-head,.dialog-foot{flex-shrink:0}
.world-labels{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.world-labels img{position:absolute;transform:translate(-50%,-50%);image-rendering:pixelated;height:auto;max-width:none}.world-labels img[hidden]{display:none}.market-cap{font-size:18px;white-space:nowrap;color:#f0d78d;margin-left:auto;margin-right:14px}.host-event{position:absolute;bottom:12px;right:12px;z-index:8;background:#1c2e3b;color:#ffe398;border:2px solid #cfac58;padding:8px 12px;font-size:19px;pointer-events:none}.viewport[data-host-event=overdrive]{outline:3px solid #d8b359}.viewport[data-host-event=rare]{outline:3px solid #a28fdf}@media(max-width:700px){.market-cap{font-size:15px;margin-right:5px}.host-event{font-size:15px;max-width:75%}.building-label{max-width:140px!important}}

.quest{z-index:5}

.quest-guide{display:flex;align-items:center;gap:10px;border-top:1px solid #c9cbb8;margin:8px 0;padding:9px 0 3px}.quest-guide #quest-arrow{font:28px monospace;color:#98702c;width:30px;text-align:center;flex-shrink:0}.quest-guide #quest-distance{font-size:19px}.quest-guide small{display:block;font-size:12px;color:#627067;margin-top:3px;line-height:1.2}

.atlas-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.atlas-tabs button{font-size:17px;padding:7px 10px;background:#eee9d6;border:2px solid #8a927b}.atlas-tabs button[aria-pressed="true"]{background:#436956;color:#fff2d0}.map-legend{flex-wrap:wrap}

#menu .atlas-tabs button[aria-pressed="true"]{background:#436956;color:#fff2d0;border-color:#294537}

.duel-invite{position:fixed;inset:auto 24px auto auto;top:56%;margin:0;width:282px;max-width:calc(100vw - 24px);padding:13px;background:#fffbea;color:#303b42;border:3px solid #485360;outline:2px solid #d1d7db;box-shadow:inset 0 0 0 3px #e1e1d4,4px 5px #17293288;font:20px Pixel,monospace;z-index:29}.duel-invite::backdrop{background:transparent;pointer-events:none}.duel-invite-heading{display:flex;align-items:center;gap:7px;font-size:13px;color:#6d7a77;border-bottom:2px solid #d1d4c5;padding-bottom:9px;margin-bottom:10px}.duel-invite-heading small{margin-left:auto}.duel-invite>strong{display:block;font-weight:normal;font-size:25px;overflow-wrap:anywhere}.duel-invite p{font-size:20px;margin:3px 0 8px;line-height:1.1}.duel-rules{display:block;color:#738170;font-size:15px}.duel-invite-actions{display:flex;gap:7px;margin-top:12px}.duel-invite-actions button{flex:1;border:2px solid #6e7f75;background:#e4ebd7;padding:7px 4px;font-size:16px}.duel-invite-actions button:last-child{background:#f0e6d6}.duel-pixel-ball{width:14px;height:14px;flex:none;background:linear-gradient(#ce6a5c 0 40%,#37434c 40% 60%,#f7f0d9 60%);border:2px solid #37434c;clip-path:polygon(25% 0,75% 0,75% 12%,100% 12%,100% 88%,75% 88%,75% 100%,25% 100%,25% 88%,0 88%,0 12%,25% 12%)}.duel-trainer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #c9cebd}.duel-trainer small{display:block;font-size:16px;color:#798576}.duel-battle-label{position:absolute;z-index:8;top:5px;left:50%;transform:translateX(-50%);padding:4px 10px;background:#fff8dc;border:2px solid #637264;font-size:15px;white-space:nowrap}.duel-turn-flash .battle-sprite{animation:hit .15s 2}@media(max-width:720px){.duel-invite{right:12px;width:245px;padding:11px;top:54%}.duel-invite>strong{font-size:23px}.duel-invite p{font-size:18px}.duel-battle-label{font-size:12px}}

/* Keep world annotations below interface panels, including the starter screen. */
.viewport{isolation:isolate}
.welcome{z-index:20}
.loading{z-index:50}
.world-tag,.context,.region-toast{z-index:4}
.viewport:has(.welcome:not(.hidden)) .world-labels,
.viewport:has(.loading:not(.hidden)) .world-labels,
.viewport:has(.battle:not(.hidden)) .world-labels{visibility:hidden}

/* A shared alignment grid for brand, location and connection controls. */
.topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:24px;height:76px;padding:0 4px 16px}
.wordmark{display:grid;grid-template-columns:27px auto;grid-template-rows:28px 14px;column-gap:12px;row-gap:2px;align-items:center;font-size:28px;line-height:1;white-space:nowrap}
.wordmark .pokeball{grid-column:1;grid-row:1 / 3;width:27px;height:27px}
.wordmark-name{grid-column:2;grid-row:1}
.wordmark .edition{position:static;grid-column:2;grid-row:2;font:9px/14px monospace;letter-spacing:1.8px;display:block}
#area{min-width:0;grid-template-columns:8px minmax(0,1fr);grid-template-rows:28px 14px;column-gap:10px;row-gap:2px;align-items:center}
#area-name{font-size:21px;line-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#area-sub{font-size:15px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.location-dot{margin:0;width:6px;height:6px}
.topbar .market-cap{margin:0;font-size:17px;line-height:24px}
.topbar .connection{gap:8px;font-size:17px;line-height:24px;white-space:nowrap}
.topbar .connection button{display:grid;place-items:center;width:36px;height:36px;margin:0 0 0 10px;padding:0;line-height:1;font-size:25px}
@media(max-width:1050px){.topbar{gap:18px}.wordmark{font-size:26px}}
@media(max-width:720px){.topbar{grid-template-columns:minmax(0,1fr) auto auto;gap:12px;height:72px;padding:10px 12px}.topbar #area{display:none}.wordmark{font-size:23px;grid-template-columns:23px auto;grid-template-rows:24px 12px;column-gap:8px}.wordmark .pokeball{width:23px;height:23px}.wordmark .edition{font-size:8px;letter-spacing:1px;line-height:12px}.topbar .market-cap,.topbar .connection{font-size:14px}.topbar .connection button{margin-left:4px;width:32px;height:32px}}
@media(max-width:390px){.topbar{gap:8px}.topbar .connection{gap:5px}.wordmark{font-size:21px}.wordmark .edition{font-size:7px}}
#trainer-wardrobe{width:620px;max-width:calc(100vw - 24px);max-height:calc(100svh - 32px);padding:20px;color:#303e3b;background:#f7f1dc;border:3px solid #54655b;box-shadow:0 0 0 3px #e3dec8,7px 7px #0d1d2280}#trainer-wardrobe::backdrop{background:#0c1c25cc}.wardrobe-head{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #c9ccb6;padding-bottom:12px;flex:none}.wardrobe-head small{font-size:13px;letter-spacing:1px;color:#6b7e67}.wardrobe-head h2{font-size:32px;font-weight:normal;margin:4px 0 0}.wardrobe-head button{background:none;border:1px solid #a9b19c;width:32px;height:32px;font-size:27px}.wardrobe-scroll{overflow-y:auto;min-height:0}.wardrobe-scroll>p{font-size:20px;line-height:1.3}.wardrobe-body{display:grid;grid-template-columns:160px 1fr;gap:24px;margin:16px 0}.trainer-preview{background:#dce4cc;border:2px solid #b1bea1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:14px 6px}.trainer-preview canvas{width:144px;height:168px;image-rendering:pixelated}.trainer-preview span{font-size:11px;color:#617457;text-align:center}.wardrobe-options fieldset{border:0;padding:0;margin:0 0 8px}.wardrobe-options legend{font-size:18px;margin-bottom:5px}.wardrobe-options fieldset>div{display:flex;gap:8px;flex-wrap:wrap}.trainer-swatch{width:28px;height:26px;background:var(--swatch);border:3px solid #f7f1dc;outline:1px solid #a5af98;padding:0}.trainer-swatch[aria-pressed=true]{outline:3px solid #334c40}.wallet-card{border:2px solid #bdc7ae;background:#eaf0df;padding:12px}.wallet-card>strong{font-size:15px;letter-spacing:1px}.wallet-card p{margin:8px 0;font-size:18px;line-height:1.25}.wallet-card .small-note{font-size:15px}.wallet-card button,.wardrobe-footer>button:not(.primary){background:#fbf7e8;border:2px solid #9daa8f;padding:8px 12px;font-size:18px}#wallet-list{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.wardrobe-footer{padding-top:12px;border-top:2px solid #c9ccb6;display:grid;gap:8px;flex:none}#wardrobe-feedback{min-height:20px;color:#3f7153}.wardrobe-footer .primary{font-size:21px}@media(max-width:500px){#trainer-wardrobe{padding:14px}.wardrobe-body{grid-template-columns:110px 1fr;gap:14px}.trainer-preview canvas{width:96px;height:112px}.trainer-swatch{width:23px;height:23px}.wardrobe-options fieldset>div{gap:7px}.wardrobe-head h2{font-size:27px}}

#starter-customize{margin-left:auto;background:#e6ecd8;border:2px solid #a9b69b;padding:6px 8px;font-size:15px}

.pump-buy{display:inline-flex;align-items:center;justify-content:center;gap:7px;margin-left:8px;padding:7px 10px;min-height:34px;background:#a8edb2;color:#183b31;text-decoration:none;font:18px Pixel,monospace;white-space:nowrap;clip-path:polygon(5px 0,calc(100% - 5px) 0,calc(100% - 5px) 3px,100% 3px,100% calc(100% - 3px),calc(100% - 5px) calc(100% - 3px),calc(100% - 5px) 100%,5px 100%,5px calc(100% - 3px),0 calc(100% - 3px),0 3px,5px 3px)}
.pump-buy[aria-disabled="true"]{opacity:.45;cursor:default;pointer-events:none}.pump-buy:hover{background:#c2f7c9}.pump-pill{display:block;width:22px;height:12px;background:linear-gradient(90deg,#35bd82 50%,#f4ffe7 50%);border:2px solid #214b3d;transform:rotate(-40deg);clip-path:polygon(4px 0,18px 0,18px 2px,22px 2px,22px 10px,18px 10px,18px 12px,4px 12px,4px 10px,0 10px,0 2px,4px 2px)}
@media(max-width:720px){.pump-buy{margin-left:2px;padding:5px 7px;gap:5px;font-size:16px}.connection{gap:5px}}
