/* =========================================================
   SGC Intranet — Frontend Styles
   Aesthetic: warm, soulful gospel.
   Inspiration: old hymnal printings, vintage tour posters,
   editorial magazine. Cream background, deep burgundy as
   primary accent, mustard gold for highlights.
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,800&family=Inter:wght@400;500;600&display=swap');

.sgc-app, .sgc-gate {
    /* Corporate Design: derived from official SGC logo and Chorvision 2023 */
    --sgc-burgundy: #93014a;        /* PRIMARY · extracted from logo */
    --sgc-burgundy-dark: #6b0036;   /* hover/active states */
    --sgc-burgundy-soft: #c4548a;   /* sparse secondary accent */
    --sgc-cream: #faf6ee;           /* primary background, replaces white */
    --sgc-cream-warm: #f3e9d4;      /* highlighted surfaces, pull-quotes */
    --sgc-ink: #1a1010;             /* body text, never pure black */
    --sgc-muted: #6f5e54;           /* secondary text */
    --sgc-gold: #c89b3c;            /* the only allowed secondary accent */
    --sgc-line: #e4d8c4;            /* dividers, borders */
    --sgc-rust: #b04a2e;

    /* Progress states */
    --sgc-state-new:       #c9bfb2;
    --sgc-state-listening: #d8b15f;
    --sgc-state-learning:  #b07a3a;
    --sgc-state-confident: #6f8a52;
    --sgc-state-mastered:  #3c6b3a;

    /* Song status pipeline */
    --sgc-status-repertoire: #3c6b3a;
    --sgc-status-in-probe:   #b04a2e;
    --sgc-status-geplant:    #8a6b2c;
    --sgc-status-archiv:     #8a8377;

    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--sgc-ink);
    background: var(--sgc-cream);
    padding: 32px 24px 64px;
    border-radius: 4px;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .sgc-app, .sgc-gate { padding: 20px 14px 48px; }
}

.sgc-app *, .sgc-app *::before, .sgc-app *::after,
.sgc-gate *, .sgc-gate *::before, .sgc-gate *::after {
    box-sizing: border-box;
}

.sgc-app h1, .sgc-app h2, .sgc-app h3, .sgc-app h4,
.sgc-gate h1, .sgc-gate h2, .sgc-gate h3, .sgc-gate h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--sgc-ink);
    margin: 0 0 12px;
}

.sgc-app h1, .sgc-gate h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
}

.sgc-app h2 { font-size: 1.6rem; margin: 0 0 14px; }
.sgc-app h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.sgc-app h4 { font-size: 1.05rem; margin: 0 0 6px; }

.sgc-eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sgc-burgundy);
    margin: 0 0 6px;
}

.sgc-muted { color: var(--sgc-muted); font-size: 0.92rem; }

.sgc-accent {
    background: linear-gradient(transparent 65%, rgba(200,155,60,0.35) 65%);
    padding: 0 2px;
}

/* ---------- Login gate ---------- */
.sgc-gate {
    max-width: 980px;
    margin: 0 auto;
}
.sgc-gate-header { text-align: center; margin-bottom: 40px; }
.sgc-gate-header .sgc-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
}
.sgc-gate-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sgc-burgundy);
    margin: 0 0 12px;
}
.sgc-gate-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 14px;
}
.sgc-gate-header h1 em {
    color: var(--sgc-burgundy);
    font-style: italic;
    font-weight: 500;
}
.sgc-gate-header .sgc-tagline {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--sgc-muted);
    margin: 0 auto;
    max-width: 580px;
    line-height: 1.5;
}

.sgc-gate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 720px) {
    .sgc-gate-grid { grid-template-columns: 1fr; }
}

/* ---------- Card ---------- */
.sgc-card {
    background: #fff;
    border: 1px solid var(--sgc-line);
    border-radius: 6px;
    padding: 24px;
    position: relative;
}
@media (max-width: 720px) {
    .sgc-card { padding: 18px 16px; }
}
.sgc-card-register::before {
    content: "";
    position: absolute; top: -1px; left: -1px; right: -1px;
    height: 4px;
    background: linear-gradient(90deg, var(--sgc-burgundy), var(--sgc-gold));
    border-radius: 6px 6px 0 0;
}

