/* Trainer surfaces share a readable scale independent from the game's zoom. */
/* Poké Mart: Emerald's balance/catalog/description composition, trainer palette. */
#screen #detail .mart-panel{max-width:1120px;gap:16px}
#screen #detail .mart-panel .tp-header{margin-bottom:0}
.mart-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px}
.mart-aside{display:flex;flex-direction:column;gap:12px;min-width:0}
.mart-balance,.mart-showcase,.mart-bag,.mart-catalog,.mart-detail{border:1px solid #4f756b;border-radius:14px;background:#173236;overflow:hidden}
.mart-balance{padding:18px;display:grid;gap:4px;background:linear-gradient(135deg,#305b4c,#193a36)}
.mart-balance small,.mart-showcase small,.mart-bag span,.mart-copy>small,.mart-order>small{font-size:10px;font-weight:700;letter-spacing:1.5px;color:#bcd3b5}
.mart-balance strong{font-size:28px;color:#f6e8b3;line-height:1.3;font-variant-numeric:tabular-nums}
.mart-balance span{font-size:12px;color:#b9cec6}
.mart-showcase{flex:1;min-height:180px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:18px;gap:7px;background:radial-gradient(ellipse at center,#46664766,#142d32 75%);text-align:center}
.mart-icon{width:36px;height:36px;object-fit:contain;image-rendering:pixelated;flex:none}
.mart-showcase .mart-icon{width:80px;height:80px;filter:drop-shadow(0 8px 9px #0005)}
.mart-showcase strong{font-size:18px;color:#f4f1da}.mart-showcase b{color:#d8deb6;font-size:16px}
.mart-bag{padding:12px 18px;display:flex;justify-content:space-between;align-items:center}.mart-bag strong{font-size:22px;color:#eff4dc}
.mart-catalog{min-width:0;display:flex;flex-direction:column}
.mart-toolbar{padding:14px;display:flex;gap:12px;align-items:center;background:#0f272c;border-bottom:1px solid #3f625b}
.mart-tabs{display:flex;gap:6px;flex:none}
#screen #detail .mart-tabs button[aria-pressed=true]{background:#456f54;border-color:#dfc978;color:#fff3bc}
#screen #detail .mart-toolbar input{min-width:70px;flex:1;width:100%}
.mart-list{height:330px;overflow-y:auto;padding:8px;scrollbar-width:thin;scrollbar-color:#587c68 transparent;overscroll-behavior:contain}
#screen #detail .mart-list .mart-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;border:1px solid transparent;border-radius:9px;padding:8px 12px;background:transparent;text-align:left;color:#edf4e8}
#screen #detail .mart-list .mart-row[aria-pressed=true]{border-color:#ddc774;background:#31554a;box-shadow:inset 3px 0 #ddc774}
#screen #detail .mart-list .mart-row:hover{background:#274a43}
.mart-item-name{flex:1;font-size:15px}.mart-price{white-space:nowrap;color:#eee3b5;font-size:14px;font-variant-numeric:tabular-nums}
.mart-empty,.mart-pending{padding:16px;color:#dfd1a2}
.mart-detail{display:grid;grid-template-columns:minmax(0,1fr) 270px;border-top:3px solid #cfbd7b;background:linear-gradient(120deg,#25443e,#162e34)}
.mart-description{display:flex;gap:18px;align-items:center;padding:24px;min-width:0}
.mart-description>.mart-icon{width:64px;height:64px;background:#0e252c;border:1px solid #557969;border-radius:12px;padding:10px}
#screen #detail .mart-copy h3{margin:4px 0 8px;font-size:20px;color:#f3efda}
#screen #detail .mart-copy p{margin:0;font-size:14px;color:#c6d7cf;line-height:1.6;overflow-wrap:anywhere}
.mart-order{display:grid;grid-template-columns:1fr;gap:8px;padding:18px;border-left:1px solid #4f756b;background:#0c222966}
.mart-stepper{display:grid;grid-template-columns:44px minmax(45px,1fr) 44px;gap:6px}
#screen #detail .mart-stepper input{text-align:center;font-weight:700}
#screen #detail .mart-confirm{background:#416d50;border-color:#c6bb79;color:#fff8d5;min-height:44px}
.mart-total{font-size:16px;color:#f1e1ac;font-variant-numeric:tabular-nums}.mart-order-hint{font-size:11px;color:#c3cec0;min-height:2.8em}
@media(max-width:650px){
 #screen #detail .mart-panel{gap:10px}.mart-layout{grid-template-columns:minmax(0,1fr);gap:10px}.mart-aside{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.mart-balance{padding:12px}.mart-balance strong{font-size:23px}.mart-showcase{grid-column:2;grid-row:1/3;min-height:0;padding:8px;gap:3px}.mart-showcase .mart-icon{width:48px;height:48px}.mart-showcase strong{font-size:14px}.mart-showcase small,.mart-showcase b{display:none}.mart-bag{padding:6px 12px}.mart-bag strong{font-size:17px}.mart-bag span{font-size:9px}.mart-toolbar{flex-wrap:wrap;padding:8px;gap:8px}.mart-tabs{flex:1}.mart-tabs button{flex:1}#screen #detail .mart-toolbar input{flex-basis:100%}.mart-list{height:220px}#screen #detail .mart-list .mart-row{padding:6px;gap:7px;min-height:49px}.mart-row .mart-icon{width:28px;height:28px}.mart-item-name{font-size:13px}.mart-price{font-size:12px}.mart-detail{grid-template-columns:1fr}.mart-description{padding:14px;gap:10px}.mart-description>.mart-icon{width:48px;height:48px;padding:6px}#screen #detail .mart-copy h3{font-size:17px}#screen #detail .mart-copy p{font-size:13px}.mart-order{border-left:0;border-top:1px solid #4f756b;padding:12px;grid-template-columns:1fr 1fr;align-items:center}.mart-order>small:first-child{grid-column:1/-1}.mart-order .mart-stepper{grid-column:1/-1}.mart-order-hint{grid-column:1/-1;min-height:0}
}
#screen #overlay #detail.trainer-panel,#screen #overlay #detail.classic-party,#screen #overlay #detail.classic-pc{inset:8px 8px 42px!important;padding:22px!important;overflow:auto!important;background:#0d2026!important;background-image:radial-gradient(ellipse at 95% 0,#24554880,transparent 50%)!important;color:#ecf4ec!important;border:1px solid #668b74!important;border-radius:16px!important;font:15px/1.5 system-ui,sans-serif!important;text-shadow:none!important;box-sizing:border-box!important}
#screen #detail.trainer-panel *,#screen #detail.classic-party *,#screen #detail.classic-pc *,dialog.pokemon-window *,dialog.trainer-compose *{box-sizing:border-box;text-shadow:none}
#screen #detail .tp-panel{width:100%;max-width:1280px;margin:auto;display:grid;gap:20px}
#screen #detail :is(.tp-header,.tp-party-header){position:static;background:none;border:0;padding:0;margin:0 0 16px;color:#ecf4ec;display:flex;justify-content:space-between;align-items:start;gap:16px}
#screen #detail .tp-party-header{display:block}
#screen #detail :is(.tp-header,.tp-party-header) h2{font:700 28px/1.2 system-ui,sans-serif;margin:5px 0 8px;padding:0;border:0;background:none;color:#f6f4da;letter-spacing:-.5px}
#screen #detail :is(.tp-header,.tp-party-header) p{margin:0;color:#b3c9c3;font:14px/1.6 system-ui,sans-serif}
.tp-eyebrow{font:700 10px/1.4 system-ui,sans-serif;letter-spacing:2px;color:#a9c998}
#screen #detail.trainer-panel :is(button,input,select,textarea),#screen #detail.classic-pc :is(button,select),#screen #detail.classic-party .classic-popup button,#screen #detail.classic-party .classic-footer button,dialog.pokemon-window button,dialog.trainer-compose :is(button,input,textarea){position:static;transform:none;float:none;min-width:0;max-width:100%;min-height:40px;width:auto;height:auto;margin:0;padding:10px 14px;border:1px solid #587c74;border-radius:9px;background:#1c3b3e;color:#edf6e9;font:600 13px/1.4 system-ui,sans-serif;box-shadow:none;text-transform:none;cursor:pointer;white-space:normal}
#screen #detail.trainer-panel button:hover,#screen #detail.classic-pc button:hover,dialog.pokemon-window button:hover,dialog.trainer-compose button:hover{background:#305954;border-color:#aad8b4}
#screen #detail button:disabled,dialog.pokemon-window button:disabled{opacity:.45;cursor:default}
#screen #detail :is(button,input,select):focus-visible,dialog.pokemon-window :focus-visible,dialog.trainer-compose :focus-visible{outline:3px solid #e7cc83;outline-offset:2px}
#screen #detail.trainer-panel :is(input,select,textarea),dialog.trainer-compose :is(input,textarea){background:#0e242b;width:100%;font-weight:400}
#screen #detail .tp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr));gap:16px}
#screen #detail .tp-card{display:block;position:relative;width:auto;min-width:0;max-width:none;max-height:none;margin:0;padding:20px;border:1px solid #385b59;border-radius:14px;background:linear-gradient(145deg,#193438,#12292f);color:#e6f0e9;overflow:visible}
#screen #detail .tp-card h3{font:700 20px/1.3 system-ui,sans-serif;color:#f6f4dd;margin:10px 0}
#screen #detail .tp-card p{margin:10px 0}
.tp-chips,.tp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tp-chip{display:inline-flex;align-items:center;border:1px solid #789b8770;border-radius:20px;background:#31565070;color:#dbeacb;font:600 11px/1.3 system-ui,sans-serif;padding:5px 9px}
#screen #detail .tp-controls{display:grid;grid-template-columns:2fr 1fr;gap:14px}
#screen #detail .tp-field,dialog.trainer-compose .tp-field{display:flex;flex-direction:column;gap:6px;font:500 12px/1.5 system-ui,sans-serif;color:#bbd3ca;min-width:0;margin:0}
#screen #detail .tp-empty{padding:36px 24px;border:1px dashed #648176;border-radius:14px;text-align:center;background:#23403a40;grid-column:1/-1;color:#bdcec5}
#screen #detail .tp-empty h3{color:#f0eed4;font:700 22px system-ui,sans-serif}
.tp-muted{color:#a9c4bd!important;font:13px/1.6 system-ui,sans-serif!important}
#screen #detail .tp-reward{display:block;font:750 28px/1.5 system-ui,sans-serif;color:#ddce92;margin:12px 0}
#screen #detail .tp-event[data-active=true]{border-color:#86b899;box-shadow:inset 0 3px #84cfa6}
#screen #detail .tp-event small{display:block;color:#b4c7be}
#screen #detail progress,dialog.pokemon-window progress{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:6px;overflow:hidden;background:#071e25;accent-color:#84c99b}
#screen #detail progress::-webkit-progress-bar,dialog.pokemon-window progress::-webkit-progress-bar{background:#09242b}
#screen #detail progress::-webkit-progress-value,dialog.pokemon-window progress::-webkit-progress-value{background:linear-gradient(90deg,#549f87,#b7d996)}
#screen #detail .tp-event-clock{font-weight:700;color:#c4e8ce}
#screen #detail .tp-friend-title{display:flex;align-items:center;gap:12px}
#screen #detail .tp-friend-title h3{flex:1;word-break:break-word}
#screen #detail .tp-avatar{display:grid;place-items:center;flex:0 0 46px;height:46px;border-radius:14px;background:linear-gradient(140deg,#59877c,#1b424b);color:#eee4be;font-weight:800;font-size:22px}
#screen #detail .tp-friend-more{border:0;border-top:1px solid #365c56;margin-top:16px;padding-top:12px;color:#b8cec4;background:none}
#screen #detail .tp-friend-more summary{font:600 13px system-ui,sans-serif;cursor:pointer;margin-bottom:12px}
#screen #detail .tp-friend-more button{margin-top:10px}
#screen #detail .tp-friend-title+.tp-chip{margin:8px 0 16px}
#screen #detail .tp-steps{border:1px solid #476c60;background:#315c4c50;padding:18px;border-radius:12px;color:#d9e5c0}
#screen #detail .tp-trade-sides{display:grid;grid-template-columns:1fr 1fr;gap:18px}
#screen #detail .tp-trade-mons{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin:12px 0}
#screen #detail .tp-mon{padding:10px!important;display:grid;gap:6px;font-size:13px}
#screen #detail .tp-mon small{color:#b1c5c0}
.tp-art{background:radial-gradient(ellipse at 50% 85%,var(--element,#548b7b) 0,transparent 70%),linear-gradient(155deg,#182e38,#0c1b25);display:grid;place-items:center;position:relative;border-radius:12px;overflow:hidden;min-height:120px}
#screen #detail .tp-art canvas.pokemon-sprite,dialog.pokemon-window .tp-art canvas.pokemon-sprite{display:block!important;width:128px!important;height:128px!important;max-width:100%;object-fit:contain;filter:drop-shadow(0 8px 8px #06131888);image-rendering:pixelated}
#screen #detail .tp-pick{padding:0!important;text-align:left;background:none!important;border:2px solid transparent!important}
#screen #detail .tp-pick[aria-pressed=true]{border-color:#e8c876!important;border-radius:16px;box-shadow:0 0 0 2px #ad955344}
#screen #detail .tp-item-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
#screen #detail .tp-trade-edit summary{cursor:pointer;font:700 18px system-ui,sans-serif;margin-bottom:14px}
#screen #detail .tp-trade-confirm{padding:18px;background:#284942;border:1px solid #6f8b72;border-radius:14px}
/* Party cards preserve the server selection, item and field-move actions. */
#screen #detail.classic-party .classic-team{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;inset:auto;width:100%;height:auto;margin:0;padding:0}
#screen #detail.classic-party .classic-slot{position:relative;inset:auto;width:auto;height:auto;min-height:215px;margin:0;padding:16px;border:1px solid #507b6e;border-radius:14px;background:linear-gradient(140deg,#23453f,#132b33);color:#f3f3dc;font:15px/1.4 system-ui,sans-serif;display:grid;grid-template-columns:100px 1fr;grid-template-rows:auto auto auto;align-items:center;gap:8px;text-align:left;box-shadow:none;clip-path:none;transform:none}
#screen #detail.classic-party .classic-slot>*{position:static!important;width:auto;height:auto;font-family:system-ui,sans-serif}
#screen #detail.classic-party .classic-slot .tp-art{grid-column:1;grid-row:1/4;min-height:110px}
#screen #detail.classic-party .classic-slot .tp-art canvas.pokemon-sprite{width:96px!important;height:96px!important}
#screen #detail.classic-party .classic-slot .tp-chips{grid-column:2;grid-row:2;gap:3px}
#screen #detail.classic-party .classic-slot .mon-name{grid-column:2;grid-row:1;font-size:17px;overflow-wrap:anywhere}
#screen #detail.classic-party .classic-slot .mon-level{grid-column:2;grid-row:3;font-size:13px;color:#cbdcc9}
#screen #detail.classic-party .classic-slot .shiny-seal{position:absolute!important;top:10px;left:12px;font-size:10px}
#screen #detail.classic-party .classic-slot .classic-health{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-width:0}
#screen #detail.classic-party .classic-slot .classic-health progress{flex:1;height:8px}
#screen #detail.classic-party .classic-slot .mon-hp{grid-column:1/-1;font-size:12px;text-align:right}
#screen #detail.classic-party .classic-slot .held-dot{font-size:11px;color:#dacb92;grid-column:1/-1}
#screen #detail.classic-party .classic-slot.empty{display:grid;place-items:center;min-height:170px;background:#18333950;border-style:dashed;color:#6e9289;font-size:13px}
#screen #detail.classic-party .classic-slot:focus{outline:2px solid #e0c680;outline-offset:2px}
#screen #detail.classic-party .classic-footer{position:static;display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:18px;padding:15px;background:#162f34;border:1px solid #41645c;border-radius:12px;width:100%;height:auto;font:13px system-ui,sans-serif}
#screen #detail.classic-party .classic-footer p{position:static;background:none;border:0;color:#c0d2c9;padding:0;margin:0;flex:1}
#screen #detail.classic-party .classic-popup{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(90%,390px);max-width:none;height:auto;max-height:90%;overflow:auto;display:grid;gap:9px;background:#16383b;color:#eef1d7;padding:22px;border:1px solid #b1a26f;border-radius:14px;box-shadow:0 20px 90px #000c;z-index:5;font:15px system-ui,sans-serif}
/* Storage uses real layout, never a stretched 240px screenshot. */
#screen #detail.classic-pc .pc-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
#screen #detail.classic-pc .pc-toolbar>*{position:static!important;background-image:none!important;transform:none!important;font-size:13px!important;color:#e7efe1!important}
#screen #detail.classic-pc .pc-board{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-width:none;max-height:none;display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px;padding:0;border:0;background:none!important;transform:none!important;overflow:visible;font:14px/1.5 system-ui,sans-serif}
#screen #detail.classic-pc .pc-inspector{position:static;padding:16px;background:#1b393d;border:1px solid #54766a;border-radius:14px;min-width:0}
#screen #detail.classic-pc .pc-portrait{position:static!important;inset:auto;width:100%;height:180px;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:radial-gradient(ellipse at bottom,var(--element,#4d8170),#102730 85%)}
#screen #detail.classic-pc .pc-portrait canvas.pokemon-sprite{width:160px!important;height:160px!important;image-rendering:pixelated}
#screen #detail.classic-pc .pc-data{position:static!important;inset:auto;width:100%;height:auto;display:grid;gap:9px;padding-top:14px;color:#e6efdf;font:13px/1.5 system-ui,sans-serif}
#screen #detail.classic-pc .pc-mon-name{font:700 22px system-ui,sans-serif}
#screen #detail.classic-pc .pc-mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:11px;color:#afccc4}
#screen #detail.classic-pc .pc-slots{position:static!important;inset:auto;width:100%;height:auto;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-content:start;border:0;padding:0;background:none}
#screen #detail.classic-pc .pc-slot{position:relative!important;inset:auto;width:100%;height:116px;min-height:0;padding:6px;background:#1c3b40;border:1px solid #3e6260;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#dce9d9;overflow:hidden}
#screen #detail.classic-pc .pc-slot canvas.pokemon-sprite{width:64px!important;height:64px!important;position:static!important;transform:none!important;image-rendering:pixelated}
#screen #detail.classic-pc .pc-slot :is(strong,small){font:600 10px/1.3 system-ui,sans-serif;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#screen #detail.classic-pc .pc-slot[data-held=true]{opacity:.45}
#screen #detail.classic-pc .pc-slot:is([data-selected=true],:focus){outline:2px solid #e4c67d;outline-offset:0;border-color:#e4c67d;background:#31574e}
#screen #detail.classic-pc .pc-action-menu{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:3;width:260px;max-width:95%;max-height:90%;height:auto;overflow:auto;display:grid;gap:10px;padding:20px;background:#17363a;border:1px solid #a2a275;border-radius:14px;box-shadow:0 10px 80px #000d;font:15px system-ui,sans-serif}
#screen #detail.classic-pc .pc-action-menu strong{font:700 18px system-ui,sans-serif}
/* A bounded, movable summary keeps the world/PC visible behind it. */
dialog.pokemon-window{position:fixed;inset:auto;margin:0;padding:0;min-width:0;min-height:0;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);background:#102a30;color:#e9efe1;border:1px solid #8eab87;border-radius:17px;box-shadow:0 28px 120px #000b;overflow:hidden;font:14px/1.5 system-ui,sans-serif;z-index:20000}
dialog.pokemon-window[open]{display:flex;flex-direction:column}
dialog.pokemon-window::backdrop,dialog.trainer-compose::backdrop{background:#06161a80;backdrop-filter:blur(2px)}
dialog.pokemon-window .ps-titlebar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;background:linear-gradient(90deg,#2a5548,#15363d);border-bottom:1px solid #75896a;cursor:move;touch-action:none;user-select:none;flex-shrink:0}
dialog.pokemon-window .ps-titlebar strong{font-size:12px;letter-spacing:1px}
dialog.pokemon-window .ps-titlebar button{min-height:32px;padding:5px 10px;font-size:12px}
dialog.pokemon-window .ps-tabs{display:flex;gap:8px;padding:12px 16px;overflow-x:auto;flex-shrink:0;border-bottom:1px solid #345751}
dialog.pokemon-window .ps-tabs button{white-space:nowrap;flex:1}
dialog.pokemon-window .ps-tabs [aria-selected=true]{background:#aac197;color:#0d302d;border-color:#d3dcac}
dialog.pokemon-window .ps-content{display:grid;grid-template-columns:minmax(170px,30%) minmax(0,1fr);overflow:auto;min-height:0;flex:1}
dialog.pokemon-window .ps-portrait{padding:20px;display:flex;flex-direction:column;gap:12px;align-items:stretch;background:#21423c70}
dialog.pokemon-window .ps-portrait .tp-art{height:170px;flex-shrink:0}
dialog.pokemon-window .ps-portrait h2{font:700 22px system-ui,sans-serif;margin:0;color:#f0edce;overflow-wrap:anywhere}
dialog.pokemon-window .ps-portrait p{margin:0;font-size:12px;color:#bdd1c7}
dialog.pokemon-window .ps-data{padding:18px 22px;min-width:0}
dialog.pokemon-window .ps-line{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #31524e;font-size:13px}
dialog.pokemon-window .ps-line span{color:#b4c8bf}
dialog.pokemon-window .ps-line strong{text-align:right;overflow-wrap:anywhere;max-width:65%}
dialog.pokemon-window .ps-stats{width:100%;border-collapse:collapse;font-size:12px;color:#e8efdf;background:none}
dialog.pokemon-window .ps-stats :is(th,td){padding:10px 5px;border-bottom:1px solid #3d6057;background:none;text-align:right}
dialog.pokemon-window .ps-stats th:first-child{text-align:left}
dialog.pokemon-window .ps-up{color:#ffbe98}dialog.pokemon-window .ps-down{color:#91c6fa}
dialog.pokemon-window .ps-move{width:100%;display:grid;gap:8px;text-align:left;margin-bottom:10px;background:#1b3b3f}
dialog.pokemon-window .ps-move[aria-pressed=true]{border:2px solid #e4c675}
dialog.pokemon-window .ps-move span{font-weight:400;color:#c0d0c7}
dialog.pokemon-window .ps-foot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #3b5d54;padding:5px 10px;flex-shrink:0;color:#9ebbaf;font-size:11px}
dialog.pokemon-window button.ps-resize{cursor:nwse-resize;touch-action:none;border:0;background:none;padding:5px;min-height:24px;width:28px}
dialog.trainer-compose{position:fixed;inset:0;width:min(520px,calc(100vw - 28px));height:fit-content;max-height:calc(100dvh - 32px);max-width:none;margin:auto;padding:24px;background:#15363a;color:#edf1dd;border:1px solid #7f9f86;border-radius:16px;font:14px/1.6 system-ui,sans-serif;overflow:auto}
dialog.trainer-compose form{display:grid;gap:18px}dialog.trainer-compose h2{font-size:22px;margin:0}dialog.trainer-compose textarea{resize:vertical}
@media(max-width:1050px){#screen #detail.classic-party .classic-team{grid-template-columns:repeat(2,minmax(0,1fr))}#screen #detail.classic-pc .pc-board{grid-template-columns:215px minmax(0,1fr)}#screen #detail.classic-pc .pc-slots{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:700px),(max-width:950px) and (max-height:500px){
 #screen #overlay:has(:is(.trainer-panel,.classic-party,.classic-pc))[data-view=panel]{position:fixed!important;inset:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0)!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;z-index:10000}
 #screen #overlay #detail.trainer-panel,#screen #overlay #detail.classic-party,#screen #overlay #detail.classic-pc{inset:0!important;width:100%!important;height:100%!important;padding:16px!important;border-radius:0!important;font-size:14px!important}
 #screen #overlay:has(:is(.trainer-panel,.classic-party,.classic-pc))[data-view=panel] :is(.trainer-menu-shell,.panel-back){display:none!important}
 body:has(#overlay[data-view=panel]:not([hidden]) :is(.trainer-panel,.classic-party,.classic-pc)) :is(#touch-controls,.game-frame-ornaments,#exit-immersive-btn,#desktop-game-controls){display:none!important}
 #screen #detail .tp-header{gap:8px}#screen #detail .tp-header h2,#screen #detail .tp-party-header h2{font-size:24px}
 #screen #detail .tp-card{padding:15px}#screen #detail .tp-trade-sides{grid-template-columns:1fr}#screen #detail .tp-trade-mons{grid-template-columns:repeat(2,minmax(0,1fr))}
 #screen #detail.classic-party .classic-team{gap:10px}#screen #detail.classic-party .classic-slot{padding:10px;grid-template-columns:1fr;gap:6px;min-height:250px}
 #screen #detail.classic-party .classic-slot .tp-art{grid-column:1;grid-row:1;min-height:90px}#screen #detail.classic-party .classic-slot .mon-name{grid-column:1;grid-row:2;font-size:14px}#screen #detail.classic-party .classic-slot .tp-chips{grid-column:1;grid-row:3}#screen #detail.classic-party .classic-slot .mon-level{grid-column:1;grid-row:4}
 #screen #detail.classic-pc .pc-board{grid-template-columns:1fr}#screen #detail.classic-pc .pc-inspector{display:grid;grid-template-columns:100px 1fr;gap:12px;padding:12px}#screen #detail.classic-pc .pc-portrait{height:115px}#screen #detail.classic-pc .pc-portrait canvas.pokemon-sprite{width:96px!important;height:96px!important}#screen #detail.classic-pc .pc-data{padding:0;font-size:11px;gap:6px}#screen #detail.classic-pc .pc-mon-name{font-size:19px}#screen #detail.classic-pc .pc-mini-stats{display:none}#screen #detail.classic-pc .pc-slots{grid-template-columns:repeat(3,minmax(0,1fr))}
 dialog.pokemon-window .ps-content{grid-template-columns:1fr}dialog.pokemon-window .ps-portrait{padding:12px;display:grid;grid-template-columns:96px 1fr;gap:6px}dialog.pokemon-window .ps-portrait .tp-art{grid-row:1/5;height:100px;min-height:0}dialog.pokemon-window .tp-art canvas.pokemon-sprite{width:96px!important;height:96px!important}dialog.pokemon-window .ps-portrait h2{font-size:19px}dialog.pokemon-window .ps-data{padding:12px}dialog.pokemon-window .ps-titlebar{padding:8px;gap:4px}dialog.pokemon-window .ps-titlebar strong{font-size:10px}dialog.pokemon-window .ps-titlebar .tp-actions{gap:3px}dialog.pokemon-window .ps-titlebar button{padding:4px 7px}dialog.pokemon-window .ps-titlebar button:nth-child(3){display:none}dialog.pokemon-window .ps-tabs{padding:8px;gap:5px}dialog.pokemon-window .ps-tabs button{padding:8px;font-size:12px}dialog.pokemon-window .ps-foot small{font-size:10px}dialog.pokemon-window .ps-line{font-size:12px}
}
/* Explicitly retire the fixed GBA grid and high-priority pixel theme rules. */
#screen #overlay #detail:is(.trainer-panel,.classic-party,.classic-pc) *,dialog.pokemon-window *,dialog.trainer-compose *{font-family:Arial,Helvetica,sans-serif!important}
#screen #detail.classic-party .classic-team{grid-template-rows:none!important;grid-auto-rows:auto!important}
#screen #overlay #detail.classic-party .classic-team .classic-slot{grid-column:auto!important;grid-row:auto!important;grid-template-columns:100px 1fr!important;grid-template-rows:auto auto auto!important;padding:16px!important;border:1px solid #53796c!important;border-radius:14px!important;box-shadow:none!important;background:linear-gradient(140deg,#23453f,#132b33)!important}
#screen #overlay #detail.classic-party .classic-slot .classic-health{grid-row:auto!important;grid-column:1/-1!important}
#screen #overlay #detail.classic-party .classic-slot .mon-hp{grid-row:auto!important;grid-column:1/-1!important}
#screen #overlay #detail.classic-party .classic-slot .mon-name{white-space:normal;text-transform:none}
#screen #overlay #detail.classic-party .classic-slot.empty{background:#18333950!important;display:grid!important;grid-template-columns:1fr!important;border-style:dashed!important}
#screen #overlay #detail.classic-party .classic-slot:focus{outline-color:#e1ca86!important;background:#2a5045!important}
#screen #overlay #detail.classic-pc :is(button,select){padding:10px 12px!important;border:1px solid #557a70!important;border-radius:8px!important;background:#23463f!important;min-height:40px!important;font:600 13px/1.4 Arial,sans-serif!important;box-shadow:none!important}
#screen #overlay #detail.classic-pc .pc-toolbar :is(button,select){width:auto!important;height:auto!important}
#screen #overlay #detail.classic-pc .pc-slot{background:#1a373c!important;border-color:#3e605c!important;min-height:110px!important;padding:5px!important}
#screen #overlay #detail.classic-pc .pc-slots{grid-template-rows:none!important;grid-auto-rows:116px!important}
#screen #overlay #detail.classic-pc .pc-data{overflow:visible!important}
#screen #overlay #detail.classic-pc .pc-data strong{font:700 22px/1.3 Arial,sans-serif!important}
#screen #overlay[data-view=panel] #detail.classic-party{display:block!important}
#screen #overlay #detail .tp-panel :is(input,select,textarea){border:1px solid #51756c!important;border-radius:8px!important;background:#112c32!important;color:#ecf2e5!important;min-height:42px!important;padding:10px!important;font-size:14px!important}
#screen #overlay #detail.classic-party .classic-footer button{border:1px solid #709487!important;background:#2b5147!important}
#screen #overlay #detail :is(.tp-panel,.classic-footer,.classic-popup) button,dialog.pokemon-window button,dialog.trainer-compose :is(button,input,textarea){border-radius:9px!important}
dialog.pokemon-window .ps-portrait>.tp-actions{grid-column:1/-1;display:flex!important;flex-direction:row!important}
@media(max-width:700px),(max-width:950px) and (max-height:500px){#screen #overlay #detail.classic-party .classic-team .classic-slot{grid-template-columns:1fr!important;padding:10px!important}#screen #overlay #detail.classic-pc .pc-toolbar :is(button,select){font-size:12px!important;padding:9px!important}}


/* Override the legacy light-PC menu, including its important button colors. */
#screen #detail.classic-pc .pc-action-menu,
#screen #detail.classic-pc .pc-action-menu strong,
#screen #detail.classic-pc .pc-action-menu button{color:#fff!important}
#screen #detail.classic-pc .pc-action-menu button:focus-visible{background:#31574e!important;outline:2px solid #e4c67d!important;color:#fff!important}

.pokemon-window .ps-meter{display:grid;gap:5px;margin:14px 0;font-size:12px;color:#edf4e8}.pokemon-window .ps-meter progress{width:100%;height:14px;accent-color:#80d6a9}

/* Compact team rail and the original leader + five reserve arrangement. */
#screen .party-rail{position:absolute;z-index:25;right:8px;top:50%;transform:translateY(-50%);width:74.4px;max-height:calc(100% - 130px);padding:6px;border:1.2px solid #648978;border-radius:15.6px;background:#102b2ee8;box-shadow:0 6px 21.6px #0005;color:#fff;box-sizing:border-box;display:flex;flex-direction:column;gap:4.8px;font:14.4px system-ui,sans-serif}
#screen .party-rail[hidden],#screen:has(#overlay:not([hidden]),#battle:not([hidden]),#dialog:not([hidden])) .party-rail{display:none}
#screen .party-rail-toggle{width:100%;min-height:32.4px;padding:3.6px;border:0;border-radius:8.4px;background:#294c43;color:#e8f4d6;font:700 16.8px system-ui;cursor:pointer}
#screen .party-rail-list{display:grid;gap:6px;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
#screen .party-rail.collapsed{width:40.8px}#screen .party-rail.collapsed .party-rail-list{display:none}
#screen .party-rail-slot{position:relative;display:block;width:100%;height:80.4px;min-height:80.4px;padding:16.8px 3.6px 9.6px;border:1.2px solid #426e63;border-radius:9.6px;background:#10292f;color:#fff;cursor:pointer;box-sizing:border-box;touch-action:manipulation}
#screen .party-rail-slot:first-child{border-color:#d9c178;background:#284d43}
#screen .party-rail-slot canvas{width:48px!important;height:48px!important;object-fit:contain;pointer-events:none}
#screen .party-rail-position{position:absolute;left:3.6px;top:1.2px;font:700 10.8px system-ui;color:#dce9cf}
#screen .party-rail-level{position:absolute;right:3.6px;top:1.2px;color:#fff4c7;font:700 10.8px/1.3 system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none}
#screen .party-rail-slot progress{position:absolute;bottom:4.8px;left:4.8px;width:calc(100% - 9.6px);height:4.8px;accent-color:#91d8a1;border:0}
#screen .party-rail-held{position:absolute;right:0;bottom:8.4px;width:25.2px;height:25.2px;display:grid;place-items:center;background:#08232ee8;border:1.2px solid #d9c178;border-radius:6px}
.party-item-icon{width:24px!important;height:24px!important;min-width:24px;object-fit:contain;image-rendering:pixelated;vertical-align:middle}
#screen .party-rail-held .party-item-icon{width:21.6px!important;height:21.6px!important;min-width:21.6px}
#screen .party-rail-slot[data-fainted=true]{filter:grayscale(.9);opacity:.65}
#screen .party-rail-slot:is(:focus-visible,.drop-target){outline:2.4px solid #ffdc87;outline-offset:-2.4px;background:#446a4d}
#screen:has(.party-rail:not([hidden]):not(.collapsed)) #companion-chat-toggle{right:90.4px}
dialog.party-actions-dialog{position:fixed;inset:0;width:min(410px,calc(100vw - 24px));max-height:calc(100dvh - 40px);margin:auto;padding:18px;border:1px solid #8eb29a;border-radius:16px;background:#112c30;color:#f4f6e5;box-sizing:border-box;overflow:auto;font:14px/1.5 system-ui,sans-serif;text-shadow:none;box-shadow:0 20px 70px #0009}
dialog.party-actions-dialog::backdrop{background:#00131366}
.party-actions-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:0;border:0;background:none}
.party-actions-dialog h2{font:700 20px/1.3 system-ui;margin:0;color:#f8edc3;overflow-wrap:anywhere}
.party-actions-dialog p{margin:4px 0 10px;color:#c0d4cc;font:13px/1.5 system-ui}
.party-actions-body{display:grid;gap:8px}.party-actions-dialog button{position:static;width:100%;min-height:44px;margin:0;padding:10px 13px;border:1px solid #527c6c;border-radius:9px;background:#24473f;color:white;font:600 14px/1.4 system-ui;cursor:pointer;text-align:left;box-sizing:border-box}
.party-actions-dialog header button{width:44px;flex:none;text-align:center}.party-actions-dialog button:focus-visible{outline:2px solid #e8cd87}.party-actions-dialog button:disabled{opacity:.45;cursor:default}.party-actions-dialog .party-equip-option{display:flex;align-items:center;gap:12px}.party-equip-option span{flex:1}.party-actions-dialog .party-actions-error{color:#ffd49f;margin:10px 0 0}.party-actions-error:empty{display:none}
#screen #overlay #detail.classic-party.party-classic-layout{inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);width:min(1080px,calc(100% - 24px))!important;height:auto!important;min-height:0!important;max-height:calc(100% - 56px)!important;padding:20px!important}
#screen #overlay #detail.party-classic-layout .classic-team{grid-template-columns:minmax(215px,.78fr) minmax(0,1.65fr)!important;grid-template-rows:repeat(5,minmax(80px,auto))!important;gap:9px!important;max-width:100%;align-items:stretch}
#screen #overlay #detail.party-classic-layout .classic-team .classic-slot{grid-column:2!important;grid-row:auto!important;grid-template-columns:60px minmax(0,1fr) minmax(85px,.75fr)!important;grid-template-rows:auto auto auto!important;gap:3px 10px!important;min-height:80px!important;padding:9px 12px!important;border-radius:11px!important}
#screen #overlay #detail.party-classic-layout .classic-slot .tp-art{grid-column:1!important;grid-row:1/4!important;min-height:58px!important;width:60px!important}
#screen #overlay #detail.party-classic-layout .classic-slot .tp-art canvas.pokemon-sprite{width:56px!important;height:56px!important}
#screen #overlay #detail.party-classic-layout .classic-slot .mon-name{grid-column:2!important;grid-row:1!important;font-size:15px;overflow-wrap:anywhere}
#screen #overlay #detail.party-classic-layout .classic-slot .tp-chips{grid-column:2!important;grid-row:2!important;gap:3px}
#screen #overlay #detail.party-classic-layout .classic-slot .tp-chip{font-size:9px;padding:2px 5px}
#screen #overlay #detail.party-classic-layout .classic-slot .mon-level{grid-column:2!important;grid-row:3!important;font-size:11px}
#screen #overlay #detail.party-classic-layout .classic-slot .classic-health{grid-column:3!important;grid-row:1!important;gap:5px}
#screen #overlay #detail.party-classic-layout .classic-slot .mon-hp{grid-column:3!important;grid-row:2!important;font-size:11px}
#screen #overlay #detail.party-classic-layout .classic-slot .held-dot{grid-column:3!important;grid-row:3!important;display:flex;align-items:center;gap:4px;justify-content:flex-end;font-size:10px;min-width:0}
#screen #overlay #detail.party-classic-layout .classic-slot .held-dot span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#screen #overlay #detail.party-classic-layout .classic-team .classic-slot:first-child{grid-column:1!important;grid-row:1/6!important;grid-template-columns:1fr!important;grid-template-rows:1fr auto auto auto auto auto auto!important;align-self:stretch;border-color:#e1c681!important;background:linear-gradient(160deg,#315c4b,#142e38)!important}
#screen #overlay #detail.party-classic-layout .classic-slot:first-child :is(.tp-art,.mon-name,.tp-chips,.mon-level,.classic-health,.mon-hp,.held-dot){grid-column:1!important;grid-row:auto!important;justify-self:stretch}
#screen #overlay #detail.party-classic-layout .classic-slot:first-child .tp-art{width:100%!important;min-height:170px!important;display:grid;place-items:center;background:radial-gradient(ellipse,var(--element),transparent 70%)}
#screen #overlay #detail.party-classic-layout .classic-slot:first-child .tp-art canvas.pokemon-sprite{width:160px!important;height:160px!important}
#screen #overlay #detail.party-classic-layout .classic-slot:first-child .mon-name{font-size:22px}
#screen #overlay #detail.party-classic-layout .classic-slot.empty{grid-template-columns:1fr!important;min-height:80px!important}
#screen #overlay #detail.party-classic-layout .classic-footer{margin-top:12px;min-height:48px}
#screen #overlay #detail.party-classic-layout .tp-party-header{margin-bottom:12px}#screen #overlay #detail.party-classic-layout .tp-party-header h2{font-size:24px;margin:3px 0}
@media(max-width:700px){
 #screen .party-rail{right:4px;width:63.6px;padding:4.8px;max-height:calc(100% - 150px)}#screen .party-rail-slot{height:72px;min-height:72px}#screen .party-rail-slot canvas{width:40.8px!important;height:40.8px!important}#screen .party-rail-level{font-size:10px;right:2.4px}
 #screen #overlay #detail.classic-party.party-classic-layout{width:calc(100% - 14px)!important;padding:12px!important;max-height:calc(100% - 24px)!important}
 #screen #overlay #detail.party-classic-layout .classic-team{grid-template-columns:1fr!important;grid-template-rows:none!important;gap:7px!important}
 #screen #overlay #detail.party-classic-layout .classic-team .classic-slot,#screen #overlay #detail.party-classic-layout .classic-team .classic-slot:first-child{grid-column:1!important;grid-row:auto!important;grid-template-columns:52px minmax(0,1fr) 85px!important;grid-template-rows:auto auto auto!important;min-height:86px!important;padding:8px!important;gap:3px 7px!important}
 #screen #overlay #detail.party-classic-layout .classic-slot:first-child .tp-art{grid-column:1!important;grid-row:1/4!important;width:52px!important;min-height:58px!important}
 #screen #overlay #detail.party-classic-layout .classic-slot .tp-art{width:52px!important}#screen #overlay #detail.party-classic-layout .classic-slot:first-child .tp-art canvas.pokemon-sprite{width:52px!important;height:52px!important}
 #screen #overlay #detail.party-classic-layout .classic-slot:first-child .mon-name{grid-column:2!important;grid-row:1!important;font-size:15px}
 #screen #overlay #detail.party-classic-layout .classic-slot:first-child .tp-chips{grid-column:2!important;grid-row:2!important}#screen #overlay #detail.party-classic-layout .classic-slot:first-child .mon-level{grid-column:2!important;grid-row:3!important}
 #screen #overlay #detail.party-classic-layout .classic-slot:first-child .classic-health{grid-column:3!important;grid-row:1!important}#screen #overlay #detail.party-classic-layout .classic-slot:first-child .mon-hp{grid-column:3!important;grid-row:2!important}#screen #overlay #detail.party-classic-layout .classic-slot:first-child .held-dot{grid-column:3!important;grid-row:3!important}
 #screen #overlay #detail.party-classic-layout .tp-party-header h2{font-size:20px}#screen #overlay #detail.party-classic-layout .tp-party-header p{font-size:12px}
}
.pokemon-window .ps-move-row{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px;margin:10px 0}.pokemon-window .ps-move-row .ps-move{margin:0;min-width:0;text-align:left}.pokemon-window .ps-move-order{display:flex;flex-direction:column;gap:7px}.pokemon-window .ps-move-order button{flex:1;padding:8px;min-height:42px}.pokemon-window .ps-move[aria-pressed=true]{outline:2px solid #edce7e;background:#34564a}.pokemon-window .ps-type{display:inline-block;border:1px solid var(--type-color);border-left:6px solid var(--type-color);background:#10282d;color:#fff;border-radius:7px;padding:5px 9px;font-weight:750;margin:5px 0}.pokemon-window .ps-line strong{overflow-wrap:anywhere}.pokemon-window .ps-move-notice{color:#eddc9a;min-height:1.5em}

/* Mounted travel controls share the party visual language and touch targets. */
.mount-hud{position:absolute;z-index:24;left:12px;top:52px;max-width:min(300px,calc(100% - 98px));padding:12px;border:1px solid #849b68;border-radius:14px;background:linear-gradient(145deg,#133c37f5,#0c222cf5);box-shadow:0 6px 22px #0005;color:#fff;font:13px/1.35 system-ui,sans-serif;pointer-events:auto}
.mount-hud[hidden]{display:none}.mount-hud strong{display:block;color:#f5eaba;margin-bottom:8px}.mount-controls{display:flex;flex-wrap:wrap;gap:6px}.mount-controls button{flex:1 1 auto;min-width:0}.mount-hud button{min-height:42px;padding:8px 12px;border:1px solid #719787;border-radius:9px;background:#214d45;color:#fff;cursor:pointer;font:600 12px system-ui,sans-serif}.mount-hud button:focus-visible{outline:2px solid #ffdc87;outline-offset:2px}.mount-hud button:disabled{opacity:.5}.mount-feedback{display:block;max-width:265px}.mount-feedback:not(:empty){margin-top:8px;color:#ffdb98}.mount-help{font:13px/1.6 system-ui,sans-serif!important;color:#c2d6ce!important;margin:8px 0}.mount-dialog [data-mount-mode]{min-height:48px;text-align:left;border-radius:10px!important}.mount-dialog{max-height:calc(100dvh - 24px)!important;overflow:auto}
#screen:has(#overlay:not([hidden])) .mount-hud,#screen:has(#battle:not([hidden])) .mount-hud,#screen:has(#dialog:not([hidden])) .mount-hud{display:none}
@media(max-width:600px),(max-height:500px){.mount-hud{left:7px;top:42px;padding:8px;max-width:min(252px,calc(100% - 88px));font-size:11px}.mount-hud strong{margin-bottom:5px}.mount-hud button{min-height:40px;padding:7px 10px}}
@media(max-width:600px){.mount-hud{top:auto;bottom:56px;max-width:calc(100% - 94px)}.mount-hud button{min-height:44px}.mount-feedback{font-size:11px}}

/* Panel decoration must never reopen a closed menu panel. */
#screen #overlay[data-view=menu] #detail{display:none!important}
#screen #overlay[hidden]{display:none!important}
.game-wiki-link.discord-menu-link::before{content:""!important;display:none!important}
#screen #detail.classic-pc .pc-team-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 10px;color:#f2edce}
#screen #detail.classic-pc .pc-team-heading span{flex:1;min-width:160px;color:#bcd2c7;font-size:12px}
#screen #detail.classic-pc .pc-team-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-bottom:20px}
#screen #detail.classic-pc .pc-team-slot{position:static;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;width:100%;min-height:125px;padding:9px 5px;background:#1a3739;border:1px solid #52766a;border-radius:12px;color:#f1f6e9;text-align:center;gap:3px;overflow:hidden}
#screen #detail.classic-pc .pc-team-slot canvas.pokemon-sprite{position:static!important;width:44px!important;height:44px!important;transform:none!important;flex:none}
#screen #detail.classic-pc .pc-team-slot strong{font:600 12px system-ui,sans-serif;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#screen #detail.classic-pc .pc-team-slot small{font:10px/1.4 system-ui,sans-serif;color:#bfd3c6}
#screen #detail.classic-pc .pc-team-slot[data-held=true]{border-color:#edcf82;background:#395847}
#screen #detail.classic-pc .pc-team-slot:hover{background:#2b4d45}
#screen #detail.classic-pc .pc-team-slot:focus-visible{outline:2px solid #e4c67d;outline-offset:2px}
#screen #detail.classic-pc .pc-action-menu .pc-release-action{color:#ffc2ad!important;border-color:#a47c65}
.pc-release-dialog .pc-release-ack{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #8c7761;border-radius:8px}
.pc-release-dialog .pc-release-ack input{width:20px;height:20px;flex:none;accent-color:#aac98c}
.pc-release-dialog .party-actions-body>small{overflow-wrap:anywhere;color:#adc2b8}
.pc-release-dialog .pc-release-confirm{background:#683b37;color:#fff3e4;border-color:#ba8b72}
@media(max-width:650px){#screen #detail.classic-pc .pc-team-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}#screen #detail.classic-pc .pc-team-slot{min-height:113px}#screen #detail.classic-pc .pc-team-heading{gap:6px}#screen #detail.classic-pc .pc-team-heading span{flex-basis:100%}}

/* Channel entry: its own world-switch icon and a clear, static red accent. */
#screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link {
  background:linear-gradient(180deg,#c42d39,#941e2b);color:#fff8eb;border:2px solid #ffb388;
  min-height:46px;font-weight:800;box-shadow:inset 0 1px 0 #ffffff38,0 2px 8px #620e2455;
  text-shadow:0 1px 1px #540a16;
}
#screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link::before {
  background:url('/channels-icon-v1.png') center/contain no-repeat;width:32px;height:32px;flex:0 0 32px;margin-right:8px;
}
#screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link:hover {background:linear-gradient(180deg,#dc3744,#ac2332);border-color:#ffe0ad;}
#screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link:focus-visible {outline:3px solid #ffe0ad;outline-offset:3px;}
html[data-mobile-client=true] #screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link {min-height:40px;font-weight:800;}
html[data-mobile-client=true] #screen #overlay[data-view=menu] .trainer-menu-foot .game-wiki-link.world-channels-link::before {width:26px;height:26px;flex-basis:26px;margin-right:6px;}

/* Player invitations stay independent from periodically refreshed panels. */
dialog.interaction-invite{box-sizing:border-box;width:min(440px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:26px;color:#f1fbff;background:linear-gradient(145deg,#173f4d,#091f2b);border:2px solid #72d6d7;border-radius:18px;box-shadow:0 18px 70px #000a;font-family:system-ui,sans-serif;}
dialog.interaction-invite::backdrop{background:#03151b99;}
.interaction-invite>span{font-size:11px;font-weight:800;letter-spacing:1.6px;color:#ffd974;}
.interaction-invite h2{font:700 23px/1.2 system-ui;margin:12px 0;}
.interaction-invite p{font-size:15px;line-height:1.5;overflow-wrap:anywhere;color:#d3e8ed;}
.interaction-invite p[role=status]:empty{display:none;}
.interaction-invite p[role=status]{color:#ffd296;}
.interaction-invite-actions{display:flex;gap:12px;margin-top:24px;}
.interaction-invite-actions button{flex:1;min-height:46px;padding:10px;border:1px solid #7294a2;border-radius:9px;font:700 15px system-ui;cursor:pointer;}
.interaction-invite-actions .invite-accept{background:#f8d35c;color:#162c30;border-color:#ffe59a;}
.interaction-invite-actions .invite-decline{background:#183340;color:#f1f8fa;}
.interaction-invite-actions button:focus-visible{outline:3px solid #fff;outline-offset:3px;}
.interaction-invite-actions button:disabled{opacity:.55;cursor:wait;}
@media(max-width:520px){dialog.interaction-invite{padding:20px;}.interaction-invite h2{font-size:21px;}}
