/*
 * TurfScout match finder — stylesheet alignment, version 1.1.
 * Shared components use the supplied styles(10).css declarations.
 * Match-only selectors keep the existing fixture layout and JS states.
 * Self-contained: no imports, additional assets or JavaScript changes.
 */


/* ---------------------------------------------------------
   SITE TOKENS / BASE
--------------------------------------------------------- */


:root {
    --bg: #f4f4f1;
    --paper: #ffffff;
    --paper-2: #fafaf7;
    --ink: #171a18;
    --text: #2c312e;
    --muted: #69716c;
    --brand: #2f7d32;
    --brand-dark: #205d24;
    --brand-soft: #e9f3e9;
    --line: #cfd4cf;
    --line-dark: #9ca59f;
    --danger: #b42318;
    --shadow: 4px 4px 0 rgba(23, 26, 24, .11);
    --shadow-soft: 0 5px 18px rgba(23, 26, 24, .08);
    --radius: 3px;
    --radius-sm: 2px;
    --max: 1100px;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

a {
    color: inherit
}

.wrap {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Required by the match finder and the shared menu. */
[hidden],
.hidden {
    display: none !important;
}

button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

button,
a,
input,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

:where(.tool-btn, .period-btn, .date-btn, .save-match, .link-btn,
       .text-button, .popup-match, .match-details > summary,
       .status-toggle input):focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 12px;
    z-index: 3000;
    padding: 12px;
    color: var(--paper);
    background: var(--ink);
}

.skip-link:focus {
    top: 10px;
}


/* ---------------------------------------------------------
   HERO / BRAND — SHARED SITE STYLES
--------------------------------------------------------- */


.hero {
    position: relative;
    padding: 26px 0 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background:
        linear-gradient(90deg,
            var(--brand) 0 11%,
            transparent 11% 13%,
            var(--ink) 13% 15%,
            transparent 15% 100%);
}

.hero-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.hero-contact {
    position: absolute;
    top: 14px;
    left: max(16px, calc((100vw - var(--max))/2));
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--brand-dark);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 #d6dad6;
    text-decoration: none;
    font-size: .76rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .01em;
    transition: background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.hero-contact:hover,
.hero-contact:focus-visible {
    color: #fff;
    background: var(--brand);
    box-shadow: 3px 3px 0 var(--ink);
    transform: translate(-1px, -1px);
    outline: none;
}

.hero-contact:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 var(--ink);
}

.hero-logo {
    display: block;
    width: min(500px, 78vw);
    height: auto;
    margin: 0 auto;
}

.hero-intro {
    max-width: 660px;
    margin: 9px auto 18px;
    text-align: center;
}

.hero-tagline {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.05rem, 2.6vw, 1.38rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.025em;
}

.hero-description {
    margin: 5px auto 0;
    color: var(--muted);
    font-size: clamp(.86rem, 1.6vw, .96rem);
    line-height: 1.45;
}

.finder-switch {
    display: inline-flex;
    gap: 4px;
    margin-top: 9px;
    padding: 3px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: .72rem;
    font-weight: 900;
}

.finder-switch a,
.finder-switch span {
    padding: 5px 8px;
    text-decoration: none;
}

.finder-switch a:hover {
    text-decoration: underline;
}

.finder-switch [aria-current="page"] {
    color: #fff;
    background: var(--brand);
}


