/* ==========================================================
   THE STUDIO — BUILD 11.6
   REHEARSALS VISUAL OVERHAUL
   ========================================================== */

body:has(.rehearsals-view) .topbar {
    display: none;
}

body:has(.rehearsals-view) > .studio-app > .workspace {
    grid-template-rows: minmax(0, 1fr);
    min-height: 100vh;
}

body:has(.rehearsals-view) > .studio-app > .workspace > #workspace-content {
    padding: 24px 40px 50px;
}


.rehearsals-view {
    position: relative;
    width: 100%;
    min-height: 100%;
    padding: clamp(24px, 3vw, 46px);
    overflow: hidden;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 18% 0%, rgba(205, 157, 91, 0.11), transparent 34%),
        radial-gradient(circle at 92% 12%, rgba(141, 92, 44, 0.10), transparent 29%),
        linear-gradient(145deg, rgba(16, 15, 14, 0.98), rgba(8, 8, 8, 0.99));
    animation: rehearsals-enter 320ms ease both;
}

.rehearsals-view::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 0.34;
    background:
        repeating-linear-gradient(90deg, transparent 0, transparent 119px, rgba(255, 255, 255, 0.012) 120px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 28%);
}

.rehearsals-view > * {
    position: relative;
    z-index: 1;
}

.rehearsals-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    max-width: 1380px;
    margin: 0 auto 28px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(205, 157, 91, 0.16);
}

.rehearsals-kicker,
.rehearsal-panel-label {
    margin: 0 0 9px;
    color: var(--accent-gold-bright, #d5b06b);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.rehearsals-hero h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 4.5vw, 4.75rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.035em;
}

.rehearsals-intro {
    max-width: 650px;
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.75;
}

.rehearsals-room-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(205, 157, 91, 0.2);
    border-radius: 999px;
    color: #d9c6a2;
    background: rgba(205, 157, 91, 0.055);
    font-size: 0.73rem;
    letter-spacing: 0.04em;
}

.rehearsals-status-light {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #caa15e;
    box-shadow: 0 0 13px rgba(202, 161, 94, 0.78);
}

.rehearsals-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
    gap: 22px;
    max-width: 1380px;
    margin: 0 auto;
}

.rehearsal-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(205, 157, 91, 0.14);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(33, 30, 27, 0.94), rgba(19, 18, 17, 0.96));
    box-shadow:
        0 22px 55px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.rehearsal-panel::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(115deg, rgba(205, 157, 91, 0.035), transparent 32%);
}

.rehearsal-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(205, 157, 91, 0.25);
    box-shadow:
        0 26px 65px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(205, 157, 91, 0.035) inset;
}

.rehearsal-next-session,
.rehearsal-focus-panel,
.rehearsal-board {
    padding: clamp(22px, 2.6vw, 34px);
}

.rehearsal-board {
    grid-column: 1 / -1;
}

.rehearsal-panel-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.rehearsal-panel-heading h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.015em;
}

.rehearsal-date-badge,
.rehearsal-panel-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(205, 157, 91, 0.26);
    border-radius: 15px;
    color: #e1bf7c;
    background: rgba(205, 157, 91, 0.08);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.rehearsal-session-time {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin: 38px 0 34px;
}

.rehearsal-session-time strong {
    color: #e0bc75;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 7vw, 6.4rem);
    font-weight: 400;
    line-height: 0.82;
    letter-spacing: -0.055em;
    text-shadow: 0 0 28px rgba(205, 157, 91, 0.12);
}

.rehearsal-session-time span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.rehearsal-session-meta {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(205, 157, 91, 0.12);
    border-radius: 14px;
    background: rgba(205, 157, 91, 0.1);
}

.rehearsal-session-meta > div {
    min-width: 0;
    padding: 16px;
    background: rgba(11, 11, 11, 0.72);
}

.rehearsal-meta-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rehearsal-session-meta strong {
    display: block;
    overflow: hidden;
    color: #d9d0c3;
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rehearsal-focus-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-top: 25px;
}

.rehearsal-focus-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.19);
    transition: background 160ms ease, border-color 160ms ease;
}

.rehearsal-focus-item:hover {
    border-color: rgba(205, 157, 91, 0.18);
    background: rgba(205, 157, 91, 0.045);
}

.rehearsal-focus-number {
    color: #bc9555;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.78rem;
}

