/* Authenticated Match Hero, compact Match card and Match Actions presentation. */

.pm-match-card {
    --pm-match-card-interaction: var(--pm-green);
    min-width: 0;
    position: relative;
}
.pm-match-card__surface {
    background: color-mix(in srgb, var(--pm-surface) 96%, transparent);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-lg);
    min-width: 0;
    overflow: hidden;
    transition: border-color var(--pm-motion-fast) ease, box-shadow var(--pm-motion-fast) ease, transform var(--pm-motion-fast) ease;
}
.pm-match-card:hover .pm-match-card__surface,
.pm-match-card:focus-within .pm-match-card__surface,
.pm-match-card.is-actions-open .pm-match-card__surface {
    border-color: color-mix(in srgb, var(--pm-match-card-interaction) 52%, var(--pm-border));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.pm-match-card.is-d { --pm-match-card-interaction: var(--pm-text-muted); }
.pm-match-card.is-l,
.pm-match-card.is-cancelled { --pm-match-card-interaction: var(--danger); }
.pm-match-card.is-postponed { --pm-match-card-interaction: var(--warning); }
.pm-match-card.is-cancelled { opacity: 0.76; }
.pm-match-card__body {
    color: var(--pm-text-primary);
    display: grid;
    gap: var(--pm-space-3);
    min-width: 0;
    padding: 0 var(--pm-space-5) var(--pm-space-5);
    text-decoration: none;
}
.pm-match-card__status {
    align-items: center;
    display: flex;
    font-size: var(--pm-type-caption);
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.08em;
    margin: 0 calc(var(--pm-space-5) * -1);
    min-height: 34px;
    text-transform: uppercase;
}
.pm-match-card__status.is-w,
.pm-match-card__status.is-upcoming { background: color-mix(in srgb, var(--pm-green) 16%, transparent); color: var(--pm-green-highlight); }
.pm-match-card__status.is-d,
.pm-match-card__status.is-postponed { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.pm-match-card__status.is-l,
.pm-match-card__status.is-cancelled { background: color-mix(in srgb, var(--danger) 14%, transparent); color: color-mix(in srgb, var(--danger) 78%, white); }
.pm-match-card__date {
    color: var(--pm-text-secondary);
    font-size: var(--pm-type-metadata);
    font-weight: 700;
    text-align: center;
}
.pm-match-card__football {
    align-items: center;
    display: grid;
    gap: var(--pm-space-3);
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-width: 0;
}
.pm-match-card__team {
    align-content: start;
    display: grid;
    gap: 7px;
    justify-items: center;
    min-width: 0;
    text-align: center;
    width: min(68%, 380px);
}
.pm-match-card__team.is-home { justify-self: end; }
.pm-match-card__team.is-away { justify-self: start; }
.pm-match-card__team img,
.pm-match-card__badge-fallback {
    align-items: center;
    border: 1px solid var(--pm-border);
    border-radius: 7px;
    display: flex;
    flex: 0 0 54px;
    height: 54px;
    justify-content: center;
    object-fit: contain;
    padding: 5px;
    width: 54px;
}
.pm-match-card__badge-fallback { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 800; }
.pm-match-card__team-copy { display: grid; gap: 2px; min-width: 0; text-align: center; }
.pm-match-card__team-copy strong { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.pm-match-card__team-copy span { color: var(--pm-text-muted); font-size: var(--pm-type-caption); }
.pm-match-card__score { display: grid; gap: 4px; justify-items: center; min-width: 88px; text-align: center; }
.pm-match-card__score strong {
    font-family: "Barlow Semi Condensed", Inter, system-ui, sans-serif;
    font-size: 36px;
    line-height: 1;
    white-space: nowrap;
}
.pm-match-card__score span { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 800; text-transform: uppercase; }
.pm-match-card__score small { color: var(--pm-text-secondary); font-size: var(--pm-type-caption); line-height: 1.35; max-width: 150px; }
.pm-match-card__context {
    color: var(--pm-text-muted);
    display: grid;
    font-size: var(--pm-type-caption);
    gap: 5px;
    justify-items: center;
}
.pm-match-card__context-row { align-items: flex-start; display: flex; gap: var(--pm-space-2); min-width: 0; }
.pm-match-card__context-row > .nav-icon { color: var(--pm-green-soft); flex: 0 0 15px; height: 15px; margin-top: 1px; width: 15px; }
.pm-match-card__context-copy { display: flex; flex-wrap: wrap; justify-content: center; min-width: 0; }
.pm-match-card__context-copy > span + span::before { color: var(--pm-text-disabled); content: "·"; margin: 0 7px; }
.pm-match-card__performance {
    border-top: 1px solid var(--pm-border);
    display: grid;
    gap: var(--pm-space-2);
    padding-top: var(--pm-space-4);
}
.pm-match-card__performance-primary,
.pm-match-card__achievements { align-items: center; display: flex; flex-wrap: wrap; }
.pm-match-card__performance-primary { color: var(--pm-text-secondary); font-size: var(--pm-type-metadata); font-weight: 700; gap: 0 9px; }
.pm-match-card__performance-missing { color: var(--pm-text-muted); font-size: var(--pm-type-support); }
.pm-match-card__achievements { gap: 6px; margin-top: var(--pm-space-2); }
.pm-match-card__achievements > span {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--pm-border);
    border-radius: 999px;
    color: var(--pm-text-secondary);
    display: inline-flex;
    font-size: var(--pm-type-caption);
    font-weight: 700;
    gap: 5px;
    padding: 4px 8px;
}
.pm-match-card__achievements .nav-icon { height: 13px; width: 13px; }
.pm-match-card__achievements .is-goal { border-color: color-mix(in srgb, var(--pm-green) 30%, var(--pm-border)); color: var(--pm-green-soft); }
.pm-match-card__achievements .is-assist,
.pm-match-card__achievements .is-captain { border-color: rgba(147, 197, 253, 0.28); color: #bfdbfe; }
.pm-match-card__achievements .is-potm { border-color: rgba(222, 177, 83, 0.38); color: #f4d58d; }
.pm-match-card__achievements .is-clean-sheet { border-color: rgba(34, 197, 94, 0.28); color: var(--pm-green-soft); }
.pm-match-card__achievements .is-yellow-card { border-color: rgba(250, 204, 21, 0.34); color: #fde68a; }
.pm-match-card__achievements .is-red-card { border-color: rgba(239, 68, 68, 0.34); color: #fca5a5; }
.pm-match-card__actions {
    align-items: center;
    border-top: 1px solid var(--pm-border);
    display: flex;
    justify-content: flex-end;
    min-height: 48px;
    padding: 2px var(--pm-space-5);
}
.pm-match-card__actions-trigger,
.pm-match-card__actions-close {
    background: color-mix(in srgb, var(--pm-surface-secondary) 82%, transparent);
    border: 1px solid var(--pm-border-strong);
    border-radius: var(--pm-radius-md);
    color: var(--pm-text-secondary);
    flex: 0 0 44px;
    height: 44px;
    padding: 0;
    width: 44px;
}
.pm-match-card__actions-trigger:hover,
.pm-match-card__actions-trigger:focus-visible,
.pm-match-card__actions-trigger[aria-expanded="true"] { border-color: var(--pm-green); color: var(--pm-green-highlight); }
.pm-match-card__actions-trigger .nav-icon,
.pm-match-card__actions-close .nav-icon { height: 21px; width: 21px; }
.pm-match-card__actions-panel {
    background: color-mix(in srgb, var(--pm-surface-secondary) 98%, transparent);
    border: 1px solid color-mix(in srgb, var(--pm-match-card-interaction) 42%, var(--pm-border-strong));
    border-radius: 0 0 var(--pm-radius-lg) var(--pm-radius-lg);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
    left: 0;
    padding: var(--pm-space-3) var(--pm-space-4);
    position: absolute;
    right: 0;
    top: calc(100% - 1px);
    overflow: hidden;
    z-index: 40;
}
.pm-match-card__actions-sheet-header { display: none; }
.pm-match-card__actions-list { align-items: center; display: flex; flex-wrap: wrap; gap: var(--pm-space-2); }
.pm-match-card__actions-list a {
    align-items: center;
    border-radius: var(--pm-radius-sm);
    color: var(--pm-text-secondary);
    display: inline-flex;
    font-size: var(--pm-type-action);
    font-weight: 700;
    gap: var(--pm-space-2);
    min-height: 40px;
    padding: 8px 12px;
    text-decoration: none;
}
.pm-match-card__actions-list a:hover,
.pm-match-card__actions-list a:focus-visible { background: color-mix(in srgb, var(--pm-green) 10%, transparent); color: var(--pm-green-highlight); }
.pm-match-card__actions-list .nav-icon { flex: 0 0 18px; height: 18px; width: 18px; }
.pm-match-card__actions-list .pm-match-card__destructive {
    border-left: 1px solid var(--pm-border);
    border-radius: 0 var(--pm-radius-sm) var(--pm-radius-sm) 0;
    color: color-mix(in srgb, var(--danger) 76%, white);
    margin-left: auto;
    padding-left: var(--pm-space-4);
}
.pm-match-card__actions-list .pm-match-card__destructive:hover,
.pm-match-card__actions-list .pm-match-card__destructive:focus-visible { background: color-mix(in srgb, var(--danger) 10%, transparent); color: color-mix(in srgb, var(--danger) 68%, white); }
.pm-match-actions-backdrop {
    background: rgba(2, 8, 15, 0.72);
    inset: 0;
    position: fixed;
    z-index: 1990;
}
.pm-match-actions-open { overflow: hidden; }
.pm-match-card__body:focus-visible { outline: 2px solid var(--pm-match-card-interaction); outline-offset: -3px; }

@media (min-width: 768px) {
    .pm-match-card.is-actions-open { z-index: 1; }
    .pm-match-card__surface { position: relative; }
    .pm-match-card.is-actions-open .pm-match-card__surface { border-radius: var(--pm-radius-lg) var(--pm-radius-lg) 0 0; }
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__performance { padding-right: calc(34px + var(--pm-space-4)); }
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__context:last-child { padding-inline: calc(34px + var(--pm-space-4)); }
    .pm-match-card__actions {
        border-top: 0;
        bottom: var(--pm-space-3);
        min-height: 0;
        padding: 0;
        position: absolute;
        right: var(--pm-space-5);
        z-index: 1;
    }
    .pm-match-card__actions-trigger {
        flex-basis: 34px;
        height: 34px;
        min-height: 34px;
        min-width: 34px;
        position: relative;
        width: 34px;
    }
    .pm-match-card__actions-trigger::before {
        content: "";
        inset: -5px;
        position: absolute;
    }
    .pm-match-card__actions-panel {
        border-top: 0;
        top: 100%;
    }
}

.pm-match-hero {
    --match-hero-inline-padding: 28px;
    background: linear-gradient(90deg, rgba(7, 17, 26, 0.84) 0%, rgba(7, 17, 26, 0.57) 50%, rgba(7, 17, 26, 0.84) 100%), linear-gradient(180deg, rgba(7, 17, 26, 0.12) 0%, rgba(7, 17, 26, 0.16) 54%, rgba(7, 17, 26, 0.9) 100%), url("../images/authenticated/match-detail-stadium-background.webp") center 58% / cover no-repeat, var(--pm-bg-deep);
    border: 1px solid color-mix(in srgb, var(--match-team-accent) 38%, var(--pm-border));
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    display: grid;
    gap: var(--pm-space-4);
    min-height: 340px;
    overflow: hidden;
    padding: 0 var(--match-hero-inline-padding) 22px;
    position: relative;
}

.pm-match-hero::before,
.pm-match-hero::after {
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

/* Public is an explicit shared-hero context, with the same score/identity geometry. */
.pm-match-hero--public { color: var(--pm-text-primary); }
.pm-match-hero--public .match-detail-hero__status { font-size: var(--pm-type-caption); margin-block: 0; margin-inline: calc(-1 * var(--match-hero-inline-padding)); color: var(--pm-text-primary); }
.pm-match-hero--public .nav-icon { height: 1em; width: 1em; stroke-width: 2; }

.pm-match-hero::before {
    background: radial-gradient(circle at 18% 52%, color-mix(in srgb, var(--match-team-accent) 42%, transparent), transparent 32%);
    opacity: 0.72;
}

.pm-match-hero--represented-away::before {
    background: radial-gradient(circle at 82% 52%, color-mix(in srgb, var(--match-team-accent) 42%, transparent), transparent 32%);
}

.pm-match-detail--neutral-accent .pm-match-hero::before {
    background: radial-gradient(circle at 50% 46%, rgba(49, 80, 99, 0.34), transparent 43%);
}

.pm-match-hero::after {
    background: linear-gradient(90deg, rgba(7, 17, 26, 0.58), transparent 28%, transparent 72%, rgba(7, 17, 26, 0.58)), radial-gradient(ellipse at 50% 115%, rgba(34, 197, 94, 0.1), transparent 46%);
}

.pm-match-hero > * {
    position: relative;
    z-index: 1;
}

.match-detail-hero__status {
    align-items: center;
    background: rgba(49, 80, 99, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    font-size: var(--pm-type-caption);
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.035em;
    margin-block: 0;
    margin-inline: calc(-1 * var(--match-hero-inline-padding));
    min-height: 40px;
    text-transform: uppercase;
}

.match-detail-hero__status.result-w { background: linear-gradient(90deg, rgba(8, 82, 48, 0.35), rgba(15, 125, 70, 0.9), rgba(8, 82, 48, 0.35)); }
.match-detail-hero__status.result-l { background: linear-gradient(90deg, rgba(98, 24, 32, 0.32), rgba(153, 39, 52, 0.86), rgba(98, 24, 32, 0.32)); }
.match-detail-hero__status.result-d,
.match-detail-hero__status.result-incomplete { background: linear-gradient(90deg, rgba(49, 80, 99, 0.32), rgba(71, 91, 108, 0.88), rgba(49, 80, 99, 0.32)); }
.match-detail-hero__status.result-upcoming { background: linear-gradient(90deg, rgba(8, 82, 48, 0.28), rgba(10, 108, 60, 0.8), rgba(8, 82, 48, 0.28)); }
.match-detail-hero__status.result-postponed { background: linear-gradient(90deg, rgba(120, 72, 8, 0.28), rgba(180, 105, 10, 0.86), rgba(120, 72, 8, 0.28)); }
.match-detail-hero__status.result-cancelled { background: linear-gradient(90deg, rgba(85, 31, 37, 0.32), rgba(132, 44, 54, 0.88), rgba(85, 31, 37, 0.32)); }

.match-detail-hero__date {
    align-items: center;
    color: var(--pm-text-secondary);
    display: flex;
    font-size: var(--pm-type-metadata);
    font-weight: 700;
    gap: 10px;
    justify-content: center;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.match-detail-hero__date span::before {
    color: var(--pm-text-disabled);
    content: "·";
    margin-right: 10px;
}

.pm-match-hero__scoreboard {
    align-items: center;
    display: grid;
    gap: clamp(16px, 3vw, 44px);
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.52fr) minmax(0, 1fr);
    justify-self: center;
    max-width: 940px;
    min-width: 0;
    width: 100%;
}

.pm-match-hero__team {
    align-items: center;
    display: grid;
    gap: 7px;
    justify-items: center;
    min-width: 0;
    position: relative;
    text-align: center;
}

.pm-match-hero__team > *:not(.pm-match-hero__ghost):not(.pm-match-hero__ghost-crest) { position: relative; z-index: 2; }
.pm-match-hero__team strong { display: block; font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: clamp(20px, 2vw, 25px); line-height: 1.08; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.pm-match-hero__team > span:not(.pm-match-hero__ghost):not(.pm-match-hero__badge) { color: var(--pm-text-secondary); font-size: var(--pm-type-metadata); line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }

.pm-match-hero__badge {
    align-items: center;
    background: rgba(7, 17, 26, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    height: 92px;
    justify-content: center;
    object-fit: contain;
    padding: 8px;
    width: 92px;
}

.pm-match-hero__badge.badge-placeholder { color: var(--pm-text-secondary); font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 28px; font-weight: 700; }
.pm-match-hero__score { display: grid; gap: 7px; justify-items: center; min-width: 0; }
.pm-match-hero__score strong { font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: clamp(52px, 7vw, 78px); font-weight: 700; letter-spacing: -0.025em; line-height: 0.9; white-space: nowrap; }
.pm-match-detail--upcoming .pm-match-hero__score strong,
.pm-match-detail--postponed .pm-match-hero__score strong,
.pm-match-detail--cancelled .pm-match-hero__score strong { font-size: clamp(44px, 6vw, 66px); letter-spacing: 0.02em; }
.pm-match-hero__score span { color: var(--pm-text-secondary); font-size: var(--pm-type-caption); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.pm-match-hero__ghost {
    color: #fff;
    font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui);
    font-size: clamp(150px, 18vw, 250px);
    font-weight: 700;
    line-height: 0.72;
    opacity: 0.055;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 0;
}

.pm-match-hero__team--home .pm-match-hero__ghost { left: -6%; }
.pm-match-hero__team--away .pm-match-hero__ghost { right: -6%; }

.pm-match-hero__ghost-crest {
    filter: grayscale(0.28) saturate(0.72);
    height: clamp(160px, 20vw, 270px);
    max-width: none;
    object-fit: contain;
    opacity: 0.065;
    pointer-events: none;
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    width: clamp(160px, 20vw, 270px);
    z-index: 0;
}

.pm-match-hero__team--home .pm-match-hero__ghost-crest { left: 8%; }
.pm-match-hero__team--away .pm-match-hero__ghost-crest { right: 8%; }

.match-detail-hero__context { align-items: center; display: grid; gap: 7px; justify-items: center; text-align: center; }
.match-detail-hero__context > span { align-items: center; color: var(--pm-text-secondary); display: inline-flex; font-size: var(--pm-type-metadata); gap: 8px; justify-content: center; max-width: 100%; min-width: 0; }
.match-detail-hero__context > span > span { overflow-wrap: anywhere; }
.match-detail-hero__context i { color: var(--pm-text-disabled); font-style: normal; margin-inline: 4px; }
.match-detail-hero__context .match-detail-hero__competition { color: var(--pm-text-primary); font-size: var(--pm-type-metadata); font-weight: 700; }
.match-detail-hero__context .match-detail-hero__competition .nav-icon { color: var(--pm-green-soft); }
.match-detail-hero__context .match-detail-hero__venue { color: #c6d3dd; font-weight: 650; }

@media (max-width: 767px) {
    .pm-match-card__body { gap: 10px; padding: 0 var(--pm-space-4) var(--pm-space-4); }
    .pm-match-card__status { margin-inline: calc(var(--pm-space-4) * -1); }
    .pm-match-card__date { line-height: 1.25; }
    .pm-match-card__football { gap: var(--pm-space-1); grid-template-columns: minmax(0, 1fr) minmax(56px, auto) minmax(0, 1fr); }
    .pm-match-card__team { width: 100%; }
    .pm-match-card__team img,
    .pm-match-card__badge-fallback { flex-basis: 44px; height: 44px; width: 44px; }
    .pm-match-card__team-copy strong { font-size: 16px; }
    .pm-match-card__team-copy span { font-size: var(--pm-type-caption); }
    .pm-match-card__score { min-width: 56px; }
    .pm-match-card__score strong { font-size: 30px; }
    .pm-match-card__context { gap: 6px; justify-items: center; text-align: center; }
    .pm-match-card__context-row { font-size: var(--pm-type-caption); justify-content: center; line-height: 1.35; }
    .pm-match-card__context-copy { justify-content: center; }
    .pm-match-card__performance { gap: 7px; padding-top: var(--pm-space-3); }
    .pm-match-card__performance-primary,
    .pm-match-card__achievements { justify-content: flex-start; text-align: left; }
    .pm-match-card__performance-primary,
    .pm-match-card__performance-missing { line-height: 1.35; }
    .pm-match-card__achievements > span { min-height: 28px; }
    .pm-match-card__surface { position: relative; }
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__performance:not(:has(> .pm-match-card__achievements)) > .pm-match-card__performance-primary,
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__performance > .pm-match-card__performance-missing,
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__performance:has(> .pm-match-card__achievements) > .pm-match-card__achievements,
    .pm-match-card__surface:has(> .pm-match-card__actions):not(:has(.pm-match-card__performance)) .pm-match-card__context:last-child { anchor-name: --pm-match-card-lower; }
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__performance { padding-right: calc(44px + var(--pm-space-3)); }
    .pm-match-card__surface:has(> .pm-match-card__actions) .pm-match-card__context:last-child { padding-inline: calc(44px + var(--pm-space-3)); }
    .pm-match-card__actions {
        border-top: 0;
        bottom: auto;
        min-height: 0;
        padding: 0;
        position: absolute;
        right: var(--pm-space-4);
        top: anchor(--pm-match-card-lower center);
        transform: translateY(-50%);
        z-index: 1;
    }
    .pm-match-card__actions-trigger { flex-basis: 34px; height: 34px; min-height: 34px; min-width: 34px; position: relative; width: 34px; }
    .pm-match-card__actions-trigger::before { content: ""; inset: -5px; position: absolute; }
    .pm-match-card__actions-panel.is-mobile-sheet {
        background: var(--pm-surface);
        border: 1px solid var(--pm-border);
        border-bottom: 0;
        border-radius: var(--pm-radius-lg) var(--pm-radius-lg) 0 0;
        bottom: 0;
        box-shadow: 0 -22px 54px rgba(0, 0, 0, 0.48);
        left: 0;
        max-height: calc(100dvh - var(--pm-space-5));
        overflow-y: auto;
        padding: var(--pm-space-5) var(--pm-space-4) calc(var(--pm-space-5) + env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        top: auto;
        z-index: 2000;
    }
    .pm-match-card__actions-sheet-header { align-items: center; display: grid; gap: var(--pm-space-3) var(--pm-space-4); grid-template-columns: minmax(0, 1fr) auto; margin-bottom: var(--pm-space-5); }
    .pm-match-card__actions-sheet-header > div { display: contents; }
    .pm-match-card__actions-sheet-header p { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 800; grid-column: 1; grid-row: 1; letter-spacing: 0.08em; margin: 0; text-transform: uppercase; }
    .pm-match-card__actions-identity { align-items: center; display: grid; gap: var(--pm-space-3); grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); width: 100%; }
    .pm-match-card__actions-identity > strong { font-size: var(--pm-type-action); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
    .pm-match-card__actions-identity > strong:last-child { text-align: right; }
    .pm-match-card__actions-identity > span { display: grid; gap: var(--pm-space-1); justify-items: center; min-width: 52px; text-align: center; }
    .pm-match-card__actions-identity b { font-family: "Barlow Semi Condensed", Inter, system-ui, sans-serif; font-size: 24px; line-height: 1; white-space: nowrap; }
    .pm-match-card__actions-identity small { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 700; line-height: 1.2; text-transform: uppercase; }
    .pm-match-card__actions-close { flex-basis: 34px; grid-column: 2; grid-row: 1; height: 34px; min-height: 34px; min-width: 34px; position: relative; width: 34px; }
    .pm-match-card__actions-close::before { content: ""; inset: -5px; position: absolute; }
    .pm-match-card__actions-close:hover,
    .pm-match-card__actions-close:focus-visible { border-color: var(--pm-green); color: var(--pm-green-highlight); }
    .pm-match-card__actions-list { align-items: stretch; display: grid; gap: var(--pm-space-2); grid-template-columns: minmax(0, 1fr); }
    .pm-match-card__actions-list a { border: 1px solid var(--pm-border); border-radius: var(--pm-radius-md); min-height: 48px; padding: 11px 14px; width: 100%; }
    .pm-match-card__actions-list .pm-match-card__destructive { border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--pm-border)); border-radius: var(--pm-radius-md); margin: var(--pm-space-3) 0 0; padding: 11px 14px; }
    .pm-match-hero { --match-hero-inline-padding: 12px; gap: 12px; min-height: 292px; padding: 0 var(--match-hero-inline-padding) 16px; }
    .match-detail-hero__status { font-size: var(--pm-type-caption); margin-inline: -12px; min-height: 36px; }
    .match-detail-hero__date { font-size: var(--pm-type-caption); }
    .pm-match-hero__scoreboard { gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(76px, auto) minmax(0, 1fr); }
    .pm-match-hero__badge { border-radius: 8px; height: 62px; padding: 5px; width: 62px; }
    .pm-match-hero__team strong { font-size: clamp(16px, 4.7vw, 19px); }
    .pm-match-hero__team > span:not(.pm-match-hero__ghost):not(.pm-match-hero__badge) { font-size: var(--pm-type-caption); }
    .pm-match-hero__score strong { font-size: clamp(37px, 11.5vw, 48px); }
    .pm-match-detail--upcoming .pm-match-hero__score strong,
    .pm-match-detail--postponed .pm-match-hero__score strong,
    .pm-match-detail--cancelled .pm-match-hero__score strong { font-size: clamp(32px, 10vw, 42px); }
    .pm-match-hero__ghost { font-size: clamp(92px, 30vw, 126px); opacity: 0.045; }
    .pm-match-hero__ghost-crest { height: clamp(100px, 30vw, 132px); opacity: 0.05; width: clamp(100px, 30vw, 132px); }
    .match-detail-hero__context { align-items: stretch; gap: 6px; justify-content: stretch; }
    .match-detail-hero__context > span { font-size: var(--pm-type-caption); justify-content: center; text-align: center; }
}

.pm-match-history {
    display: grid;
    gap: var(--pm-space-6);
    margin: 0 auto;
    max-width: 1320px;
    min-width: 0;
    width: 100%;
}

.pm-match-history__hero {
    --pm-match-history-accent: var(--pm-green);
    --pm-player-hero-accent: var(--pm-match-history-accent);
    background:
        linear-gradient(90deg, rgba(7, 17, 26, 0.96) 0%, rgba(7, 17, 26, 0.84) 48%, rgba(7, 17, 26, 0.72) 100%),
        var(--pm-surface);
    border: 1px solid color-mix(in srgb, var(--pm-match-history-accent) 22%, var(--pm-border));
    border-radius: var(--pm-radius-lg);
    isolation: isolate;
    animation: pm-match-history-hero-enter 340ms var(--pm-motion-ease) both;
    min-height: 390px;
    overflow: hidden;
    position: relative;
}

.pm-match-history__hero::before,
.pm-match-history__hero::after {
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.pm-match-history__hero::before {
    background:
        linear-gradient(90deg, transparent 46%, color-mix(in srgb, var(--pm-match-history-accent) 10%, transparent) 66%, color-mix(in srgb, var(--pm-match-history-accent) 36%, rgba(7, 17, 26, 0.7)) 100%),
        radial-gradient(circle at 88% 38%, color-mix(in srgb, var(--pm-match-history-accent) 28%, transparent), transparent 42%);
    z-index: -1;
}

.pm-match-history__hero::after {
    background: linear-gradient(90deg, rgba(7, 17, 26, 0.34), rgba(7, 17, 26, 0.48) 48%, rgba(7, 17, 26, 0.62));
    z-index: -1;
}

.pm-match-history__hero-photo {
    filter: saturate(0.68) brightness(0.5);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 100%);
    object-position: center top;
    opacity: 0.38;
    transition: opacity var(--pm-motion-layout) var(--pm-motion-ease);
    width: 72%;
}

.pm-match-history__hero-badge {
    height: clamp(430px, 38vw, 520px);
    opacity: 0.065;
    right: -7%;
    top: 52%;
    transform: translateY(-48%) rotate(5deg);
    transition: opacity var(--pm-motion-layout) var(--pm-motion-ease), transform var(--pm-motion-layout) var(--pm-motion-ease);
    width: clamp(430px, 38vw, 520px);
}

.pm-match-history__hero-content {
    align-items: center;
    display: flex;
    gap: var(--pm-space-6);
    justify-content: space-between;
    min-height: 390px;
    padding: var(--pm-space-8);
    position: relative;
    z-index: 1;
}

.pm-match-history__identity {
    align-items: center;
    display: flex;
    gap: var(--pm-space-6);
    min-width: 0;
}

.pm-match-history__identity { --pm-authenticated-hero-image-width: clamp(160px, 14vw, 180px); --pm-authenticated-hero-image-height: clamp(203px, 17.8vw, 228px); }

.pm-match-history__intro {
    display: grid;
    gap: 0;
    min-width: 0;
    max-width: 650px;
}

.pm-match-history__section-heading p {
    color: var(--pm-green-highlight);
    font-size: var(--pm-type-caption);
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0;
    text-transform: uppercase;
}

.pm-match-history__intro h1 {
    margin: 0;
}

.pm-match-history__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
}

.pm-match-history__meta {
    gap: var(--pm-space-2);
    margin: var(--pm-space-2) 0 0;
}

.pm-match-history__meta span + span::before {
    color: var(--pm-text-disabled);
    content: "·";
    margin-right: var(--pm-space-2);
}

.pm-match-history__helper {
    color: var(--pm-text-secondary);
    font-size: var(--pm-type-body);
    line-height: 1.5;
    margin: var(--pm-space-4) 0 0;
    max-width: 600px;
}

@keyframes pm-match-history-hero-enter {
    from { opacity: 0.72; }
    to { opacity: 1; }
}

.pm-match-history__controls {
    display: grid;
    gap: var(--pm-space-4);
    min-width: 0;
}

.pm-match-history__search .nav-icon,
.pm-match-history__filter-details summary .nav-icon,
.pm-match-history__view-switch .nav-icon {
    height: 18px;
    width: 18px;
}

.pm-match-history__navigation {
    align-items: center;
    display: grid;
    gap: var(--pm-space-4);
    grid-template-columns: minmax(0, 380px) minmax(0, 300px);
    justify-content: space-between;
    min-width: 0;
}

.pm-match-history__view-switch,
.pm-match-history__scope-switch {
    display: grid;
    gap: var(--pm-space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.pm-match-history__view-switch a,
.pm-match-history__scope-switch a {
    align-items: center;
    background: color-mix(in srgb, var(--pm-surface) 90%, transparent);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    color: var(--pm-text-secondary);
    display: flex;
    font-size: var(--pm-type-action);
    font-weight: 700;
    gap: var(--pm-space-2);
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    text-decoration: none;
}

.pm-match-history__view-switch a:hover,
.pm-match-history__view-switch a:focus-visible,
.pm-match-history__scope-switch a:hover,
.pm-match-history__scope-switch a:focus-visible {
    border-color: var(--pm-border-strong);
    color: var(--pm-text-primary);
}

.pm-match-history__view-switch a.is-active,
.pm-match-history__scope-switch a.is-active {
    background: color-mix(in srgb, var(--pm-green) 12%, var(--pm-surface-secondary));
    border-color: color-mix(in srgb, var(--pm-green) 48%, var(--pm-border));
    color: var(--pm-text-primary);
}

.pm-match-history__view-switch strong {
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    display: inline-flex;
    font-size: var(--pm-type-caption);
    justify-content: center;
    min-width: 24px;
    padding: 3px 7px;
}

.pm-match-history__filter-toolbar {
    align-items: start;
    display: grid;
    gap: var(--pm-space-3);
    grid-template-columns: minmax(0, 3fr) minmax(var(--pm-space-8), 1fr) minmax(160px, 190px);
    position: relative;
}

.pm-match-history__search {
    align-items: center;
    background: color-mix(in srgb, var(--pm-surface) 94%, transparent);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    display: grid;
    column-gap: var(--pm-space-3);
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding-left: 14px;
}

.pm-match-history__search:focus-within {
    border-color: var(--pm-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-green) 18%, transparent);
}

.pm-match-history__search .nav-icon { color: var(--pm-text-muted); flex: 0 0 auto; }
.pm-match-history__search input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
}
.pm-match-history__search input:focus { box-shadow: none; outline: 0; }

.pm-match-history__filter-details { display: contents; }
.pm-match-history__filter-details summary {
    align-items: center;
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    color: var(--pm-text-primary);
    cursor: pointer;
    display: flex;
    font-size: var(--pm-type-action);
    font-weight: 700;
    gap: var(--pm-space-2);
    justify-content: center;
    min-height: 48px;
    padding: 10px 16px;
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
    width: 100%;
}
.pm-match-history__filter-details summary::marker { content: ""; }
.pm-match-history__filter-details[open] summary { border-color: var(--pm-green); }
.pm-match-history__filter-panel {
    background: color-mix(in srgb, var(--pm-surface) 98%, transparent);
    border: 1px solid var(--pm-border-strong);
    border-radius: var(--pm-radius-lg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
    display: grid;
    gap: var(--pm-space-4);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    padding: var(--pm-space-5);
    position: absolute;
    right: 0;
    top: calc(100% + var(--pm-space-2));
    width: clamp(520px, 50%, 660px);
    z-index: 30;
}
.pm-match-history__filter-actions {
    display: flex;
    gap: var(--pm-space-3);
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.pm-match-history__chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--pm-space-2);
}
.pm-match-history__chips a:not(.pm-match-history__clear) {
    border: 1px solid color-mix(in srgb, var(--pm-green) 28%, var(--pm-border));
    font-size: var(--pm-type-caption);
    gap: 7px;
    padding: 6px 11px;
}
.pm-match-history__chips b { color: var(--pm-green-highlight); font-size: 17px; line-height: 1; }
.pm-match-history__clear { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 700; }

.pm-match-history__list-section { display: grid; gap: var(--pm-space-6); min-width: 0; }
.pm-match-history__section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
}
.pm-match-history__section-heading h2 {
    font-family: "Barlow Semi Condensed", Inter, system-ui, sans-serif;
    font-size: 30px;
    line-height: 1;
    margin: 3px 0 0;
}
.pm-match-history__section-heading > span { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 700; }
.pm-match-history__cards { display: grid; gap: var(--pm-space-7); }

.pm-match-history__empty {
    background: color-mix(in srgb, var(--pm-surface) 88%, transparent);
    border-radius: var(--pm-radius-lg);
    display: grid;
    gap: var(--pm-space-3);
    justify-items: start;
    padding: var(--pm-space-6);
}
.pm-match-history__empty h3 { margin: 0; }

@media (max-width: 767px) {
    .pm-match-history { gap: var(--pm-space-5); }
    .pm-match-history__hero { min-height: 0; }
    .pm-match-history__hero::before { background: radial-gradient(circle at 92% 72%, color-mix(in srgb, var(--pm-match-history-accent) 32%, transparent), transparent 62%); }
    .pm-match-history__hero::after { background: linear-gradient(180deg, rgba(7, 17, 26, 0.18), rgba(7, 17, 26, 0.48)); }
    .pm-match-history__hero-content { display: block; min-height: 0; padding: 0 0 var(--pm-space-5); }
    .pm-match-history__identity { align-items: stretch; flex-direction: column; gap: var(--pm-space-4); }
    .pm-match-history__intro { padding-inline: var(--pm-space-5); box-sizing: border-box; max-width: none; width: 100%; }
    .pm-match-history__intro h1 { text-align: center; }
    .pm-match-history__meta { gap: 4px 7px; justify-content: center; text-align: center; }
    .pm-match-history__meta span + span::before { margin-right: 7px; }
    .pm-match-history__helper { font-size: var(--pm-type-support); text-align: left; }
    .pm-match-history__navigation { align-items: stretch; display: grid; gap: var(--pm-space-3); grid-template-columns: minmax(0, 1fr); }
    .pm-match-history__filter-toolbar { grid-template-columns: minmax(0, 1fr); }
    .pm-match-history__section-heading h2 { font-size: 26px; }
}

.match-detail-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    margin: 0 0 10px;
}

.match-detail-nav a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.match-detail-nav a:hover,
.match-detail-nav a:focus-visible {
    color: var(--accent);
}

.pm-match-detail-page .pm-player-page-shell {
    overflow-x: clip;
}

.pm-match-detail {
    margin: 0 auto;
    max-width: 1240px;
    min-width: 0;
    width: 100%;
}

.pm-match-detail > *,
.pm-match-detail__content > * {
    min-width: 0;
}

.pm-match-detail__actions {
    gap: var(--pm-space-2) var(--pm-space-4);
    justify-content: flex-end;
}

.pm-match-detail__actions a {
    overflow-wrap: anywhere;
}

.pm-match-detail__actions a:first-child {
    margin-right: auto;
}

.match-result-bar.result-incomplete {
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.match-delete-panel {
    border-color: color-mix(in srgb, var(--danger) 22%, var(--border));
    margin-top: 28px;
}

.match-delete-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.match-delete-panel p {
    margin-top: 0;
}

.match-delete-panel form {
    justify-items: end;
}

.match-delete-panel button {
    width: auto;
}

.js-enabled [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.js-enabled [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-tile[data-reveal]:nth-child(2),
.match-card[data-reveal]:nth-child(2) {
    transition-delay: 60ms;
}

.stat-tile[data-reveal]:nth-child(3),
.match-card[data-reveal]:nth-child(3) {
    transition-delay: 120ms;
}

.stat-tile[data-reveal]:nth-child(4),
.match-card[data-reveal]:nth-child(4) {
    transition-delay: 180ms;
}

.stat-tile[data-reveal]:nth-child(5),
.match-card[data-reveal]:nth-child(5) {
    transition-delay: 240ms;
}

.stat-tile[data-reveal]:nth-child(6) {
    transition-delay: 300ms;
}

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

    .js-enabled [data-reveal],
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition-delay: 0ms !important;
    }

}

/* Match display components: football-first identity, performance and supporting facts. */
.pm-player-shell-page.pm-match-detail-page,
.pm-player-shell-page.pm-add-result-page {
    background: linear-gradient(180deg, rgba(7, 17, 26, 0.68), rgba(7, 17, 26, 0.84)), url("../images/authenticated/match-detail-stadium-background.webp") center top / cover fixed no-repeat, var(--pm-bg-deep);
}

.pm-match-detail-page .pm-player-page-shell,
.pm-add-result-page .pm-player-page-shell {
    background: radial-gradient(circle at 82% 8%, rgba(49, 80, 99, 0.12), transparent 28rem), linear-gradient(180deg, rgba(7, 17, 26, 0.62), rgba(10, 22, 33, 0.84));
}

.pm-match-detail {
    --match-team-accent: #315063;
    display: grid;
    gap: var(--pm-space-4);
    margin: 0 auto;
    max-width: 1320px;
    min-width: 0;
    width: 100%;
}

.pm-match-detail > *,
.pm-match-detail__content > *,
.pm-match-detail__secondary-column > * {
    min-width: 0;
}

.pm-match-detail .nav-icon {
    flex: 0 0 auto;
    height: 20px;
    width: 20px;
}

.pm-match-detail__navigation {
    align-items: center;
    display: flex;
    min-width: 0;
}

.pm-match-detail__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--pm-space-3);
    justify-content: flex-end;
}

.pm-match-detail__navigation {
    justify-content: flex-start;
}

.pm-match-detail__hero-stage {
    min-width: 0;
    position: relative;
}

.pm-match-detail__action-toolbar {
    align-items: center;
    bottom: var(--pm-space-3);
    display: flex;
    justify-content: flex-end;
    min-width: 0;
    position: absolute;
    right: var(--pm-space-5);
    z-index: 2;
}

.pm-match-detail__actions-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--pm-text-secondary);
    display: inline-flex;
    font-family: var(--font-ui);
    font-size: var(--pm-type-metadata);
    font-weight: 600;
    gap: var(--pm-space-2);
    height: 44px;
    justify-content: center;
    min-height: 44px;
    padding: 5px 0 5px var(--pm-space-2);
}

.pm-match-detail__actions-trigger > span:first-child {
    color: var(--pm-text-muted);
    font-size: 14px;
    font-weight: 500;
}

.pm-match-detail__actions-trigger-icon {
    align-items: center;
    background: rgba(16, 33, 46, 0.88);
    border: 1px solid var(--pm-border-strong);
    border-radius: var(--pm-radius-md);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    width: 34px;
}

.pm-match-detail__actions-trigger .nav-icon { height: 18px; width: 18px; }
.pm-match-detail__actions-trigger:hover,
.pm-match-detail__actions-trigger:focus-visible,
.pm-match-detail__actions-trigger[aria-expanded="true"] { background: transparent; color: var(--pm-text-primary); }
.pm-match-detail__actions-trigger:hover .pm-match-detail__actions-trigger-icon,
.pm-match-detail__actions-trigger:focus-visible .pm-match-detail__actions-trigger-icon,
.pm-match-detail__actions-trigger[aria-expanded="true"] .pm-match-detail__actions-trigger-icon { background: rgba(34, 197, 94, 0.07); border-color: var(--pm-green); color: var(--pm-green-highlight); }

@media (min-width: 768px) {
    .pm-match-detail__actions-panel {
        border: 1px solid var(--pm-border-strong);
        border-radius: var(--pm-radius-lg);
        box-shadow: var(--pm-shadow-2);
        left: auto;
        padding: var(--pm-space-3);
        width: min(360px, calc(100vw - (var(--pm-space-4) * 2)));
        z-index: 60;
    }
    .pm-match-detail__actions-panel.is-desktop-popover {
        left: auto;
        position: fixed;
        right: var(--pm-match-detail-actions-panel-right);
        top: var(--pm-match-detail-actions-panel-top);
        transform: translateY(var(--pm-space-2));
    }
    .pm-match-detail__actions-panel .pm-match-card__actions-list { align-items: stretch; display: grid; grid-template-columns: minmax(0, 1fr); }
    .pm-match-detail__actions-panel .pm-match-card__actions-list a { border: 1px solid transparent; min-height: 44px; width: 100%; }
    .pm-match-detail__actions-panel .pm-match-card__actions-list .pm-match-card__destructive {
        border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--pm-border));
        border-radius: var(--pm-radius-md);
        margin: var(--pm-space-2) 0 0;
        padding: 9px 12px;
    }
}

.pm-match-detail__back {
    color: var(--pm-text-secondary);
    font-size: var(--pm-type-action);
    font-weight: 600;
    margin-right: auto;
    min-height: 44px;
    padding: 11px 2px;
    text-decoration: none;
}

.pm-match-detail__back:hover,
.pm-match-detail__back:focus-visible {
    color: var(--pm-green-highlight);
}

.pm-match-detail__action-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pm-space-2);
}

