:root
{
    --bg: #f4f6f0;
    --grid: #dce3d7;
    --ink: #10202a;
    --muted: #617078;
    --panel: #fbfcf8;
    --panel-alt: #eaf0f2;
    --line: #b7c5c3;
    --line-strong: #829696;
    --masthead: #59676b;
    --masthead-ink: #ffffff;
    --red: #ef5069;
    --blue: #4c55ec;
    --green: #4bc358;
    --yellow: #e3b829;
    --accent: #a5ef52;
    --highlight-row: #dce8ff;
    --highlight-column: #ffe0e7;
    --highlight-cross: #dbf9d5;
    --shadow: rgba(16, 32, 42, .18);
    --heat-low: #ff78aa;
    --heat-high: #b4e69e;
    color-scheme: light;
}

html.dark,
body.dark
{
    --bg: #11181b;
    --grid: #29363a;
    --ink: #edf6f3;
    --muted: #a2b2b4;
    --panel: #182326;
    --panel-alt: #223035;
    --line: #52666b;
    --line-strong: #71858a;
    --red: #ff7085;
    --blue: #8b91ff;
    --green: #58d96a;
    --yellow: #f0c74a;
    --masthead: #0d1315;
    --masthead-ink: #edf6f3;
    --highlight-row: #27455f;
    --highlight-column: #5b3342;
    --highlight-cross: #2d5937;
    --shadow: rgba(0, 0, 0, .42);
    color-scheme: dark;
}

*
{
    box-sizing: border-box;
}

html
{
    min-width: 320px;
    background: var(--bg);
}

body
{
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg);
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--ink);
    font: 14px/1.45 "Google Sans Flex", "Google Sans", Arial, Helvetica, sans-serif;
}

button,
input,
select
{
    font: inherit;
}

a
{
    color: inherit;
    text-decoration: none;
}

a:hover
{
    color: var(--blue);
}

.window
{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.titlebar
{
    position: relative;
    z-index: 500;
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 5px 14px 5px 8px;
    border-bottom: 1px solid #101719;
    background: var(--masthead);
    color: var(--masthead-ink);
    box-shadow: 0 3px 0 color-mix(in srgb, var(--masthead) 55%, transparent);
}

.brand
{
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: inherit;
}

.brand:hover
{
    color: var(--accent);
}

.brand-pokemon
{
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 3px 2px rgba(0,0,0,.3));
}

.brand > span
{
    display: grid;
    gap: 2px;
}

.brand strong
{
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
}

.brand small
{
    font-size: 12px;
    font-weight: normal;
}

.brand small span
{
    text-decoration: underline;
}

.theme-toggle
{
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin-left: auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--masthead-ink) 50%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--masthead-ink);
    cursor: pointer;
    font-weight: 800;
}

.theme-toggle:hover
{
    border-color: var(--accent);
    background: var(--accent);
    color: #10202a;
}

.content
{
    width: 100%;
    padding: 10px;
    overflow: auto;
}

.content2
{
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 56px;
}