.rehearsal-focus-item strong {
    color: #ded5c8;
    font-size: 0.79rem;
}

.rehearsal-focus-item p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.rehearsal-quiet-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(205, 157, 91, 0.15);
    border-radius: 999px;
    color: #bca57e;
    background: rgba(205, 157, 91, 0.04);
    font-size: 0.63rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rehearsal-board-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 25px;
}

.rehearsal-board-card {
    min-height: 145px;
    padding: 19px;
    border: 1px solid rgba(255, 255, 255, 0.048);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(12, 12, 12, 0.62), rgba(24, 22, 20, 0.52));
    transition: border-color 160ms ease, background 160ms ease;
}

.rehearsal-board-card:hover {
    border-color: rgba(205, 157, 91, 0.19);
    background: linear-gradient(145deg, rgba(205, 157, 91, 0.045), rgba(24, 22, 20, 0.65));
}

.rehearsal-board-card > span {
    display: block;
    margin-bottom: 13px;
    color: #b58c50;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.rehearsal-board-card strong {
    color: #ded5c9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.03rem;
    font-weight: 400;
}

.rehearsal-board-card p {
    margin: 9px 0 0;
    color: var(--text-muted);
    font-size: 0.73rem;
    line-height: 1.58;
}

@keyframes rehearsals-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .rehearsals-layout {
        grid-template-columns: 1fr;
    }

    .rehearsal-board {
        grid-column: auto;
    }

    .rehearsal-board-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .rehearsals-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .rehearsal-session-meta {
        grid-template-columns: 1fr;
    }

    .rehearsal-session-time {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rehearsals-view,
    .rehearsal-panel,
    .rehearsal-focus-item,
    .rehearsal-board-card {
        animation: none;
        transition: none;
    }
}