.pm-match-detail__action-toolbar .pm-match-detail__action-group { justify-content: flex-end; }

.pm-match-detail__action-group .button {
    border-radius: 7px;
    gap: var(--pm-space-2);
    min-height: 44px;
    padding: 10px 16px;
    transition:
        background-color var(--pm-motion-fast) var(--pm-motion-ease),
        border-color var(--pm-motion-fast) var(--pm-motion-ease),
        color var(--pm-motion-fast) var(--pm-motion-ease),
        filter var(--pm-motion-fast) var(--pm-motion-ease),
        transform var(--pm-motion-fast) var(--pm-motion-ease);
}

.pm-match-detail__action-group .button.secondary {
    background: rgba(16, 33, 46, 0.88);
    border: 1px solid var(--pm-border-strong);
}

.pm-match-detail__content { display: grid; gap: var(--pm-space-4); }
.pm-match-detail__primary-column,
.pm-match-detail__secondary-column { display: grid; gap: var(--pm-space-4); }
.pm-match-detail__secondary-column { align-content: start; }

.pm-match-panel {
    background: rgba(16, 33, 46, 0.9);
    border-radius: 8px;
    padding: var(--pm-space-5);
}

.pm-match-panel__heading { align-items: center; display: grid; gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; margin-bottom: var(--pm-space-4); }
.pm-match-panel__heading h2 { font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 23px; margin: 0; overflow-wrap: anywhere; }
.pm-match-panel__heading-icon { color: var(--pm-green-highlight); display: inline-flex; }

