/* ==========================================================================
   derbyish.com — roller derby listings
   Brand v1.0: dark, high-contrast, hot-pink. Bold condensed italic sports
   lettering, rounded buttons with motion, subtle speed-line accents.
   ========================================================================== */

:root {
    /* Surfaces (dark) */
    --color-bg: #111111;
    --color-surface: #1a1a1a;
    --color-surface-2: #242424;
    --color-line: #333333;

    /* Text */
    --color-ink: #ffffff;
    --color-muted: #b3b3b3;

    /* Brand */
    --color-pink: #ff2d8d;
    --color-pink-bright: #ff5aa6;
    --color-pink-dark: #e0186f;
    --color-pink-soft: rgba(255, 45, 141, 0.14);
    --color-black: #111111;
    --color-grey: #2b2b2b;

    /* Aliases reused by components (keeps class logic stable) */
    --color-accent: var(--color-pink);
    --color-accent-dark: var(--color-pink-dark);
    --color-today: var(--color-pink);
    --color-cta: var(--color-pink);
    --color-cta-dark: var(--color-pink-bright);
    --color-cta-ink: #111111;

    --radius: 14px;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 14px 40px rgba(0, 0, 0, 0.45);
    --glow: 0 6px 22px rgba(255, 45, 141, 0.5);
    --max-width: 1040px;

    --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Barlow Condensed", "Barlow", Impact, "Arial Narrow", sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-ink);
    background: var(--color-bg);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::selection {
    background: var(--color-pink);
    color: #fff;
}

a {
    color: var(--color-pink);
    text-decoration: none;
}

a:hover {
    color: var(--color-pink-bright);
    text-decoration: underline;
}

/* Shared display-heading treatment: condensed, uppercase, forward lean */
.page-title,
.panel__title,
.event-card__title,
.site-footer__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.02;
}

/* --- Header ------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
    color: #111111;
    border-bottom: 3px solid var(--color-pink);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

/* Diagonal speed lines — subtle, to imply movement without clutter */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        115deg,
        transparent 0 20px,
        rgba(255, 45, 141, 0.07) 20px 22px
    );
    pointer-events: none;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    color: #fff;
}

.site-brand:hover {
    text-decoration: none;
}

.site-logo {
    display: block;
    height: 52px;
    width: auto;
}

.site-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.site-nav__link {
    color: #444444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
}

.site-nav__link:hover {
    color: var(--color-pink-dark);
    background: var(--color-pink-soft);
    text-decoration: none;
}

.site-nav__link--active {
    color: #111;
    background: var(--color-pink);
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
    font: inherit;
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 1.02rem;
    padding: 10px 22px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    line-height: 1.2;
    transition: transform 0.12s ease, box-shadow 0.12s ease,
        background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn--primary {
    background: var(--color-pink);
    color: #111;
}

.btn--primary:hover {
    background: var(--color-pink-bright);
    color: #111;
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn--ghost {
    background: transparent;
    border-color: var(--color-line);
    color: var(--color-ink);
}

.btn--ghost:hover {
    border-color: var(--color-pink);
    color: var(--color-pink);
    transform: translateY(-1px);
}

.btn--cta {
    background: var(--color-pink);
    color: #111;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.btn--cta:hover {
    background: var(--color-pink-bright);
    color: #111;
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

/* Inline text button (e.g. the "Filter" trigger inside a sentence) */
.link-button {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--color-pink);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover {
    color: var(--color-pink-bright);
}

.btn--danger {
    background: transparent;
    border-color: rgba(255, 77, 77, 0.55);
    color: #ff6b6b;
}

.btn--danger:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
    color: #fff;
    transform: translateY(-1px);
}

.btn--sm {
    padding: 5px 14px;
    font-size: 0.9rem;
}

/* --- Main / layout ------------------------------------------------------ */

.site-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 34px 20px 56px;
}

.page-title {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    color: #fff;
}

/* Pink speed-slash accent under page titles */
.page-title::after {
    content: "";
    display: block;
    width: 68px;
    height: 6px;
    margin-top: 12px;
    background: var(--color-pink);
    border-radius: 2px;
    transform: skewX(-18deg);
}

.page-subtitle {
    margin: 0 0 26px;
    color: var(--color-muted);
    font-size: 1.05rem;
}

/* --- Filter bar --------------------------------------------------------- */

.filters {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.filters--collapsed {
    display: none;
}

.filters__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.filters__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    flex: 1 1 180px;
}

.filters__field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filters__actions {
    display: flex;
    gap: 8px;
}

/* --- Form controls (shared: filters, admin, alerts, contact) ------------ */

select,
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="url"],
textarea {
    font: inherit;
    color: var(--color-ink);
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: 10px;
    padding: 10px 12px;
    width: 100%;
}

