.py-team {
    --team-bg: #17130b;
    --team-deep: #211a0e;
    --team-panel: #2b2415;
    --team-high: #372c17;
    --team-line: #604c22;
    --team-gold: #f6cf3c;
    --team-cream: #fff6cf;
    --team-red: #ce5252;
    --team-green: #77b769;
    --team-blue: #6d83df;
    --team-navy: #2c2d63;
    width: min(1600px, 100%);
    margin: 0 auto;
    padding: 22px;
}

.py-team [hidden] {
    display: none !important;
}

.py-team button,
.py-team input,
.py-team select {
    font: inherit;
}

.py-team button:focus-visible,
.py-team a:focus-visible,
.py-team input:focus-visible,
.py-team select:focus-visible {
    outline: 3px solid var(--team-gold);
    outline-offset: 2px;
}

.py-team-hero {
    min-height: 248px;
}

.py-team-score-card {
    position: relative;
    min-height: 166px;
    padding: 17px;
    overflow: hidden;
    border: 3px solid var(--team-bg);
    border-radius: 7px;
    background:
        linear-gradient(rgba(44, 45, 99, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 45, 99, .08) 1px, transparent 1px),
        var(--team-gold);
    background-size: 14px 14px;
    color: var(--team-bg);
    box-shadow: inset 0 0 0 3px #ffe678, 6px 6px 0 #9c3a08;
}

.py-team-score-card::after {
    content: "";
    position: absolute;
    right: -33px;
    bottom: -40px;
    width: 125px;
    height: 125px;
    border: 18px solid rgba(44, 45, 99, .16);
    border-radius: 50%;
}

.py-team-score-card > * {
    position: relative;
    z-index: 1;
}

.py-team-score-card > span {
    color: #493714;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .13em;
}

.py-team-score-card > div:first-of-type {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 9px;
}

.py-team-score-card strong {
    color: var(--team-navy);
    font-size: 50px;
    font-weight: 950;
    line-height: 1;
}

.py-team-score-card small {
    color: #5b4214;
    font-size: 11px;
    font-weight: 900;
}

.py-team-score-track {
    width: 100%;
    height: 10px;
    margin-top: 10px;
    overflow: hidden;
    border: 2px solid var(--team-bg);
    background: rgba(255, 246, 207, .7);
}

.py-team-score-track i {
    display: block;
    width: 0;
    height: 100%;
    background: repeating-linear-gradient(90deg, var(--team-navy) 0 13px, #5a5ca3 13px 26px);
    transition: width .25s ease;
}

.py-team-score-card p {
    margin: 9px 0 0;
    color: #513b13;
    font-size: 9px;
    font-weight: 800;
}

.py-team-control-bar {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--team-line);
    border-left: 5px solid var(--team-gold);
    border-radius: 7px;
    background: linear-gradient(90deg, rgba(246, 207, 60, .07), transparent 45%), var(--team-deep);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.py-team-save-label {
    display: grid;
    min-width: 175px;
    margin-right: auto;
}

.py-team-save-label span,
.py-team-picker > span,
.py-team-boss-controls label > span {
    color: #aa965e;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.py-team-save-label strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--team-cream);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-save-label a {
    margin-top: 2px;
    color: var(--team-gold);
    font-size: 8px;
    font-weight: 850;
}

.py-team-picker {
    display: grid;
    gap: 4px;
    min-width: min(310px, 29vw);
}

.py-team-picker select,
.py-team-boss-controls select,
.py-team-move-slot select,
.py-team-level-control input {
    min-height: 36px;
    border: 1px solid #735b25;
    border-radius: 4px;
    background: #17130b;
    color: #f5e8bd;
}

.py-team-picker select,
.py-team-boss-controls select,
.py-team-move-slot select {
    padding: 7px 30px 7px 9px;
}

.py-team-control-bar > button {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #745d29;
    border-radius: 4px;
    background: #332a18;
    color: #e5d5a8;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.py-team-control-bar > button:hover {
    border-color: var(--team-gold);
    color: var(--team-cream);
}

.py-team-control-bar > button.is-primary {
    border-color: #15110a;
    background: var(--team-gold);
    color: #17130b;
    box-shadow: 2px 2px 0 #9c3a08;
}

.py-team-control-bar > button.is-danger {
    border-color: rgba(206, 82, 82, .58);
    color: #efaaa1;
}

.py-team-workbench {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.py-team-roster-panel,
.py-team-panel {
    min-width: 0;
    border: 1px solid var(--team-line);
    border-radius: 8px;
    background: rgba(43, 36, 21, .97);
    box-shadow: 0 13px 28px rgba(0, 0, 0, .21);
}

.py-team-roster-panel {
    overflow: hidden;
}

.py-team-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
}

.py-team-roster-panel > .py-team-section-head {
    padding: 12px 15px;
    border-bottom: 1px solid var(--team-line);
    background: linear-gradient(90deg, rgba(246, 207, 60, .06), transparent), #261f11;
}

.py-team-section-head > div > span {
    color: var(--team-gold);
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .12em;
}

.py-team-section-head h2 {
    margin: 2px 0 0;
    color: var(--team-cream);
    font-size: 19px;
    line-height: 1.1;
}

.py-team-section-head h2 small,
.py-team-section-head > p,
.py-team-section-head > small {
    color: #988653;
    font-size: 9px;
    font-weight: 750;
}

.py-team-section-head > a,
.py-team-section-head > strong:not(.py-team-count-pill) {
    color: #e1c970;
    font-size: 9px;
    font-weight: 850;
}

.py-team-roster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

.py-team-empty-roster {
    grid-column: 1 / -1;
    min-height: 220px;
    display: grid;
    place-items: center;
    padding: 30px;
    border: 1px dashed #675126;
    border-radius: 7px;
    background: #211a0e;
    color: #aa965d;
    text-align: center;
}

.py-team-empty-roster strong,
.py-team-empty-roster span {
    display: block;
}

.py-team-empty-roster strong {
    color: var(--team-cream);
    font-size: 19px;
}

.py-team-empty-roster span {
    margin-top: 6px;
    font-size: 10px;
}

.py-team-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #5e4921;
    border-radius: 7px;
    background: #211a0e;
}