.pm-match-panel__edit {
    align-items: center;
    border: 1px solid var(--pm-border-strong);
    border-radius: 6px;
    color: var(--pm-text-secondary);
    display: inline-flex;
    font-size: var(--pm-type-action-compact);
    font-weight: 700;
    gap: 5px;
    min-height: 36px;
    padding: 7px 9px;
    text-decoration: none;
    transition:
        background-color var(--pm-motion-fast) var(--pm-motion-ease),
        border-color var(--pm-motion-fast) var(--pm-motion-ease),
        color var(--pm-motion-fast) var(--pm-motion-ease),
        transform var(--pm-motion-fast) var(--pm-motion-ease);
}

.pm-match-panel__edit .nav-icon { height: 16px; width: 16px; }
.pm-match-detail__action-group .button:active,
.pm-match-panel__edit:active { transform: scale(0.98); }
.pm-match-detail__action-group .button.secondary:focus-visible,
.pm-match-panel__edit:focus-visible { background: rgba(34, 197, 94, 0.07); border-color: var(--pm-green); color: var(--pm-text-primary); }
.pm-match-performance { background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--match-team-accent) 14%, transparent), transparent 22rem), rgba(16, 33, 46, 0.92); }

.pm-match-performance__body {
    display: grid;
    min-width: 0;
}