::placeholder {
    color: #7a7a7a;
}

/* Dark date/time picker indicators where the browser supports it */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ff2d8d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

select option {
    color: #fff;
    background: #1a1a1a;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--color-pink);
    outline-offset: 1px;
    border-color: var(--color-pink);
}

/* --- Event list --------------------------------------------------------- */

.event-count {
    margin: 0 0 12px;
    color: var(--color-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.event-card {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, border-color 0.12s ease,
        box-shadow 0.12s ease;
}

.event-card:hover {
    text-decoration: none;
    border-color: var(--color-pink);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.event-card__media {
    flex: 0 0 172px;
    display: flex;
    flex-direction: column;
    background: var(--color-surface-2);
}

.event-card__img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 118px;
    object-fit: cover;
    flex: 1 1 auto;
}

/* Small zoomed-out locator map on each card (rendered by index.php) */
.event-card__map {
    width: 100%;
    flex: 1 1 auto;
    min-height: 118px;
    pointer-events: none; /* keep the whole card a single click target */
}

.event-card__map--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.event-card__body {
    flex: 1 1 auto;
    padding: 18px 22px;
    min-width: 0;
}

.event-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.event-card__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
}

.event-card__details {
    flex: 1 1 auto;
    min-width: 0;
}

/* Category + status pills share this row so they line up with each other */
.event-card__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.event-card__title {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.event-card__tag {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-pink);
    background: var(--color-pink-soft);
    padding: 3px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

.event-card__meta {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.event-card__meta strong {
    color: #fff;
    font-weight: 700;
}

.event-card__bouts {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.event-card__bouts li {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
    color: var(--color-pink);
}

.event-card__bouts .vs {
    text-transform: lowercase;
    color: #7a7a7a;
}

.event-card__bouts li::before {
    content: "▸ ";
    color: var(--color-muted);
}

/* Status + category badges */
.badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge--today {
    background: var(--color-pink);
    color: #111;
}

.badge--upcoming {
    background: transparent;
    color: var(--color-pink);
    box-shadow: inset 0 0 0 2px var(--color-pink);
}

.badge--past {
    background: var(--color-surface-2);
    color: var(--color-muted);
}

.badge--applied {
    background: rgba(31, 122, 68, 0.2);
    color: #7ee2a8;
}

.badge--pending {
    background: rgba(255, 45, 141, 0.15);
    color: var(--color-pink);
}

.migration-table code {
    font-size: 0.9rem;
    color: var(--color-ink);
}

/* Today's events: thick pink border + glow, and double height */
.event-card--today,
.event-card--today:hover {
    border: 3px solid var(--color-pink);
    box-shadow: var(--glow);
}

.event-card--today {
    min-height: 220px;
}

.event-card--today .event-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Past events read as slightly dimmed */
.event-card--past {
    opacity: 0.72;
}

.event-card--past .event-card__title {
    color: var(--color-muted);
}

/* "Past events" divider between upcoming and past */
.event-list__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 10px 2px;
    color: var(--color-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.event-list__divider span {
    flex: 0 0 auto;
}

.event-list__divider::before,
.event-list__divider::after {
    content: "";
    height: 2px;
    background: linear-gradient(90deg, var(--color-pink), transparent);
    flex: 1 1 auto;
}

.event-list__divider::after {
    background: linear-gradient(90deg, transparent, var(--color-pink));
}

/* --- Empty state -------------------------------------------------------- */

.empty-state {
    background: var(--color-surface);
    border: 1px dashed var(--color-line);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--color-muted);
}

/* --- Event detail ------------------------------------------------------- */

.breadcrumb {
    margin: 0 0 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.event-detail__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.event-detail__header .page-title {
    flex: 1 1 260px;
    min-width: 0;
    margin-top: 6px;
}

/* Classic tear-off calendar block. */
.cal {
    flex: 0 0 auto;
    position: relative;
    width: 116px;
    padding: 20px 12px 14px;
    text-align: center;
    line-height: 1;
    background: #ffffff;
    color: #14161d;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Coloured header strip along the top. */
.cal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: var(--color-pink);
}

/* Faint calendar-icon watermark behind the text. */
.cal::after {
    content: "";
    position: absolute;
    inset: 18px 0 0;
    background: no-repeat center / 78px 78px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314161d' stroke-width='1.4'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
}

/* Binder rings straddling the header strip. */
.cal__ring {
    position: absolute;
    top: 2px;
    width: 7px;
    height: 12px;
    border-radius: 4px;
    background: #d9d9de;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.cal__ring--l { left: 30px; }
.cal__ring--r { right: 30px; }

.cal__day,
.cal__weekday,
.cal__month {
    position: relative;
    z-index: 1;
    display: block;
}

.cal__day {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3.4rem;
    letter-spacing: -0.02em;
    margin-top: 4px;
}

.cal__weekday {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a4d57;
}

.cal__month {
    margin-top: 4px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-pink-dark);
}

/* Compact calendar on homepage event cards. */
.event-card .cal {
    pointer-events: none;
    flex: 0 0 auto;
}

.cal--card {
    width: 88px;
    padding: 14px 8px 10px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.cal--card::before {
    height: 10px;
}

.cal--card::after {
    inset: 14px 0 0;
    background-size: 54px 54px;
}

.cal--card .cal__ring {
    top: 1px;
    width: 5px;
    height: 9px;
}

.cal--card .cal__ring--l { left: 22px; }
.cal--card .cal__ring--r { right: 22px; }

.cal--card .cal__day {
    font-size: 2.2rem;
    margin-top: 2px;
}

.cal--card .cal__weekday {
    margin-top: 4px;
    font-size: 0.68rem;
}

.cal--card .cal__month {
    margin-top: 2px;
    font-size: 0.78rem;
}

/* Event graphic thumbnail (opens a modal). */
.event-thumb {
    flex: 0 0 auto;
    margin-left: auto;
    width: 120px;
    height: 120px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: none;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.event-thumb:hover,
.event-thumb:focus-visible {
    transform: scale(1.03);
    border-color: var(--color-pink);
    outline: none;
}

.event-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox modal for the enlarged event graphic. */
body.modal-open {
    overflow: hidden;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-modal[hidden] {
    display: none;
}

.image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(2px);
}

.image-modal__body {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 90vh;
}

.image-modal__img {
    display: block;
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.image-modal__close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-pink);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.event-detail__meta {
    list-style: none;
    margin: 12px 0 22px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    color: var(--color-muted);
}

.event-detail__meta strong {
    color: #fff;
}

.event-detail__image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 0 20px;
    box-shadow: var(--shadow);
}

.event-detail__description {
    max-width: 70ch;
    margin: 0 0 24px;
    color: var(--color-ink);
    font-size: 1.05rem;
}

/* Event "theatre": one swappable featured player + controls */
.theatre {
    margin-bottom: 20px;
}

.theatre__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Bout cards below the player */
.bout-cards {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.bout-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.bout-card.is-playing {
    border-color: var(--color-pink);
    box-shadow: var(--glow);
}

.bout-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 1.35rem;
    line-height: 1.05;
}

.bout-team:hover {
    color: var(--color-pink);
    text-decoration: none;
}

.bout-team--right {
    justify-content: flex-end;
    text-align: right;
}

.bout-team__name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bout-team__logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: contain;
    background: var(--color-surface-2);
    border-radius: 8px;
}

.bout-team__logo--empty {
    background: var(--color-surface-2);
}

.bout-card__vs {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    color: var(--color-muted);
    font-size: 1rem;
}

.bout-card__cta {
    justify-self: end;
}

/* Prominent "Watch" button on bout cards */
.btn--watch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    font-size: 1.15rem;
}

.btn--watch__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.22);
    font-size: 0.7rem;
    line-height: 1;
    padding-left: 2px;
}

/* Live duplicate-name check on the team form */
.team-name-matches {
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-left: 3px solid var(--color-muted);
    border-radius: 8px;
    font-size: 0.9rem;
}

.team-name-matches--exact {
    border-left-color: var(--color-pink);
    background: var(--color-pink-soft);
}

.team-name-matches__warn {
    margin: 0 0 6px;
    color: var(--color-pink-bright);
    font-weight: 600;
}

.team-name-matches__label {
    margin: 0 0 4px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    font-weight: 700;
}

.team-name-matches ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 2px;
}

.team-assoc-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-bottom: 6px;
}