/* Build 15.5 — Rehearsal Planning & History Foundation */
.rehearsal-manager-view{padding-bottom:3rem}.rehearsals-hero{align-items:center}.rehearsal-primary,.rehearsal-danger{border:0;border-radius:8px;padding:.75rem 1rem;font:inherit;font-weight:700;cursor:pointer}.rehearsal-primary{background:#d9a85c;color:#1b130b}.rehearsal-danger{background:rgba(160,55,45,.25);color:#ffd7d0}.rehearsal-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:1.25rem 0;padding:1rem;border:1px solid rgba(255,255,255,.12);background:rgba(17,14,12,.72);border-radius:10px}.rehearsal-toolbar label{display:flex;align-items:center;gap:.6rem}.rehearsal-manager-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:1.25rem}.rehearsal-list{display:grid;gap:.75rem}.rehearsal-list-card{width:100%;display:grid;grid-template-columns:100px 1fr auto;text-align:left;gap:.35rem 1rem;padding:1rem;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(25,21,18,.86);color:inherit;cursor:pointer}.rehearsal-list-card strong{font-size:1.05rem}.rehearsal-list-card small{grid-column:2/-1;opacity:.72}.rehearsal-list-date{text-transform:uppercase;letter-spacing:.08em;color:#d9a85c}.rehearsal-editor{padding:1.1rem;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(16,13,11,.9);align-self:start}.rehearsal-form{display:grid;gap:.85rem}.rehearsal-form label{display:grid;gap:.35rem;font-weight:650}.rehearsal-form input,.rehearsal-form select,.rehearsal-form textarea,.rehearsal-toolbar select{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.16);border-radius:6px;background:#171310;color:#f5eee5;padding:.7rem;font:inherit}.rehearsal-form select[multiple]{min-height:110px}.rehearsal-form-row{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:.65rem}.rehearsal-form-actions{display:flex;gap:.7rem}.rehearsal-form-error{min-height:1.2em;color:#ffaaa0;margin:0}.rehearsal-empty{display:grid;gap:.3rem;padding:2rem;border:1px dashed rgba(255,255,255,.2);border-radius:10px;text-align:center}.dashboard-rehearsal-details{display:grid;grid-template-columns:repeat(2,1fr);gap:.35rem;margin:.8rem 0;font-size:.84rem}.dashboard-rehearsal-songs{margin:.5rem 0 0;padding-left:1.1rem;font-size:.85rem}@media(max-width:900px){.rehearsal-manager-layout{grid-template-columns:1fr}.rehearsal-list-card{grid-template-columns:1fr}.rehearsal-list-card small{grid-column:auto}.rehearsal-form-row{grid-template-columns:1fr}}

/* Build 15.6 — Rehearsal Workspace & Scheduler */
.rehearsal-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.rehearsal-overview-card,.rehearsal-history-card{border:1px solid rgba(255,255,255,.11);border-radius:14px;background:rgba(20,17,14,.9);color:inherit;text-align:left;cursor:pointer;transition:transform .16s ease,border-color .16s ease}.rehearsal-overview-card{display:grid;gap:.65rem;padding:1.15rem;border-left:4px solid rgba(217,168,92,.55)}.rehearsal-overview-card.status-in-progress{border-left-color:#6fc4a8}.rehearsal-overview-card.status-completed{border-left-color:#71869d}.rehearsal-overview-card.status-cancelled{border-left-color:#9a5f5a;opacity:.75}.rehearsal-overview-card:hover,.rehearsal-history-card:hover{transform:translateY(-2px);border-color:rgba(217,168,92,.45)}.rehearsal-card-top,.panel-title-row{display:flex;justify-content:space-between;align-items:center;gap:1rem}.rehearsal-status{display:inline-flex;padding:.28rem .55rem;border-radius:999px;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;background:rgba(217,168,92,.12);color:#e4bd7e}.rehearsal-status-in-progress{background:rgba(82,170,140,.18);color:#9de3cb}.rehearsal-status-completed{background:rgba(103,126,151,.2);color:#bdd0e2}.rehearsal-status-cancelled{background:rgba(160,78,69,.2);color:#e0aaa4}.rehearsal-card-metrics{display:flex;flex-wrap:wrap;gap:.5rem}.rehearsal-card-metrics span,.attachment-prep-grid span{padding:.35rem .55rem;border-radius:7px;background:rgba(255,255,255,.05);font-size:.75rem}.rehearsal-history-section{margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1)}.history-filters{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:.8rem;margin:1rem 0}.history-filters label{display:grid;gap:.3rem;font-size:.75rem}.history-filters input{border:1px solid rgba(255,255,255,.15);border-radius:7px;background:#171310;color:#f5eee5;padding:.7rem}.rehearsal-history-list{display:grid;gap:.65rem}.rehearsal-history-card{display:grid;grid-template-columns:120px minmax(180px,1fr) auto;gap:.35rem 1rem;padding:.9rem 1rem}.rehearsal-history-card small{grid-column:2/-1;opacity:.7}.rehearsal-workspace{padding-bottom:3rem}.rehearsal-workspace-header{display:grid;grid-template-columns:1fr auto;gap:1rem;align-items:end;margin-bottom:1.25rem}.rehearsal-workspace-header>[data-rehearsal-back]{grid-column:1/-1;justify-self:start}.rehearsal-workspace-header h2{margin:.15rem 0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2rem,5vw,3.5rem);font-weight:400}.rehearsal-workspace-header p{margin:.2rem 0}.rehearsal-workspace-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(420px,1.2fr);gap:1rem}.rehearsal-workspace-panel{display:grid;align-content:start;gap:.8rem;padding:1.15rem;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(16,13,11,.92)}.rehearsal-details-panel{grid-row:span 3}.rehearsal-workspace-panel label{display:grid;gap:.35rem;font-weight:650}.rehearsal-workspace-panel input,.rehearsal-workspace-panel select,.rehearsal-workspace-panel textarea{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.15);border-radius:7px;background:#171310;color:#f5eee5;padding:.7rem;font:inherit}.rehearsal-workspace-panel select[multiple]{min-height:90px}.rehearsal-secondary{border:1px solid rgba(217,168,92,.35);border-radius:7px;background:rgba(217,168,92,.08);color:#e4bd7e;padding:.5rem .7rem;cursor:pointer}.song-plan-row{display:grid;grid-template-columns:32px minmax(140px,.8fr) minmax(150px,1fr) auto 34px;gap:.55rem;align-items:center;margin:.55rem 0}.song-drag{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:rgba(217,168,92,.12);color:#e4bd7e}.song-ready{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;white-space:nowrap}.song-ready input{width:auto}.song-plan-row button,.timeline-row button{border:0;background:transparent;color:#e7aaa2;font-size:1.3rem;cursor:pointer}.timeline-row{display:grid;grid-template-columns:110px minmax(140px,.8fr) minmax(150px,1fr) 34px;gap:.55rem;margin:.55rem 0}.rehearsal-empty-inline{padding:1rem;border:1px dashed rgba(255,255,255,.14);border-radius:8px;opacity:.7}.rehearsal-save-status{font-size:.76rem;color:#9de3cb}.rehearsal-save-status.is-error{color:#ffaaa0}.rehearsal-attachments{grid-column:2}.attachment-prep-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}.dashboard-rehearsal-details{grid-template-columns:1fr}.dashboard-rehearsal-details span{display:flex;justify-content:space-between;gap:1rem}.dashboard-rehearsal-details strong{color:#e4bd7e}@media(max-width:950px){.rehearsal-workspace-grid{grid-template-columns:1fr}.rehearsal-details-panel{grid-row:auto}.rehearsal-attachments{grid-column:auto}.history-filters{grid-template-columns:1fr}.rehearsal-history-card{grid-template-columns:1fr}.rehearsal-history-card small{grid-column:auto}.song-plan-row,.timeline-row{grid-template-columns:1fr}.rehearsal-workspace-header{grid-template-columns:1fr}}

/* ==========================================================
   THE STUDIO — BUILD 15.6.1
   REHEARSAL UI POLISH
   Visual-only Design System alignment.
   ========================================================== */

.rehearsal-manager-view,
.rehearsal-workspace {
    --rehearsal-planned: #d7a84f;
    --rehearsal-active: #68c5a3;
    --rehearsal-completed: #8fa7bd;
    --rehearsal-cancelled: #ce7d73;
    --rehearsal-control-bg: rgba(18, 15, 12, 0.92);
    --rehearsal-control-border: rgba(200, 167, 101, 0.24);
    --rehearsal-control-border-hover: rgba(215, 176, 107, 0.52);
    --rehearsal-focus-ring: rgba(215, 176, 107, 0.28);
}

/* Design System action hierarchy */
.rehearsal-manager-view .studio-button,
.rehearsal-workspace .studio-button {
    appearance: none;
    min-height: 40px;
    padding: 0 15px;
    border-radius: var(--radius-small, 9px);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.015em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.rehearsal-manager-view .studio-button-primary,
.rehearsal-workspace .studio-button-primary {
    color: #17130d;
    border-color: rgba(232, 195, 125, .5);
    background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold));
}

.rehearsal-manager-view .studio-button-primary:hover,
.rehearsal-workspace .studio-button-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.24), 0 0 0 1px rgba(232,195,125,.18);
}