.sgc-card-tips { background: var(--sgc-burgundy); color: #fff; }
.sgc-card-tips h2, .sgc-card-tips .sgc-eyebrow { color: #fff; }
.sgc-card-tips .sgc-eyebrow { color: var(--sgc-gold); }
.sgc-tips { padding-left: 1.2em; margin: 12px 0 0; }
.sgc-tips li { margin: 8px 0; }

.sgc-pending { max-width: 600px; margin: 40px auto; text-align: center; }

/* ---------- Forms ---------- */
.sgc-form label {
    display: block;
    margin: 12px 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--sgc-muted);
}
.sgc-form input,
.sgc-form select,
.sgc-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 11px 14px;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    font: inherit;
    background: #fff;
    color: var(--sgc-ink);
}
.sgc-form input:focus,
.sgc-form select:focus,
.sgc-form textarea:focus {
    outline: 2px solid var(--sgc-burgundy);
    outline-offset: -1px;
    border-color: var(--sgc-burgundy);
}

/* wp_login_form() output */
.login-username, .login-password, .login-remember, .login-submit {
    margin: 12px 0;
}
.login-username label, .login-password label, .login-remember label {
    font-size: 0.92rem;
    color: var(--sgc-muted);
}
.login-username input, .login-password input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    margin-top: 4px;
}
.login-submit input {
    cursor: pointer;
}