.team-assoc-picker__item {
    margin: 0;
    padding: 8px 10px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: 8px;
}

/* Team page */
.team-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.team-header__logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    flex: 0 0 auto;
}

.team-header__body {
    min-width: 0;
}

.team-header .page-title {
    margin-bottom: 12px;
}

.team-header__description {
    max-width: 70ch;
    margin: 0 0 12px;
    color: var(--color-ink);
    font-size: 1.05rem;
}

.team-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-cluster {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-cluster__card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.12s ease, transform 0.12s ease;
}

.team-cluster__card:hover {
    border-color: var(--color-pink);
    transform: translateY(-1px);
    text-decoration: none;
}

.team-cluster__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: calc(var(--radius) - 2px);
}

.team-cluster__logo--empty {
    display: inline-block;
}

.team-cluster__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    color: #fff;
    font-size: 0.95rem;
}

.team-schedule {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.team-schedule__row {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.12s ease, transform 0.12s ease;
}

.team-schedule__row:hover {
    border-color: var(--color-pink);
    transform: translateY(-1px);
    text-decoration: none;
}

.team-schedule__main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
}

.team-schedule__cal .cal {
    pointer-events: none;
}

.team-schedule__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.team-schedule__map {
    width: 128px;
    min-height: 96px;
    flex: 0 0 auto;
    border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
    overflow: hidden;
    background: var(--color-surface-2);
}