.rehearsal-workspace .studio-button-secondary {
    color: var(--text-primary);
    border-color: var(--rehearsal-control-border);
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
}

.rehearsal-workspace .studio-button-secondary:hover {
    border-color: var(--rehearsal-control-border-hover);
    background: rgba(200,167,101,.1);
}

.rehearsal-workspace .studio-button-ghost {
    color: var(--text-secondary);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.rehearsal-workspace .studio-button-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}

.rehearsal-workspace .studio-button-danger {
    color: #f3beb7;
    border-color: rgba(206, 93, 79, .42);
    background: rgba(132, 43, 34, .22);
}

.rehearsal-workspace .studio-button-danger:hover {
    color: #ffe0dc;
    border-color: rgba(222, 111, 97, .72);
    background: rgba(157, 49, 39, .42);
}

.rehearsal-manager-view button:focus-visible,
.rehearsal-workspace button:focus-visible,
.rehearsal-manager-view input:focus-visible,
.rehearsal-manager-view select:focus-visible,
.rehearsal-workspace input:focus-visible,
.rehearsal-workspace select:focus-visible,
.rehearsal-workspace textarea:focus-visible {
    outline: 2px solid var(--accent-gold-bright, #d5b06b);
    outline-offset: 2px;
    border-color: var(--rehearsal-control-border-hover);
    box-shadow: 0 0 0 4px var(--rehearsal-focus-ring);
}

.rehearsal-manager-view button:disabled,
.rehearsal-workspace button:disabled,
.rehearsal-manager-view input:disabled,
.rehearsal-manager-view select:disabled,
.rehearsal-workspace input:disabled,
.rehearsal-workspace select:disabled,
.rehearsal-workspace textarea:disabled {
    cursor: not-allowed;
    opacity: .45;
    filter: saturate(.55);
    transform: none;
    box-shadow: none;
}

/* Cards and panels */
.rehearsal-toolbar,
.rehearsal-workspace-panel,
.rehearsal-overview-card,
.rehearsal-history-card,
.rehearsal-empty,
.rehearsal-empty-inline {
    border-color: rgba(200,167,101,.16);
    background:
        linear-gradient(145deg, rgba(255,255,255,.028), rgba(255,255,255,.008)),
        rgba(17,14,12,.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.rehearsal-overview-card,
.rehearsal-history-card {
    color: var(--text-primary);
}

.rehearsal-overview-card:hover,
.rehearsal-history-card:hover {
    border-color: rgba(200,167,101,.4);
    background:
        linear-gradient(145deg, rgba(200,167,101,.055), rgba(255,255,255,.012)),
        rgba(20,17,14,.94);
    box-shadow: 0 16px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.035);
}

.rehearsal-overview-card:active,
.rehearsal-history-card:active,
.rehearsal-manager-view .studio-button:active,
.rehearsal-workspace .studio-button:active {
    transform: translateY(0);
}

/* Status language */
.rehearsal-status {
    border: 1px solid rgba(215,168,79,.3);
    background: rgba(215,168,79,.11);
    color: #e8c687;
}

.rehearsal-status-planned,
.rehearsal-overview-card.status-planned {
    --status-color: var(--rehearsal-planned);
}

.rehearsal-status-in-progress,
.rehearsal-overview-card.status-in-progress {
    --status-color: var(--rehearsal-active);
}

.rehearsal-status-completed,
.rehearsal-overview-card.status-completed {
    --status-color: var(--rehearsal-completed);
}

.rehearsal-status-cancelled,
.rehearsal-overview-card.status-cancelled {
    --status-color: var(--rehearsal-cancelled);
}

.rehearsal-status-planned,
.rehearsal-status-in-progress,
.rehearsal-status-completed,
.rehearsal-status-cancelled {
    color: color-mix(in srgb, var(--status-color) 82%, white);
    border-color: color-mix(in srgb, var(--status-color) 44%, transparent);
    background: color-mix(in srgb, var(--status-color) 15%, transparent);
}

.rehearsal-overview-card.status-planned,
.rehearsal-overview-card.status-in-progress,
.rehearsal-overview-card.status-completed,
.rehearsal-overview-card.status-cancelled {
    border-left-color: var(--status-color);
}

.rehearsal-overview-card.status-cancelled {
    opacity: .8;
}

/* Forms and filters */
.rehearsal-toolbar {
    border-radius: var(--radius-medium, 14px);
}

.rehearsal-toolbar label,
.history-filters label,
.rehearsal-workspace-panel label {
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .025em;
}

.rehearsal-toolbar select,
.history-filters input,
.rehearsal-workspace-panel input,
.rehearsal-workspace-panel select,
.rehearsal-workspace-panel textarea,
.song-plan-row select,
.song-plan-row input,
.timeline-row input {
    min-height: 42px;
    border: 1px solid var(--rehearsal-control-border);
    border-radius: var(--radius-small, 9px);
    color: var(--text-primary);
    background: var(--rehearsal-control-bg);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.34);
    transition: border-color var(--transition-fast, 140ms ease), background var(--transition-fast, 140ms ease), box-shadow var(--transition-fast, 140ms ease);
}

.rehearsal-toolbar select:hover,
.history-filters input:hover,
.rehearsal-workspace-panel input:hover,
.rehearsal-workspace-panel select:hover,
.rehearsal-workspace-panel textarea:hover {
    border-color: rgba(200,167,101,.38);
    background: rgba(24,20,16,.96);
}

.rehearsal-workspace-panel textarea {
    line-height: 1.55;
    resize: vertical;
}

.history-filters {
    padding: .9rem;
    border: 1px solid rgba(200,167,101,.12);
    border-radius: var(--radius-medium, 14px);
    background: rgba(10,9,8,.34);
}

/* Planner and timeline rows */
.song-plan-row,
.timeline-row {
    padding: .6rem;
    border: 1px solid rgba(200,167,101,.1);
    border-radius: 11px;
    background: rgba(255,255,255,.018);
    transition: border-color var(--transition-fast, 140ms ease), background var(--transition-fast, 140ms ease);
}

.song-plan-row:hover,
.timeline-row:hover {
    border-color: rgba(200,167,101,.24);
    background: rgba(200,167,101,.035);
}

.song-drag {
    border: 1px solid rgba(200,167,101,.18);
}

.rehearsal-icon-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 1.05rem !important;
    line-height: 1;
}

