.fantasy-points-round-tools,
.fantasy-points-round-tools form,
.fantasy-points-round-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fantasy-points .fantasy-team-heading > div { min-width: 0; }

.fantasy-points-tournament {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

.fantasy-points .fantasy-points-tournament select { width: 100%; }

.fantasy-points select {
    max-width: min(100%, 330px);
    padding: 7px 9px;
    border: 1px solid #9badab;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.fantasy-points-round {
    margin-bottom: 26px;
    padding: clamp(12px, 2vw, 22px);
    border-radius: 9px;
    background: #f2f6f4;
}

.fantasy-points-round-title h2 {
    font-size: clamp(22px, 2.5vw, 32px);
}

.fantasy-points-state {
    padding: 4px 7px;
    border-radius: 5px;
    background: #fff;
    color: #214b41;
    font-size: 13px;
    font-weight: 700;
}

.fantasy-points-round-tools a[aria-label] {
    min-width: 44px;
    justify-content: center;
}

.fantasy-points .fantasy-points-round-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 12px;
    font-size: 14px;
}

.fantasy-points-round-stats div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fantasy-points-round-stats dd {
    font-weight: 750;
}

.fantasy-points-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(16px, 3.5vw, 48px);
}

.fantasy-points .fantasy-points-context {
    margin-top: 4px;
    color: hsl(var(--muted));
    font-size: 14px;
}

.fantasy-points-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: separate;
    border-spacing: 0 3px;
    font-size: 14px;
}

.fantasy-points-table td,
.fantasy-points-table th {
    padding: 6px 8px;
    vertical-align: middle;
}

.fantasy-points-table th {
    text-align: left;
}

.fantasy-points-table thead,
.fantasy-points-group {
    background: #edf3ef;
    color: #294b3f;
}

.fantasy-points-table tr:not(.fantasy-points-group) td,
.fantasy-points-table tbody tr:not(.fantasy-points-group) th {
    background: #f7f9f8;
}

.fantasy-points-table td:nth-child(n+3),
.fantasy-points-table thead th:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fantasy-points-player {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    overflow-wrap: anywhere;
}

.fantasy-points-player img {
    flex: 0 0 32px;
    object-fit: contain;
}

.fantasy-points-player small {
    display: block;
    color: hsl(var(--muted));
    font-size: 12px;
    font-weight: 450;
}

.fantasy-points-player abbr {
    display: inline-block;
    padding: 0 4px;
    border-radius: 3px;
    background: #edf5ef;
    color: #214b41;
    font-size: 11px;
    text-decoration: none;
}

.fantasy-points-table td:last-child {
    color: #214b41;
    font-size: 15px;
}

.fantasy-points-table .fantasy-points-negative { color: #912040; }

.fantasy-points-team {
    padding: 16px;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.fantasy-points .fantasy-points-team dl {
    display: grid;
    gap: 5px;
    margin-top: 12px;
}

.fantasy-points-team dl div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 5px;
    background: #f4f7f5;
    font-size: 14px;
}

.fantasy-points-team dd {
    font-weight: 750;
    white-space: nowrap;
}

.fantasy-points-empty {
    display: grid;
    gap: 10px;
    justify-items: start;
    margin-top: 12px;
}

.fantasy-points-empty details { width: 100%; }
.fantasy-points-empty summary { padding: 8px 0; cursor: pointer; }

@media (max-width: 800px) {
    .fantasy-points-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 540px) {
    html:has(.fantasy-points) { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .fantasy-points .fantasy-team-heading > a { display: none; }
    .fantasy-points .fantasy-team-nav { margin-bottom: 16px; }

    .fantasy-points-round-tools {
        width: 100%;
        gap: 5px;
    }

    .fantasy-points-table .fantasy-points-price { display: none; }
    .fantasy-points-table { font-size: 12px; }
    .fantasy-points-table td,
    .fantasy-points-table th { padding: 6px 4px; }
    .fantasy-points-table td:nth-child(2) { overflow-wrap: anywhere; }
    .fantasy-points-player img { width: 24px; height: 24px; flex-basis: 24px; }
    .fantasy-points-player .fantasy-player-placeholder { width: 24px; height: 24px; }
    .fantasy-points-player small { font-size: 11px; }
}