.team-schedule__match {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    color: var(--color-pink);
    font-size: 1.05rem;
}

.team-schedule__meta {
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* Responsive 16:9 video wrapper */
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 0 0 24px;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8a8a;
    height: 100%;
    padding: 20px;
    text-align: center;
}

/* --- Cards / forms for admin, alerts, contact --------------------------- */

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.panel__title {
    margin: 0 0 16px;
    font-size: 1.6rem;
    color: #fff;
}

.form {
    display: grid;
    gap: 16px;
}

.form--narrow {
    max-width: 460px;
}

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

.form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__field--full {
    grid-column: 1 / -1;
}

.form__field label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-ink);
}

.form__hint {
    font-size: 0.82rem;
    color: var(--color-muted);
}

.form__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.checkbox input {
    width: auto;
    accent-color: var(--color-pink);
}

.checkbox--danger {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 99, 132, 0.5);
    border-radius: 8px;
    background: rgba(255, 99, 132, 0.08);
    color: #ff8aa3;
}

.fivenations-lookup {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.fivenations-lookup input {
    flex: 1 1 260px;
}

.fivenations-lookup .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.fivenations-result {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* Honeypot: kept in the DOM for bots, hidden from people. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.current-image {
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid var(--color-line);
    display: block;
}

/* --- Notices ------------------------------------------------------------ */

.notice {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid var(--color-line);
    background: var(--color-surface-2);
}

.notice--ok {
    background: rgba(31, 122, 68, 0.14);
    color: #7ee2a8;
    border-color: #1f7a44;
}

.notice--error {
    background: var(--color-pink-soft);
    color: var(--color-pink-bright);
    border-color: var(--color-pink-dark);
}

/* --- Admin topbar ------------------------------------------------------- */

.admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.admin-topbar__link {
    color: var(--color-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.admin-topbar__link:hover {
    color: #fff;
    background: var(--color-surface-2);
    text-decoration: none;
}

.admin-topbar__link.is-active {
    color: #111;
    background: var(--color-pink);
}

.admin-topbar__link.is-active:hover {
    color: #111;
    background: var(--color-pink-bright);
}

.admin-topbar__link--logout {
    margin-left: auto;
    color: var(--color-pink);
}

.admin-topbar__link--logout:hover {
    color: #fff;
    background: var(--color-pink-dark);
}

/* --- Admin event table -------------------------------------------------- */

.admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-line);
    vertical-align: middle;
}

.admin-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    background: var(--color-surface-2);
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table__actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.admin-table td.admin-table__nowrap {
    white-space: nowrap;
}

.admin-table__message {
    max-width: 460px;
    word-break: break-word;
}

.admin-table__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.85rem;
}

.admin-table__muted {
    color: var(--color-muted);
}

.admin-thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.admin-thumb--empty {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    background: var(--color-surface-2);
}

.admin-thumb--square {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--color-surface-2);
}