.sgc-btn {
    display: inline-block;
    padding: 11px 22px;
    background: #fff;
    color: var(--sgc-ink);
    border: 1px solid var(--sgc-ink);
    border-radius: 4px;
    font: 500 0.95rem 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.sgc-btn:hover { background: var(--sgc-ink); color: #fff; }

.sgc-btn-primary {
    background: var(--sgc-burgundy);
    color: #fff;
    border-color: var(--sgc-burgundy);
}
.sgc-btn-primary:hover { background: var(--sgc-burgundy-dark); border-color: var(--sgc-burgundy-dark); }

.sgc-btn-ghost {
    background: transparent;
    border-color: var(--sgc-line);
    color: var(--sgc-burgundy);
    font-size: 0.85rem;
    padding: 8px 14px;
}
.sgc-btn-ghost:hover { background: var(--sgc-burgundy); color: #fff; border-color: var(--sgc-burgundy); }

.login-submit input[type="submit"], #wp-submit {
    background: var(--sgc-burgundy);
    color: #fff;
    border: 1px solid var(--sgc-burgundy);
    padding: 11px 22px;
    border-radius: 4px;
    cursor: pointer;
    font: 500 0.95rem 'Inter', sans-serif;
}

.sgc-flash {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}
.sgc-flash-pending { background: #f4ead4; border-color: var(--sgc-gold); }
.sgc-flash-error, .sgc-flash-exists, .sgc-flash-invalid {
    background: #f8e1dc; border-color: var(--sgc-rust); color: var(--sgc-burgundy-dark);
}

/* ---------- App header ---------- */
.sgc-app { max-width: 1200px; margin: 0 auto; }

.sgc-app-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    padding-bottom: 28px;
    margin-bottom: 36px;
    border-bottom: 2px solid var(--sgc-line);
}
@media (max-width: 720px) {
    .sgc-app-header { grid-template-columns: 1fr; gap: 18px; }
    .sgc-app-header-main { text-align: left; }
    .sgc-app-nav { justify-content: flex-start; }
}
.sgc-app-header h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--sgc-burgundy);
}
.sgc-app-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.sgc-app-nav a {
    color: var(--sgc-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(147, 1, 74, 0.06);
    transition: background 0.15s ease, color 0.15s ease;
}
.sgc-app-nav a:hover {
    background: var(--sgc-burgundy);
    color: var(--sgc-cream);
}
.sgc-app-nav a.sgc-logout {
    background: transparent;
    color: var(--sgc-muted);
    margin-left: auto;
}
.sgc-app-nav a.sgc-logout:hover {
    background: transparent;
    color: var(--sgc-burgundy);
}
}
.sgc-voice-badge { margin: 12px 0 0; }
.sgc-voice {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--sgc-burgundy);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}
.sgc-voice-sopran { background: #b03a55; }
.sgc-voice-alt    { background: #8a3a64; }
.sgc-voice-tenor  { background: #4a5e3a; }
.sgc-voice-bass   { background: #2c3a4a; }

/* ---------- Grid 3 ---------- */
.sgc-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
@media (max-width: 900px) { .sgc-grid-3 { grid-template-columns: 1fr; } }

.sgc-big-date { font-size: 2.4rem; line-height: 1; margin: 6px 0 2px; font-weight: 800; color: var(--sgc-burgundy); }

.sgc-setlist { list-style: none; padding: 0; margin: 8px 0 0; }
.sgc-setlist li { padding: 6px 0; border-bottom: 1px dashed var(--sgc-line); }
.sgc-setlist li:last-child { border: 0; }
.sgc-setlist a { color: var(--sgc-ink); text-decoration: none; }
.sgc-setlist a:hover { color: var(--sgc-burgundy); }

/* ---------- Progress bars ---------- */
.sgc-progress-bars { margin-top: 14px; }
.sgc-progress-row {
    display: grid;
    grid-template-columns: 140px 1fr 30px;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    font-size: 0.86rem;
}
.sgc-progress-label { color: var(--sgc-muted); }
.sgc-progress-bar { height: 8px; background: var(--sgc-line); border-radius: 4px; overflow: hidden; }
.sgc-progress-fill { display: block; height: 100%; transition: width 0.4s ease; }
.sgc-progress-count { text-align: right; font-weight: 600; }

.sgc-state-new       .sgc-progress-fill, .sgc-progress-fill.sgc-state-new       { background: var(--sgc-state-new); }
.sgc-state-listening .sgc-progress-fill, .sgc-progress-fill.sgc-state-listening { background: var(--sgc-state-listening); }
.sgc-state-learning  .sgc-progress-fill, .sgc-progress-fill.sgc-state-learning  { background: var(--sgc-state-learning); }
.sgc-state-confident .sgc-progress-fill, .sgc-progress-fill.sgc-state-confident { background: var(--sgc-state-confident); }
.sgc-state-mastered  .sgc-progress-fill, .sgc-progress-fill.sgc-state-mastered  { background: var(--sgc-state-mastered); }

/* ---------- Section ---------- */
.sgc-section { margin-bottom: 56px; scroll-margin-top: 20px; }
.sgc-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; margin-bottom: 20px;
}
.sgc-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.sgc-filters label { font-size: 0.85rem; color: var(--sgc-muted); }
.sgc-filters select, .sgc-filters input {
    margin-top: 3px;
    padding: 8px 12px;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    background: #fff;
}

.sgc-status-heading {
    display: flex; align-items: center; gap: 12px;
    margin-top: 32px; padding-bottom: 8px;
    border-bottom: 1px solid var(--sgc-line);
    font-size: 1.15rem;
}
.sgc-status-heading::before {
    content: ''; width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.sgc-status-heading.sgc-status-repertoire::before { background: var(--sgc-status-repertoire); }
.sgc-status-heading.sgc-status-in-probe::before   { background: var(--sgc-status-in-probe); }
.sgc-status-heading.sgc-status-geplant::before    { background: var(--sgc-status-geplant); }
.sgc-status-heading.sgc-status-archiv::before     { background: var(--sgc-status-archiv); }
.sgc-count { font-size: 0.75rem; color: var(--sgc-muted); margin-left: auto; }

/* ---------- Song grid ---------- */
.sgc-song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.sgc-song-card {
    background: #fff;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    padding: 16px 18px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex; flex-direction: column;
}
.sgc-song-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,13,27,0.08); }
.sgc-song-card[hidden] { display: none !important; }
.sgc-song-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sgc-song-card h4 { font-size: 1.1rem; margin: 0; flex: 1; }
.sgc-song-card h4 a { color: var(--sgc-ink); text-decoration: none; }
.sgc-song-card h4 a:hover { color: var(--sgc-burgundy); }
.sgc-difficulty { color: var(--sgc-gold); font-size: 0.9rem; letter-spacing: 1px; }
.sgc-song-meta { font-size: 0.85rem; color: var(--sgc-muted); margin: 4px 0 12px; font-style: italic; }
.sgc-song-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.sgc-state-pill {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sgc-state-new);
    color: var(--sgc-ink);
}
.sgc-state-pill.sgc-state-new { background: var(--sgc-state-new); }
.sgc-state-pill.sgc-state-listening { background: var(--sgc-state-listening); color: #fff; }
.sgc-state-pill.sgc-state-learning { background: var(--sgc-state-learning); color: #fff; }
.sgc-state-pill.sgc-state-confident { background: var(--sgc-state-confident); color: #fff; }
.sgc-state-pill.sgc-state-mastered { background: var(--sgc-state-mastered); color: #fff; }
.sgc-go { color: var(--sgc-burgundy); text-decoration: none; font-size: 1.4rem; }

/* ---------- Song single view ---------- */
.sgc-song-view { max-width: 1100px; }
.sgc-back { color: var(--sgc-burgundy); text-decoration: none; font-size: 0.9rem; }
.sgc-back:hover { text-decoration: underline; }

.sgc-song-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px solid var(--sgc-line); }
.sgc-song-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--sgc-muted); font-size: 0.92rem; }
.sgc-song-facts span { display: inline-flex; align-items: center; }

.sgc-progress-tracker { background: #fff; border: 1px solid var(--sgc-line); border-radius: 4px; padding: 18px 22px; margin-bottom: 28px; }
.sgc-state-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sgc-state-btn {
    border: 1px solid var(--sgc-line);
    background: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font: 500 0.85rem 'Inter', sans-serif;
    color: var(--sgc-ink);
}
.sgc-state-btn:hover { border-color: var(--sgc-burgundy); }
.sgc-state-btn.is-active { background: var(--sgc-burgundy); color: #fff; border-color: var(--sgc-burgundy); }

.sgc-player-card { margin-bottom: 32px; }
.sgc-track-group {
    border-top: 1px solid var(--sgc-line);
    padding: 14px 0;
}
.sgc-track-group summary {
    font-weight: 600;
    cursor: pointer;
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.sgc-track-group summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--sgc-burgundy);
}
.sgc-track-group[open] summary::after { content: '−'; }
.sgc-track-group.is-own summary { color: var(--sgc-burgundy); }
.sgc-mine-tag {
    background: var(--sgc-gold);
    color: var(--sgc-ink);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-left: 10px;
}
.sgc-track-list { padding: 14px 0 6px; }
.sgc-track {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
    padding: 8px 0;
}
@media (max-width: 600px) {
    .sgc-track { grid-template-columns: 1fr; gap: 4px; }
}
.sgc-track-label { font-size: 0.92rem; color: var(--sgc-muted); }
.sgc-track audio { width: 100%; }

.sgc-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .sgc-two-col { grid-template-columns: 1fr; } }

.sgc-lyrics, .sgc-pronunciation {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    white-space: pre-wrap;
}
.sgc-lyrics p, .sgc-pronunciation p { margin: 0 0 12px; }

/* ---------- Rehearsals ---------- */
.sgc-rehearsal-list { list-style: none; padding: 0; margin: 0; }
.sgc-rehearsal-list li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--sgc-line);
}
.sgc-rehearsal-date {
    text-align: center;
    background: var(--sgc-burgundy);
    color: #fff;
    border-radius: 6px;
    padding: 12px 8px;
    height: fit-content;
}
.sgc-rehearsal-date .sgc-day {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.sgc-rehearsal-date .sgc-month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 4px;
}
.sgc-rehearsal-time { font-weight: 500; margin: 0 0 8px; }