.py-team-card.has-error {
    border-color: rgba(206, 82, 82, .78);
}

.py-team-card-head {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 86px;
    padding: 9px;
    border-bottom: 1px solid #4c3b1d;
    background: radial-gradient(circle at 14% 40%, color-mix(in srgb, var(--mon-color) 22%, transparent), transparent 43%), #282011;
}

.py-team-sprite {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 2px solid #17130b;
    border-radius: 5px;
    background: #fff2b8;
    box-shadow: inset 0 0 0 2px rgba(246, 207, 60, .52);
}

.py-team-sprite img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    image-rendering: pixelated;
}

.py-team-card-title {
    min-width: 0;
}

.py-team-card-title > span {
    color: var(--team-gold);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
}

.py-team-card-title h3 {
    margin: 2px 0 5px;
    overflow: hidden;
    color: var(--team-cream);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-card-types {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.py-team-card-types i,
.py-team-type-chip {
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 3px;
    color: #fff;
    font-style: normal;
    font-size: 7px;
    font-weight: 900;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .45);
}

.py-team-card-actions {
    display: grid;
    gap: 4px;
}

.py-team-card-actions button {
    display: grid;
    place-items: center;
    width: 25px;
    height: 23px;
    padding: 0;
    border: 1px solid #665023;
    border-radius: 3px;
    background: #17130b;
    color: #cbb879;
    font-size: 10px;
    cursor: pointer;
}

.py-team-card-actions button:hover:not(:disabled) {
    border-color: var(--team-gold);
    color: var(--team-cream);
}

.py-team-card-actions button:disabled {
    opacity: .32;
    cursor: default;
}

.py-team-card-actions button.is-remove {
    color: #ef9890;
}

.py-team-card-body {
    padding: 10px;
}

.py-team-level-row,
.py-team-moves-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.py-team-level-row > span,
.py-team-moves-heading > span {
    color: #a89560;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.py-team-level-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.py-team-level-control::before {
    content: "Lv.";
    color: var(--team-gold);
    font-size: 9px;
    font-weight: 900;
}

.py-team-level-control input {
    width: 62px;
    min-height: 30px;
    padding: 4px 6px;
    text-align: center;
    font-weight: 900;
}

.py-team-evolution-warning {
    margin: 8px 0 0;
    padding: 6px 7px;
    border: 1px solid rgba(206, 82, 82, .54);
    border-radius: 4px;
    background: rgba(206, 82, 82, .1);
    color: #efb1a2;
    font-size: 8px;
    line-height: 1.4;
}

.py-team-moves-heading {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #44351a;
}

.py-team-moves-heading div {
    display: flex;
    gap: 4px;
}

.py-team-moves-heading button {
    padding: 3px 6px;
    border: 1px solid #625024;
    border-radius: 3px;
    background: #18130a;
    color: #cbb879;
    font-size: 7px;
    font-weight: 850;
    cursor: pointer;
}

.py-team-move-list {
    display: grid;
    gap: 6px;
    margin-top: 7px;
}

.py-team-move-slot {
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.py-team-move-slot > span {
    display: grid;
    place-items: center;
    width: 21px;
    height: 28px;
    border: 1px solid #5c4821;
    border-radius: 3px;
    background: #17130b;
    color: #967f48;
    font-size: 8px;
    font-weight: 900;
}

.py-team-move-slot select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 9px;
}

.py-team-move-slot.is-invalid select {
    border-color: var(--team-red);
    color: #efada3;
}

.py-team-selected-moves {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 18px;
    margin-top: 7px;
}

.py-team-selected-moves a {
    padding: 2px 5px;
    border: 1px solid color-mix(in srgb, var(--move-color) 60%, #4c3d20);
    border-radius: 3px;
    background: color-mix(in srgb, var(--move-color) 12%, #17130b);
    color: #e5d9b0;
    font-size: 7px;
    font-weight: 800;
}

.py-team-analysis-grid {
    display: grid;
    grid-template-columns: minmax(370px, .82fr) minmax(640px, 1.55fr);
    align-items: start;
    gap: 13px;
}

.py-team-analysis-column {
    display: grid;
    gap: 13px;
}

.py-team-panel {
    padding: 13px;
}

.py-team-panel > .py-team-section-head {
    min-height: 40px;
    padding-bottom: 9px;
    border-bottom: 1px solid #51401e;
}

.py-team-count-pill {
    display: grid;
    place-items: center;
    min-width: 31px;
    height: 25px;
    padding: 0 7px;
    border: 1px solid #765b23;
    border-radius: 13px;
    background: #17130b;
    color: var(--team-gold);
    font-size: 10px;
}

.py-team-issue-list {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.py-team-issue,
.py-team-no-issues {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid #4e3d1d;
    border-radius: 4px;
    background: #1d170c;
}

.py-team-issue > i,
.py-team-no-issues > i {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #604b22;
    color: #fff5cb;
    font-style: normal;
    font-size: 9px;
    font-weight: 950;
}

.py-team-issue.is-error {
    border-color: rgba(206, 82, 82, .55);
}

.py-team-issue.is-error > i {
    background: var(--team-red);
}

.py-team-issue.is-warning > i {
    background: #b27d22;
}

.py-team-issue.is-info > i {
    background: #4c70aa;
}

.py-team-issue strong,
.py-team-issue span,
.py-team-no-issues strong,
.py-team-no-issues span {
    display: block;
}

.py-team-issue strong,
.py-team-no-issues strong {
    color: #eee1b7;
    font-size: 10px;
}

.py-team-issue span,
.py-team-no-issues span {
    margin-top: 2px;
    color: #958350;
    font-size: 8px;
    line-height: 1.45;
}

.py-team-no-issues {
    border-color: rgba(119, 183, 105, .5);
}

.py-team-no-issues > i {
    background: var(--team-green);
    color: #15200f;
}

.py-team-hm-list {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.py-team-hm-row {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid #4d3c1d;
    border-radius: 4px;
    background: #1d170c;
}

.py-team-hm-row.is-covered {
    border-color: rgba(119, 183, 105, .48);
}

.py-team-hm-disc {
    display: grid;
    place-items: center;
    min-height: 27px;
    border: 2px solid #17130b;
    border-radius: 3px;
    background: var(--team-gold);
    color: #17130b;
    font-size: 8px;
    font-weight: 950;
    box-shadow: 2px 2px 0 #8d350c;
}

.py-team-hm-row strong,
.py-team-hm-row span,
.py-team-hm-row small {
    display: block;
}

.py-team-hm-row strong {
    color: #eee2ba;
    font-size: 10px;
}

.py-team-hm-row span {
    margin-top: 2px;
    color: #8e7d4c;
    font-size: 8px;
}

.py-team-hm-row small {
    color: #ef9d94;
    font-size: 8px;
    font-weight: 850;
    text-align: right;
}

.py-team-hm-row.is-covered small {
    color: #9dd491;
}

.py-team-panel-copy {
    margin: 9px 0 0;
    color: #968451;
    font-size: 8px;
    line-height: 1.45;
}

.py-team-type-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin-top: 9px;
}

.py-team-type-result {
    min-width: 0;
    padding: 6px 4px;
    border: 1px solid #4d3d1e;
    border-radius: 4px;
    background: #1c160c;
    text-align: center;
}

.py-team-type-result.is-covered {
    border-color: color-mix(in srgb, var(--type-color) 70%, #54421d);
    background: color-mix(in srgb, var(--type-color) 12%, #1c160c);
}

.py-team-type-result strong,
.py-team-type-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-type-result strong {
    color: #e8dbb2;
    font-size: 8px;
}

.py-team-type-result small {
    margin-top: 2px;
    color: #806f42;
    font-size: 7px;
}

.py-team-type-result.is-covered small {
    color: #a9d49d;
}

.py-team-defense-list {
    display: grid;
    gap: 4px;
    margin-top: 9px;
}

.py-team-defense-row {
    display: grid;
    grid-template-columns: 74px repeat(3, 1fr);
    align-items: center;
    gap: 5px;
    min-height: 31px;
    padding: 4px 6px;
    border: 1px solid #47381b;
    border-radius: 4px;
    background: #1c160c;
}

.py-team-defense-row.is-risk {
    border-color: rgba(206, 82, 82, .58);
    background: rgba(206, 82, 82, .07);
}

.py-team-defense-row > strong {
    overflow: hidden;
    color: #e5d7ab;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-defense-row span {
    color: #8e7c49;
    font-size: 7px;
    text-align: center;
}

.py-team-defense-row span b {
    color: #d9c88f;
}

.py-team-boss-panel {
    position: sticky;
    top: 78px;
    max-height: calc(100vh - 94px);
    overflow: hidden;
}

.py-team-boss-heading {
    align-items: end;
}

.py-team-boss-controls {
    display: flex;
    gap: 6px;
}

.py-team-boss-controls label {
    display: grid;
    gap: 3px;
}

.py-team-boss-controls select {
    min-height: 31px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 8px;
}

.py-team-boss-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 610px;
    max-height: calc(100vh - 170px);
    margin: 10px -13px -13px;
    border-top: 1px solid #51401e;
}

.py-team-boss-list {
    overflow-y: auto;
    border-right: 1px solid #51401e;
    background: #211a0e;
}

.py-team-boss-button {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 52px;
    padding: 7px 8px;
    border: 0;
    border-bottom: 1px solid #403219;
    background: transparent;
    color: #bbaa75;
    text-align: left;
    cursor: pointer;
}

.py-team-boss-button:hover,
.py-team-boss-button.is-active {
    background: rgba(246, 207, 60, .07);
}

.py-team-boss-button.is-active {
    box-shadow: inset 4px 0 0 var(--team-gold);
}

.py-team-boss-order {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid #17130b;
    border-radius: 50%;
    background: #705620;
    color: #fff3bf;
    font-size: 8px;
    font-weight: 950;
}

.py-team-boss-button strong,
.py-team-boss-button small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-boss-button strong {
    color: #eadcb2;
    font-size: 9px;
}

.py-team-boss-button small {
    margin-top: 2px;
    color: #857342;
    font-size: 7px;
}

.py-team-readiness-badge {
    min-width: 34px;
    padding: 3px 4px;
    border: 1px solid var(--readiness-color);
    border-radius: 3px;
    background: color-mix(in srgb, var(--readiness-color) 12%, #17130b);
    color: var(--readiness-color);
    font-size: 7px;
    font-weight: 950;
    text-align: center;
}

.py-team-boss-detail {
    min-width: 0;
    overflow-y: auto;
    background: #261f11;
}

.py-team-boss-hero {
    padding: 16px;
    border-bottom: 1px solid #51401e;
    background: radial-gradient(circle at 100% 0, rgba(246, 207, 60, .13), transparent 42%), #241d10;
}

.py-team-boss-hero > span {
    color: var(--team-gold);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
}

.py-team-boss-hero h3 {
    margin: 4px 0 0;
    color: var(--team-cream);
    font-size: 23px;
}

.py-team-boss-hero p {
    margin: 6px 0 0;
    color: #aa985f;
    font-size: 9px;
}

.py-team-boss-score {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.py-team-boss-score > strong {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 5px solid var(--readiness-color);
    border-radius: 50%;
    background: #17130b;
    color: var(--readiness-color);
    font-size: 20px;
}

.py-team-boss-score div strong,
.py-team-boss-score div span {
    display: block;
}

.py-team-boss-score div strong {
    color: #eee1b7;
    font-size: 12px;
}

.py-team-boss-score div span {
    margin-top: 3px;
    color: #938150;
    font-size: 8px;
    line-height: 1.45;
}

.py-team-boss-section {
    margin: 11px;
    padding: 10px;
    border: 1px solid #51401e;
    border-radius: 5px;
    background: #1e180d;
}

.py-team-boss-section h4 {
    margin: 0 0 8px;
    color: #e8dab0;
    font-size: 11px;
}

.py-team-boss-party {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.py-team-boss-mon {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 6px;
    border: 1px solid #443519;
    border-radius: 4px;
    background: #17130b;
}

.py-team-boss-mon > img {
    width: 43px;
    height: 43px;
    object-fit: contain;
    image-rendering: pixelated;
}

.py-team-boss-mon strong,
.py-team-boss-mon span,
.py-team-boss-mon small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-boss-mon strong {
    color: #eee0b4;
    font-size: 9px;
}

.py-team-boss-mon span {
    color: var(--team-gold);
    font-size: 8px;
}

.py-team-boss-mon small {
    margin-top: 2px;
    color: #847243;
    font-size: 7px;
}

.py-team-counter-list {
    display: grid;
    gap: 5px;
}

.py-team-counter-row {
    display: grid;
    grid-template-columns: minmax(90px, .8fr) minmax(0, 1.5fr) auto;
    align-items: center;
    gap: 7px;
    padding: 7px;
    border: 1px solid #443519;
    border-radius: 4px;
    background: #17130b;
}

.py-team-counter-row > strong {
    color: #e5d7aa;
    font-size: 9px;
}

.py-team-counter-row > span {
    overflow: hidden;
    color: #9b8954;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-team-counter-row > small {
    color: #99cf8e;
    font-size: 8px;
    font-weight: 900;
}

.py-team-empty-analysis {
    padding: 30px 18px;
    color: #9b8954;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 1320px) {
    .py-team-roster {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .py-team-analysis-grid {
        grid-template-columns: minmax(330px, .72fr) minmax(560px, 1.35fr);
    }
}

@media (max-width: 1050px) {
    .py-team-control-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .py-team-save-label {
        flex: 1 1 100%;
    }

    .py-team-picker {
        flex: 1 1 330px;
    }

    .py-team-analysis-grid {
        grid-template-columns: 1fr;
    }

    .py-team-boss-panel {
        position: static;
        max-height: none;
    }

    .py-team-boss-layout {
        max-height: 720px;
    }
}

@media (max-width: 720px) {
    .py-team {
        padding: 13px;
    }

    .py-team-roster {
        grid-template-columns: 1fr;
    }

    .py-team-control-bar > button {
        flex: 1 1 calc(50% - 8px);
    }

    .py-team-boss-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .py-team-boss-controls label {
        flex: 1;
    }

    .py-team-boss-controls select {
        width: 100%;
    }

    .py-team-boss-layout {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .py-team-boss-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 260px;
        border-right: 0;
        border-bottom: 1px solid #51401e;
    }

    .py-team-boss-button {
        border-right: 1px solid #403219;
    }
}

@media (max-width: 480px) {
    .py-team {
        padding: 8px;
    }

    .py-team-control-bar > button {
        flex-basis: 100%;
    }

    .py-team-card-head {
        grid-template-columns: 62px minmax(0, 1fr) auto;
    }

    .py-team-sprite {
        width: 60px;
        height: 60px;
    }

    .py-team-sprite img {
        width: 55px;
        height: 55px;
    }

    .py-team-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .py-team-boss-list,
    .py-team-boss-party {
        grid-template-columns: 1fr;
    }

    .py-team-counter-row {
        grid-template-columns: 1fr;
    }
}
