/* ------------------------------------------------------------------
   Tournament page (/fi/turnaukset, /en/tournaments).
   The header, Skoutti and footer come from home.css (body.home); colour
   and surface tokens live in :root (site.css). Scoped to body.tournaments. */

/* The tournament filters in the header's glass tracks, each row its
   own track with its name above it: the cities across the whole
   width, the class, format and players side by side below. */
.tournaments .toolbar-filters {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 10px;
}
.tournaments .t-filter-row {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.tournaments .t-filter-row-city {
    flex-basis: 100%;
}
.tournaments .t-filter-label {
    padding-left: 13px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* Pico gives a role="group" a 20px bottom margin; the rows space themselves. */
.tournaments .t-filter-row .court-toggle {
    display: flex;
    flex: initial;
    flex-wrap: wrap;
    width: auto;
    margin-bottom: 0;
    border-radius: 18px;
}
.tournaments .t-filter-row .court-toggle .toggle-opt {
    flex: 0 0 auto;
    padding: 6px 9px;
}
.tournaments .toggle-opt .opt-n {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
}
.tournaments .toggle-opt.opt-empty {
    opacity: 0.4;
}
.tournaments .t-city-controls {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.tournaments .t-more {
    position: relative;
    margin: 0;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}
.tournaments .t-more > summary.toggle-opt {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    margin: 0;
    padding: 6px 10px 6px 11px;
    border: 0;
    border-radius: 999px;
    color: var(--glass-text);
    font-size: 13px;
    font-weight: 600;
    line-height: inherit;
    list-style: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.tournaments .t-more > summary.toggle-opt::-webkit-details-marker,
.tournaments .t-more > summary.toggle-opt::marker,
.tournaments .t-more > summary.toggle-opt::after {
    display: none;
    content: none;
}
.tournaments .t-more > summary.toggle-opt:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.tournaments .t-more[open] > summary.toggle-opt:not(.toggle-active) {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.tournaments .t-more > summary.toggle-opt.toggle-active,
.tournaments .t-more > summary.toggle-opt.toggle-active:hover {
    background: #fff;
    color: var(--navy-ink);
}
.tournaments .t-more > summary.toggle-opt:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}
.tournaments .t-more-caret {
    margin-left: 5px;
    font-size: 10px;
    opacity: 0.75;
    transition: transform 0.15s;
}
.tournaments .t-more[open] .t-more-caret {
    transform: rotate(180deg);
}
.tournaments .t-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(2, minmax(134px, 1fr));
    gap: 2px;
    width: max-content;
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: linear-gradient(145deg, #353e4a, #1e242c);
    box-shadow: 0 18px 40px -12px rgba(11, 15, 20, 0.65);
}
.tournaments .t-more-menu .toggle-opt {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.tournaments .filters-clear {
    margin-left: auto;
    padding: 8px 4px;
    color: var(--link-light);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.tournaments .filters-clear:hover {
    color: #fff;
}

/* Above the list: the heading and its figures, the "updated" orb
   breathing like the venue orbs on the home page. */
.t-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 8px;
}
.tournaments h1 {
    margin: 0 0 4px;
    color: var(--navy-ink);
    font-size: 26px;
    letter-spacing: -0.01em;
}
.t-intro {
    max-width: 640px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}
.t-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.t-stats li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    list-style: none;
    white-space: nowrap;
}
.t-stats b {
    color: var(--navy-ink);
    font-variant-numeric: tabular-nums;
}
.t-stats .t-stat-soon {
    border-color: var(--warn-border);
    background: var(--warn-bg);
    color: var(--warn-ink);
}
.t-stats .t-stat-soon b {
    color: var(--warn-ink);
}

/* Months: a bold section divider with Skoutti's green bar on the left
   so month boundaries stand out while scrolling. */
.tournaments h2.t-month {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 36px 0 14px;
    color: var(--navy-ink);
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}
.tournaments .t-hero + h2.t-month {
    margin-top: 22px;
}
.tournaments h2.t-month::before {
    content: "";
    flex: none;
    width: 5px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
    box-shadow: 0 1px 4px var(--accent-glow);
}
.tournaments h2.t-month::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(20, 33, 61, 0.16);
}
.t-month-n {
    padding: 2px 9px;
    border: 1px solid var(--color-accent-muted);
    border-radius: 999px;
    background: var(--color-accent-bg);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* A card is a ticket: the calendar leaf, what and where, the events
   by format, and past a perforation when entry closes with the way
   in. A card closing soon is told by its orange time alone. */
.t-cards {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.t-cards > li {
    margin: 0;
    list-style: none;
}
.t-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas: "tile head side" "tile body side";
    gap: 0 18px;
    padding: 16px 18px 16px 16px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.15s, transform 0.15s;
}
.t-card:hover {
    box-shadow: 0 12px 28px -16px rgba(32, 38, 46, 0.4);
    transform: translateY(-1px);
}

/* The leaf is a day of the header's day picker under a month band:
   slate glass, the weekend's name in its gold, the lit green
   spilling from below. */
.t-tile {
    grid-area: tile;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-radius: 11px;
    background: var(--lit-spill), linear-gradient(160deg, var(--slate-top), var(--slate-bottom));
    color: var(--day-date);
    text-align: center;
    line-height: 1.1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 10px -6px rgba(20, 26, 34, 0.5);
}
.t-tile-mon {
    align-self: stretch;
    padding: 4px 2px 3px;
    overflow-wrap: normal;
    background: rgba(8, 12, 16, 0.32);
    color: var(--lit-name);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.t-tile-wd {
    margin-top: 5px;
    color: var(--day-name);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.t-tile.t-weekend .t-tile-wd {
    color: var(--lit-weekend);
}
.t-tile-day {
    margin: 1px 0 6px;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.t-tile-day.t-long {
    font-size: 15px;
    letter-spacing: -0.03em;
}

.t-head {
    grid-area: head;
    align-self: end;
}
.t-name {
    color: var(--navy-ink);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}
.t-name:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.t-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    margin-top: 3px;
    color: var(--text-subtle);
    font-size: 13px;
}
.t-meta svg {
    flex: none;
    margin-right: 4px;
    vertical-align: -2px;
    color: #8a96a0;
}
.t-place {
    color: var(--text-body);
    font-weight: 500;
}
.t-entries {
    color: var(--text-body);
    font-weight: 600;
}

/* The events by format: the format's name, then a chip per class
   with its entries. Chips the choice leaves out fade. */
.t-formats {
    grid-area: body;
    align-self: start;
    display: grid;
    grid-template-columns: minmax(9.6em, max-content) minmax(0, 1fr);
    align-items: start;
    gap: 6px 14px;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--surface-muted);
    font-size: 12.5px;
}
.t-formats dt {
    margin: 0;
    padding-top: 3px;
    color: #46544c;
    font-weight: 600;
    line-height: 1.3;
}
.t-formats dt.off {
    color: var(--text-disabled);
}
.t-formats dd {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
}
.t-ev {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--color-accent-muted);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: help;
}
.t-ev-cls {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 4px 7px;
    background: var(--color-accent-bg);
    color: var(--color-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.t-ev-cls small {
    color: #4f7a5f;
    font-size: 10.5px;
    font-weight: 600;
}
.t-ev-n {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 26px;
    justify-content: center;
    padding: 4px 7px 4px 6px;
    color: #3d4a57;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.t-ev-n svg {
    flex: none;
    color: #9aa5ae;
}
.t-ev.on {
    border-color: var(--accent-bottom);
}
.t-ev.on .t-ev-cls {
    background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
    color: var(--accent-ink);
    text-shadow: var(--accent-emboss);
}
.t-ev.on .t-ev-cls small {
    color: var(--accent-ink);
}
.t-ev.off {
    border-color: var(--border-off);
}
.t-ev.off .t-ev-cls {
    background: var(--surface-off);
    color: var(--text-disabled);
}
.t-ev.off .t-ev-cls small,
.t-ev.off .t-ev-n,
.t-ev.off .t-ev-n svg {
    color: #b4bcc2;
}

/* Without events: an age group's classes and its formats apart. */
.t-groups {
    grid-area: body;
    display: grid;
    gap: 5px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--surface-muted);
}
.t-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 13px;
}
.t-age {
    display: inline-block;
    min-width: 44px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: #3d4a57;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.t-cls {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--color-accent-muted);
    border-radius: 7px;
    background: var(--color-accent-bg);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: help;
}
.t-cls.on {
    background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
    border-color: var(--accent-bottom);
    color: var(--accent-ink);
    text-shadow: var(--accent-emboss);
}
.t-cls.off {
    border-color: var(--border-off);
    background: var(--surface-off);
    color: var(--text-disabled);
}
.t-noclass {
    padding: 1px 8px;
    border: 1px dashed #c9d0d6;
    border-radius: 7px;
    color: var(--text-subtle);
    font-size: 12px;
}
.t-games {
    margin-left: 2px;
    color: var(--text-secondary);
}

/* The stub past the perforation. */
.t-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    min-width: 170px;
    margin: -2px 0;
    padding-left: 18px;
    border-left: 1.5px dashed var(--border-card);
    text-align: right;
}
.t-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef6e4;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.t-left b {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.t-left.soon {
    background: #ffe9bf;
    color: var(--warn-ink);
}
.t-closes {
    color: var(--text-subtle);
    font-size: 12.5px;
    white-space: nowrap;
}
.t-side svg {
    flex: none;
}
/* The way in is a quiet link: on every card a button would shout. */
.t-enter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    padding: 4px 0;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.t-enter:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.t-enter-arrow {
    color: var(--accent-bottom);
    font-weight: 700;
}

/* The source line closes the list; the footer follows close behind. */
.t-source {
    margin: 16px 0 0;
    color: var(--text-subtle);
    font-size: 13px;
}
.tournaments main.container {
    padding-bottom: 0;
}
.tournaments .site-footer {
    margin-top: 32px;
}
.loading main {
    opacity: 0.6;
    transition: opacity 0.1s;
}
@media (prefers-reduced-motion: reduce) {
    .t-card,
    .t-card:hover {
        transition: none;
        transform: none;
    }
}
@media (min-width: 769px) {
    .tournaments .content-toolbar > .toolbar-filters {
        display: flex;
    }
}
@media (min-width: 769px) and (max-width: 1023px) {
    .tournaments .t-more-menu {
        left: 0;
        right: auto;
    }
}
@media (max-width: 768px) {
    /* Without the home page's day picker between the top row and the
       filter button, pull the sticky header up only past the first
       row so the gap above the filter button stays as top padding. */
    .tournaments {
        --header-row-1: 42px;
    }
    .tournaments .content-toolbar {
        padding-top: 2px;
    }
    /* On the phone the inline header filters stay hidden; the button opens
       the filter sheet instead. */
    .tournaments .content-toolbar > .toolbar-filters {
        display: none;
    }
    .tournaments .t-filter-label {
        padding-left: 10px;
    }
    .tournaments .t-filter-row .court-toggle .toggle-opt {
        flex: 0 0 auto;
        padding: 6px 8px;
    }
    .tournaments .t-city-controls {
        gap: 6px;
    }
    .tournaments .t-more {
        position: static;
    }
    .tournaments .t-more > summary.toggle-opt {
        padding: 6px 9px;
    }
    .tournaments .t-more-menu {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        max-height: 55vh;
        overflow-y: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tournaments .filters-clear {
        flex-basis: 100%;
        text-align: center;
    }
    .tournaments h1 {
        font-size: 23px;
    }
    .t-stats li {
        padding: 4px 10px;
        font-size: 12.5px;
    }
    /* The leaf beside the name, the events across the card below
       them, and the deadline with the way in past a perforation
       across the card's foot. */
    .t-card {
        grid-template-columns: 50px minmax(0, 1fr);
        grid-template-areas: "tile head" "body body" "side side";
        gap: 0 12px;
        padding: 12px 14px;
    }
    .t-tile-day {
        font-size: 17px;
        margin-bottom: 5px;
    }
    .t-tile-day.t-long {
        font-size: 13.5px;
    }
    .t-head {
        align-self: center;
    }
    .t-formats {
        gap: 6px 10px;
        font-size: 12px;
    }
    .t-side {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 4px 12px;
        min-width: 0;
        margin: 12px 0 0;
        padding: 10px 0 0;
        border-top: 1.5px dashed var(--border-card);
        border-left: 0;
        text-align: left;
    }
    .t-left {
        justify-self: start;
    }
    .t-closes {
        grid-column: 1;
        white-space: normal;
    }
    .t-enter {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin: 0;
        padding: 12px 0 12px 8px;
        font-size: 13.5px;
    }
}

/* ------------------------------------------------------------------
   The filters as in the Skoutti app: a key in the header that opens them
   in a sheet, the choices as chips beside it, and the months held at the
   bottom of the screen. */

/* The key and the chips, on the slate (mobile only; desktop shows the
   inline filters above). */
.tournaments .t-toolbar {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
@media (max-width: 768px) {
    .tournaments .t-toolbar {
        display: flex;
    }
}
.tournaments .t-filter-open {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    width: auto;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--day-text, #e6edf8);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.2;
    box-shadow: none;
    cursor: pointer;
}
.tournaments .t-filter-open:hover {
    background: rgba(255, 255, 255, 0.14);
}
.tournaments .t-filter-open:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}
.tournaments .t-filter-open.has-chosen {
    border-color: rgba(168, 221, 94, 0.5);
}
.tournaments .t-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-top, #a8dd5e);
    color: var(--accent-ink, #18360f);
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.tournaments .t-chosen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tournaments .t-chosen li {
    margin: 0;
    list-style: none;
}
.tournaments .t-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    border: 1px solid rgba(168, 221, 94, 0.45);
    border-radius: 999px;
    background: rgba(168, 221, 94, 0.12);
    color: var(--lit-name, #cfe9a6);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}
.tournaments .t-chip span {
    opacity: 0.75;
    font-size: 14px;
    line-height: 1;
}
.tournaments .t-chip:hover {
    background: rgba(168, 221, 94, 0.22);
    color: #fff;
}
.tournaments .t-chip-clear {
    padding: 5px 4px;
    color: var(--link-light);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: underline;
}
.tournaments .t-chip-clear:hover {
    color: #fff;
}

/* The sheet: the header's slate, rising from the bottom on a phone and
   in the middle of a wide screen. */
.tournaments .t-sheet {
    /* Pico draws a dialog as a full-screen overlay holding a box; this one
       is the box itself. */
    width: min(560px, 100vw);
    min-width: 0;
    max-width: 100vw;
    height: auto;
    min-height: 0;
    max-height: min(86svh, 760px);
    margin: auto;
    padding: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: linear-gradient(160deg, #2b333e, #182029 60%, #141a21);
    color: var(--day-text, #e6edf8);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.tournaments .t-sheet[open] {
    display: flex;
    flex-direction: column;
}
.tournaments .t-sheet:modal {
    overscroll-behavior: contain;
}
.tournaments .t-sheet::backdrop {
    overflow: hidden;
    background: rgba(11, 15, 20, 0.55);
    overscroll-behavior: contain;
}
@media (max-width: 640px) {
    .tournaments .t-sheet {
        width: 100vw;
        margin: auto 0 0;
        border-radius: 22px 22px 0 0;
        border-bottom: 0;
    }
}
.tournaments .t-sheet-head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 10px 20px;
}
.tournaments .t-sheet-head h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}
.tournaments .t-sheet-close {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    color: var(--day-muted, #c3ccd7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.tournaments .t-sheet-close::after {
    content: "";
    position: absolute;
    inset: -6px;
}
.tournaments .t-sheet-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.tournaments .t-sheet-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.tournaments .t-sheet-body.is-loading .toolbar-filters {
    opacity: 0.6;
    transition: opacity 0.1s 0.15s;
}
/* The rows one under the other, each a label over its track, at every
   width (the header's phone rules fold them). */
.tournaments .t-sheet .toolbar-filters {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: auto;
    margin: 0;
    padding: 4px 18px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.tournaments .t-sheet .t-filter-row,
.tournaments .t-sheet .t-filter-row-city {
    flex: none;
}
.tournaments .t-sheet .t-filter-row .court-toggle {
    width: auto;
}
.tournaments .t-sheet .t-filter-row .court-toggle .toggle-opt {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 14px;
}
/* In the sheet the other cities open under their key, not as a menu over
   the rows. */
.tournaments .t-sheet .t-more {
    flex-basis: 100%;
    border: 0;
    padding: 0;
    background: none;
}
.tournaments .t-sheet .t-more > summary.toggle-opt {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
}
.tournaments .t-sheet .t-more-menu {
    position: static;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    width: auto;
    max-width: none;
    margin-top: 8px;
    box-shadow: none;
}
.tournaments .t-sheet-bar {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tournaments .t-sheet-clear {
    flex: none;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: var(--day-muted, #c3ccd7);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.tournaments .t-sheet-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.tournaments .t-sheet-clear.is-off {
    opacity: 0.4;
    pointer-events: none;
}
.tournaments .t-sheet-show {
    flex: 1 1 auto;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-top, #a8dd5e), var(--accent-bottom, #7cc043));
    color: var(--accent-ink, #18360f);
    font-size: 15.5px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.tournaments .t-sheet-show:hover {
    filter: brightness(1.05);
}
.tournaments .t-sheet-show.is-off {
    opacity: 0.45;
    pointer-events: none;
}

/* The months, held at the bottom of the screen while the list goes by:
   the month being read lit from below, as a picked day. */
.tournaments h2.t-month {
    scroll-margin-top: 12px;
}
.tournaments .t-months {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(43, 51, 62, 0.94), rgba(24, 32, 41, 0.96));
    box-shadow: 0 12px 30px -12px rgba(11, 15, 20, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.tournaments .t-months::-webkit-scrollbar {
    display: none;
}
.tournaments .t-month-key {
    position: relative;
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 58px;
    padding: 6px 10px 8px;
    border-radius: 11px;
    color: #e6edf8;
    line-height: 1.15;
    text-decoration: none;
}
.tournaments .t-month-key:hover {
    background: rgba(255, 255, 255, 0.08);
}
.tournaments .t-month-key-name {
    color: #c3ccd7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tournaments .t-month-key b {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tournaments .t-month-key.is-active {
    background: linear-gradient(180deg, rgba(168, 221, 94, 0) 20%, rgba(168, 221, 94, 0.18));
    color: #fff;
}
.tournaments .t-month-key.is-active .t-month-key-name {
    color: #cfe9a6;
}
.tournaments .t-month-key.is-active::after {
    content: "";
    position: absolute;
    right: 26%;
    bottom: 2px;
    left: 26%;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-top, #a8dd5e);
    box-shadow: 0 0 8px rgba(168, 221, 94, 0.9);
}
.tournaments .t-month-key:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}
