/* ========================================
   KMC SAMULNORI — PUBLIC PERFORMANCES
======================================== */

.performances-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.performances-page main {
    position: relative;
    z-index: 1;
}

.performances-hero {
    padding-top: 190px;
    padding-bottom: 72px;
}

.performances-page-header {
    max-width: 1040px;
}

.performances-eyebrow {
    margin: 0 0 18px;
    color: #7f0020;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.performances-page-header h1 {
    margin: 0;
    font-size: clamp(3.6rem, 9vw, 7.6rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.075em;
}

.performances-intro {
    max-width: 640px;
    margin: 30px 0 0;
    color: rgba(20, 20, 20, 0.66);
    font-size: clamp(1.02rem, 1.8vw, 1.24rem);
    line-height: 1.65;
}

.performance-browser {
    padding: 16px 24px 136px;
}

.performance-browser-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 32px;
}

.performance-browser-header h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -0.045em;
}

.performance-browser-header p {
    margin: 8px 0 0;
    color: rgba(20, 20, 20, 0.55);
    font-size: 0.94rem;
}

.performance-year-filter {
    display: grid;
    gap: 8px;
    min-width: 170px;
    color: rgba(20, 20, 20, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.performance-year-filter select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(20, 20, 20, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    padding: 0 42px 0 14px;
    color: #171717;
    font: inherit;
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.performance-year-filter select:focus {
    border-color: rgba(127, 0, 32, 0.5);
    box-shadow: 0 0 0 4px rgba(127, 0, 32, 0.1);
    outline: none;
}

.performances-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.5vw, 30px);
}

.performance-public-card {
    position: relative;
    min-height: clamp(390px, 48vw, 570px);
    overflow: hidden;
    border: 0;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(12, 12, 12, 0.03) 18%, rgba(12, 12, 12, 0.92) 100%),
        var(--performance-image, linear-gradient(135deg, #7f0020, #230008));
    background-position: center;
    background-size: cover;
    padding: 0;
    color: #fff;
    text-align: left;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    isolation: isolate;
    transition:
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.5s ease;
}

.performance-public-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.62));
    transition: background 0.45s ease;
}

.performance-public-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: inherit;
    background-position: center;
    background-size: cover;
    transform: scale(1.001);
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-public-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.18);
}

.performance-public-card:hover::after {
    transform: scale(1.045);
}

.performance-public-card:focus-visible {
    outline: 4px solid rgba(127, 0, 32, 0.34);
    outline-offset: 4px;
}

.performance-card-content {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 10px;
    padding: clamp(24px, 4vw, 40px);
}

.performance-card-arrangements {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.45;
    text-transform: uppercase;
    opacity: 0.76;
}

.performance-card-location {
    margin: 0;
    max-width: 92%;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.performance-card-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.82;
}

.performance-card-arrow {
    position: absolute;
    right: clamp(22px, 3vw, 34px);
    top: clamp(22px, 3vw, 34px);
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

.performance-card-arrow svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.performance-public-card:hover .performance-card-arrow {
    transform: translate(2px, -2px);
    background: rgba(255, 255, 255, 0.22);
}

.performance-skeleton {
    min-height: clamp(390px, 48vw, 570px);
    border-radius: 28px;
    background: linear-gradient(100deg, #ececec 20%, #f7f7f7 42%, #ececec 64%);
    background-size: 220% 100%;
    animation: performance-skeleton 1.6s ease-in-out infinite;
}

@keyframes performance-skeleton {
    from { background-position: 100% 0; }
    to { background-position: -120% 0; }
}

.performance-empty,
.performance-load-error {
    padding: 80px 24px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 26px;
    text-align: center;
}

.performance-empty h2,
.performance-load-error h2 {
    margin: 0;
    font-size: 1.5rem;
}

.performance-empty p,
.performance-load-error p {
    margin: 10px 0 0;
    color: rgba(20, 20, 20, 0.58);
}

/* Detail panel */

body.performance-detail-open {
    overflow: hidden;
}

body.performance-gallery-open,
body.performance-gallery-viewer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.performance-detail[hidden] {
    display: none;
}

.performance-detail {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.performance-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 7, 0.62);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    transition: opacity 0.34s ease;
}

.performance-detail-shell {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.32);
    opacity: 0;
    transform: translateY(34px) scale(0.965);
    transition:
        opacity 0.36s ease,
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-detail.is-open .performance-detail-backdrop,
.performance-detail.is-open .performance-detail-shell {
    opacity: 1;
}

.performance-detail.is-open .performance-detail-shell {
    transform: translateY(0) scale(1);
}

.performance-detail.is-closing .performance-detail-backdrop {
    opacity: 0;
}

.performance-detail.is-closing .performance-detail-shell {
    opacity: 0;
    transform: translateY(20px) scale(0.982);
    transition-duration: 0.26s;
}

.performance-detail-scroll {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.performance-detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(16, 16, 16, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.performance-detail-close:hover {
    transform: scale(1.06);
    background: rgba(16, 16, 16, 0.38);
}

.performance-detail-close span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}

.performance-detail-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.performance-detail-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.performance-detail-hero {
    position: relative;
    display: flex;
    min-height: 430px;
    align-items: end;
    overflow: hidden;
    background:
        linear-gradient(135deg, #7f0020, #240008),
        var(--detail-image, none);
    background-position: center;
    background-size: cover;
    color: #fff;
}

.performance-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.78));
}

