.collection-sections.lounge-sections{display:block}
.lounge-sections .owned-grid{grid-template-columns:repeat(auto-fill,minmax(275px,1fr))}
.lounge-sections .roster-pagination{margin-top:20px}
.lounge-sections #lounge-search{width:100%;min-height:42px}
.owned-card [data-add-party],.owned-card [data-remove-party]{white-space:normal}
/* Only the portrait and heading share a row; every control gets the card width.
   Keep this layout in the statically versioned Team stylesheet, independent of
   a previously cached progression stylesheet. */
.owned-grid > .owned-card{grid-template-columns:60px minmax(0,1fr);min-width:0}
.owned-grid > .owned-card > *{grid-column:1/-1;min-width:0;box-sizing:border-box}
.owned-grid > .owned-card > .portrait{grid-column:1;grid-row:1;align-self:center}
.owned-grid > .owned-card > .owned-heading{grid-column:2;grid-row:1}
.owned-grid > .owned-card > .pokemon-ability{width:100%;margin:4px 0;overflow-wrap:break-word}
.owned-grid > .owned-card > .ability-patch-row{margin-top:0}
@media(max-width:640px){.lounge-sections .inline-row{align-items:stretch;flex-direction:column}.lounge-sections .roster-pagination{flex-wrap:wrap}.lounge-sections .owned-grid{grid-template-columns:1fr}}