/* ---------- Wishes ---------- */
.sgc-wish-form {
    background: #fff;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    padding: 22px;
    margin-bottom: 24px;
}
.sgc-wish-form h3 { margin-top: 0; }
.sgc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sgc-wish-form input, .sgc-wish-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    font: inherit;
    margin-bottom: 12px;
}
@media (max-width: 600px) { .sgc-form-row { grid-template-columns: 1fr; } }

.sgc-wish-list { list-style: none; padding: 0; margin: 0; }
.sgc-wish-list li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--sgc-line);
    align-items: start;
}
.sgc-vote {
    background: #fff;
    border: 1px solid var(--sgc-line);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}
.sgc-vote:hover { border-color: var(--sgc-burgundy); }
.sgc-vote.is-voted {
    background: var(--sgc-burgundy);
    color: #fff;
    border-color: var(--sgc-burgundy);
}
.sgc-vote-count { display: block; font-weight: 700; font-size: 1.1rem; }
.sgc-vote-label { font-size: 0.9rem; }
.sgc-wish-body h4 { font-family: 'Fraunces', serif; font-size: 1.05rem; }
.sgc-wish-meta { margin-top: 6px; font-size: 0.82rem; }

/* ---------- Modal ---------- */
.sgc-modal {
    position: fixed; inset: 0;
    background: rgba(28,20,16,0.6);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.sgc-modal[hidden] { display: none; }
.sgc-modal-content {
    background: var(--sgc-cream);
    border-radius: 6px;
    padding: 28px;
    width: 100%; max-width: 500px;
}
.sgc-modal-content h3 { margin-top: 0; }
.sgc-modal-content label { display: block; margin: 14px 0; }
.sgc-modal-content select, .sgc-modal-content textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--sgc-line); border-radius: 4px;
    font: inherit; margin-top: 4px;
}
.sgc-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Toast ---------- */
.sgc-toast {
    position: fixed;
    bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--sgc-ink);
    color: var(--sgc-cream);
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.92rem;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: sgc-toast-in 0.3s ease;
}
@keyframes sgc-toast-in {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Privacy note (anonymization hint) ---------- */
.sgc-privacy-note {
    margin-top: 14px;
    padding: 8px 12px;
    background: var(--sgc-cream-warm);
    border-left: 3px solid var(--sgc-gold);
    border-radius: 2px;
    font-size: 0.8rem;
    color: var(--sgc-muted);
    line-height: 1.45;
}
.sgc-privacy-note .sgc-lock {
    margin-right: 4px;
}

/* ---------- Training section ---------- */
.sgc-training {
    margin-top: 12px;
}
.sgc-training-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sgc-line);
    font-size: 1.15rem;
    font-family: 'Fraunces', serif;
    font-weight: 600;
}
.sgc-training-cat::before {
    content: '';
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--sgc-gold);
    display: inline-block;
}
.sgc-training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.sgc-training-card {
    background: #fff;
    border: 1px solid var(--sgc-line);
    border-radius: 4px;
    padding: 18px 20px;
}
.sgc-training-card h4 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    margin: 0 0 8px;
    font-size: 1.1rem;
}
.sgc-voice-pill-all {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sgc-cream-warm);
    color: var(--sgc-ink);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    margin-right: 6px;
}
.sgc-training-duration {
    color: var(--sgc-muted);
    font-size: 0.85rem;
    margin-left: 6px;
}
.sgc-training-desc {
    margin: 10px 0 14px;
    color: var(--sgc-ink);
    font-size: 0.95rem;
    line-height: 1.55;
}
.sgc-training-other {
    margin-top: 32px;
    padding: 14px 18px;
    background: var(--sgc-cream-warm);
    border-radius: 4px;
}
.sgc-training-other summary {
    cursor: pointer;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: var(--sgc-burgundy);
}
.sgc-training-other h4 {
    margin: 16px 0 6px;
    font-family: 'Fraunces', serif;
    font-size: 1rem;
}
.sgc-training-other-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sgc-training-other-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
}