.rehearsal-save-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 28px;
    margin: .15rem 0 0;
    color: #a8ddc9;
}

.rehearsal-save-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    content: "";
    background: currentColor;
    box-shadow: 0 0 10px color-mix(in srgb, currentColor 55%, transparent);
}

.rehearsal-save-status.is-error {
    color: #ef9f96;
}

@media (prefers-reduced-motion: reduce) {
    .rehearsal-manager-view *,
    .rehearsal-workspace * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ==========================================================
   THE STUDIO — BUILD 15.6.2
   REHEARSAL ACCEPTANCE HOTFIX
   Functional create flow + complete control normalization.
   ========================================================== */

.rehearsal-manager-view button,
.rehearsal-workspace button,
.rehearsal-manager-view input,
.rehearsal-manager-view select,
.rehearsal-manager-view textarea,
.rehearsal-workspace input,
.rehearsal-workspace select,
.rehearsal-workspace textarea {
    font: inherit;
}

.rehearsal-overview-card,
.rehearsal-history-card {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin: 0;
}

.rehearsal-manager-view select,
.rehearsal-manager-view input,
.rehearsal-workspace select,
.rehearsal-workspace input,
.rehearsal-workspace textarea {
    color-scheme: dark;
}

.rehearsal-manager-view select option,
.rehearsal-workspace select option {
    color: var(--text-primary, #f5eee5);
    background: #171310;
}

.rehearsal-dialog {
    width: min(620px, calc(100vw - 32px));
    max-width: 620px;
    padding: 0;
    border: 1px solid rgba(200, 167, 101, .28);
    border-radius: var(--radius-large, 18px);
    color: var(--text-primary, #f5eee5);
    background:
        linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008)),
        #15110e;
    box-shadow: 0 28px 80px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.04);
}