.ts-page-share {
    position: absolute;
    top: 14px;
    right: max(16px, calc((100vw - var(--max, 1100px)) / 2));
    z-index: 40;

    width: 38px;
    height: 36px;

    display: grid;
    place-items: center;

    padding: 0;

    color: var(--ink, #171a18);
    background: var(--paper, #ffffff);

    border: 1px solid var(--ink, #171a18);
    border-radius: var(--radius-sm, 2px);

    box-shadow: 2px 2px 0 #d6dad6;

    cursor: pointer;

    transition:
        background .14s ease,
        color .14s ease,
        transform .14s ease,
        box-shadow .14s ease;
}

.ts-page-share:hover,
.ts-page-share:focus-visible {
    color: #ffffff;
    background: var(--brand, #2f7d32);

    outline: none;

    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink, #171a18);
}

.ts-page-share svg {
    display: block;
}

@media (max-width: 600px) {
    .ts-page-share {
        top: 12px;
        right: 12px;
    }
}


/* ---------------------------------------------------------
   SEARCH / BUTTONS — SHARED SITE STYLES
--------------------------------------------------------- */


.search-card {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-card::before {
    content: "FIND A MATCH";
    position: absolute;
    top: -10px;
    left: 12px;
    padding: 2px 7px;
    background: var(--paper);
    color: var(--brand-dark);
    border: 1px solid var(--ink);
    font-size: .62rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .12em;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.field {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.field::placeholder {
    color: #8a918c
}

.field:focus {
    border-color: var(--ink);
    box-shadow: inset 0 -3px 0 var(--brand);
    outline: none;
}

.btn {
    min-height: 45px;
    border-radius: var(--radius-sm);
    padding: 10px 17px;
    font-weight: 800;
    letter-spacing: .01em;
    transition: background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.btn:hover {
    transform: translate(-1px, -1px)
}

.btn:active {
    transform: translate(0, 0)
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none
}

.btn-primary {
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 3px 3px 0 var(--ink);
}

.btn-secondary {
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    box-shadow: 2px 2px 0 #d6dad6;
}

.btn-secondary:hover {
    color: #fff;
    background: var(--ink);
}

.btn-wide {
    width: 100%;
    margin-top: 8px;
}

.search-note {
    margin: 9px 2px 0;
    color: #7a817c;
    font-size: .73rem;
    line-height: 1.4;
    text-align: center;
}

.compact-control {
    display: grid;
    gap: 4px;
    position: relative;
}

.control-label,
.compact-control > span {
    color: #5c645f;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.compact-select {
    min-height: 40px;
    padding: 8px 36px 8px 11px;
    border-color: var(--line-dark);
    background: var(--paper);
    font-weight: 700;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 9px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 #d8ddd8;
    text-decoration: none;
    font-size: .74rem;
    font-weight: 900;
    transition: .14s ease;
}

.link-btn:hover {
    color: #fff;
    background: var(--ink);
    box-shadow: none;
    transform: translate(1px, 1px);
}


/* Same green Share action used on the pitch cards. */
.link-btn[data-share] {
    color: #fff;
    background: var(--brand);
    border-color: var(--ink);
    cursor: pointer;
}

.link-btn[data-share]:hover {
    color: #fff;
    background: var(--brand-dark);
}

/* Directions and empty-state actions retain the standard link-button style. */
.link-btn.primary-link {
    border-color: var(--ink);
}


/* ---------------------------------------------------------
   LOCATION AUTOCOMPLETE
--------------------------------------------------------- */


.location-search-wrap {
    position: relative;
    min-width: 0;
}

.location-search-wrap>.field {
    display: block;
}

.location-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 80;
    max-height: min(360px, 52vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}

.location-suggestions[hidden] {
    display: none
}

.location-suggestion {
    width: 100%;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 9px 10px;
    text-align: left;
    color: var(--text);
    background: var(--paper);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    cursor: pointer;
}

.location-suggestion:last-child {
    border-bottom: 0
}

.location-suggestion:hover,
.location-suggestion.active {
    background: var(--brand-soft);
}

.location-suggestion.active {
    box-shadow: inset 4px 0 0 var(--brand);
}

.location-suggestion-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--ink);
    border-radius: 1px;
    font-size: .78rem;
    font-weight: 900;
}

.location-suggestion-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.location-suggestion-main {
    overflow: hidden;
    color: var(--ink);
    font-size: .87rem;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-suggestion-sub {
    overflow: hidden;
    color: #747d77;
    font-size: .73rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------
   MATCHDAY HEADING / FILTERS
--------------------------------------------------------- */


main.wrap {
    padding: 22px 0 62px;
}


.fixture-board-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-bottom: 11px;
}

.eyebrow {
    margin: 0 0 5px;
    color: #5c645f;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.fixture-board-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.board-tools {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 35px;
    padding: 7px 11px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 #d6dad6;
    font-size: .80rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.tool-btn:hover:not(:disabled) {
    color: #fff;
    background: var(--ink);
    box-shadow: none;
    transform: translate(1px, 1px);
}

.tool-btn[aria-pressed="true"] {
    color: #fff;
    background: var(--brand);
    border-color: var(--ink);
}

.tool-btn[aria-pressed="true"]:hover:not(:disabled) {
    background: var(--brand-dark);
}

.tool-count {
    display: inline-block;
    min-width: 18px;
    padding: 1px 4px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #bfd6c1;
    font-size: .66rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.filter-board {
    min-width: 0;
    margin: 0;
    padding: 0;
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.period-btn {
    min-height: 32px;
    padding: 6px 9px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 #d8ddd8;
    font-size: .74rem;
    font-weight: 900;
    transition: .14s ease;
}

.period-btn:hover:not(:disabled) {
    color: #fff;
    background: var(--ink);
    box-shadow: none;
    transform: translate(1px, 1px);
}

.period-btn[aria-pressed="true"] {
    color: #fff;
    background: var(--brand);
    border-color: var(--ink);
}

.period-btn[aria-pressed="true"]:hover:not(:disabled) {
    background: var(--brand-dark);
}

.uk-time-note {
    color: var(--muted);
    font-size: .72rem;
    white-space: nowrap;
}

.date-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
}

.date-btn {
    min-width: 0;
    padding: 9px 4px;
    color: var(--ink);
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.date-btn:hover:not(:disabled) {
    border-color: var(--ink);
    background: var(--brand-soft);
}

.date-btn[aria-pressed="true"] {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: var(--ink);
    box-shadow: inset 0 -3px 0 var(--brand);
}

.date-day {
    display: block;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.date-number {
    display: block;
    margin: 4px 0;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.date-count {
    display: block;
    color: var(--muted);
    font-size: .66rem;
    line-height: 1.35;
}

.date-btn.is-today .date-day {
    color: var(--brand-dark);
}

.date-btn.uncovered {
    background: var(--paper);
    border-style: dashed;
}

.filter-bottomline {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.5fr) minmax(180px, 1fr) minmax(155px, .85fr);
    align-items: end;
    gap: 12px;
    padding: 0 12px 12px;
}

.filter-bottomline .compact-control {
    min-width: 0;
}

.filter-bottomline .compact-select {
    min-width: 0;
    text-overflow: ellipsis;
}

.competition-control {
    min-width: 0;
}

.status-toggle {
    display: flex;
    align-items: flex-start;
    align-self: end;
    gap: 8px;
    min-height: 40px;
    padding: 3px 0;
    color: #434a45;
    font-size: .82rem;
    line-height: 1.3;
    cursor: pointer;
}

.status-toggle input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}


/* ---------------------------------------------------------
   STATUS / WELCOME / FEED STATES
--------------------------------------------------------- */


.results-status {
    padding: 18px 0 11px;
}

.status-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.status-sub {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .81rem;
}


.results {
    min-width: 0;
}

.notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    color: #68480c;
    background: #fffbef;
    border: 1px solid var(--ink);
    border-left: 4px solid #a66716;
    border-radius: var(--radius);
    box-shadow: 2px 2px 0 #d9ddd9;
    font-size: .79rem;
    line-height: 1.5;
}

.error-panel {
    color: var(--danger);
    background: #fffafa;
    border-left-color: #d92d20;
}

.error-panel p {
    margin: 0 0 6px;
}

.welcome-panel,
.empty-panel,
.loading-panel {
    padding: 26px 18px;
    color: #68716b;
    background: var(--paper);
    border: 1px solid var(--ink);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.welcome-heading > div {
    min-width: 0;
}

.welcome-mark {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 #d9ddd9;
    font-size: .82rem;
    font-weight: 900;
}

.welcome-heading h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -.02em;
}

.welcome-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .79rem;
    line-height: 1.5;
}

.welcome-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.step-number {
    color: var(--brand-dark);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.welcome-steps h4 {
    margin: 7px 0 4px;
    color: var(--ink);
    font-size: .89rem;
    font-weight: 900;
}

.welcome-steps p {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.4;
}

.empty-panel h3 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 900;
}

.empty-panel p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: .81rem;
    line-height: 1.5;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

/* Visibility is controlled by Matches.js through the hidden attribute. */
.load-more {
    display: block;
    min-width: 150px;
    margin: 17px auto 0;
}

.feed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.feed-footer p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.4;
}

.text-button {
    padding: 5px 0;
    color: var(--brand-dark);
    background: none;
    border: 0;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.text-button:hover:not(:disabled) {
    text-decoration-thickness: 2px;
}

.coverage-note {
    margin: 16px 0 0;
    color: #505852;
    font-size: .72rem;
    line-height: 1.4;
}

.loading-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: .81rem;
    line-height: 1.4;
    text-align: center;
}

.loading-dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ---------------------------------------------------------
   FIXTURE CARDS — SAME FINISH AS THE SITE'S VENUE CARDS
--------------------------------------------------------- */


.day-group {
    margin: 13px 0 22px;
}

.day-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand);
}

.day-heading h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.day-heading .full-date {
    color: var(--muted);
    font-size: .81rem;
}

.day-total {
    margin-left: auto;
    color: var(--brand-dark);
    font-size: .72rem;
    font-weight: 900;
}

.day-matches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.match-card {
    position: relative;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 2px 2px 0 #d9ddd9;
    transition: transform .14s ease, box-shadow .14s ease;
}

.match-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--brand);
}

.match-card:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #d1d6d1;
}


.match-card {
    min-width: 0;
    scroll-margin-top: 20px;
}

.match-card::before {
    pointer-events: none;
}

.match-card.is-inactive {
    background: var(--paper-2);
}

.match-card.is-inactive::before {
    background: var(--line-dark);
}

.match-card.is-disrupted::before {
    background: #a66716;
}

.match-card.is-highlighted {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.match-topline {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 13px;
    padding: 12px 14px 9px 16px;
}

.competition-name {
    margin: 0;
    color: #646d67;
    font-size: .70rem;
    line-height: 1.35;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.save-match {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 4px;
    min-height: 32px;
    margin: -4px -4px 0 0;
    padding: 5px 7px;
    color: #646d67;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 800;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}

.save-match:hover,
.save-match[aria-pressed="true"] {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: #b8d1ba;
}

.save-symbol {
    font-size: 1.1rem;
    line-height: 1;
}

.match-lineup {
    display: grid;
    grid-template-columns: 77px minmax(0, 1fr);
    gap: 13px;
    padding: 0 14px 10px 16px;
}

.kickoff-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 10px 3px 0;
    border-right: 1px solid var(--line);
}

.kickoff-time {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}

.kickoff-label {
    margin-top: 4px;
    color: #646d67;
    font-size: .66rem;
    line-height: 1.3;
    text-align: center;
}

.teams {
    margin: 0;
    color: var(--ink);
    font-size: .98rem;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: -.01em;
}


.teams {
    overflow-wrap: anywhere;
}

.team-v {
    display: block;
    margin: 2px 0;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: 0;
}

.match-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.status-badge {
    display: inline-block;
    padding: 3px 6px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #b8d1ba;
    border-radius: 1px;
    font-size: .66rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.status-badge.inactive {
    color: #4d5650;
    background: #f0f2ef;
    border-color: var(--line);
}

.status-badge.warning {
    color: #794c10;
    background: #fff2d8;
    border-color: #d8c391;
}

.status-badge.live {
    color: #9e2c21;
    background: #fff0ec;
    border-color: #e3b1a7;
}

.score-snapshot {
    color: #646d67;
    font-size: .73rem;
}

.match-ground {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 13px;
    padding: 10px 14px 9px 16px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.ground-info {
    min-width: 0;
}

.ground-name {
    margin: 0;
    color: var(--ink);
    font-size: .89rem;
    line-height: 1.3;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ground-address {
    margin: 4px 0 0;
    color: #717a74;
    font-size: .79rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ground-label {
    margin: 4px 0 0;
    color: #646d67;
    font-size: .70rem;
    line-height: 1.3;
}

.distance {
    white-space: nowrap;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #bfd6c1;
    padding: 4px 6px;
    font-size: .79rem;
    font-weight: 900;
}


.distance {
    flex-shrink: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.distance small {
    display: block;
    margin-top: 3px;
    color: var(--brand-dark);
    font-size: .60rem;
    line-height: 1.15;
    font-weight: 400;
}

.match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 14px 10px 16px;
    background: var(--paper);
}

.match-details {
    border-top: 1px solid var(--line);
}

.match-details summary {
    padding: 9px 14px 9px 16px;
    color: #646d67;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}

.match-details[open] summary {
    color: var(--brand-dark);
}

.match-details-inner {
    padding: 0 14px 10px 16px;
    color: #646d67;
    font-size: .76rem;
    line-height: 1.4;
}

.match-details-inner p {
    margin: 0 0 7px;
    overflow-wrap: anywhere;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


/* ---------------------------------------------------------
   FOOTER — SHARED SITE STYLES
--------------------------------------------------------- */


footer {
    padding: 21px 0 30px;
    color: #505852;
    background: #e9ebe8;
    border-top: 1px solid var(--ink);
    font-size: .75rem;
    line-height: 1.55;
    text-align: center;
}

footer strong {
    color: var(--brand-dark)
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin: 0 0 9px;
    font-weight: 800;
}

.footer-nav a {
    color: var(--ink);
    text-underline-offset: 2px;
}

.footer-nav a:hover {
    text-decoration-thickness: 2px
}


/* ---------------------------------------------------------
   MAP DIALOG / TOAST
--------------------------------------------------------- */


.map-dialog {
    width: min(980px, calc(100vw - 32px));
    max-width: none;
    max-height: 90vh;
    max-height: 90dvh;
    padding: 0;
    overflow: auto;
    color: var(--text);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.map-dialog::backdrop {
    background: rgba(23, 26, 24, .45);
}

.map-dialog-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 13px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ink);
}

.map-dialog-header > div {
    min-width: 0;
}

.map-dialog-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.map-dialog-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .81rem;
    line-height: 1.35;
}

.match-map {
    height: min(560px, 62vh);
    height: min(560px, 62dvh);
    min-height: 240px;
    background: #e9ece8;
}

.map-notice {
    margin: 0;
    padding: 10px 14px;
    color: #505852;
    font-size: .72rem;
    line-height: 1.4;
}

/* Keep the numbered marker geometry expected by Matches.js. */
.match-pin {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--brand);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(23, 26, 24, .42);
    font: 900 12px Helvetica, Arial, sans-serif;
}

.match-map .leaflet-tooltip {
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 rgba(23, 26, 24, .14);
    font-family: Helvetica, Arial, sans-serif;
    font-size: .76rem;
    font-weight: 800;
}

.match-map .leaflet-tooltip-top::before {
    border-top-color: var(--ink);
}

.match-map .leaflet-popup-content-wrapper {
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 3px 3px 0 rgba(23, 26, 24, .18);
}

.match-map .leaflet-popup-content {
    min-width: 150px;
    margin: 11px 12px 12px;
    font-family: Helvetica, Arial, sans-serif;
    text-align: center;
}

.match-map .leaflet-popup-tip {
    background: var(--paper);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}


.map-popup h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: .82rem;
    line-height: 1.25;
    font-weight: 900;
}

.popup-match {
    display: block;
    width: 100%;
    padding: 8px 0;
    color: var(--brand-dark);
    background: var(--paper);
    border: 0;
    border-top: 1px solid var(--line);
    font-family: Helvetica, Arial, sans-serif;
    font-size: .74rem;
    line-height: 1.4;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.popup-match:hover {
    background: var(--brand-soft);
}

.popup-match span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 400;
}

.toast {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 3000;
    width: max-content;
    max-width: calc(100vw - 30px);
    padding: 10px 14px;
    color: #fff;
    background: var(--ink);
    border: 1px solid #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: .80rem;
    line-height: 1.4;
    transform: translateX(-50%);
}


/* ---------------------------------------------------------
   RESPONSIVE — SHARED HEADER / SEARCH BREAKPOINT AT 620PX
--------------------------------------------------------- */


@media (min-width: 1000px) {
    .date-number {
        font-size: 1.38rem;
    }

    .date-btn {
        padding: 11px 6px;
    }
}

/* The match-only filter board needs two columns before the main mobile breakpoint. */
@media (max-width: 820px) {
    .filter-bottomline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .competition-control {
        order: 3;
    }

    .status-toggle {
        order: 4;
    }
}

@media (max-width: 740px) {
    .day-matches {
        grid-template-columns: 1fr;
    }

    .welcome-steps {
        gap: 15px;
    }
}

@media (max-width: 620px) {

    .wrap {
            width: min(100% - 18px, var(--max))
        }


    .hero {
            padding: 58px 0 20px
        }


    .hero-contact {
            top: 12px;
            left: 9px;
            min-height: 32px;
            padding: 6px 9px;
            font-size: .73rem;
        }


    .hero-logo {
            width: min(360px, 86vw)
        }


    .hero-intro {
            margin: 8px auto 14px
        }


    .hero-tagline {
            font-size: 1.08rem
        }


    .hero-description {
            font-size: .84rem
        }


    .search-card {
            padding: 12px;
            box-shadow: 3px 3px 0 rgba(23, 26, 24, .10);
        }


    .search-row {
            grid-template-columns: 1fr
        }


    .search-row .btn {
            width: 100%
        }


    .search-note {
            font-size: .70rem
        }


    .distance {
            font-size: .72rem;
            padding: 3px 5px;
        }


    .location-suggestions {
            top: calc(100% + 4px);
            max-height: 44vh;
        }


    .location-suggestion {
            min-height: 52px;
            padding: 9px 10px;
        }


    .fixture-board-heading {
        align-items: start;
        flex-wrap: wrap;
        gap: 11px;
    }

    .fixture-board-heading > div:first-child {
        flex: 1 1 180px;
    }

    .board-tools {
        margin-left: auto;
    }

    .filter-board {
        box-shadow: 3px 3px 0 rgba(23, 26, 24, .10);
    }

    .filter-topline {
        padding: 10px;
        gap: 7px;
    }

    .period-buttons {
        flex: 1;
        gap: 6px;
    }

    .uk-time-note {
        display: none;
    }

    .date-strip {
        gap: 4px;
        padding: 10px 8px;
    }

    .date-btn {
        padding: 9px 1px;
    }

    .date-day {
        font-size: .62rem;
        letter-spacing: 0;
    }

    .date-number {
        font-size: 1.08rem;
    }

    .date-count {
        font-size: .60rem;
    }

    .filter-bottomline {
        padding: 0 10px 11px;
    }

    .welcome-panel {
        padding: 18px 14px;
    }

    .welcome-steps {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-top: 16px;
        padding-top: 14px;
    }

    .welcome-steps > div {
        position: relative;
        padding-left: 28px;
    }

    .step-number {
        position: absolute;
        top: 1px;
        left: 0;
    }

    .welcome-steps h4 {
        margin: 0 0 3px;
    }

    .match-topline {
        gap: 8px;
        padding: 11px 11px 8px 14px;
    }

    .match-lineup {
        grid-template-columns: 69px minmax(0, 1fr);
        gap: 10px;
        padding: 0 11px 9px 14px;
    }

    .kickoff-cell {
        padding-right: 9px;
    }

    .kickoff-time {
        font-size: 1.22rem;
    }

    .teams {
        font-size: .92rem;
    }

    .match-ground {
        gap: 8px;
        padding: 9px 11px 8px 14px;
    }

    .ground-address {
        font-size: .74rem;
    }

    .match-actions {
        padding: 0 11px 9px 14px;
    }

    .match-details summary {
        padding: 9px 11px 9px 14px;
        font-size: .73rem;
    }

    .match-details-inner {
        padding: 0 11px 9px 14px;
        font-size: .73rem;
    }

    .feed-footer {
        align-items: start;
        flex-wrap: wrap;
    }

    .map-dialog {
        width: calc(100vw - 18px);
    }

    .map-dialog-header {
        gap: 8px;
        padding: 11px;
    }

    .map-dialog-header h2 {
        font-size: 1rem;
    }
}

/* Let controls wrap instead of shrinking the site's 16px input text. */
@media (max-width: 440px) {
    .filter-bottomline {
        grid-template-columns: minmax(0, 1fr);
    }

    .competition-control {
        order: 0;
    }

    .status-toggle {
        min-height: 32px;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