/* =========================================================
   v1.4.0 — Cover, Donuts, Hero, Badges, Waveform, Heatmap
   All values stay inside the SGC corporate design palette.
========================================================= */

/* --- Generated cover SVG --- */
.sgc-app .sgc-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* --- Song cards: visual upgrade with cover + donut overlay --- */
.sgc-app .sgc-song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin: 0 0 26px;
}
.sgc-app .sgc-song-card {
    background: var(--sgc-cream);
    border: 1px solid var(--sgc-line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(26, 16, 16, 0.04);
}
.sgc-app .sgc-song-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(107, 0, 54, 0.14);
    border-color: var(--sgc-burgundy-soft);
}
.sgc-app .sgc-song-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--sgc-burgundy);
}
.sgc-app .sgc-song-card-cover svg.sgc-cover {
    transition: transform 0.4s ease;
}
.sgc-app .sgc-song-card:hover .sgc-song-card-cover svg.sgc-cover {
    transform: scale(1.04);
}
.sgc-app .sgc-song-card-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    line-height: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.sgc-app .sgc-song-card-body {
    padding: 14px 16px 4px;
    flex: 1;
}
.sgc-app .sgc-song-card-body h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    margin: 0 0 4px;
    line-height: 1.25;
}
.sgc-app .sgc-song-card-body h4 a {
    color: var(--sgc-ink);
    text-decoration: none;
}
.sgc-app .sgc-song-card-body h4 a:hover {
    color: var(--sgc-burgundy);
}
.sgc-app .sgc-song-card .sgc-song-meta {
    font-size: 0.84rem;
    color: var(--sgc-muted);
    margin: 0 0 10px;
    font-style: italic;
}
.sgc-app .sgc-song-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}
.sgc-app .sgc-song-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 14px;
    gap: 10px;
}
.sgc-app .sgc-song-card .sgc-go {
    color: var(--sgc-burgundy);
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease;
}
.sgc-app .sgc-song-card:hover .sgc-go {
    transform: translateX(3px);
}

