/* Pixel edition: shared frames cover every existing 0.5.3 panel. */
:root{--ink:#263e42;--paper:#fff9df;--line:#416660;--leaf:#27705a;--gold:#e6c36c;--shade:#102e32}
body{background:repeating-linear-gradient(0deg,#112e32 0 4px,#163639 4px 8px);color:#f4efce}
button,input,select,textarea{border-radius:0!important;font-family:inherit}
button{transition:background-color .1s;color:inherit;touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #c28435!important;outline-offset:2px}
#screen{border:4px solid #789784;border-radius:0;box-shadow:0 0 0 3px #fff2ce,0 0 0 7px #1b4948,0 10px 0 7px #0c242a;isolation:isolate}
#overlay{background:#112e325c;gap:12px;padding:12px;align-items:center}
#menu,#detail,#dialog,#campaign-scene,#battle,#notice,#recovery-result,.character-card,.trainer-editor,.journey-slot,.chat{border:3px solid var(--line)!important;border-radius:0!important;box-shadow:inset 0 0 0 2px #fff9e5,0 0 0 2px #b5c89d,4px 5px 0 #102e3255;background:var(--paper);color:var(--ink)}
#menu{padding:9px 5px;min-width:130px;background:linear-gradient(90deg,#edf0d4 0 9px,#fff9df 9px);scrollbar-width:thin}
#menu button{border:0;position:relative;padding:9px 8px 9px 22px!important;background:transparent;color:var(--ink);font-weight:bold;line-height:1.25}
#menu button:hover,#menu button:focus-visible{background:#dae7bc}
#menu button:hover:before,#menu button:focus-visible:before{content:'▶';position:absolute;left:7px;color:#276a55}
#detail{padding:15px;scrollbar-color:#698778 #eeeccd;scrollbar-width:thin;overflow-x:hidden}
#detail>h2{background:#286653;color:#fff9df;margin:-12px -12px 14px;padding:12px;border-bottom:4px solid var(--gold);text-shadow:1px 2px #183d38;letter-spacing:1px}
#detail button,.campaign-actions button,#campaign-scene button,.summary-tabs button{border:2px solid #9eb797;background:#eef0d1;color:var(--ink);box-shadow:inset 0 2px #fffce7;padding:8px}
#detail button:hover,#detail button:focus-visible,#campaign-scene button:hover{background:#d4e5b4;border-color:#47735f}
input,select,textarea{background:#fffef0!important;color:var(--ink)!important;border:2px solid #83977a!important;box-shadow:inset 2px 2px #d7dfc4;min-height:34px}
.party-row{margin:7px 0;padding:8px;border:2px solid #b1c29a;background:linear-gradient(90deg,#d8e8be,#fff8df);gap:5px}
.party-row .pokemon-sprite,.dex-entry .pokemon-sprite{filter:drop-shadow(2px 3px 0 #304c4533)}
.item-row{padding:12px 3px;border-bottom:2px dotted #acb99b}
.dex-grid{gap:7px}.dex-grid button{border:2px solid #b5c89d!important;background:#f5f2d7!important}
progress{appearance:none;border:2px solid #405c4c;border-radius:0;background:#e1dfc4;height:12px;overflow:hidden}
progress::-webkit-progress-bar{background:#dddcc2}progress::-webkit-progress-value{background:linear-gradient(#a4ecad 0 35%,#45b886 35% 70%,#298661 70%)}
progress::-moz-progress-bar{background:#45b886}
#dialog{border-bottom:5px solid #597c66!important;line-height:1.65;padding:15px 18px;font-weight:bold;background:linear-gradient(#fffce6,#f0efd2)}
#battle{padding:8px;background:#eeefd4;border-color:#354f4a!important}
.battle-field{border-bottom:4px solid #9cb588;background:radial-gradient(ellipse at 73% 39%,#92b46b 0 16%,#c2d490 16% 19%,transparent 19.5%),radial-gradient(ellipse at 25% 94%,#91af66 0 22%,#c5d895 22% 25%,transparent 25.5%),repeating-linear-gradient(0deg,#d6e7bc 0 3px,#dcebc6 3px 6px)}
.battle-field>div{gap:3px;font-weight:bold;text-shadow:1px 1px #fff8db}
.battle-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:6px;background:#536e68;border:2px solid #253f44}
.battle-actions button{min-height:36px;border:2px solid #99ad8f;background:#fff9df;color:#284645;font-weight:bold;box-shadow:inset 0 -3px #e1dfc2}
.battle-actions button:hover,.battle-actions button:focus-visible{background:#cce0ae}
#battle>p{background:#356a69;color:#fff9df;padding:10px;border:3px solid #aab791;text-shadow:1px 1px #203c45;line-height:1.45}
.chat{padding:12px;background:#f6f2d9}.chat #chat-log{color:#34544c}#chat-form{flex-wrap:wrap}#chat-form input{min-width:100px}
#auth{border:4px solid #789784;border-radius:0;box-shadow:0 0 0 3px #f4eac5,8px 10px 0 #09292b;min-height:610px}
.auth-art{image-rendering:pixelated;background:linear-gradient(#173e3144,#163a30e8),var(--asset-login-hoenn, url('/assets/login-hoenn.png')) center/cover;border-right:4px solid #7c9b78}
.auth-card{background:repeating-linear-gradient(0deg,#fff9df 0 3px,#fbf5dc 3px 6px);border-top:6px solid var(--gold)}
.auth-card form>button,.station-primary,.character-card button{background:#286b56;color:#fff9df;border:3px solid #174b42;box-shadow:inset 0 2px #6f9d77,0 3px #173d39;font-weight:bold}
.auth-art h1{color:#fff5d5}.auth-links button{color:#2d6155;text-decoration:underline;text-underline-offset:4px}
#characters{max-width:100%;width:100%;border:0;border-radius:0;background:#153c38;color:#fff3d2}
.trainer-station{border-radius:0!important}.journey-slot,.trainer-editor{border-radius:0!important}.station-header{border-bottom:3px solid var(--gold)}
.trainer-choice{border-radius:0!important}.trainer-choice[aria-pressed=true]{outline:3px solid var(--gold)}
.trainer-showcase{background:repeating-linear-gradient(0deg,#dce9c7 0 4px,#e6efd4 4px 8px);color:#284b42;border-radius:0!important}
.toolbar button{border:2px solid #7b9b84;background:#285649;color:#fff2d2}.summary-tabs button[aria-selected=true]{background:#286b56!important;color:#fff9df!important}
#campaign-scene{max-height:95%;overflow:auto}#campaign-scene label{line-height:1.6}.campaign-starters{gap:6px}
@media(max-width:600px){main{padding:12px 8px}#overlay{padding:7px;gap:7px}#menu{min-width:95px;font-size:10px}#menu button{padding:7px 4px 7px 18px!important}#detail{font-size:11px;padding:9px;max-width:calc(100% - 103px);width:calc(100% - 103px);max-height:96%}#detail>h2{margin:-6px -6px 10px;font-size:13px}#detail button{padding:7px}.battle-field{min-height:145px}.battle-field canvas{width:96px;height:96px}.battle-actions button{font-size:11px}.auth-art{border-right:0;border-bottom:4px solid #789784}.auth-card{padding:24px}.character-slots{grid-template-columns:1fr}.chat{margin-top:22px}#dialog{padding:9px;font-size:11px}.toolbar{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
