/* 1.7: the lobby's preserved image_gen jade/bronze plates, sliced without
   stretching ornament into the text area. Layout only; original PNGs retained. */
.native-ui #bug-report-launch.bug-report-in-header{background:var(--menu-command) center/100% 100% no-repeat!important}
@media(max-width:620px) and (orientation:landscape){
 .native-ui #lobby .site-header{gap:6px}
 .native-ui #lobby .site-header .main-nav{gap:4px;min-width:0;max-width:none;flex:1;justify-content:flex-end;overflow:visible}
 .native-ui #lobby .site-header .main-nav .nav-item{width:auto;min-width:0;height:36px;padding:9px 12px;font-size:10px;flex:none}
 .native-ui #lobby .site-header #bug-report-launch.bug-report-in-header{min-height:36px;height:36px;padding:9px 16px;font-size:10px}
}
body.native-ui:not(.in-game)::before{background:linear-gradient(#061d208c,#061d20c9),url('assets/ui/arena-lobby-quiet-native.png?v=stadium2') center/cover!important}
.native-ui #lobby .game-selection .featured-panel{overflow-y:auto!important;scrollbar-width:thin;overscroll-behavior:contain}
.native-ui #lobby .featured-panel :is(#loadout,#selected-stats,.loadout-heading){display:none!important}
.native-ui #lobby .game-selection .featured-panel .fighter-details-toggle{order:5;background-color:transparent!important}
.native-ui #lobby .game-selection .featured-panel .local-favorite-selected{order:6;margin-top:0}
.native-ui #lobby .game-selection .fighter-details-toggle{display:block!important;width:100%;height:auto;min-height:48px;padding:14px 26px;line-height:1.25;font-size:15px;margin:16px 0 8px;flex-shrink:0;white-space:normal;color:#f4e2b7}
.native-ui #lobby .game-selection .featured-panel .partner-scene{background:none!important}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster{gap:8px}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card{background:none!important;border:0!important;border-image:url('assets/ui/arena-jade-quiet.png') 40 95 fill / 8px 14px / 0 stretch!important;padding:10px 14px!important;gap:4px;box-shadow:none!important;border-radius:0;justify-content:center;overflow:visible}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card:is(.selected,:hover,:focus-visible,.controller-focused){border-image-source:url('assets/ui/arena-jade-quiet.png')!important;filter:brightness(1.4)}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card img{width:48px;height:48px;max-height:55%;max-width:100%;border-radius:0}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card strong{display:block!important;position:static;font-size:12px;line-height:1.15;white-space:normal;overflow-wrap:anywhere;color:#ece2c6;text-align:center;max-width:100%;margin:0}
.native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .card-number{display:none!important}
/* Selection/focus share exactly the same silhouette and interior. The legacy
   selected ::before painted a second plate over portraits at a different size. */
.native-ui #lobby #roster .pokemon-card::before,.native-ui #lobby #roster .pokemon-card::after{display:none!important;content:none!important}
.native-ui #lobby #roster{padding:4px!important;box-sizing:border-box}
.native-ui #lobby #roster .pokemon-card,.native-ui #lobby #roster .pokemon-card:is(.selected,:hover,:focus-visible,.controller-focused){background:none!important;border:0!important;border-image:url('assets/ui/arena-jade-quiet.png') 40 95 fill / 8px 14px / 0 stretch!important;transform:none!important;transition:filter .12s,transform .12s;transform-origin:center}
.native-ui #lobby #roster .pokemon-card:is(.selected,:focus-visible,.controller-focused){filter:brightness(1.4)!important;transform:translateY(-1px) scale(1.025)!important;z-index:2;outline:0!important}
.native-ui #lobby #roster .pokemon-card:is(.selected,:focus-visible,.controller-focused) strong{color:#b8f3ac!important}
.native-ui #lobby #roster .pokemon-card img{transform:none!important;filter:none!important}
@media(prefers-reduced-motion:reduce){.native-ui #lobby #roster .pokemon-card{transition:none!important}}
.native-ui #lobby .biome-choice::after,.native-ui #lobby .biome-choice::before{content:none!important;display:none!important}
.native-ui #lobby .biome-choice{background:none!important;border:0!important;border-image:url('assets/ui/arena-jade-quiet.png') 40 95 fill / 7px 13px / 0 stretch!important;padding:10px 14px!important;height:auto;min-height:72px;gap:6px;box-shadow:none!important}
.native-ui #lobby .biome-choice:is(.chosen,:focus-visible){border-image-source:url('assets/ui/arena-jade-quiet.png')!important;filter:brightness(1.4)!important;transform:none!important}
.native-ui #lobby .biome-choice>span{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.2;font-size:11px}
.native-ui #lobby .search-field{background:var(--menu-command) center/100% 100% no-repeat!important;padding:10px 24px;min-height:38px;height:auto}
.native-ui #lobby .search-field input{min-width:0;padding:0 0 0 4px}
.native-ui #lobby #selected-type>span:first-child{background:none!important;padding:5px 0}
.native-ui .fighter-details-drawer{padding:16px;background:#041719ed}
.native-ui #fighter-details-drawer .fighter-details-window{display:flex;flex-direction:column;width:min(800px,100%);max-height:calc(100dvh - 32px);overflow:hidden;background:none!important;border:16px solid transparent!important;border-image:url('assets/ui/arena-jade-quiet.png') 40 95 fill / 16px 34px / 0 stretch!important;padding:14px 24px;box-shadow:none;box-sizing:border-box}
.native-ui #fighter-details-drawer .fighter-details-header{flex:none;gap:16px;margin:0 0 14px}
.native-ui #fighter-details-drawer .fighter-details-header h2{font-size:25px;line-height:1.25;margin:0;overflow-wrap:anywhere}
.native-ui #fighter-details-close{width:auto;height:auto;min-width:96px;min-height:44px;padding:12px 22px;font:15px var(--pixel);background:var(--menu-command) center/100% 100% no-repeat!important}
.native-ui #fighter-details-content{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;min-height:0;padding:0 4px 6px}
.native-ui #fighter-details-content #loadout{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px}
.native-ui #fighter-details-content .loadout-item{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:start;gap:8px;min-width:0;height:auto!important;min-height:148px;padding:16px 20px!important;background:none!important;border:0!important;border-image:url('assets/ui/arena-jade-quiet.png') 40 95 fill / 8px 16px / 0 stretch!important;overflow:visible}
.native-ui #fighter-details-content .loadout-item>div{min-width:0;display:flex;flex-direction:column;gap:7px}
.native-ui #fighter-details-content .loadout-item kbd{font:12px var(--pixel);min-width:0;max-width:30px;padding:6px 0;white-space:normal;overflow-wrap:anywhere;background:none;border:0;box-shadow:none;color:#d6bd7e}
.native-ui #fighter-details-content .equipped-name{font-size:17px;line-height:1.2;color:#fff0bf;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.native-ui #fighter-details-content .loadout-item select{display:block;width:100%;max-width:100%;min-width:0;height:40px;min-height:40px;padding:8px 18px 8px 8px;font:13px var(--pixel);background-color:#112e2a;color:#fff0bf;cursor:pointer}
.native-ui #fighter-details-content .loadout-item small{font-size:12px;line-height:1.4;white-space:normal;overflow:visible;color:#c3d2b9;max-width:100%;overflow-wrap:anywhere}
.native-ui #fighter-details-content .equipped-description{margin:0;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;color:#c4d3c4}
.native-ui #fighter-details-content #selected-stats{display:grid!important;grid-template-columns:1fr!important;margin:18px 4px 4px;gap:12px}
.native-ui #fighter-details-drawer :is(button,select):focus-visible{outline:2px solid #f4db96;outline-offset:2px}
@media(max-height:540px) and (orientation:landscape){
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;align-items:center;padding:9px 14px!important;gap:2px 7px}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card img{grid-column:1;grid-row:1/3;width:32px;height:32px;min-height:32px;max-height:none;max-width:100%;margin:0;justify-self:center}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card .card-number{grid-column:2;grid-row:1;align-self:end;text-align:left;justify-self:start;font-size:8px}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card strong{grid-column:2;grid-row:2;text-align:left;font-size:10px;line-height:1.2;overflow-wrap:anywhere;align-self:start}
 .native-ui #lobby .game-selection .fighter-details-toggle{min-height:40px;margin:6px 0;padding:10px 20px;font-size:12px}
 .native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster{gap:5px}
 .native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card{padding:8px 12px!important;gap:2px}
 .native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card img{width:34px;height:34px}
 .native-ui #lobby .game-selection:not([data-selection-mode=survival]) #roster .pokemon-card strong{font-size:10px}
 .native-ui #lobby .biome-choice{min-height:55px;padding:8px 12px!important;gap:3px}
 .native-ui #lobby .biome-choice>span{font-size:10px}
 .native-ui #lobby .search-field{min-height:30px;padding:7px 18px}
 .native-ui #fighter-details-drawer{padding:8px}
 .native-ui #fighter-details-drawer .fighter-details-window{max-height:calc(100dvh - 16px);padding:8px 18px;border-width:12px!important;border-image-width:12px 26px!important}
 .native-ui #fighter-details-drawer .fighter-details-header{margin-bottom:8px}
 .native-ui #fighter-details-drawer .fighter-details-header h2{font-size:21px}
 .native-ui #fighter-details-content .loadout-item{min-height:140px;padding:14px 17px!important;grid-template-columns:24px minmax(0,1fr);gap:5px}
 .native-ui #fighter-details-content .equipped-name{font-size:15px}
}
@media(max-width:620px) and (orientation:landscape){
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card{grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto;padding:8px 12px!important;gap:4px}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card img{grid-row:1;width:24px;height:24px;min-height:24px}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card .card-number{display:none}
 .native-ui #lobby .game-selection[data-selection-mode=survival] #roster .pokemon-card strong{grid-row:1;font-size:9px;align-self:center}
}
@media(max-width:520px){
 .native-ui #fighter-details-drawer .fighter-details-window{padding:12px 12px;border-image-width:14px 23px!important;border-width:14px!important}
 .native-ui #fighter-details-content #loadout{grid-template-columns:minmax(0,1fr)!important}
 .native-ui #fighter-details-drawer .fighter-details-header{flex-wrap:wrap;gap:8px}
 .native-ui #fighter-details-drawer .fighter-details-header h2{font-size:21px}
 .native-ui #fighter-details-close{margin-left:auto}
}
/* The dedicated live window keeps a portrait layout. These two actions occupy
   separate halves of the same grid row, with matching insets and no overlap. */
@media(max-width:700px) and (orientation:portrait){
 .native-ui #lobby .game-selection #fighter-details-toggle,.native-ui #lobby .game-selection #local-favorite-selected{grid-column:2;grid-row:4;width:calc(50% - 4px);min-height:42px;height:auto;padding:10px 16px;font-size:11px;line-height:1.2;margin:0;align-self:start}
 .native-ui #lobby .game-selection #fighter-details-toggle{justify-self:start}
 .native-ui #lobby .game-selection #local-favorite-selected{justify-self:end}
}