/* --- Pills (small inline badges for meta) --- */
.sgc-app .sgc-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sgc-cream-warm);
    color: var(--sgc-ink);
    border: 1px solid var(--sgc-line);
    letter-spacing: 0.01em;
}
.sgc-app .sgc-pill-key   { background: #f3e9d4; color: #6b0036; border-color: #e8d8b5; }
.sgc-app .sgc-pill-bpm   { background: #faf6ee; color: var(--sgc-muted); }
.sgc-app .sgc-pill-diff  { color: #fff; border: none; }
.sgc-app .sgc-diff-easy  { background: #6f8a52; }
.sgc-app .sgc-diff-medium{ background: #c89b3c; color: #1a1010; }
.sgc-app .sgc-diff-hard  { background: #b04a2e; }
.sgc-app .sgc-pill-when  { background: var(--sgc-burgundy); color: white; font-weight: 600; padding: 3px 10px; }

/* --- Status headings: keep, but tighter --- */
.sgc-app .sgc-status-heading {
    margin: 28px 0 14px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sgc-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sgc-app .sgc-status-heading .sgc-count {
    background: var(--sgc-cream-warm);
    color: var(--sgc-burgundy);
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.sgc-app .sgc-status-in-probe { color: var(--sgc-status-in-probe); }
.sgc-app .sgc-status-in-probe .sgc-count { background: rgba(176, 74, 46, 0.12); color: var(--sgc-status-in-probe); }
.sgc-app .sgc-status-geplant { color: var(--sgc-status-geplant); }
.sgc-app .sgc-status-geplant .sgc-count { background: rgba(138, 107, 44, 0.12); color: var(--sgc-status-geplant); }
.sgc-app .sgc-status-repertoire { color: var(--sgc-status-repertoire); }
.sgc-app .sgc-status-repertoire .sgc-count { background: rgba(60, 107, 58, 0.12); color: var(--sgc-status-repertoire); }

/* --- Song detail HERO --- */
.sgc-app .sgc-setlist-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(95deg, rgba(147, 1, 74, 0.08), rgba(200, 155, 60, 0.10));
    border-left: 4px solid var(--sgc-burgundy);
    padding: 14px 18px;
    border-radius: 6px;
    margin: 0 0 22px;
    font-size: 0.95rem;
}
.sgc-app .sgc-setlist-banner-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.sgc-app .sgc-song-hero {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
    margin: 0 0 26px;
}
.sgc-app .sgc-song-hero-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(107, 0, 54, 0.22);
    transform: rotate(-2deg);
    transition: transform 0.4s ease;
}
.sgc-app .sgc-song-hero-cover:hover {
    transform: rotate(0deg) scale(1.02);
}
.sgc-app .sgc-song-hero-cover .sgc-cover {
    width: 100%;
    height: 100%;
}
.sgc-app .sgc-song-hero-body h1 {
    margin: 6px 0 10px;
}
.sgc-app .sgc-song-credits {
    color: var(--sgc-muted);
    font-size: 0.95rem;
    margin: 0 0 14px;
}
.sgc-app .sgc-song-credits .sgc-dot { opacity: 0.5; margin: 0 4px; }
.sgc-app .sgc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}
.sgc-app .sgc-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 11px;
    border-radius: 4px;
    background: var(--sgc-cream-warm);
    color: var(--sgc-ink);
}
.sgc-app .sgc-badge.sgc-status-repertoire { background: rgba(60, 107, 58, 0.12); color: var(--sgc-status-repertoire); }
.sgc-app .sgc-badge.sgc-status-in-probe   { background: rgba(176, 74, 46, 0.14); color: var(--sgc-status-in-probe); }
.sgc-app .sgc-badge.sgc-status-geplant    { background: rgba(138, 107, 44, 0.14); color: var(--sgc-status-geplant); }
.sgc-app .sgc-badge.sgc-status-archiv     { background: rgba(138, 131, 119, 0.18); color: var(--sgc-status-archiv); }
.sgc-app .sgc-badge-diff.sgc-diff-easy    { background: rgba(111, 138, 82, 0.18); color: #4d6238; }
.sgc-app .sgc-badge-diff.sgc-diff-medium  { background: rgba(200, 155, 60, 0.20); color: #7a5e21; }
.sgc-app .sgc-badge-diff.sgc-diff-hard    { background: rgba(176, 74, 46, 0.18); color: var(--sgc-status-in-probe); }
.sgc-app .sgc-badge-lang                  { background: rgba(147, 1, 74, 0.10); color: var(--sgc-burgundy); }

@media (max-width: 720px) {
    .sgc-app .sgc-song-hero {
        grid-template-columns: 1fr;
    }
    .sgc-app .sgc-song-hero-cover {
        max-width: 240px;
        margin: 0 auto;
        transform: none;
    }
}

/* --- Waveform under audio tracks --- */
.sgc-app .sgc-track-with-wave {
    position: relative;
    padding: 10px 14px 6px;
    border-bottom: 1px dashed var(--sgc-line);
}
.sgc-app .sgc-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.sgc-app .sgc-track-row audio {
    flex: 1;
    height: 36px;
}
.sgc-app .sgc-track-label {
    min-width: 180px;
    font-size: 0.92rem;
    color: var(--sgc-ink);
}
.sgc-app .sgc-track-wave {
    margin-top: 4px;
    height: 22px;
    pointer-events: none;
}
.sgc-app .sgc-waveform {
    width: 100%;
    height: 100%;
    fill: rgba(147, 1, 74, 0.18);
}
.sgc-track-with-wave:hover .sgc-waveform {
    fill: rgba(147, 1, 74, 0.35);
}

/* --- Member dashboard: donut card + tighter setlist --- */
.sgc-app .sgc-progress-donut-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0 18px;
}
.sgc-app .sgc-donut-lg {
    flex-shrink: 0;
}
.sgc-app .sgc-progress-donut-meta {
    flex: 1;
}
.sgc-app .sgc-progress-fraction {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 2px;
    color: var(--sgc-burgundy);
}
.sgc-app .sgc-rehearsal-when {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
}
.sgc-app .sgc-rehearsal-place {
    color: var(--sgc-muted);
    margin: 0 0 8px;
    font-size: 0.92rem;
}
.sgc-app .sgc-setlist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sgc-app .sgc-setlist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.94rem;
}
.sgc-app .sgc-setlist-state {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sgc-app .sgc-setlist-state.sgc-state-new       { background: var(--sgc-state-new); }
.sgc-app .sgc-setlist-state.sgc-state-listening { background: var(--sgc-state-listening); }
.sgc-app .sgc-setlist-state.sgc-state-learning  { background: var(--sgc-state-learning); }
.sgc-app .sgc-setlist-state.sgc-state-confident { background: var(--sgc-state-confident); }
.sgc-app .sgc-setlist-state.sgc-state-mastered  { background: var(--sgc-state-mastered); }

/* --- Heatmap for director cockpit (admin) --- */
.sgc-heatmap-card {
    background: #faf6ee;
    border: 1px solid #e4d8c4;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 14px 0 22px;
}
.sgc-heatmap-card h3 {
    font-family: 'Fraunces', Georgia, serif;
    margin: 0 0 12px;
    color: #1a1010;
}
.sgc-heatmap-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.92rem;
}
.sgc-heatmap-table th,
.sgc-heatmap-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(228, 216, 196, 0.6);
}
.sgc-heatmap-table th:first-child,
.sgc-heatmap-table td:first-child {
    text-align: left;
    font-weight: 600;
}
.sgc-heatmap-table thead th {
    background: #f3e9d4;
    color: #6b0036;
    font-weight: 700;
}
.sgc-heatmap-cell {
    position: relative;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sgc-heatmap-cell small {
    display: block;
    font-weight: 400;
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 2px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.sgc-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6f5e54;
    margin: 8px 0 0;
}
.sgc-heatmap-legend-gradient {
    flex: 1;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #c9bfb2 0%, #d8b15f 25%, #b07a3a 50%, #6f8a52 75%, #3c6b3a 100%);
}
.sgc-heatmap-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}
.sgc-heatmap-summary .card {
    background: #faf6ee;
    border-radius: 8px;
    padding: 14px 18px;
    border: 1px solid #e4d8c4;
}
.sgc-heatmap-summary .card h4 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.8rem;
    color: #93014a;
}
.sgc-heatmap-summary .card p {
    margin: 4px 0 0;
    color: #6f5e54;
    font-size: 0.85rem;
}

/* ===========================================================
   Reiter / Tabs (v1.5.0) + Mediathek-Einbindung
   =========================================================== */

/* Reiter-Leiste: auf Mobil horizontal scrollbar statt umbrechen */
.sgc-app-nav.sgc-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sgc-app-nav.sgc-tabs::-webkit-scrollbar { display: none; }

.sgc-app-nav a.sgc-tab {
    cursor: pointer;
    white-space: nowrap;
    flex: none;
}
.sgc-app-nav a.sgc-tab.is-active {
    background: var(--sgc-burgundy);
    color: var(--sgc-cream);
}

/* Panels nur umschalten, wenn JS aktiv ist – sonst bleibt alles sichtbar */
.sgc-app.sgc-tabs-on .sgc-panel:not(.is-active) { display: none; }
.sgc-app .sgc-panels { margin-top: 6px; }
/* Aktive Sektion braucht keinen großen Abstand mehr nach unten */
.sgc-app.sgc-tabs-on .sgc-section { margin-bottom: 24px; }

/* Mediathek-Player an das SCG-CD angleichen (Mustard-Gold-Akzent) */
#sgc-mediathek > h2 { margin-bottom: 14px; }
#sgc-mediathek .cm-app {
    --cm-accent: #c89b3c;
    --cm-accent-soft: rgba(200, 155, 60, 0.16);
    max-width: 100%;
    margin: 0;
}

@media (max-width: 760px) {
    .sgc-app-nav.sgc-tabs { gap: 8px; padding-bottom: 4px; }
    .sgc-app-nav a.sgc-tab { padding: 7px 13px; }
    /* Abmelden auf Mobil mitscrollen lassen statt ganz rechts wegzudrücken */
    .sgc-app-nav.sgc-tabs a.sgc-logout { margin-left: 4px; }
}