.performance-detail-heading {
    position: relative;
    z-index: 1;
    max-width: 830px;
    padding: clamp(34px, 6vw, 66px);
}

.performance-detail-heading > p:first-child {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    line-height: 1.5;
    text-transform: uppercase;
    opacity: 0.78;
}

.performance-detail-heading h2 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.performance-detail-heading > p:last-child {
    margin: 18px 0 0;
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.82;
}

.performance-detail-content {
    display: grid;
    gap: 54px;
    padding: clamp(34px, 6vw, 70px);
}

.performance-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.performance-fact {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 20px;
    background: #fafafa;
}

.performance-fact-label {
    margin: 0 0 9px;
    color: rgba(20, 20, 20, 0.48);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.performance-fact-value {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.55;
}

.performance-detail-section-heading p {
    margin: 0 0 8px;
    color: #7f0020;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.performance-detail-section-heading h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.performance-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.performance-external-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 18px;
    padding: 18px 20px;
    color: #171717;
    text-decoration: none;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        background 0.25s ease;
}

.performance-external-link:hover {
    transform: translateY(-3px);
    border-color: rgba(127, 0, 32, 0.28);
    background: rgba(127, 0, 32, 0.04);
}

.performance-external-link span:first-child {
    font-weight: 650;
}

.performance-external-link-icon {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #7f0020;
    color: #fff;
}

.performance-external-link-icon svg {
    width: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 780px) {
    .performances-hero {
        padding-top: 150px;
        padding-bottom: 54px;
    }

    .performance-browser {
        padding-right: 18px;
        padding-left: 18px;
        padding-bottom: 100px;
    }

    .performance-browser-header {
        align-items: stretch;
        flex-direction: column;
    }

    .performance-year-filter {
        min-width: 0;
    }

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

    .performance-public-card,
    .performance-skeleton {
        min-height: 440px;
    }

    .performance-detail {
        align-items: end;
        padding: 10px;
    }

    .performance-detail-shell,
    .performance-detail-scroll {
        max-height: calc(100dvh - 20px);
    }

    .performance-detail-shell {
        border-radius: 26px 26px 16px 16px;
        transform: translateY(54px) scale(0.985);
    }

    .performance-detail-hero {
        min-height: 360px;
    }

    .performance-facts,
    .performance-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .performances-page-header h1 {
        font-size: clamp(3.3rem, 17vw, 5rem);
    }

    .performance-public-card,
    .performance-skeleton {
        min-height: 390px;
        border-radius: 24px;
    }

    .performance-card-content {
        padding: 24px;
    }

    .performance-card-location {
        font-size: 1.85rem;
    }

    .performance-detail-heading,
    .performance-detail-content {
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (prefers-color-scheme: dark) {
    .performances-intro,
    .performance-browser-header p {
        color: rgba(255, 255, 255, 0.58);
    }

    .performance-year-filter {
        color: rgba(255, 255, 255, 0.58);
    }

    .performance-year-filter select {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(30, 30, 30, 0.78);
        color: #f5f5f5;
    }

    .performance-skeleton {
        background: linear-gradient(100deg, #222 20%, #2d2d2d 42%, #222 64%);
        background-size: 220% 100%;
    }

    .performance-empty,
    .performance-load-error {
        border-color: rgba(255, 255, 255, 0.12);
    }

    .performance-empty p,
    .performance-load-error p {
        color: rgba(255, 255, 255, 0.58);
    }

    .performance-detail-shell {
        background: #141414;
        color: #f5f5f5;
    }

    .performance-fact {
        border-color: rgba(255, 255, 255, 0.1);
        background: #1b1b1b;
    }

    .performance-fact-label {
        color: rgba(255, 255, 255, 0.45);
    }

    .performance-external-link {
        border-color: rgba(255, 255, 255, 0.11);
        color: #f5f5f5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .performance-public-card,
    .performance-public-card::after,
    .performance-card-arrow,
    .performance-detail-backdrop,
    .performance-detail-shell,
    .performance-external-link {
        transition: none !important;
    }

    .performance-skeleton {
        animation: none;
    }
}

/* ========================================
   PERFORMANCE GALLERY
======================================== */
.performance-public-card .performance-card-arrow {
    top: auto;
    right: 24px;
    bottom: 24px;
    left: auto;
    z-index: 4;
    display: grid;
    width: 46px;
    height: 46px;
    color: #fff;
    opacity: 1;
    transform: none;
}
.performance-public-card:hover .performance-card-arrow { transform: none; background: rgba(255,255,255,.22); }
.performance-public-card .performance-card-content { padding-right: 88px; }

.performance-gallery-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.performance-gallery-show-all { min-height:42px; padding:0 18px; border:0; border-radius:999px; background:#8f1d2c; color:#fff; font:inherit; font-size:.9rem; font-weight:750; box-shadow:0 7px 18px rgba(143,29,44,.22); cursor:pointer; transition:transform .18s ease, background .18s ease; }
.performance-gallery-show-all:hover { transform:translateY(-1px); background:#741624; }
.performance-gallery-show-all:focus-visible { outline:3px solid rgba(143,29,44,.3); outline-offset:4px; }

.performance-gallery-preview,.performance-gallery-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:0; overflow:hidden; background:#d9d9dc; }
.performance-gallery-preview { margin-top:20px; border-radius:16px; }
.performance-gallery-preview-tile,.performance-gallery-tile { position:relative; display:block; width:100%; aspect-ratio:1; overflow:hidden; padding:0; border:0; border-radius:0; background:#d9d9dc; cursor:pointer; }
.performance-gallery-preview-tile img,.performance-gallery-preview-tile video,.performance-gallery-tile img,.performance-gallery-tile video { display:block; width:100%; height:100%; object-fit:cover; }
.performance-gallery-placeholder { display:grid; width:100%; height:100%; place-items:center; background:linear-gradient(145deg,#ececef,#d7d7dc); }
.performance-gallery-loader { position:relative; display:block; width:30px; height:30px; border:3px solid rgba(127,0,32,.16); border-top-color:#7f0020; border-right-color:rgba(127,0,32,.62); border-radius:50%; filter:drop-shadow(0 0 7px rgba(127,0,32,.28)); animation:performance-gallery-loader-spin .82s linear infinite; }
.performance-gallery-loader::after { content:""; position:absolute; inset:4px; border:2px solid transparent; border-bottom-color:rgba(127,0,32,.38); border-radius:inherit; animation:performance-gallery-loader-spin .62s linear infinite reverse; }
@keyframes performance-gallery-loader-spin { to { transform:rotate(360deg); } }
.performance-gallery-preview-tile::after,.performance-gallery-tile::after { content:""; position:absolute; inset:0; pointer-events:none; background:transparent; transition:background .18s ease; }
.performance-gallery-preview-tile:hover::after,.performance-gallery-tile:hover::after { background:rgba(0,0,0,.15); }
.performance-gallery-video-badge { position:absolute; right:6px; bottom:6px; z-index:1; padding:4px 7px; border-radius:999px; background:rgba(0,0,0,.7); color:#fff; font-size:.66rem; font-weight:750; }

.performance-gallery-modal { position:fixed; inset:0; z-index:14000; display:grid; place-items:center; padding:20px; background:transparent; }
.performance-gallery-modal[hidden],.performance-gallery-viewer[hidden],.performance-gallery-video-controls[hidden] { display:none !important; }
.performance-gallery-modal-backdrop { position:absolute; inset:0; background:#f5f5f7; opacity:0; transition:opacity .18s ease; }
.performance-gallery-modal-shell { position:relative; width:min(1440px,100%); height:min(92dvh,980px); overflow:auto; padding:clamp(20px,3vw,38px); border:1px solid rgba(20,20,20,.08); border-radius:30px; background:#fff; box-shadow:0 28px 100px rgba(0,0,0,.18); opacity:0; transform:translateY(14px) scale(.985); transition:opacity .2s ease, transform .26s cubic-bezier(.22,1,.36,1); }
.performance-gallery-modal.is-open .performance-gallery-modal-backdrop,.performance-gallery-modal.is-open .performance-gallery-modal-shell { opacity:1; }
.performance-gallery-modal.is-open .performance-gallery-modal-shell { transform:translateY(0) scale(1); }
.performance-gallery-modal.is-viewing .performance-gallery-modal-shell { overflow:hidden; }
.performance-gallery-modal-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; padding-right:58px; }
.performance-gallery-modal-header h2 { margin:0; font-size:clamp(2rem,4vw,3.5rem); letter-spacing:-.055em; }
.performance-gallery-modal-close { position:absolute; top:24px; right:24px; z-index:6; display:grid; width:46px; height:46px; flex:0 0 46px; padding:0; place-items:center; border:1px solid rgba(20,20,20,.12); border-radius:50%; background:#f2f2f4; cursor:pointer; transition:opacity .16s ease, visibility .16s ease; }
.performance-gallery-modal-close span { position:absolute; width:18px; height:2px; border-radius:99px; background:#171717; transform:rotate(45deg); }
.performance-gallery-modal-close span:last-child { transform:rotate(-45deg); }
.performance-gallery-modal.is-viewing .performance-gallery-modal-close { opacity:0; visibility:hidden; pointer-events:none; }
.performance-gallery-grid { overflow:visible; align-content:start; justify-content:start; background:#fff; }

.performance-gallery-viewer { position:fixed; inset:0; z-index:12; display:grid; grid-template-rows:minmax(0,1fr) auto auto; width:100vw; height:100dvh; min-width:0; min-height:0; padding:clamp(64px,7vh,82px) clamp(64px,6vw,104px) max(14px,env(safe-area-inset-bottom)); overflow:hidden; overscroll-behavior:none; touch-action:manipulation; }
.performance-gallery-viewer-backdrop { position:absolute; inset:0; z-index:0; background:#000; opacity:0; pointer-events:none; transition:opacity .44s cubic-bezier(.22,1,.36,1); }
.performance-gallery-viewer.is-visible .performance-gallery-viewer-backdrop { opacity:1; }
.performance-gallery-viewer-media { position:relative; z-index:2; display:grid; min-width:0; min-height:0; overflow:hidden; place-items:center; opacity:1; }
.performance-gallery-viewer.is-content-visible .performance-gallery-viewer-media { opacity:1; }
.performance-gallery-viewer.is-shared-transitioning .performance-gallery-viewer-media { visibility:hidden; }
.performance-gallery-viewer-media > img,.performance-gallery-viewer-media > video { position:absolute; inset:0; grid-area:1 / 1; display:block; width:100% !important; height:100% !important; min-width:0 !important; min-height:0 !important; max-width:100% !important; max-height:100% !important; object-fit:contain !important; object-position:center !important; }
.performance-gallery-viewer-media .performance-gallery-placeholder { grid-area:1 / 1; display:grid; max-width:100%; max-height:100%; object-fit:contain; }
.performance-gallery-viewer-media .performance-gallery-placeholder { display:grid; width:100%; height:100%; background:transparent; }
.performance-gallery-viewer-media .performance-gallery-loader { border-color:rgba(255,255,255,.15); border-top-color:#fff; border-right-color:rgba(255,255,255,.66); filter:drop-shadow(0 0 9px rgba(255,255,255,.3)); }
.performance-gallery-viewer-media .performance-gallery-loader::after { border-bottom-color:rgba(255,255,255,.42); }
.performance-gallery-progressive-preview { position:absolute; inset:0; grid-area:1 / 1; z-index:3; display:grid; width:100%; height:100%; min-width:0; min-height:0; place-items:center; }
.performance-gallery-progressive-preview > img,.performance-gallery-progressive-preview > video { position:absolute; inset:0; display:block; width:100% !important; height:100% !important; min-width:0 !important; min-height:0 !important; max-width:100% !important; max-height:100% !important; object-fit:contain !important; object-position:center !important; }
.performance-gallery-progressive-preview .performance-gallery-placeholder { width:100%; height:100%; object-fit:contain; }
.performance-gallery-progressive-preview.is-faded { opacity:0; }
.performance-gallery-progressive-full,.performance-gallery-streaming-video { z-index:5; }
.performance-gallery-progressive-full { opacity:0; visibility:hidden; }
.performance-gallery-progressive-full.is-loaded { opacity:1; visibility:inherit; }
.performance-gallery-viewer.is-shared-transitioning .performance-gallery-progressive-full { opacity:0; visibility:hidden; }
.performance-gallery-streaming-video { opacity:0; }
.performance-gallery-streaming-video.is-loaded { opacity:1; }
.performance-gallery-viewer-close,.performance-gallery-viewer-navigation { z-index:4; display:grid; width:48px; height:48px; padding:0 0 5px; place-items:center; border:1px solid rgba(20,20,20,.12); border-radius:50%; background:rgba(255,255,255,.94); color:#171717; box-shadow:0 8px 28px rgba(0,0,0,.25); font-size:2.15rem; line-height:1; cursor:pointer; opacity:0; transition:opacity .18s ease, transform .18s ease, background .18s ease; }
.performance-gallery-viewer.is-content-visible .performance-gallery-viewer-close,.performance-gallery-viewer.is-content-visible .performance-gallery-viewer-navigation { opacity:1; }
.performance-gallery-viewer-close { position:absolute; top:max(20px,env(safe-area-inset-top)); left:max(20px,env(safe-area-inset-left)); }
.performance-gallery-viewer-navigation { position:absolute; top:50%; transform:translateY(-50%); }
.performance-gallery-viewer-navigation:hover,.performance-gallery-viewer-close:hover { background:#fff; }
.performance-gallery-viewer-navigation.is-previous { left:max(18px,env(safe-area-inset-left)); }
.performance-gallery-viewer-navigation.is-next { right:max(18px,env(safe-area-inset-right)); }
.performance-gallery-viewer-navigation[hidden] { display:none !important; }
.performance-gallery-video-controls { position:relative; z-index:2; display:grid; grid-template-columns:42px auto minmax(0,1fr) auto; align-items:center; gap:12px; width:min(900px,100%); margin:12px auto 5px; color:#fff; opacity:0; transition:opacity .18s ease; }
.performance-gallery-viewer.is-content-visible .performance-gallery-video-controls { opacity:1; }
.performance-gallery-video-controls button { position:relative; width:42px; height:42px; padding:0; border:0; border-radius:50%; background:#fff; color:#111; cursor:pointer; }
.gallery-play-icon { position:absolute; top:50%; left:50%; width:0; height:0; border-top:7px solid transparent; border-bottom:7px solid transparent; border-left:11px solid #111; transform:translate(-42%,-50%); }
.performance-gallery-video-controls button.is-playing .gallery-play-icon { width:11px; height:14px; border:0; transform:translate(-50%,-50%); }
.performance-gallery-video-controls button.is-playing .gallery-play-icon::before,.performance-gallery-video-controls button.is-playing .gallery-play-icon::after { content:""; position:absolute; top:0; width:3px; height:14px; border-radius:2px; background:#111; }
.performance-gallery-video-controls button.is-playing .gallery-play-icon::before { left:1px; }.performance-gallery-video-controls button.is-playing .gallery-play-icon::after { right:1px; }
.performance-gallery-video-controls input { width:100%; accent-color:#fff; }
.performance-gallery-video-controls > span { min-width:42px; color:rgba(255,255,255,.78); font-size:.8rem; font-variant-numeric:tabular-nums; }
.performance-gallery-video-controls > span:last-child { text-align:right; }
.performance-gallery-filmstrip { position:relative; z-index:2; width:min(100%,1040px); min-width:0; margin:8px auto 0; overflow:hidden; opacity:0; transform:translateY(10px); transition:opacity .2s ease,transform .3s cubic-bezier(.22,1,.36,1); }
.performance-gallery-viewer.is-content-visible .performance-gallery-filmstrip { opacity:1; transform:translateY(0); }
.performance-gallery-filmstrip-track { display:flex; align-items:center; gap:7px; width:100%; min-height:70px; padding:7px calc(50% - 30px); overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain; touch-action:pan-x; scrollbar-width:none; scroll-snap-type:x proximity; }
.performance-gallery-filmstrip-track::-webkit-scrollbar { display:none; }
.performance-gallery-filmstrip-item { position:relative; flex:0 0 54px; width:54px; height:54px; overflow:hidden; padding:0; border:2px solid transparent; border-radius:8px; background:#1e1e1e; opacity:.58; cursor:pointer; scroll-snap-align:center; transition:opacity .2s ease,transform .28s cubic-bezier(.22,1,.36,1),border-color .2s ease; }
.performance-gallery-filmstrip-item:hover { opacity:.86; }
.performance-gallery-filmstrip-item.is-selected { z-index:1; border-color:#fff; opacity:1; transform:scale(1.13); }
.performance-gallery-filmstrip-item img,.performance-gallery-filmstrip-item video,.performance-gallery-filmstrip-item .performance-gallery-placeholder { display:block; width:100%; height:100%; object-fit:cover; }
.performance-gallery-filmstrip-item .performance-gallery-placeholder { display:grid; }
.performance-gallery-filmstrip-item .performance-gallery-loader { width:18px; height:18px; border-width:2px; }
.performance-gallery-filmstrip-item .performance-gallery-loader::after { inset:3px; border-width:1px; }
.performance-gallery-filmstrip-item .performance-gallery-video-badge { right:3px; bottom:3px; padding:2px 4px; font-size:.48rem; }
.performance-gallery-shared-media { position:fixed; z-index:20000; display:block; overflow:hidden; margin:0; border:0; border-radius:0; background:#202024; object-fit:cover; pointer-events:none; will-change:left,top,width,height,border-radius; }
.performance-gallery-shared-media.performance-gallery-placeholder { display:grid; place-items:center; }

@media (max-width:900px) { .performance-gallery-preview,.performance-gallery-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }.performance-gallery-modal { padding:10px; }.performance-gallery-modal-shell { height:calc(100dvh - 20px); border-radius:24px; }.performance-gallery-viewer { padding:70px 18px max(10px,env(safe-area-inset-bottom)); }.performance-gallery-viewer-navigation { width:42px; height:42px; font-size:1.9rem; }.performance-gallery-viewer-navigation.is-previous { left:10px; }.performance-gallery-viewer-navigation.is-next { right:10px; } }
@media (max-width:520px) { .performance-public-card .performance-card-arrow { right:19px; bottom:19px; width:44px; height:44px; }.performance-public-card .performance-card-content { padding-right:76px; }.performance-gallery-preview,.performance-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.performance-gallery-video-controls { grid-template-columns:38px auto minmax(0,1fr) auto; gap:7px; }.performance-gallery-video-controls button { width:38px;height:38px; }.performance-gallery-video-controls > span { min-width:34px; font-size:.72rem; }.performance-gallery-viewer-navigation { top:46%; width:38px; height:38px; }.performance-gallery-filmstrip-track { min-height:60px; padding:5px calc(50% - 25px); }.performance-gallery-filmstrip-item { flex-basis:46px; width:46px; height:46px; } }
@media (prefers-color-scheme:dark) { .performance-gallery-modal-backdrop { background:#111; }.performance-gallery-modal-shell { border-color:rgba(255,255,255,.1); background:#18181a; color:#f5f5f7; }.performance-gallery-grid { background:#18181a; }.performance-gallery-placeholder { background:linear-gradient(145deg,#29292d,#1f1f22); }.performance-gallery-loader { border-color:rgba(255,255,255,.14); border-top-color:#fff; border-right-color:rgba(255,255,255,.62); filter:drop-shadow(0 0 7px rgba(255,255,255,.24)); }.performance-gallery-loader::after { border-bottom-color:rgba(255,255,255,.4); }.performance-gallery-modal-close { border-color:rgba(255,255,255,.14); background:#28282b; }.performance-gallery-modal-close span { background:#fff; } }
@media (prefers-reduced-motion:reduce) { .performance-gallery-loader,.performance-gallery-loader::after { animation-duration:1.7s; } }

/* Arrangement filters */
.performance-arrangement-filter {
    min-width: 0;
    margin: 0 0 30px;
    padding: 0;
    border: 0;
}

.performance-arrangement-filter legend {
    margin-bottom: 8px;
    color: rgba(20, 20, 20, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.performance-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.performance-filter-heading p,
.performance-filter-help {
    margin: 0;
    color: rgba(20, 20, 20, 0.56);
    font-size: 0.9rem;
}

.performance-filter-heading button {
    border: 0;
    background: transparent;
    padding: 4px 0;
    color: #7f0020;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.performance-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.performance-filter-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid rgba(20, 20, 20, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    padding: 0 17px;
    color: #202020;
    font-size: 0.92rem;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.24s ease,
        background-color 0.24s ease,
        color 0.24s ease,
        box-shadow 0.24s ease;
}

.performance-filter-option:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 0, 32, 0.3);
}

.performance-filter-option.is-selected {
    border-color: #7f0020;
    background: #7f0020;
    color: #fff;
    box-shadow: 0 8px 24px rgba(127, 0, 32, 0.18);
}

.performance-filter-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.performance-filter-option:has(input:focus-visible) {
    outline: 3px solid rgba(127, 0, 32, 0.22);
    outline-offset: 3px;
}

.performance-filter-help {
    margin-top: 10px;
    font-size: 0.82rem;
}

.performance-arrangement-filter:disabled {
    opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
    .performance-arrangement-filter legend,
    .performance-filter-heading p,
    .performance-filter-help {
        color: rgba(255, 255, 255, 0.58);
    }

    .performance-filter-option {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(30, 30, 30, 0.78);
        color: #f4f4f4;
    }

    .performance-filter-option.is-selected {
        border-color: #a51a3d;
        background: #a51a3d;
        color: #fff;
    }
}

@media (max-width: 640px) {
    .performance-filter-heading {
        align-items: flex-start;
    }

    .performance-filter-option {
        min-height: 42px;
        padding: 0 14px;
        font-size: 0.88rem;
    }
}



/* ========================================
   HOME-PAGE PERFORMANCE CARD MATCH
======================================== */

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

.performance-public-card.performance-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-width: 0;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0;
    color: #ffffff;
    font: inherit;
    text-align: left;
    background: linear-gradient(145deg, rgba(104, 0, 20, .96), rgba(61, 0, 12, .94));
    box-shadow: var(--shadow);
    cursor: pointer;
    isolation: isolate;
    transition: transform .35s ease, box-shadow .35s ease;
}

.performance-public-card.performance-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--performance-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.01);
    transition: transform .55s ease;
}

.performance-public-card.performance-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to top,
        rgba(8, 0, 2, .9) 0%,
        rgba(8, 0, 2, .48) 48%,
        rgba(8, 0, 2, .12) 100%
    );
}

.performance-public-card.performance-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.performance-public-card.performance-card.has-highlight-photo:hover::before {
    transform: scale(1.06);
}

.performance-public-card.performance-card:focus-visible {
    outline: 4px solid rgba(127, 0, 32, .28);
    outline-offset: 4px;
}

.performance-public-card .performance-card-content {
    position: relative;
    inset: auto;
    z-index: 3;
    display: block !important;
    width: 100%;
    padding: 34px;
    text-align: left;
}

.performance-public-card .performance-date-time {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: rgba(255, 255, 255, .74);
    font-size: clamp(.78rem, 1.2vw, .92rem);
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: .035em;
    text-align: left;
    text-transform: uppercase;
}

.performance-public-card .performance-location {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: clamp(1.75rem, 3.2vw, 2.65rem);
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-align: left;
}

.performance-public-card .performance-meta {
    display: block;
    width: 100%;
    margin: 12px 0 0;
    padding: 0;
    color: rgba(255, 255, 255, .68);
    font-size: clamp(.86rem, 1.25vw, 1rem);
    font-weight: 600;
    line-height: 1.55;
    text-align: left;
}

/* Remove the older public-page arrow and tall-card presentation. */
.performance-public-card .performance-card-arrow {
    display: none;
}

@media (max-width: 900px) {
    .performances-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .performance-public-card.performance-card {
        min-height: 360px;
    }
}

@media (max-width: 560px) {
    .performance-public-card .performance-card-content {
        padding: 28px;
    }
}


/* ========================================
   PERFORMANCE DETAIL CONTENT LAYOUT
======================================== */

/*
 * The old hero used an opaque gradient as the first background layer,
 * which covered the highlight photo. The image is now the actual hero
 * background, with a separate translucent overlay above it.
 */
.performance-detail-hero {
    min-height: clamp(390px, 50vw, 560px);
    background-color: #7f0020;
    background-image: var(--detail-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.performance-detail-hero:not(.has-highlight-photo) {
    background-image:
        radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.15), transparent 34%),
        linear-gradient(135deg, #7f0020, #270009);
}

.performance-detail-hero-overlay {
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.16) 40%,
            rgba(0, 0, 0, 0.86) 100%
        );
}

.performance-detail-heading {
    width: 100%;
    max-width: none;
}

.performance-detail-date-time {
    margin: 0 0 11px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    opacity: 0.86 !important;
}

.performance-detail-heading h2 {
    max-width: 850px;
    font-size: clamp(2.25rem, 5.4vw, 4.4rem);
    font-weight: 750;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.performance-detail-arrangements {
    margin: 16px 0 0 !important;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem) !important;
    font-weight: 550 !important;
    letter-spacing: 0 !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    opacity: 0.82 !important;
}

.performance-detail-content {
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.performance-detail-section {
    padding: clamp(38px, 5vw, 58px) 0;
    border-bottom: 1px solid rgba(20, 20, 20, 0.1);
}

.performance-detail-section:last-child {
    border-bottom: 0;
}

.performance-detail-section-heading h3 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.performance-location-details {
    margin-top: 22px;
}

.performance-location-name {
    margin: 0;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.performance-location-address {
    display: inline-flex;
    margin-top: 11px;
    color: #7f0020;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: opacity 0.22s ease;
}

.performance-location-address:hover {
    opacity: 0.68;
}

.performance-location-address-unavailable,
.performance-members-placeholder,
.performance-links-empty {
    margin: 16px 0 0;
    color: rgba(20, 20, 20, 0.55);
    line-height: 1.65;
}

.performance-members-list {
    margin-top: 22px;
}

.performance-members-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.performance-members-list li {
    border: 1px solid rgba(20, 20, 20, 0.11);
    border-radius: 999px;
    background: #fafafa;
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 600;
}

.performance-links {
    margin-top: 22px;
}

@media (max-width: 780px) {
    .performance-detail-hero {
        min-height: 390px;
    }

    .performance-detail-heading {
        padding-bottom: 38px;
    }

    .performance-detail-content {
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (prefers-color-scheme: dark) {
    .performance-detail-section {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .performance-location-address {
        color: #e194a8;
    }

    .performance-location-address-unavailable,
    .performance-members-placeholder,
    .performance-links-empty {
        color: rgba(255, 255, 255, 0.53);
    }

    .performance-members-list li {
        border-color: rgba(255, 255, 255, 0.11);
        background: #1b1b1b;
    }
}


/* ========================================
   PERFORMANCE DETAIL HEADER CLEARANCE FIX
======================================== */

/*
 * Keep the expanded performance beneath the fixed public header instead of
 * allowing the panel to extend behind it. The higher layer also prevents
 * header controls from appearing over the expanded card.
 */
.performance-detail {
    top: 88px;
    bottom: 0;
    inset-inline: 0;
    height: auto;
    padding: 20px 24px 24px;
    z-index: 12000;
}

.performance-detail-backdrop {
    position: fixed;
    top: 88px;
    right: 0;
    bottom: 0;
    left: 0;
}

.performance-detail-shell {
    width: min(980px, 100%);
    max-height: calc(100dvh - 132px);
}

.performance-detail-scroll {
    max-height: calc(100dvh - 132px);
}

.performance-detail-hero {
    min-height: clamp(310px, 38vw, 430px);
}

@media (max-width: 780px) {
    .performance-detail {
        top: 72px;
        padding: 10px;
    }

    .performance-detail-backdrop {
        top: 72px;
    }

    .performance-detail-shell,
    .performance-detail-scroll {
        max-height: calc(100dvh - 92px);
    }

    .performance-detail-hero {
        min-height: 300px;
    }
}

@media (max-width: 520px) {
    .performance-detail {
        top: 68px;
    }

    .performance-detail-backdrop {
        top: 68px;
    }

    .performance-detail-shell,
    .performance-detail-scroll {
        max-height: calc(100dvh - 82px);
    }

    .performance-detail-hero {
        min-height: 260px;
    }

    .performance-detail-heading h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }
}


/* ========================================
   FULL-SCREEN PERFORMANCE BACKDROP FIX
======================================== */

/*
 * The expanded card remains positioned below the public header, while its
 * dimmed blur layer covers the entire viewport, including the header area.
 */
.performance-detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.performance-detail-shell {
    z-index: 1;
}

@media (max-width: 780px) {
    .performance-detail-backdrop {
        inset: 0;
    }
}

@media (max-width: 520px) {
    .performance-detail-backdrop {
        inset: 0;
    }
}


/* ========================================
   COMPACT PERFORMANCE FILTER BAR
======================================== */

.performance-filter-row {
    position: relative;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 0.55fr);
    align-items: end;
    gap: clamp(18px, 3vw, 34px);
    margin: 0 0 34px;
}

.performance-arrangement-filter,
.performance-member-filter,
.performance-year-filter {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.performance-filter-label,
.performance-year-filter > span {
    color: rgba(20, 20, 20, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.performance-arrangement-trigger,
.performance-year-filter select {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(20, 20, 20, 0.13);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.82);
    color: #171717;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition:
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        background-color 0.24s ease;
}

.performance-arrangement-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    text-align: left;
    cursor: pointer;
}

.performance-arrangement-trigger:hover,
.performance-arrangement-filter.is-open .performance-arrangement-trigger,
.performance-member-filter.is-open .performance-arrangement-trigger {
    border-color: rgba(127, 0, 32, 0.38);
}

.performance-arrangement-trigger:focus-visible,
.performance-year-filter select:focus {
    border-color: rgba(127, 0, 32, 0.5);
    box-shadow: 0 0 0 4px rgba(127, 0, 32, 0.1);
    outline: none;
}

.performance-arrangement-trigger:disabled {
    cursor: default;
    opacity: 0.5;
}

.performance-filter-chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-arrangement-filter.is-open .performance-filter-chevron,
.performance-member-filter.is-open .performance-filter-chevron {
    transform: translateY(2px) rotate(225deg);
}

.performance-arrangement-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 80;
    width: min(360px, calc(100vw - 48px));
    max-height: min(430px, 65vh);
    overflow-y: auto;
    border: 1px solid rgba(20, 20, 20, 0.11);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    padding: 8px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.16),
        0 4px 18px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    transform-origin: top left;
    animation: performance-filter-popover-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-arrangement-popover[hidden] {
    display: none;
}

@keyframes performance-filter-popover-in {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.performance-filter-options {
    display: grid;
    gap: 2px;
}

.performance-check-option {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 46px;
    border-radius: 12px;
    padding: 8px 11px;
    color: #202020;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.18s ease;
}

.performance-check-option:hover {
    background: rgba(127, 0, 32, 0.065);
}

.performance-check-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.performance-checkmark {
    position: relative;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(20, 20, 20, 0.25);
    border-radius: 6px;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-checkmark::after {
    content: "";
    width: 8px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(0.65);
    transition:
        opacity 0.16s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.performance-check-option input:checked + .performance-checkmark {
    border-color: #7f0020;
    background: #7f0020;
    transform: scale(1.03);
}

.performance-check-option input:checked + .performance-checkmark::after {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

.performance-check-option:has(input:focus-visible) {
    outline: 3px solid rgba(127, 0, 32, 0.18);
    outline-offset: -2px;
}

.performance-check-divider {
    height: 1px;
    margin: 5px 8px;
    background: rgba(20, 20, 20, 0.09);
}

.performance-year-filter {
    min-width: 170px;
}

.performance-year-filter select {
    min-width: 0;
    padding: 0 42px 0 15px;
}

@media (prefers-color-scheme: dark) {
    .performance-filter-label,
    .performance-year-filter > span {
        color: rgba(255, 255, 255, 0.58);
    }

    .performance-arrangement-trigger,
    .performance-year-filter select {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(28, 28, 28, 0.84);
        color: #f5f5f5;
    }

    .performance-arrangement-popover {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(29, 29, 29, 0.95);
        box-shadow:
            0 24px 70px rgba(0, 0, 0, 0.38),
            0 4px 18px rgba(0, 0, 0, 0.22);
    }

    .performance-check-option {
        color: #f4f4f4;
    }

    .performance-check-option:hover {
        background: rgba(255, 255, 255, 0.07);
    }

    .performance-checkmark {
        border-color: rgba(255, 255, 255, 0.28);
    }

    .performance-check-option input:checked + .performance-checkmark {
        border-color: #a51a3d;
        background: #a51a3d;
    }

    .performance-check-divider {
        background: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 700px) {
    .performance-filter-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .performance-member-filter,
    .performance-year-filter {
        min-width: 0;
    }

    .performance-arrangement-popover {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .performance-arrangement-popover {
        animation: none;
    }

    .performance-filter-chevron,
    .performance-checkmark,
    .performance-checkmark::after {
        transition: none;
    }
}

/* Final permanent card arrow placement. */
.performance-public-card .performance-card-arrow {
    top: auto;
    right: 24px;
    bottom: 24px;
    left: auto;
    z-index: 4;
    display: grid;
    width: 46px;
    height: 46px;
    color: #fff;
    opacity: 1;
    transform: none;
}
.performance-public-card .performance-card-content { padding-right: 88px; }
@media (max-width:520px) { .performance-public-card .performance-card-arrow { right:19px; bottom:19px; width:44px; height:44px; }.performance-public-card .performance-card-content { padding-right:76px; } }

/* Match the permanent arrow used by public arrangement cards. */
.performance-public-card .performance-card-arrow {
    right: 30px;
    bottom: 30px;
    width: 52px;
    height: 52px;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.13);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.performance-public-card .performance-card-arrow svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.performance-public-card:hover .performance-card-arrow {
    transform: none;
    background: rgba(255, 255, 255, 0.13);
}

.performance-public-card .performance-card-content { padding-right: 104px; }

@media (max-width: 520px) {
    .performance-public-card .performance-card-arrow {
        right: 20px;
        bottom: 20px;
        width: 46px;
        height: 46px;
    }

    .performance-public-card .performance-card-content { padding-right: 82px; }
}

/* Natural date casing and a year chooser matching the arrangements menu. */
.performance-public-card .performance-date-time,
.performance-detail-date-time { text-transform: none; }
#performance-year[hidden] { display: none !important; }
#performance-year-filter { position: relative; }
.performance-year-popover { max-height: min(340px, 55vh); overflow-y: auto; }
.performance-year-option {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 12px 14px; border: 0; border-radius: 10px;
    background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.performance-year-option:hover, .performance-year-option:focus-visible { background: rgba(127,0,32,.08); outline: none; }
.performance-year-option[aria-selected="true"] { color: #7f0020; font-weight: 700; }
.performance-year-option[aria-selected="true"]::after { content: "✓"; }
#performance-year-trigger { width: 100%; }
#performance-year-filter.is-open .performance-filter-chevron { transform: rotate(225deg); }
@media (prefers-color-scheme: dark) {
    .performance-year-option[aria-selected="true"] { color: #ffb3c0; }
    .performance-year-option:hover, .performance-year-option:focus-visible { background: rgba(255,179,192,.12); }
}

#performance-year-popover { left: auto; right: 0; width: max(100%, 180px); max-width: calc(100vw - 48px); }