.rehearsal-dialog::backdrop {
    background: rgba(4, 3, 2, .76);
    backdrop-filter: blur(5px);
}

.rehearsal-dialog-form {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.rehearsal-dialog-header,
.rehearsal-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rehearsal-dialog-header h3 {
    margin: .15rem 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 400;
}

.rehearsal-dialog-close {
    width: 40px;
    min-width: 40px;
    padding: 0 !important;
    font-size: 1.25rem !important;
}

.rehearsal-dialog-fields {
    display: grid;
    gap: .85rem;
}

.rehearsal-dialog-fields label {
    display: grid;
    gap: .35rem;
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .025em;
}

.rehearsal-dialog-fields input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: .7rem;
    border: 1px solid var(--rehearsal-control-border, rgba(255,255,255,.16));
    border-radius: var(--radius-small, 9px);
    color: var(--text-primary, #f5eee5);
    background: var(--rehearsal-control-bg, rgba(18,15,12,.92));
    box-shadow: inset 0 1px 2px rgba(0,0,0,.34);
}

.rehearsal-dialog-fields input:hover {
    border-color: rgba(200,167,101,.38);
    background: rgba(24,20,16,.96);
}

.rehearsal-dialog-fields input:focus-visible {
    outline: 2px solid var(--accent-gold-bright, #d5b06b);
    outline-offset: 2px;
    border-color: rgba(215,176,107,.52);
    box-shadow: 0 0 0 4px rgba(215,176,107,.28);
}

.rehearsal-dialog-actions {
    justify-content: flex-end;
    padding-top: .2rem;
}

.rehearsal-dialog .studio-button {
    appearance: none;
    min-height: 40px;
    padding: 0 15px;
    border-radius: var(--radius-small, 9px);
    font-size: .82rem;
    font-weight: 750;
    letter-spacing: .015em;
}

.rehearsal-dialog .studio-button:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

@media (max-width: 620px) {
    .rehearsal-dialog-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .rehearsal-dialog-actions .studio-button {
        width: 100%;
    }
}

/* ==========================================================
   THE STUDIO — BUILD 15.7
   REHEARSAL WORKFLOW & LIFECYCLE
   ========================================================== */
.rehearsal-card-open{display:grid;width:100%;padding:0;border:0;color:inherit;text-align:left;background:transparent;cursor:pointer;gap:.55rem;font:inherit}
.rehearsal-card-open:focus-visible{outline:2px solid var(--accent,#c8a765);outline-offset:4px;border-radius:12px}
.rehearsal-card-actions,.rehearsal-workflow-bar{display:flex;flex-wrap:wrap;gap:.5rem}
.rehearsal-card-actions{padding-top:.8rem;margin-top:.35rem;border-top:1px solid rgba(200,167,101,.12)}
.rehearsal-workflow-bar{margin:0 0 1rem;padding:.8rem;border:1px solid rgba(200,167,101,.15);border-radius:14px;background:rgba(15,12,10,.72)}
.rehearsal-feedback{margin:0 0 1rem;padding:.7rem .85rem;border:1px solid rgba(87,191,139,.35);border-radius:10px;color:#bce8d1;background:rgba(40,105,73,.18)}
.rehearsal-feedback.is-error{border-color:rgba(220,90,90,.4);color:#ffc0c0;background:rgba(130,35,35,.2)}
.rehearsal-card-actions .studio-button{min-height:36px;padding:.45rem .7rem;font-size:.78rem}
.rehearsal-overview-card{display:block}

/* Build 15.7.1 — fixed, status-driven Workflow Action Bar */
.rehearsal-workflow-bar{position:sticky;top:.75rem;z-index:12;display:flex;align-items:center;flex-wrap:wrap;gap:.65rem;margin:0 0 1.25rem;padding:.9rem 1rem;border:1px solid rgba(200,167,101,.28);border-radius:14px;background:linear-gradient(180deg,rgba(31,25,20,.97),rgba(18,14,12,.97));box-shadow:0 12px 30px rgba(0,0,0,.28);backdrop-filter:blur(10px)}
.rehearsal-workflow-bar:empty{display:none}
.rehearsal-workflow-bar .studio-button{min-height:2.65rem;white-space:nowrap}
.rehearsal-card-actions{align-items:center}
@media (max-width:760px){.rehearsal-workflow-bar{position:static}.rehearsal-workflow-bar .studio-button{flex:1 1 calc(50% - .65rem)}}

/* Build 15.11 acceptance fix: explicit persistent member assignment */
.rehearsal-participants {
    display: grid;
    gap: 12px;
}

.rehearsal-participants-heading {
    display: grid;
    gap: 4px;
}

.rehearsal-participants-heading > span {
    font-weight: 700;
}

.rehearsal-participants-heading > small {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.rehearsal-participant-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rehearsal-participant-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.rehearsal-participant-choice:has(input:checked) {
    border-color: rgba(205, 157, 91, 0.38);
    background: rgba(205, 157, 91, 0.08);
}

.rehearsal-participant-choice input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.rehearsal-participant-choice span {
    display: grid;
    gap: 2px;
}

.rehearsal-participant-choice strong {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.rehearsal-participant-choice small {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.rehearsal-participant-choice:has(input:disabled) {
    cursor: default;
    opacity: 0.72;
}

@media (max-width: 680px) {
    .rehearsal-participant-choices {
        grid-template-columns: 1fr;
    }
}

/* Build 15.11 final acceptance fix: explicit Members ↔ Rehearsals editor */
.rehearsal-participant-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.rehearsal-participant-add select {
    width: 100%;
    min-height: 42px;
}

.rehearsal-participant-linked-list {
    display: grid;
    gap: 8px;
}

.rehearsal-participant-linked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid rgba(205, 157, 91, 0.24);
    border-radius: 10px;
    background: rgba(205, 157, 91, 0.06);
}

.rehearsal-participant-linked > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.rehearsal-participant-linked strong {
    color: var(--text-primary);
    font-size: 0.82rem;
}

.rehearsal-participant-linked small {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.rehearsal-participant-remove {
    flex: 0 0 auto;
}

@media (max-width: 680px) {
    .rehearsal-participant-add {
        grid-template-columns: 1fr;
    }

    .rehearsal-participant-linked {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Build 15.11 — simplified rehearsal core */
.song-plan-row.is-readonly {
    display: grid;
    gap: 0.25rem;
    align-items: start;
}
.song-plan-row.is-readonly span {
    opacity: 0.78;
}
.rehearsal-delete-button {
    margin-top: 1rem;
    justify-self: start;
}