.admin-thumb--empty.admin-thumb--square {
    width: 40px;
    height: 40px;
}

.current-image--logo {
    max-width: 120px;
    object-fit: contain;
    background: var(--color-surface-2);
}

/* Bout editor (admin event form) */
.bout-editor {
    margin-top: 8px;
    padding: 20px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

.bout-editor .panel__title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.bout-rows {
    display: grid;
    gap: 16px;
    margin-bottom: 12px;
}

.bout-row {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 10px;
}

.bout-row__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: end;
}

.bout-row__vs {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    color: var(--color-pink);
    padding-bottom: 10px;
}

.bout-remove {
    justify-self: start;
}

.inline-form {
    display: inline;
}

/* --- Leaflet mini-maps (event cards) ------------------------------------ */

.leaflet-container {
    background: #111111;
    font-family: var(--font);
}

/* Strip Leaflet's default white divIcon box so only our dot shows */
.derby-marker {
    background: transparent;
    border: 0;
}

.derby-marker__dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-pink);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--color-pink), 0 1px 4px rgba(0, 0, 0, 0.6);
}

.map-attribution {
    margin: 16px 2px 0;
    color: #7a7a7a;
    font-size: 0.75rem;
}

.map-attribution a {
    color: #9a9a9a;
}

.map-attribution a:hover {
    color: var(--color-pink);
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
    flex-shrink: 0;
    border-top: 3px solid var(--color-pink);
    background: var(--color-black);
    color: rgba(255, 255, 255, 0.7);
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    font-size: 0.9rem;
}

.site-footer__name {
    font-size: 1.35rem;
    color: #fff;
    display: block;
}

.site-footer__note {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
}

.site-footer__links a:hover {
    color: #111;
    background: var(--color-pink);
    text-decoration: none;
}

.site-footer__copy {
    font-size: 0.82rem;
}

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 640px) {
    .site-header__inner {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
    }

    .site-header__right {
        width: 100%;
        justify-content: space-between;
    }

    .form__grid {
        grid-template-columns: 1fr;
    }

    .filters__actions {
        width: 100%;
    }

    .filters__actions .btn {
        flex: 1;
    }

    .event-card__media {
        flex-basis: 128px;
    }

    .bout-row__teams {
        grid-template-columns: 1fr;
    }

    .bout-row__vs {
        padding-bottom: 0;
        text-align: center;
    }

    .bout-card {
        grid-template-columns: 1fr auto 1fr;
        gap: 10px;
    }

    .bout-team {
        font-size: 1.05rem;
        gap: 8px;
    }

    .bout-team__logo {
        width: 36px;
        height: 36px;
    }

    .bout-card__cta {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .bout-card__cta .btn {
        width: 100%;
        justify-content: center;
    }
}