.pm-match-performance__body.has-photo {
    align-items: start;
    gap: var(--pm-space-4);
    grid-template-columns: clamp(166px, 15vw, 196px) minmax(0, 1fr);
}

.pm-match-performance__photo {
    align-self: start;
    align-items: flex-end;
    background:
        radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--match-team-accent) 24%, transparent), transparent 68%),
        rgba(7, 17, 26, 0.58);
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    display: flex;
    isolation: isolate;
    justify-content: center;
    margin: 0;
    min-height: 0;
    overflow: hidden;
    padding: 8px;
    position: relative;
}

.pm-match-performance__photo::after {
    background: linear-gradient(180deg, rgba(4, 12, 19, 0.08), rgba(4, 12, 19, 0.34));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.pm-match-performance__photo > img:not(.pm-match-performance__photo-crest) {
    aspect-ratio: 4 / 5;
    border-radius: 6px;
    display: block;
    height: auto;
    min-height: 0;
    object-fit: cover;
    object-position: center 22%;
    position: relative;
    width: 100%;
    z-index: 2;
}

.pm-match-performance__photo .pm-match-performance__photo-crest {
    filter: grayscale(0.35) saturate(0.7);
    height: 172%;
    left: 50%;
    max-width: none;
    object-fit: contain;
    opacity: 0.075;
    position: absolute;
    top: 48%;
    transform: translate(-50%, -50%);
    width: 172%;
    z-index: 0;
}

@media (min-width: 1100px) {
    .pm-match-performance__photo {
        background: none;
        border-color: transparent;
        border-radius: 0;
    }

    .pm-match-performance__photo::after,
    .pm-match-performance__photo .pm-match-performance__photo-crest { display: none; }
}

.pm-match-performance__content { min-width: 0; }

.pm-match-performance__identity {
    align-items: stretch;
    background: rgba(7, 17, 26, 0.38);
    border: 1px solid var(--pm-border);
    border-radius: 7px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    margin-bottom: 10px;
    min-height: 72px;
    padding: 9px 0;
}

.pm-match-performance__identity-value { align-content: center; display: grid; gap: 3px; justify-items: center; min-width: 0; padding: 0 10px; text-align: center; }
.pm-match-performance__identity-value + .pm-match-performance__identity-value { border-left: 1px solid var(--pm-border-strong); }
.pm-match-performance__identity-value small { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pm-match-performance__identity-value strong { font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 22px; line-height: 1.05; overflow-wrap: anywhere; }
.pm-match-performance__identity-value em { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-style: normal; font-weight: 600; }
.pm-match-performance__minutes { white-space: nowrap; }
.pm-match-performance__minutes strong { font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 29px; line-height: 1; }

.pm-match-performance__stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-match-performance__stats > div { align-items: center; background: rgba(7, 17, 26, 0.32); border: 1px solid var(--pm-border); border-radius: 7px; display: grid; justify-items: center; min-height: 92px; padding: 12px; }
.pm-match-performance__stats strong { font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 38px; line-height: 1; }
.pm-match-performance__stats span { color: var(--pm-text-secondary); font-size: var(--pm-type-metadata); }

.pm-match-performance__recognition { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pm-match-recognition { align-items: center; background: rgba(7, 17, 26, 0.34); border: 1px solid var(--pm-border); border-radius: 7px; color: var(--pm-text-secondary); display: inline-flex; font-size: var(--pm-type-metadata); font-weight: 700; gap: 9px; min-height: 48px; padding: 8px 12px; }
.pm-match-recognition > span { display: grid; gap: 1px; }
.pm-match-recognition small { color: var(--pm-text-muted); font-size: var(--pm-type-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pm-match-recognition--potm { background: linear-gradient(135deg, rgba(180, 128, 42, 0.17), rgba(7, 17, 26, 0.34)); border-color: rgba(222, 177, 83, 0.38); box-shadow: inset 0 0 22px rgba(222, 177, 83, 0.08); color: #f4d58d; flex: 0 1 auto; }
.pm-match-recognition--captain { border-color: rgba(147, 197, 253, 0.28); color: #bfdbfe; }
.pm-match-recognition--clean-sheet { border-color: rgba(34, 197, 94, 0.28); color: var(--pm-green-soft); }

.pm-match-performance__cards,
.pm-match-performance__events { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pm-match-performance__cards > span,
.pm-match-performance__events > span { align-items: center; background: rgba(7, 17, 26, 0.26); border: 1px solid var(--pm-border); border-radius: 6px; color: var(--pm-text-secondary); display: inline-flex; font-size: var(--pm-type-caption); gap: 7px; min-height: 36px; padding: 7px 10px; }
.pm-match-performance__cards i { border-radius: 1px; display: inline-block; height: 20px; width: 13px; }
.pm-match-performance__cards .is-yellow i { background: #facc15; box-shadow: 0 0 10px rgba(250, 204, 21, 0.18); }
.pm-match-performance__cards .is-red i { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.18); }
.pm-match-performance__cards strong { color: var(--pm-text-primary); }
.pm-match-performance__events { border-top: 1px solid rgba(49, 80, 99, 0.5); padding-top: 7px; }
.pm-match-performance__events > span { background: transparent; border-color: transparent; color: var(--pm-text-muted); min-height: 28px; padding: 2px 0; }

.pm-match-performance__special { border-top: 1px solid var(--pm-border); margin-top: var(--pm-space-5); padding-top: var(--pm-space-4); }
.pm-match-performance__special h3 { font-size: 17px; margin: 0 0 10px; }
.pm-match-performance__special dl,
.pm-match-result-detail dl { display: grid; gap: 0; margin: 0; }
.pm-match-performance__special dl > div,
.pm-match-result-detail dl > div { align-items: center; border-top: 1px solid rgba(49, 80, 99, 0.58); display: flex; gap: var(--pm-space-4); justify-content: space-between; padding: 10px 0; }
.pm-match-performance__special dl > div:first-child,
.pm-match-result-detail dl > div:first-child { border-top: 0; }
.pm-match-performance__special dt,
.pm-match-result-detail dt { color: var(--pm-text-muted); font-size: var(--pm-type-caption); }
.pm-match-performance__special dd,
.pm-match-result-detail dd { font-size: var(--pm-type-metadata); font-weight: 700; margin: 0; text-align: right; }

.pm-match-empty-state,
.pm-match-unused-state,
.pm-match-fixture-notice {
    align-items: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 8px;
    display: grid;
    gap: var(--pm-space-3);
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: var(--pm-space-4);
}

.pm-match-unused-state { background: rgba(148, 163, 184, 0.055); border-color: var(--pm-border); grid-template-columns: auto minmax(0, 1fr); }
.pm-match-empty-state > span,
.pm-match-unused-state > span,
.pm-match-fixture-notice > span { color: #93c5fd; display: inline-flex; }
.pm-match-unused-state > span { color: var(--pm-text-muted); }
.pm-match-empty-state h3,
.pm-match-unused-state h3,
.pm-match-fixture-notice h2 { font-size: 17px; margin: 0 0 4px; }
.pm-match-empty-state p,
.pm-match-unused-state p,
.pm-match-fixture-notice p { color: var(--pm-text-secondary); font-size: var(--pm-type-support); line-height: 1.5; margin: 0; }
.pm-match-performance__minor { color: var(--pm-text-muted); display: inline-block; font-size: var(--pm-type-caption); margin-top: 7px; }

.pm-match-facts__list { display: grid; gap: 0; margin: 0; }
.pm-match-facts__list > div { border-top: 1px solid rgba(49, 80, 99, 0.58); padding: 11px 0; }
.pm-match-facts__list > div:first-child { border-top: 0; padding-top: 0; }
.pm-match-facts__list > div:last-child { padding-bottom: 0; }
.pm-match-facts__list dt { align-items: center; color: var(--pm-text-muted); display: flex; font-size: var(--pm-type-caption); gap: 7px; margin-bottom: 4px; }
.pm-match-facts__list dt .nav-icon { height: 17px; width: 17px; }
.pm-match-facts__list dd { font-size: var(--pm-type-metadata); font-weight: 700; line-height: 1.4; margin: 0 0 0 24px; overflow-wrap: anywhere; }
.pm-match-facts__list dd > span { color: var(--pm-text-disabled); }
.pm-match-facts__list dd small { color: var(--pm-text-secondary); display: block; font-size: var(--pm-type-caption); font-weight: 400; }
.pm-match-detail .private-note { color: var(--pm-text-secondary); font-size: var(--pm-type-body); line-height: 1.55; margin: 0; overflow-wrap: anywhere; }

.pm-match-fixture-notice { margin-top: 0; }

.pm-match-previous__list { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pm-match-previous__row { align-content: start; background: rgba(7, 17, 26, 0.28); border: 1px solid var(--pm-border); border-radius: 8px; color: inherit; display: grid; gap: 10px; min-width: 0; overflow: hidden; padding: 0 14px 14px; text-decoration: none; transition: background-color var(--pm-motion-fast) var(--pm-motion-ease), border-color var(--pm-motion-fast) var(--pm-motion-ease), box-shadow var(--pm-motion-fast) var(--pm-motion-ease); }
.pm-match-previous__row:active { background: rgba(49, 80, 99, 0.18); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.16); }
.pm-match-previous__row:focus-visible { border-color: var(--pm-green-highlight); outline: 3px solid rgba(48, 196, 141, 0.55); outline-offset: 2px; }
.pm-match-previous__row time { color: var(--pm-text-secondary); font-size: var(--pm-type-caption); font-weight: 700; text-align: center; }
.pm-match-previous__row small { color: var(--pm-text-muted); font-size: var(--pm-type-caption); overflow-wrap: anywhere; text-align: center; }
.pm-match-previous__row p { align-items: center; display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); margin: 0; min-width: 0; text-align: center; }
.pm-match-previous__row p strong { font-size: var(--pm-type-metadata); line-height: 1.25; overflow-wrap: anywhere; }
.pm-match-previous__row p strong:first-child { text-align: right; }
.pm-match-previous__row p strong:last-child { text-align: left; }
.pm-match-previous__row p span { color: var(--pm-text-primary); font-family: "Barlow Semi Condensed", "Arial Narrow", var(--font-ui); font-size: 22px; font-weight: 700; white-space: nowrap; }
.pm-match-previous__result { align-items: center; display: flex; font-size: var(--pm-type-caption); font-weight: 800; justify-content: center; letter-spacing: 0.06em; margin-inline: -14px; min-height: 30px; text-align: center; text-transform: uppercase; width: calc(100% + 28px); }
.pm-match-previous__result.result-w { background: rgba(0, 211, 133, 0.72); color: #04130d; }
.pm-match-previous__result.result-d { background: rgba(93, 117, 133, 0.58); color: var(--pm-text-primary); }
.pm-match-previous__result.result-l { background: rgba(164, 55, 67, 0.68); color: #fff1f2; }

@media (hover: hover) and (pointer: fine) {
    .pm-match-detail__action-group .button.secondary:hover:not(:active),
    .pm-match-panel__edit:hover:not(:active) {
        background: rgba(34, 197, 94, 0.07);
        border-color: var(--pm-green);
        color: var(--pm-text-primary);
        filter: none;
        transform: none;
    }

    .pm-match-previous__row:hover:not(:active) {
        background: rgba(49, 80, 99, 0.14);
        border-color: var(--pm-green-soft);
        box-shadow: var(--pm-shadow-1);
    }
}

@media (min-width: 768px) {
    .pm-match-panel { padding: var(--pm-space-6); }
    .pm-match-detail__content--fixture .pm-match-facts__list { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-match-detail__content--fixture .pm-match-facts__list > div { background: rgba(7, 17, 26, 0.22); border: 1px solid var(--pm-border); border-radius: 7px; padding: 12px; }
}

@media (min-width: 1024px) {
    .pm-match-detail__content--completed { align-items: stretch; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.82fr); }
    .pm-match-detail__content--fixture { grid-template-columns: minmax(0, 1fr); }
    .pm-match-detail__content--completed > .pm-match-detail__primary-column,
    .pm-match-detail__content--completed > .pm-match-detail__secondary-column { height: 100%; }
    .pm-match-detail__content--completed .pm-match-performance,
    .pm-match-detail__content--completed .pm-match-facts { height: 100%; }
}

@media (max-width: 1099px) {
    .pm-match-performance__body.has-photo { grid-template-columns: minmax(0, 1fr); }
    .pm-match-performance__photo {
        background:
            radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--match-team-accent) 42%, transparent), transparent 64%),
            linear-gradient(180deg, color-mix(in srgb, var(--match-team-accent) 15%, rgba(7, 17, 26, 0.78)), rgba(7, 17, 26, 0.9));
        height: 222px;
        min-height: 0;
        padding: 0 18px;
        width: 100%;
    }
    .pm-match-performance__photo::after { background: radial-gradient(circle at 50% 42%, transparent 38%, rgba(4, 12, 19, 0.42) 100%), linear-gradient(180deg, rgba(4, 12, 19, 0.04), rgba(4, 12, 19, 0.3)); }
    .pm-match-performance__photo > img:not(.pm-match-performance__photo-crest) { align-self: stretch; border-radius: 0; height: 100%; max-height: none; max-width: min(178px, 52vw); width: auto; }
    .pm-match-performance__photo .pm-match-performance__photo-crest { height: 168%; opacity: 0.1; width: 168%; }
    .pm-match-performance__identity { align-items: stretch; background: transparent; border: 0; border-radius: 0; gap: var(--pm-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--pm-space-4); min-height: 0; padding: 0; }
    .pm-match-performance__identity-value,
    .pm-match-performance__identity-value + .pm-match-performance__identity-value { background: rgba(7, 17, 26, 0.38); border: 1px solid var(--pm-border); border-radius: 7px; min-height: 78px; padding: 11px 8px; }
    .pm-match-performance__identity-value strong,
    .pm-match-performance__minutes strong { font-size: 26px; }
}

@media (max-width: 767px) {
    .pm-match-detail-page { background-attachment: scroll; }
    .pm-match-detail { gap: 12px; }
    .pm-match-detail__actions { gap: 6px 10px; }
    .pm-match-detail__back { flex-basis: 100%; min-height: 38px; padding-block: 7px; }
    .pm-match-detail__action-group { width: 100%; }
    .pm-match-detail__action-group .button { flex: 1 1 0; min-width: 0; }
    .pm-match-detail__hero-stage.has-match-actions .pm-match-hero { padding-bottom: calc(var(--pm-space-12) + var(--pm-space-1)); }
    .pm-match-detail__hero-stage.has-match-actions .pm-match-hero > .pm-match-detail__action-toolbar { bottom: var(--pm-space-1); position: absolute; right: var(--pm-space-2); }
    .pm-match-detail__action-toolbar .pm-match-detail__action-group { display: grid; grid-template-columns: minmax(0, 1fr); }
    .pm-match-detail__action-toolbar .pm-match-detail__action-group .button { justify-content: center; min-width: 0; width: 100%; }
    .pm-match-panel { padding: var(--pm-space-5); }
    .pm-match-panel__heading h2 { font-size: 20px; }
    .pm-match-performance__stats > div { min-height: 82px; }
    .pm-match-recognition { flex: 0 1 auto; }
    .pm-match-empty-state,
    .pm-match-fixture-notice { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
    .pm-match-empty-state .button { grid-column: 1 / -1; width: 100%; }

}

@media (prefers-reduced-motion: reduce) {
    .pm-match-detail [data-reveal],
    .pm-match-detail [data-reveal].is-visible { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 759px) {
    .match-detail-nav a {
        font-size: 0.94rem;
    }

    .pm-match-detail__actions a:first-child {
        flex-basis: 100%;
        margin-right: 0;
    }
}