/* The roster stays compact; the game summary carries the complete record. */
.owned-grid{align-items:start}
.owned-grid>.owned-card-compact{grid-template-columns:44px minmax(0,1fr);gap:7px 10px;padding:12px 14px;align-content:start;align-items:start;border:1px solid #cbd8d3;border-radius:13px;box-shadow:0 2px 0 #29495612}
.owned-grid>.owned-card-compact>.portrait{width:44px;height:44px;border-radius:9px}
.owned-card-compact .owned-heading h3{display:flex;align-items:baseline;gap:5px;font-size:15px;line-height:1.3;margin:1px 0 4px;min-width:0}
.owned-card-compact .owned-heading .owned-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.owned-card-compact .owned-heading .shiny-star{flex:none;font-size:12px}
.owned-card-compact .owned-heading p{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;font-size:11px;line-height:1.5;margin:0;color:#7b8d90;text-transform:capitalize}
.owned-level{font-size:11px;font-weight:600;color:#718b87;white-space:nowrap;margin-left:auto;flex:none}
.owned-overview{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;min-height:22px;line-height:1.5;font-size:11px;color:#758b80}
.owned-ability-name{font-weight:600;color:#5f7d58;cursor:help;max-width:100%;overflow-wrap:anywhere}
.owned-happiness{white-space:nowrap;color:#8a9b7d;font-variant-numeric:tabular-nums}
.owned-happiness>span{font-size:14px;vertical-align:-1px}
.owned-trainer{min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:auto;font-size:11px;color:#8a9896}
.owned-heading .owned-slot{padding:0;background:none;border-radius:0;font-size:11px;color:#82958e;white-space:nowrap}
.owned-heading .owned-slot.explorer-status{background:none;color:#a48c55}
.owned-iv-badge{font-size:11px;color:#5e8b76;white-space:nowrap}
.owned-meta{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;font-size:10px;color:#7a8f88;min-width:0}
.owned-origin{display:inline-flex;align-items:center;gap:4px;line-height:1.4;padding:3px 7px;border-radius:6px;background:#eef3f6;color:#7a9098;max-width:100%;overflow-wrap:anywhere}
.owned-origin img{object-fit:contain;flex:none;width:16px;height:16px}
.owned-meta .pokemon-ribbons{display:inline-flex;gap:4px;margin:0;padding:0}
.owned-meta .pokemon-ribbons>span{display:inline-flex;align-items:center;margin:0}
.owned-meta .pokemon-ribbons img{width:21px;height:21px;object-fit:contain}
.owned-meta .pokemon-ribbons small{display:none}
.owned-actions{display:flex;align-items:center;gap:8px;padding-top:1px}
.owned-actions .button{min-height:40px;padding:7px 12px;font-size:11px;flex:0 1 auto;margin:0;white-space:normal;border-radius:8px;box-shadow:0 2px 0 #29495612}
.owned-actions .button:only-child{flex:0 1 auto;min-width:82px}
.owned-actions [data-add-party],.owned-actions [data-remove-party]{margin-left:auto}
@media(max-width:500px){.owned-grid>.owned-card-compact{padding:11px 12px;gap:6px 9px}.owned-card-compact .owned-heading h3{font-size:14px}.owned-meta{font-size:9px;gap:5px}.owned-origin{max-width:180px}}

.pokemon-summary-dialog{width:min(680px,calc(100vw - 24px));height:min(660px,calc(100dvh - 28px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);margin:auto;padding:0;overflow:hidden;border:2px solid #42677a;border-radius:18px;background:#f8fcfa;color:#29434e;box-shadow:0 18px 70px #163b4c44}
.pokemon-summary-dialog[open]{display:flex;flex-direction:column}
.pokemon-summary-dialog::backdrop{background:#16343d99;backdrop-filter:blur(4px)}
.pokemon-summary-header{display:flex;align-items:center;gap:14px;padding:18px 20px;background:#eaf3f4;border-bottom:1px solid #cfdfdf;flex:none;min-width:0}
.pokemon-summary-header>.portrait{width:60px;height:60px;border-radius:12px;flex:none;object-fit:contain}
.pokemon-summary-header>div{min-width:0;flex:1}
.pokemon-summary-header .summary-kicker{font-size:10px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;color:#7d969c;margin:0 0 4px}
.pokemon-summary-header h2{font-size:21px;line-height:1.2;margin:0 0 5px;overflow-wrap:anywhere}
.pokemon-summary-header h2>span:not(.shiny-star){display:inline-block;font-size:13px;font-weight:500;color:#748e91;white-space:nowrap}
.pokemon-summary-header p{font-size:12px;line-height:1.4;margin:0;color:#728a8e;text-transform:capitalize}
.summary-close{align-self:flex-start;display:grid;place-items:center;width:44px;height:44px;flex:none;font-size:27px;color:#657e85;border:1px solid #c7d8d9;border-radius:10px;background:#f8fcfa;cursor:pointer}
.summary-tabs{display:flex;gap:3px;overflow-x:auto;overscroll-behavior-x:contain;flex:none;padding:7px 10px;border-bottom:1px solid #d5e2dc;background:#f3f8f4;scrollbar-width:none}
.summary-tabs::-webkit-scrollbar,.summary-pages::-webkit-scrollbar{display:none}
.summary-tabs>button{flex:1 0 auto;min-height:42px;padding:9px 12px;border:0;border-radius:8px;background:none;color:#7f938a;font-size:12px;font-weight:650;cursor:pointer}
.summary-tabs>button[aria-selected=true]{background:#dcebe0;color:#3c6b59;box-shadow:inset 0 -2px 0 #89b39a}
.summary-pages{display:flex;flex:1 1 0;min-height:0;min-width:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;outline-offset:-3px}
.summary-page{flex:0 0 100%;width:100%;min-width:0;min-height:0;box-sizing:border-box;overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-align:start;scroll-snap-stop:always;padding:22px;scrollbar-width:thin}
.summary-page h3{font-size:17px;line-height:1.35;margin:0 0 17px;color:#3e655e}
.summary-page p{font-size:13px;line-height:1.65}
.summary-page .owned-meta{font-size:12px;margin-bottom:16px;gap:8px}
.summary-page .owned-origin{max-width:100%;padding:5px 8px}
.summary-page .pokemon-ribbons img{width:28px;height:28px}
.summary-page .pokemon-ribbons small{display:inline;font-size:12px}
.summary-page .pokemon-ribbons>span{gap:5px}
.summary-page .pokemon-ability{margin:16px 0;padding:14px;border:1px solid #d8e4d5;border-radius:11px;background:#eef5e9}
.summary-page .pokemon-ability strong{display:block;font-size:15px;margin-bottom:6px}
.summary-page .pokemon-ability span,.summary-page .pokemon-ability small{display:block;font-size:13px;line-height:1.65}
.summary-happiness label{font-size:13px;line-height:1.6;display:block;margin:20px 0 12px;color:#667f6e}
.summary-happiness strong{float:right;font-variant-numeric:tabular-nums}
.summary-happiness progress{display:block;width:100%;height:10px;margin-top:8px;accent-color:#91b778}
.summary-breeding{color:#8a9a90}
.summary-page .trainer-record{margin:0;padding:0;border:0;background:none}
.summary-page .trainer-record dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 18px}
.summary-page .trainer-record dt{font-size:11px;letter-spacing:.03em;color:#83958d}
.summary-page .trainer-record dd{font-size:15px;margin:6px 0 0;line-height:1.5}
.summary-page .trainer-id{display:inline-block;font-size:12px}
.summary-page .trainer-record>small{display:block;margin-top:17px;font-size:12px;line-height:1.6}
.summary-page .genetics-table{margin-top:22px}
.summary-page .genetics-table table{font-size:12px;min-width:320px}
.summary-page .genetics-table td,.summary-page .genetics-table th{font-size:12px;padding:10px 5px}
.summary-page .genetics-table caption{font-size:12px;line-height:1.5;margin-bottom:12px}
.summary-page .genetics-table p{font-size:12px!important;line-height:1.65}
.summary-page .individual-experience{font-size:12px;margin:14px 0}
.summary-page .ability-patch-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}
.summary-page .ability-patch-row .subtle-tag{font-size:12px;line-height:1.6;white-space:normal}
.summary-page .ability-patch-row .button,.summary-page-actions .button{min-height:44px;width:auto;padding:10px 14px;font-size:13px}
.summary-move-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.summary-move{padding:14px;border:1px solid #d8e3da;border-radius:12px;background:#f1f6ed;min-width:0}
.summary-move>small{font-size:11px;color:#8b9d8b}
.summary-move h3{font-size:15px;margin:5px 0}
.summary-move .summary-move-type{font-size:11px;margin:0 0 14px;color:#7f9483}
.summary-move dl{display:flex;gap:15px;margin:0}
.summary-move dt{font-size:10px;color:#879b87}
.summary-move dd{font-size:13px;font-weight:650;margin:4px 0 0;color:#5f7f5b}
.summary-move>p:last-child{font-size:12px;margin:12px 0 0;line-height:1.55;color:#82937e}
.summary-page-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.pokemon-summary-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:10px 16px;background:#edf5ef;border-top:1px solid #d5e2d8}
.pokemon-summary-footer .button{min-width:44px;min-height:42px;padding:8px 12px;font-size:18px}
.pokemon-summary-footer>span{font-size:12px;color:#7d9384;line-height:1.4}
.summary-tabs>button:focus-visible,.summary-close:focus-visible{outline:2px solid #4476a0;outline-offset:-3px}
@media(max-width:500px){.pokemon-summary-header{padding:14px;gap:10px}.pokemon-summary-header>.portrait{width:48px;height:48px}.pokemon-summary-header h2{font-size:18px}.pokemon-summary-header p{font-size:11px}.summary-tabs{padding:6px;gap:0}.summary-tabs>button{padding:9px 10px}.summary-page{padding:17px}.summary-move-list{grid-template-columns:1fr}.summary-page .trainer-record dl{grid-template-columns:1fr}.summary-move>small,.summary-move .summary-move-type,.summary-move dt{font-size:12px}}
@media(max-height:520px) and (orientation:landscape){.pokemon-summary-dialog{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.pokemon-summary-header{padding:8px 14px;gap:10px}.pokemon-summary-header>.portrait{width:44px;height:44px}.pokemon-summary-header .summary-kicker{display:none}.pokemon-summary-header h2{font-size:18px;margin-bottom:3px}.summary-tabs{padding:3px 8px}.summary-tabs>button{min-height:40px;padding:7px 11px}.pokemon-summary-footer{padding:5px 12px}.summary-page{padding:16px 20px}}
@media(prefers-reduced-motion:reduce){.summary-pages,.summary-tabs{scroll-behavior:auto}}