.eyebrow
{
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.index-content
{
    padding-top: 18px;
}

.index-content > h1
{
    margin: 0 0 22px;
    font-size: 32px;
}

.regulation-group
{
    margin: 0 0 26px;
}

.regulation-heading
{
    display: grid;
    grid-template-columns: minmax(0,1fr) auto 20px;
    align-items: center;
    gap: 12px;
    padding: 0 0 8px;
    border-bottom: 3px solid var(--ink);
    cursor: pointer;
    list-style: none;
}

.regulation-heading::-webkit-details-marker
{
    display: none;
}

.regulation-heading strong
{
    font-size: 24px;
}

.regulation-heading span
{
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.regulation-heading i
{
    color: var(--blue);
    font-size: 16px;
    font-style: normal;
}

.regulation-group[open] .regulation-heading i
{
    transform: rotate(180deg);
}

.tournament-list
{
    display: grid;
}

.tournament-row
{
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 18px;
    min-height: 68px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-strong);
    background: var(--panel-alt);
}

.tournament-row:first-child
{
    border-top: 1px solid var(--line-strong);
}

.tournament-row:hover
{
    background: var(--panel-alt);
    color: var(--ink);
}

.tournament-row:hover strong,
.tournament-row:hover i
{
    color: var(--blue);
}

.tournament-row strong
{
    color: var(--ink);
    font-size: 16px;
}

.tournament-row > span:not(.tournament-date)
{
    color: var(--muted);
    font-size: 12px;
}

.tournament-date
{
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.tournament-row i
{
    color: var(--blue);
    font-size: 22px;
    font-style: normal;
}

.tournament-heading
{
    background: var(--bg);
}

.tournament-heading > h1
{
    margin: 0;
    padding: 17px 15px 3px;
    font-size: clamp(25px, 3vw, 30px);
    line-height: 1.1;
}

.tournament-heading > h1 a:hover
{
    background: var(--accent);
    color: #10202a;
}

.tourinfo
{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 15px 13px;
}

.littlebox
{
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    padding: 10px 17px;
    border: 0;
    outline: 0;
    background: var(--panel-alt);
    box-shadow: none;
    font-size: 15px;
    white-space: nowrap;
}

.tabs
{
    display: flex;
    max-width: 100%;
    gap: 5px;
    padding: 8px 14px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    background: var(--panel-alt);
    scrollbar-width: thin;
}

.tab,
.table-controls button,
.core-size-filter button
{
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.tab:hover,
.table-controls button:hover,
.core-size-filter button:hover
{
    border-color: var(--ink);
    background: var(--accent);
    color: #10202a;
}

.tab.active,
.core-size-filter button.active
{
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.core-size-filter button:disabled
{
    opacity: .3;
    cursor: not-allowed;
}

.pages
{
    flex: 1;
    min-height: 0;
}

.page
{
    display: none;
    min-height: 100%;
}

.page.active
{
    display: block;
}

.table-page
{
    padding-top: 0;
}

.table-controls
{
    position: sticky;
    left: 0;
    z-index: 220;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    padding: 10px 0;
}

.fixed-table-wrap,
#usageContainer,
#megaContainer,
#pointsContainer,
#averageContainer,
.explorer-table-wrap
{
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line-strong);
    background: var(--panel);
}

table
{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--ink);
}

th,
td
{
    padding: 7px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    text-align: center;
    vertical-align: middle;
}

tr > :last-child
{
    border-right: 0;
}

tbody tr:last-child > *
{
    border-bottom: 0;
}

thead th,
table > tbody > tr:first-child th
{
    background: var(--panel-alt);
    font-size: 10px;
}

tbody tr:nth-child(even) td,
tbody tr:nth-child(even) th
{
    background: color-mix(in srgb, var(--panel-alt) 60%, var(--panel));
}

th
{
    font-weight: 800;
}

td
{
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.fixed-table-wrap table
{
    min-width: 1280px;
    table-layout: fixed;
}

.fixed-table-wrap th,
.fixed-table-wrap td
{
    width: 132px;
    min-width: 132px;
    height: 104px;
    padding: 6px;
    font-size: 13px;
}

.fixed-table-wrap th:first-child,
.fixed-table-wrap td:first-child
{
    position: sticky;
    left: 0;
    z-index: 80;
    width: 140px;
    min-width: 140px;
    background: var(--panel-alt);
}

.fixed-table-wrap tr:first-child th
{
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--panel-alt);
}

.fixed-table-wrap .corner-header
{
    left: 0;
    z-index: 150;
}

.fixed-table-wrap [data-r="0"],
.fixed-table-wrap [data-c="0"]
{
    cursor: pointer;
}

.pokemon-label
{
    display: inline-grid;
    justify-items: center;
    gap: 1px;
    overflow: visible;
    line-height: 1.05;
}

.pokemon-stack
{
    display: inline-flex;
    min-height: 32px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.pokemon-icon
{
    width: 64px;
    height: 64px;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 3px 2px var(--shadow));
}

.fixed-table-wrap .pokemon-label,
.floating-header .pokemon-label
{
    width: 100%;
    max-width: 100%;
    min-height: 64px;
    align-content: center;
    overflow: visible;
}

.fixed-table-wrap .pokemon-label-text,
.floating-header .pokemon-label-text
{
    display: none;
}

.fixed-table-wrap .pokemon-stack,
.floating-header .pokemon-stack
{
    width: 100%;
    height: 128px;
    min-height: 0;
    align-items: center;
    overflow: visible;
}

.fixed-table-wrap .pokemon-stack-single,
.floating-header .pokemon-stack-single
{
    margin-inline: auto;
    justify-content: center;
}

.fixed-table-wrap .pokemon-stack-single .pokemon-icon,
.floating-header .pokemon-stack-single .pokemon-icon
{
    width: 64px;
    height: 64px;
}

.fixed-table-wrap .pokemon-stack-dual .pokemon-icon,
.floating-header .pokemon-stack-dual .pokemon-icon
{
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}

.fixed-table-wrap .pokemon-stack-dual .pokemon-icon + .pokemon-icon,
.floating-header .pokemon-stack-dual .pokemon-icon + .pokemon-icon
{
    margin-left: -8px;
}

.pokemon-stack-dual
{
    width: 88px;
}

.pokemon-stack-dual .pokemon-icon
{
    width: 48px;
    height: 48px;
}

.pokemon-stack-dual .pokemon-icon + .pokemon-icon
{
    margin-left: -8px;
}

.pokemon-stack-dual .stack-2
{
    z-index: 2;
}

.pokemon-label-text
{
    font-size: 9px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pokemon-label-empty
{
    align-content: center;
    min-height: 52px;
    color: var(--muted);
}

.image-missing
{
    opacity: .18;
}

.blacked-out
{
    opacity: .16;
}

tr.highlight-row > *
{
    background: var(--highlight-row) !important;
}

.col-highlight
{
    background: var(--highlight-column) !important;
}

.cross-highlight
{
    background: var(--highlight-cross) !important;
}

#tableContainer td[style*="background-color"],
#averageContainer td[style*="background-color"]
{
    color: #10202a !important;
}

.sorted
{
    box-shadow: inset 0 -3px var(--blue);
}

.tooltip
{
    position: fixed;
    z-index: 9999;
    display: none;
    max-width: 340px;
    padding: 8px 10px;
    border: 1px solid #10202a;
    background: #fff3a6;
    color: #10202a;
    box-shadow: none;
    pointer-events: none;
    font-size: 12px;
}

.floating-header
{
    position: fixed;
    top: 0;
    z-index: 999;
    display: none;
    overflow: hidden;
    pointer-events: none;
}

.floating-header table
{
    min-width: 1280px;
    table-layout: fixed;
}

.floating-header tr:first-child th
{
    width: 132px;
    min-width: 132px;
    height: 104px;
}

.floating-header tr:first-child th:first-child
{
    width: 140px;
    min-width: 140px;
}

#usageContainer table,
#megaContainer table,
#pointsContainer table,
#averageContainer table
{
    min-width: 820px;
    table-layout: auto;
}

#usageContainer th:first-child,
#megaContainer th:first-child,
#pointsContainer th:first-child,
#averageContainer th:first-child
{
    min-width: 136px;
}

#usageContainer .pokemon-icon,
#megaContainer .pokemon-icon,
#pointsContainer .pokemon-icon,
#averageContainer .pokemon-icon
{
    width: 58px;
    height: 58px;
}

#usageContainer .pokemon-label,
#megaContainer .pokemon-label,
#pointsContainer .pokemon-label,
#averageContainer .pokemon-label
{
    max-width: 104px;
    overflow: visible;
}

#usageContainer .pokemon-stack,
#megaContainer .pokemon-stack,
#pointsContainer .pokemon-stack,
#averageContainer .pokemon-stack
{
    max-width: none;
    overflow: visible;
}

#usageContainer .pokemon-stack-dual,
#megaContainer .pokemon-stack-dual,
#pointsContainer .pokemon-stack-dual,
#averageContainer .pokemon-stack-dual
{
    width: 104px;
}

#usageContainer th,
#megaContainer th,
#pointsContainer th,
#averageContainer th
{
    font-size: 11px;
}

#usageContainer td,
#megaContainer td,
#pointsContainer td,
#averageContainer td
{
    min-width: 92px;
    font-size: 16px !important;
}

#podium_1st > *
{
    background: linear-gradient(135deg,#f4cf35,#fff1a4,#d8a817) !important;
    color: #10202a !important;
}

#podium_2nd > *
{
    background: linear-gradient(135deg,#aebcc3,#f2f6f5,#8fa0a8) !important;
    color: #10202a !important;
}

#podium_3rd > *,
#podium_4th > *
{
    background: linear-gradient(135deg,#c17839,#edae72,#9e5427) !important;
    color: #10202a !important;
}

.infobox
{
    max-width: 680px;
    margin: 22px auto;
    padding: 17px;
    border: 1px solid var(--line-strong);
    border-left: 5px solid var(--blue);
    background: var(--panel);
}

.infobox a
{
    text-decoration: underline;
}

.about-page
{
    max-width: 960px;
}

.about-page .infobox
{
    width: min(680px, 100%);
    margin: 30px auto 0;
}

.about-page h2,
.explorer-heading h2
{
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: clamp(28px,5vw,48px);
}

.about-page h3
{
    margin-top: 35px;
}

.video-wrap
{
    position: relative;
    width: min(800px,100%);
    margin-top: 25px;
    padding-top: min(56.25%,450px);
    border: 1px solid var(--line-strong);
    background: var(--panel);
}

.video-wrap iframe
{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.explorer-heading
{
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

.explorer-heading > div > p:last-child
{
    max-width: 640px;
    margin-bottom: 0;
    color: var(--muted);
}

.core-size-filter
{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.core-table
{
    min-width: 980px;
}

.core-table th:first-child
{
    min-width: 220px;
    text-align: center;
}

.core-table td
{
    min-width: 95px;
}

.core-label
{
    display: inline-block;
    max-width: 100%;
}

.core-icon-row
{
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
}

.core-icon
{
    width: 42px;
    height: 42px;
    margin-right: -9px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px var(--shadow));
}

.empty-state
{
    padding: 32px;
    border: 1px dashed var(--line-strong);
    background: var(--panel);
    color: var(--muted);
    text-align: center;
}

.conversion-summary
{
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.conversion-summary > div
{
    display: grid;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 3px 3px 0 var(--grid);
}

.conversion-summary strong
{
    color: var(--blue);
    font-size: 25px;
    line-height: 1;
}

.conversion-summary span
{
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.archetype-table
{
    min-width: 790px;
}

.archetype-table th:first-child
{
    min-width: 180px;
}

.archetype-table td
{
    min-width: 92px;
}

.archetype-table thead th,
.core-table thead th
{
    cursor: pointer;
}

.conversion-cell
{
    min-width: 155px !important;
}

.conversion-cell > strong
{
    display: block;
    margin-bottom: 5px;
}

.conversion-track
{
    display: block;
    width: 100%;
    height: 5px;
    overflow: hidden;
    background: var(--grid);
}

.conversion-track i
{
    display: block;
    height: 100%;
    background: var(--green);
}

.team-search
{
    display: grid;
    min-width: min(390px,100%);
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.team-search input
{
    width: 100%;
    height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    outline: 0;
    background: var(--panel);
    color: var(--ink);
    font-size: 13px;
}

.team-search input:focus
{
    border-color: var(--blue);
    box-shadow: 0 0 0 2px color-mix(in srgb,var(--blue) 25%,transparent);
}

.team-browser-labels,
.team-summary
{
    display: grid;
    grid-template-columns: 70px minmax(180px,1fr) 105px minmax(250px,420px) 22px;
    align-items: center;
    gap: 12px;
}

.team-browser-labels
{
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    background: var(--ink);
    color: var(--bg);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.team-entry
{
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    background: var(--panel);
}

.team-entry:last-child
{
    border-bottom: 1px solid var(--line-strong);
}

.team-entry.open
{
    margin: 8px 0;
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 5px 5px 0 var(--grid);
}

.load-more-teams
{
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.load-more-teams:hover
{
    border-color: var(--blue);
    background: var(--accent);
    color: #10202a;
}

.load-more-teams small
{
    margin-left: 8px;
    font-weight: normal;
}

.team-summary
{
    width: 100%;
    min-height: 64px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.team-summary:hover
{
    background: var(--panel-alt);
}

.team-summary > i
{
    color: var(--blue);
    font-size: 18px;
    font-style: normal;
}

.team-entry.open .team-summary > i
{
    transform: rotate(180deg);
}

.ranking-badge
{
    display: inline-flex;
    width: 42px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--panel-alt);
    font-weight: 800;
}

.ranking-badge.first
{
    border-color: #d2ab0e;
    background: #ffd919;
    color: #10202a;
}

.ranking-badge.second
{
    background: #c3cdd1;
    color: #10202a;
}

.ranking-badge.third
{
    background: #d78d43;
    color: #10202a;
}

.player-cell
{
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.player-cell small,
.opponent-name small
{
    min-width: 28px;
    color: var(--muted);
    font-size: 10px;
}

.country-flag
{
    display: inline-block;
    font-size: 20px;
    line-height: 1;
}

.player-cell strong
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-cell,
.opponent-record
{
    font-variant-numeric: tabular-nums;
}

.team-icon-strip
{
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
}

.team-browser-icon
{
    width: 48px;
    height: 48px;
    margin-left: -7px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px var(--shadow));
}

.team-detail
{
    padding: 12px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb,var(--panel-alt) 60%,var(--panel));
}

.team-card-grid
{
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

.team-member-card
{
    --card-accent: #8d9290;
    min-width: 0;
    overflow: hidden;
    border: 2px solid var(--card-accent);
    border-radius: 14px;
    background: color-mix(in srgb,var(--card-accent) 8%,var(--panel));
}

.type-theme-normal
{
    --card-accent: #9fa19f;
}

.type-theme-fire
{
    --card-accent: #e62829;
}

.type-theme-water
{
    --card-accent: #2980ef;
}

.type-theme-electric
{
    --card-accent: #fac000;
}

.type-theme-grass
{
    --card-accent: #3fa129;
}

.type-theme-ice
{
    --card-accent: #3fd8ff;
}

.type-theme-fighting
{
    --card-accent: #ff8000;
}

.type-theme-poison
{
    --card-accent: #9141cb;
}

.type-theme-ground
{
    --card-accent: #915121;
}

.type-theme-flying
{
    --card-accent: #81b9ef;
}

.type-theme-psychic
{
    --card-accent: #ef4179;
}

.type-theme-bug
{
    --card-accent: #91a119;
}

.type-theme-rock
{
    --card-accent: #afa981;
}

.type-theme-ghost
{
    --card-accent: #704170;
}

.type-theme-dragon
{
    --card-accent: #5060e1;
}

.type-theme-dark
{
    --card-accent: #50413f;
}

.type-theme-steel
{
    --card-accent: #60a1b8;
}

.type-theme-fairy
{
    --card-accent: #ef70ef;
}

.team-theme-0
{
    --card-accent: #e3b829;
}

.team-theme-1
{
    --card-accent: #f07828;
}

.team-theme-2
{
    --card-accent: #ef5069;
}

.team-theme-3
{
    --card-accent: #8d9290;
}

.team-theme-4
{
    --card-accent: #e766ba;
}

.team-theme-5
{
    --card-accent: #5f5555;
}

.team-set-header
{
    padding: 9px 10px 8px;
}

.team-set-title
{
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.team-member-card h3
{
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-chip
{
    flex: 0 0 auto;
    padding: 2px 9px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.team-type-row
{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.team-type-badge
{
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.team-type-badge img
{
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.type-color-normal
{
    background: #9fa19f;
}

.type-color-fire
{
    background: #e62829;
}

.type-color-water
{
    background: #2980ef;
}

.type-color-electric
{
    background: #fac000;
}

.type-color-grass
{
    background: #3fa129;
}

.type-color-ice
{
    background: #3fd8ff;
}

.type-color-fighting
{
    background: #ff8000;
}

.type-color-poison
{
    background: #9141cb;
}

.type-color-ground
{
    background: #915121;
}

.type-color-flying
{
    background: #81b9ef;
}

.type-color-psychic
{
    background: #ef4179;
}

.type-color-bug
{
    background: #91a119;
}

.type-color-rock
{
    background: #afa981;
}

.type-color-ghost
{
    background: #704170;
}

.type-color-dragon
{
    background: #5060e1;
}

.type-color-dark
{
    background: #50413f;
}

.type-color-steel
{
    background: #60a1b8;
}

.type-color-fairy
{
    background: #ef70ef;
}

.type-color-unknown
{
    background: #979b99;
}

.team-set-meta
{
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    border-top: 1px solid color-mix(in srgb,var(--card-accent) 60%,var(--line));
    border-bottom: 1px solid color-mix(in srgb,var(--card-accent) 60%,var(--line));
}

.team-set-meta-cell
{
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 6px 9px;
    background: color-mix(in srgb,var(--card-accent) 4%,var(--panel));
}

.team-set-meta-cell + .team-set-meta-cell
{
    border-left: 1px solid color-mix(in srgb,var(--card-accent) 45%,var(--line));
}

.team-set-meta-cell small
{
    color: color-mix(in srgb,var(--card-accent) 75%,var(--ink));
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.team-set-meta-cell strong
{
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-item-icon
{
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
}

.team-set-body
{
    display: grid;
    min-height: 176px;
    grid-template-columns: minmax(120px,34%) minmax(0,1fr);
    align-items: center;
    gap: 8px;
    padding: 9px;
}

.team-member-image
{
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
}

.team-member-image .team-browser-icon
{
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 150px;
    margin: 0;
    object-fit: contain;
}

.team-moves
{
    display: grid;
    align-content: center;
    gap: 5px;
}

.team-move
{
    display: grid;
    min-height: 34px;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid color-mix(in srgb,var(--ink) 80%,transparent);
    border-radius: 7px;
    background: color-mix(in srgb,var(--panel) 92%,transparent);
}

.team-move-type
{
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-style: normal;
}

.team-move-type img
{
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.team-move-type.type-color-electric,
.team-move-type.type-color-grass,
.team-move-type.type-color-ice,
.team-move-type.type-color-ground,
.team-move-type.type-color-flying,
.team-move-type.type-color-bug,
.team-move-type.type-color-steel
{
    color: #fff;
}

.team-move strong
{
    align-self: center;
    overflow: hidden;
    padding: 5px 9px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-moves-unavailable
{
    display: flex;
    min-height: 151px;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px dashed color-mix(in srgb,var(--card-accent) 60%,var(--line));
    border-radius: 7px;
    background: color-mix(in srgb,var(--panel) 75%,transparent);
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.battle-records
{
    margin-top: 18px;
    padding: 15px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.battle-records > h3
{
    margin: 0 0 12px;
}

.battle-row
{
    display: grid;
    grid-template-columns: 44px 40px 42px minmax(160px,1fr) 82px minmax(230px,360px);
    min-height: 53px;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line);
}

.battle-round
{
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
}

.result-pill
{
    display: inline-flex;
    width: 30px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--muted);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.result-w
{
    background: var(--green);
}

.result-l
{
    background: var(--red);
}

.result-t
{
    background: var(--yellow);
    color: #10202a;
}

.opponent-place
{
    color: var(--yellow);
    font-size: 11px;
}

.opponent-name
{
    display: flex;
    align-items: center;
    gap: 8px;
}

.opponent-record
{
    display: grid;
    font-size: 11px;
}

.opponent-record small
{
    color: var(--yellow);
}

.opponent-team .team-browser-icon
{
    width: 40px;
    height: 40px;
}

@media (max-width: 980px)
{
    .tournament-row
    {
        grid-template-columns: 130px minmax(0,1fr) 28px;
    }

    .tournament-row > span:not(.tournament-date)
    {
        display: none;
    }

    .explorer-heading
    {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-browser-labels
    {
        display: none;
    }

    .team-summary
    {
        grid-template-columns: 54px minmax(130px,1fr) 85px minmax(210px,320px) 18px;
    }

    .battle-records
    {
        overflow-x: auto;
    }

    .battle-row
    {
        min-width: 760px;
    }
}

@media (max-width: 680px)
{
    .titlebar
    {
        min-height: 66px;
    }

    .brand-pokemon
    {
        width: 54px;
        height: 54px;
    }

    .brand strong
    {
        font-size: 18px;
    }

    .content2
    {
        width: min(100% - 16px,1160px);
        padding-top: 20px;
    }

    .regulation-heading strong
    {
        font-size: 20px;
    }

    .tournament-row
    {
        grid-template-columns: 1fr 24px;
        gap: 6px;
        padding-inline: 8px;
    }

    .tournament-row .tournament-date
    {
        grid-column: 1;
    }

    .tournament-row strong
    {
        grid-column: 1;
    }

    .tournament-row i
    {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .tournament-heading > h1
    {
        padding-inline: 10px;
    }

    .tourinfo
    {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding-inline: 10px;
    }

    .littlebox
    {
        min-width: 0;
        white-space: normal;
    }

    .tabs
    {
        padding-inline: 7px;
    }

    .table-controls
    {
        flex-wrap: nowrap;
        max-width: none;
    }

    .table-page
    {
        overflow-x: auto;
    }

    #tableContainer .pokemon-label-text,
    .floating-header .pokemon-label-text
    {
        display: none;
    }

    .fixed-table-wrap th,
    .fixed-table-wrap td,
    .floating-header tr:first-child th
    {
        height: 104px;
    }

    .team-summary
    {
        grid-template-columns: 48px minmax(125px,1fr) 68px 16px;
        padding: 8px;
    }

    .team-summary > .team-icon-strip
    {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 52px;
    }

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

    .team-set-body
    {
        grid-template-columns: minmax(88px,30%) minmax(0,1fr);
    }

    .team-member-image .team-browser-icon
    {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 118px;
    }

    .team-browser-icon
    {
        width: 43px;
        height: 43px;
    }

    .conversion-summary
    {
        grid-template-columns: 1fr;
    }

    .review-stats
    {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce)
{
    *,
    *::before,
    *::after
    {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
