.fantasy-home {
    padding-block: clamp(5px, 1.7vw, 25px) 15px;
}

.fantasy-home-hero,
.fantasy-home-content {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    gap: 24px clamp(26px, 4.6vw, 70px);
}

.fantasy-home-hero {
    align-items: center;
}

.fantasy-home-intro h1 {
    margin: 0;
    font: 800 clamp(36px, 4vw, 56px)/1.05 var(--display);
    letter-spacing: -.045em;
}

.fantasy-home-intro > p:not(.fantasy-home-status) {
    max-width: 47ch;
    margin: 13px 0 0;
    color: hsl(var(--muted));
    font-size: clamp(16px, 1.45vw, 20px);
    line-height: 1.52;
}

.fantasy-home-rules {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 7px 10px;
    margin: 23px 0;
}

.fantasy-home-rules > div {
    padding: 10px 9px;
    border-radius: 7px;
    background: hsl(var(--surface));
}

.fantasy-home-rules dt,
.fantasy-home-rules dd small {
    color: hsl(var(--muted));
    font: 700 12px/1.22 Kappers Text, system-ui, sans-serif;
    overflow-wrap: anywhere;
}

.fantasy-home-rules dd {
    margin: 3px 0 0;
    font: 800 clamp(25px, 3vw, 43px)/1 var(--display);
    font-variant-numeric: tabular-nums;
}

.fantasy-home-status,
.fantasy-home-section-heading p,
.fantasy-home-board header p {
    margin: 5px 0 0;
    color: hsl(var(--muted));
    font-size: 13px;
}

.fantasy-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fantasy-home-actions a,
.fantasy-home-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

.fantasy-home-secondary {
    border: 1px solid hsl(var(--border));
    background: #fff;
    color: hsl(var(--foreground));
}

.fantasy-home-secondary:hover {
    background: hsl(var(--surface));
}

.fantasy-home-board {
    min-width: 0;
    padding: 11px;
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
}

.fantasy-home-board header,
.fantasy-home-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.fantasy-home-board header h2 {
    margin: 0;
    font: 700 17px/1.22 Kappers Text, system-ui, sans-serif;
}

.fantasy-home-board form {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fantasy-home-board select {
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid #829393;
    border-radius: 7px;
    background: #fff;
    color: hsl(var(--foreground));
    font: inherit;
    font-size: 16px;
}

.fantasy-home-pitch {
    --pitch-color: #214b41;
    --pitch-line: #e1eee585;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    min-height: 248px;
    padding: 12px 6%;
    overflow: hidden;
    border-radius: 8px;
    background: repeating-linear-gradient(0deg, var(--pitch-color) 0 12.5%, #2e564c 12.5% 25%);
}

.fantasy-home-pitch::before {
    position: absolute;
    z-index: -1;
    inset: 10px;
    border: 1px solid var(--pitch-line);
    border-radius: 4px;
    content: "";
}

.fantasy-pitch-line {
    position: absolute;
    z-index: -1;
    inset: 50% 10px auto;
    border-top: 1px solid var(--pitch-line);
}

.fantasy-pitch-line::after {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 68px;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid var(--pitch-line);
    border-radius: 50%;
    content: "";
}

.fantasy-pitch-row {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 4px;
}

.fantasy-pitch-slot {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 35px;
    min-height: 42px;
    border-radius: 7px;
    background: #edf5ef;
    color: var(--pitch-color);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.fantasy-pitch-slot i,
.fantasy-player-placeholder i {
    width: 16px;
    height: 15px;
    background: currentColor;
    clip-path: polygon(25% 0, 38% 0, 50% 19%, 62% 0, 75% 0, 100% 24%, 86% 45%, 76% 36%, 76% 100%, 24% 100%, 24% 36%, 14% 45%, 0 24%);
}

.fantasy-home-bench,
.fantasy-home-bench div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.fantasy-home-bench {
    justify-content: space-between;
    padding: 8px 2px 0;
    color: hsl(var(--muted));
    font-size: 12px;
}

.fantasy-home-bench div span {
    min-width: 27px;
    padding: 4px;
    border-radius: 4px;
    background: hsl(var(--surface));
    color: hsl(var(--foreground));
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.fantasy-home-tournaments,
.fantasy-home-guide,
.fantasy-home-content {
    margin-block-start: clamp(26px, 3vw, 42px);
}

.fantasy-home :is(.fantasy-home-tournaments, .fantasy-home-guide, .fantasy-home-content) h2 {
    margin: 0 0 8px;
    scroll-margin-top: 96px;
    font: 800 clamp(21px, 2.2vw, 27px)/1.15 var(--display);
}

.fantasy-home-section-heading p {
    margin-top: -3px;
}

.fantasy-tournament-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.fantasy-tournament-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid hsl(var(--border));
    border-radius: 7px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.fantasy-tournament-list a[aria-current],
.fantasy-home-positions a[aria-current] {
    border-color: hsl(var(--primary));
    background: var(--home-accent-surface);
    color: hsl(var(--primary));
}

.fantasy-tournament-list img {
    flex: none;
    object-fit: contain;
}

.fantasy-tournament-list a span,
.fantasy-home-sections a > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.fantasy-tournament-list small,
.fantasy-home-sections small {
    color: hsl(var(--muted));
    font-size: 12px;
}

.fantasy-home-content {
    grid-template-columns: minmax(0, 1.66fr) minmax(0, 1fr);
}

.fantasy-home-content > section {
    min-width: 0;
}

.fantasy-home-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: hsl(var(--primary));
    font-size: 13px;
    font-weight: 700;
}

.fantasy-home-positions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-block: 9px 10px;
    scroll-margin-top: 96px;
}

.fantasy-home-positions a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: hsl(var(--surface));
    font-size: 13px;
    font-weight: 700;
}

.fantasy-home-players {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.fantasy-home-players :is(th, td) {
    padding: 7px 6px;
    text-align: end;
}

.fantasy-home-players :is(th, td):first-child {
    text-align: start;
}

.fantasy-home-players thead {
    background: hsl(var(--surface));
    color: hsl(var(--muted));
    font-size: 12px;
}

.fantasy-home-players th a {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    overflow-wrap: anywhere;
}

.fantasy-home-players img,
.fantasy-player-placeholder {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.fantasy-player-placeholder {
    display: grid;
    place-items: center;
    background: hsl(var(--surface));
    color: #214b41;
}

.fantasy-home-sections ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fantasy-home-sections a {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 6px;
    border-radius: 7px;
}

.fantasy-home-sections a:hover {
    background: hsl(var(--surface));
}

.fantasy-section-icon {
    display: grid;
    place-items: center;
    height: 32px;
    border-radius: 6px;
    background: #edf5ef;
    color: #214b41;
}

.fantasy-home-guide > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 15px;
}

.fantasy-home-guide summary,
.fantasy-home-empty {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 7px;
    background: hsl(var(--surface));
    font-weight: 700;
}

.fantasy-home-guide summary {
    cursor: pointer;
}

.fantasy-home-guide details p {
    margin: 8px 12px 10px;
    color: hsl(var(--muted));
}

@media (max-width: 1100px) {
    .fantasy-tournament-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .fantasy-home-hero,
    .fantasy-home-content,
    .fantasy-home-guide > div {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 510px) {
    .fantasy-tournament-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fantasy-home-pitch {
        min-height: 214px;
    }

    .fantasy-home-rules dd small {
        display: block;
        margin-top: 3px;
    }
}
