/* Mockup styles: Gesangverein Termen. Tokens first; they carry over to the real app. */

:root {
    --paper: #f4f8fa;
    --surface: #ffffff;
    --ink: #1b2733;
    --muted: #55636f;
    --line: #d8dfe4;
    --accent: #0b6a9f;
    --accent-dark: #084f78;
    --accent-tint: #e3f2fa;
    --sky: #2ba6de;
    --sky-light: #5cc4ee;
    --sun: #f6ae35;
    --sun-tint: #fff1da;
    --focus: #c2410c;

    /* One color per voice part: the memorable element of the design. */
    --v-s: #9a5600;
    --v-s-tint: #fdf0dc;
    --v-a: #6c3c99;
    --v-a-tint: #f1e9f8;
    --v-t: #126c66;
    --v-t-tint: #e1f3f1;
    --v-b: #2b4997;
    --v-b-tint: #e6ecfa;
    --v-all: #4a5560;
    --v-all-tint: #eceff1;

    --serif: "Alegreya", Georgia, serif;
    --sans: "Alegreya Sans", "Segoe UI", sans-serif;

    --step--1: 0.889rem;
    --step-0: 1rem;
    --step-1: 1.25rem;
    --step-2: 1.563rem;
    --step-3: 1.953rem;
    --step-4: 2.441rem;
    --step-5: 3.052rem;

    --radius-s: 6px;
    --radius-m: 12px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --t-fast: 0.2s;
    --t-mid: 0.35s;
    --max: 72rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 112.5%; /* 18px: readable for the older members */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.55;
    /* Alegreya defaults to old-style figures; times, dates and "MP3" read better lining. */
    font-variant-numeric: lining-nums;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
    /* Long German compounds ("Mitgliederbeitrag") must not overflow on phones. */
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 {
    font-size: clamp(1.9rem, 6vw, var(--step-4));
}

h2 {
    font-size: var(--step-3);
}

h3 {
    font-size: var(--step-1);
}

p {
    margin: 0 0 1em;
    max-width: 38em;
}

a {
    color: var(--accent-dark);
    text-underline-offset: 0.18em;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 3px;
}

img {
    max-width: 100%;
    display: block;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

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

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

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4.2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-1);
    line-height: 1.05;
    flex-shrink: 0;
}

.brand small {
    display: block;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.62em;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.brand-mark {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    padding: 0.45rem 0.7rem;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.main-nav a {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-s);
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.main-nav a:hover {
    background: var(--paper);
}

.main-nav a[aria-current="page"] {
    color: var(--accent-dark);
    box-shadow: inset 0 -2px 0 var(--accent);
    border-radius: 0;
}

.main-nav .nav-member a {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-s);
}

.main-nav .nav-member a:hover {
    background: var(--accent-dark);
}

.member-strip {
    background: var(--ink);
    color: #e7ecf0;
    font-size: var(--step--1);
}

.member-strip .wrap {
    display: flex;
    gap: 1rem;
    align-items: center;
    min-height: 2.2rem;
}

.member-strip a {
    color: #fff;
    margin-left: auto;
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows var(--t-mid) var(--ease);
    }

    .main-nav > ul {
        overflow: hidden;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        padding: 0 1rem;
    }

    .site-header.is-open .main-nav {
        grid-template-rows: 1fr;
    }

    .site-header.is-open .main-nav > ul {
        padding: 0.5rem 1rem 1rem;
    }

    .main-nav a[aria-current="page"] {
        box-shadow: inset 3px 0 0 var(--accent);
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
        transform var(--t-fast) var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-quiet {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.btn-quiet:hover {
    border-color: var(--ink);
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Public home ---------- */

/* A soft echo of the logo's sunburst, so the page feels like the logo without copying it. */
.hero {
    background:
        radial-gradient(circle at 24% 45%, rgba(246, 174, 53, 0.28), transparent 38%),
        repeating-conic-gradient(from 0deg at 24% 45%, rgba(43, 166, 222, 0.09) 0deg 7deg, transparent 7deg 14deg),
        linear-gradient(180deg, #e9f5fc, var(--paper));
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

.logo-play {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transform: rotate(-2deg);
    box-shadow: 0 18px 40px rgba(11, 106, 159, 0.25);
    transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.logo-play:hover {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: 0 24px 48px rgba(11, 106, 159, 0.3);
}

.logo {
    display: block;
    width: 100%;
    height: auto;
}

.logo-hint {
    margin: 1rem 0 0;
    text-align: center;
    font-size: var(--step--1);
    color: var(--muted);
}

.hero h1 {
    max-width: 22ch;
}

.hero-lead {
    font-size: var(--step-1);
    color: #3d4a55;
    max-width: 30em;
}

.rehearsal {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin: 1.6rem 0;
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--sun);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
    max-width: 30rem;
}

.rehearsal strong {
    display: block;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.upcoming h2 {
    margin-bottom: 1rem;
}

.event-row {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2rem;
}

.event-row .event {
    border-top: 3px solid var(--sun);
}

/* Logo animation. The logo is redrawn as separate elements (tools/vectorize/redraw.py): the sun
   rises as a whole circle behind the church, the light rays then brighten, the staff draws from
   left to right and the notes arrive one by one. Afterwards only the rays breathe gently. */
@media (prefers-reduced-motion: no-preference) {
    .logo .logo-sun {
        transform-box: view-box;
        animation: sun-rise 1.8s var(--ease) both;
    }

    .logo .logo-rays {
        animation:
            rays-in 1.2s var(--ease) 1.2s both,
            rays-breathe 6s ease-in-out 2.4s infinite;
    }

    .logo .logo-staff {
        animation: staff-draw 1.4s var(--ease) 0.4s both;
    }

    .logo .logo-note {
        transform-box: fill-box;
        transform-origin: center bottom;
        animation: note-in 0.5s var(--ease) both;
        animation-delay: calc(1.6s + var(--i) * 0.18s);
    }

    /* After the entrance the notes keep no animation, so singing doesn't replay it. */
    .logo-play.is-ready .logo-note {
        animation: none;
    }

    .logo-play.is-ready .logo-note.is-singing {
        animation: note-hop 0.42s var(--ease);
    }
}

.logo .logo-note.is-singing,
.logo .logo-note.is-singing * {
    fill: var(--sun);
}

@keyframes sun-rise {
    from {
        transform: translateY(700px);
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

/* Color, not opacity: the rays start in the sky color and light up once the sun is up. */
@keyframes rays-in {
    from {
        fill: #2daae2;
    }
}

@keyframes rays-breathe {
    50% {
        fill: #6fd2f4;
    }
}

@keyframes staff-draw {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes note-in {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.85);
    }
}

@keyframes note-hop {
    40% {
        transform: translateY(-60px);
    }
}

/* Moments: photos and a voice from the choir carry the emotion, not big type. */
.moments {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    margin-top: 1.5rem;
}

.moment {
    margin: 0;
    position: relative;
    border-radius: var(--radius-m);
    overflow: hidden;
    min-height: 12rem;
    background: linear-gradient(160deg, var(--c1, #5d7b8f), var(--c2, #1b2733));
    color: #fff;
    display: flex;
    align-items: flex-end;
}

.moment:first-child {
    grid-row: span 2;
    min-height: 25rem;
}

.moment-wide {
    grid-column: span 2;
}

.moment figcaption {
    padding: 1rem 1.1rem;
    background: linear-gradient(0deg, rgba(10, 20, 30, 0.7), transparent);
    width: 100%;
}

.moment figcaption small {
    display: block;
    opacity: 0.85;
}

.moment .placeholder-note {
    position: absolute;
    top: 0.8rem;
    left: 1rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.quote {
    margin: 0;
    padding: 1.6rem 1.5rem;
    border-radius: var(--radius-m);
    background: var(--sun-tint);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote blockquote {
    margin: 0 0 0.8rem;
    font-family: var(--serif);
    font-size: var(--step-1);
    line-height: 1.4;
}

.quote figcaption {
    color: var(--muted);
    font-size: var(--step--1);
}

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.event {
    display: grid;
    grid-template-columns: 3.6rem 1fr;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--line);
}

.event-date {
    text-align: center;
    font-family: var(--serif);
    line-height: 1;
}

.event-date .day {
    display: block;
    font-size: var(--step-4);
    font-weight: 700;
    color: var(--accent);
}

.event-date .month {
    display: block;
    font-family: var(--sans);
    font-size: var(--step--1);
    color: var(--muted);
    margin-top: 0.2rem;
}

.event h3 {
    margin: 0.1rem 0 0.2rem;
}

.event p {
    margin: 0;
    color: var(--muted);
    font-size: var(--step--1);
}

.tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.08rem 0.5rem;
    border-radius: 99px;
    background: var(--v-all-tint);
    color: var(--v-all);
    margin-left: 0.35rem;
    vertical-align: 0.15em;
}

.tag-intern {
    background: var(--ink);
    color: #fff;
}

.section {
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.news-item time {
    color: var(--muted);
    font-size: var(--step--1);
}

.news-item h3 {
    margin-top: 0.3rem;
}

.news-item.featured h3 {
    font-size: var(--step-2);
}

.photo-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-m);
    background:
        linear-gradient(160deg, rgba(27, 39, 51, 0.08), rgba(27, 39, 51, 0.22)),
        repeating-linear-gradient(45deg, #e6ebee 0 12px, #edf1f3 12px 24px);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: var(--step--1);
    margin-bottom: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.join-band {
    background:
        repeating-conic-gradient(from 0deg at 85% 50%, rgba(255, 255, 255, 0.06) 0deg 7deg, transparent 7deg 14deg),
        var(--accent);
    color: #fff;
}

.join-band .wrap {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2.5rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
    align-items: center;
}

.join-band p {
    color: #e3f1f9;
}

.join-band .btn-primary {
    background: var(--sun);
    color: var(--ink);
}

.join-band .btn-primary:hover {
    background: #ffc45e;
}

.join-steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
}

.join-steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.2rem 1fr;
    gap: 0.8rem;
    padding: 0.6rem 0;
}

.join-steps li::before {
    content: counter(step);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 2px solid var(--sun);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.site-footer {
    padding: 2.5rem 0;
    font-size: var(--step--1);
    color: var(--muted);
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
}

.site-footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

/* ---------- Member area ---------- */

.page-head {
    padding: 2.5rem 0 1.5rem;
}

.page-head p {
    color: var(--muted);
    font-size: var(--step-1);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 1.4rem;
}

.dash {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.dash .panel h2 {
    font-size: var(--step-2);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.quick-links a {
    display: block;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.quick-links a span {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: var(--step--1);
}

.quick-links a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.new-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.new-list li {
    padding: 0.6rem 0;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.new-list time {
    margin-left: auto;
    color: var(--muted);
    font-size: var(--step--1);
}

/* ---------- Voice filter ---------- */

.voice-bar {
    position: sticky;
    top: 4.2rem;
    z-index: 10;
    background: rgba(245, 247, 248, 0.94);
    backdrop-filter: blur(6px);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

.voice-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    align-items: center;
}

.voice-label {
    font-weight: 700;
}

.voice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.voice-btn {
    --c: var(--v-all);
    --tint: var(--v-all-tint);
    font: inherit;
    font-weight: 700;
    min-width: 3rem;
    min-height: 2.75rem;
    padding: 0.3rem 0.85rem;
    border-radius: 99px;
    border: 2px solid var(--c);
    background: var(--surface);
    color: var(--c);
    cursor: pointer;
    transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
        transform var(--t-fast) var(--ease);
}

.voice-btn:hover {
    background: var(--tint);
}

.voice-btn[aria-pressed="true"] {
    background: var(--c);
    color: #fff;
}

.voice-btn:active {
    transform: scale(0.96);
}

.voice-sub {
    display: grid;
    grid-template-columns: 0fr;
    transition: grid-template-columns var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
    opacity: 0;
}

.voice-sub.is-open {
    grid-template-columns: 1fr;
    opacity: 1;
}

.voice-sub > div {
    overflow: hidden;
    display: flex;
    gap: 0.4rem;
    padding: 2px;
}

.voice-sub .voice-btn {
    min-width: 2.75rem;
    padding: 0.2rem 0.6rem;
    border-width: 1.5px;
}

.voice-reset {
    background: none;
    border: none;
    font: inherit;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    padding: 0.3rem;
}

.voice-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: var(--step--1);
    color: var(--muted);
}

/* ---------- Üben ---------- */

.ueben-layout {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: 2rem;
    padding: 1.5rem 1rem 4rem;
}

/* Grid children default to min-width: auto and would push wide content past the viewport. */
.ueben-layout > *,
.dash > *,
.fee > * {
    min-width: 0;
}

.programme-nav h2 {
    font-size: var(--step-1);
}

.programme-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.programme-nav button {
    width: 100%;
    text-align: left;
    font: inherit;
    background: none;
    border: none;
    border-radius: var(--radius-s);
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    color: var(--ink);
    transition: background-color var(--t-fast) var(--ease);
}

.programme-nav button span {
    display: block;
    font-size: var(--step--1);
    color: var(--muted);
}

.programme-nav button:hover {
    background: var(--surface);
}

.programme-nav button[aria-pressed="true"] {
    background: var(--surface);
    box-shadow: inset 3px 0 0 var(--accent);
    font-weight: 700;
}

.search {
    width: 100%;
    font: inherit;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--surface);
    margin-bottom: 1rem;
}

.song {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: opacity var(--t-mid) var(--ease);
}

.song[hidden] {
    display: none;
}

.song-head {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 1rem 1.2rem 0.4rem;
    flex-wrap: wrap;
}

.song-head h3 {
    margin: 0;
}

.song-head h3 a {
    color: var(--ink);
    text-decoration: none;
}

.song-head h3 a:hover {
    text-decoration: underline;
}

.song-order {
    font-family: var(--serif);
    color: var(--accent);
    font-weight: 700;
    min-width: 1.5rem;
}

.song-meta {
    color: var(--muted);
    font-size: var(--step--1);
}

.song-docs {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-link {
    font-size: var(--step--1);
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
}

.doc-link:hover {
    border-color: var(--ink);
}

.recs {
    list-style: none;
    margin: 0;
    padding: 0.2rem 0.6rem 0.8rem;
}

.rec {
    display: grid;
    grid-template-columns: 5.2rem 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-s);
    animation: rec-in var(--t-mid) var(--ease);
}

.rec[hidden] {
    display: none;
}

.rec.is-best {
    background: var(--paper);
}

@keyframes rec-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

.rec-voices {
    display: flex;
    gap: 0.25rem;
}

.vchip {
    --c: var(--v-all);
    --tint: var(--v-all-tint);
    display: inline-grid;
    place-items: center;
    min-width: 2.2rem;
    height: 1.7rem;
    padding: 0 0.4rem;
    border-radius: 99px;
    background: var(--tint);
    color: var(--c);
    font-weight: 700;
    font-size: 0.85rem;
}

.player {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    min-width: 0;
}

.play {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: none;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.play:hover {
    background: var(--accent);
}

.play:active {
    transform: scale(0.94);
}

.play svg {
    width: 1rem;
    height: 1rem;
}

.play .i-pause {
    display: none;
}

.is-playing .play .i-play {
    display: none;
}

.is-playing .play .i-pause {
    display: block;
}

.track {
    min-width: 0;
}

.track-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.bar {
    height: 5px;
    background: var(--line);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.3rem;
}

.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: inherit;
}

.rec-tools {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.tool {
    font: inherit;
    font-size: var(--step--1);
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    color: var(--ink);
    text-decoration: none;
    transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.tool:hover {
    border-color: var(--ink);
}

.tool[aria-pressed="true"] {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.time {
    font-variant-numeric: tabular-nums lining-nums;
    color: var(--muted);
    font-size: var(--step--1);
}

.empty-note {
    padding: 0.4rem 1.2rem 1rem;
    color: var(--muted);
    font-size: var(--step--1);
    margin: 0;
}

.tone-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.6rem;
}

.tone {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
}

.tone .play {
    width: 2.2rem;
    height: 2.2rem;
    background: var(--accent);
}

.tone small {
    display: block;
    color: var(--muted);
}

.youtube-placeholder {
    margin: 0 1.2rem 1rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-s);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--step--1);
    color: var(--muted);
}

/* Work detail */

.parts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.part {
    border-top: 1px solid var(--line);
}

.part summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    font-weight: 700;
}

.part summary::-webkit-details-marker {
    display: none;
}

.chevron {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    transition: transform var(--t-mid) var(--ease);
}

details[open] > summary .chevron {
    transform: rotate(180deg);
}

details > .details-body {
    animation: reveal var(--t-mid) var(--ease);
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* ---------- Photos ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

.chip-btn {
    font: inherit;
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    color: var(--ink);
    transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.chip-btn[aria-pressed="true"] {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.year-group {
    margin-bottom: 2.5rem;
}

.year-group h2 {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    font-size: var(--step-3);
}

.year-group h2 small {
    font-family: var(--sans);
    font-weight: 400;
    font-size: var(--step--1);
    color: var(--muted);
}

.albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1.2rem;
}

.album {
    text-decoration: none;
    color: var(--ink);
}

.album .cover {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-m);
    overflow: hidden;
    position: relative;
    margin-bottom: 0.6rem;
}

.album .cover div {
    position: absolute;
    inset: 0;
    transition: transform var(--t-mid) var(--ease);
}

.album:hover .cover div {
    transform: scale(1.04);
}

.album .count {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    background: rgba(27, 39, 51, 0.8);
    color: #fff;
    border-radius: 99px;
    padding: 0.05rem 0.55rem;
    font-size: 0.8rem;
}

.album strong {
    display: block;
}

.album span.muted {
    font-size: var(--step--1);
}

.album[hidden] {
    display: none;
}

/* ---------- Fee / QR ---------- */

.fee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.fee {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    align-items: start;
}

.fee h2 {
    font-size: var(--step-2);
    margin-bottom: 0.2rem;
}

.amount {
    font-family: var(--serif);
    font-size: var(--step-4);
    font-weight: 700;
    line-height: 1;
    margin: 0.4rem 0 0.8rem;
}

.qr {
    width: 10rem;
    height: 10rem;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
}

.iban-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.iban {
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums lining-nums;
}

.copied {
    color: var(--v-t);
    font-weight: 700;
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}

.copied.is-visible {
    opacity: 1;
}

/* ---------- Documents ---------- */

.doc-year {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    margin-bottom: 0.75rem;
}

.doc-year summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 700;
}

.doc-year summary::-webkit-details-marker {
    display: none;
}

.doc-list {
    list-style: none;
    margin: 0;
    padding: 0 1.2rem 1rem;
}

.doc-list li {
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
    align-items: baseline;
}

.doc-list .muted {
    margin-left: auto;
    font-size: var(--step--1);
}

/* ---------- Login ---------- */

.login {
    max-width: 26rem;
    margin: 4rem auto;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.4rem;
}

.tabs button {
    flex: 1;
    font: inherit;
    font-weight: 700;
    background: none;
    border: none;
    padding: 0.7rem;
    cursor: pointer;
    color: var(--muted);
    box-shadow: inset 0 -2px 0 transparent;
    transition: box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.tabs button[aria-selected="true"] {
    color: var(--ink);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.field input,
.field select {
    width: 100%;
    font: inherit;
    padding: 0.65rem 0.8rem;
    border: 1px solid #b9c4cc;
    border-radius: var(--radius-s);
    background: #fff;
}

.field .help {
    font-size: var(--step--1);
    color: var(--muted);
    margin-top: 0.3rem;
}

/* ---------- Edit mode (content manager) ---------- */

.edit-bar {
    background: #fff8d6;
    border-bottom: 1px solid #e8d77a;
    font-size: var(--step--1);
}

.edit-bar .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    min-height: 3rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.edit-bar strong {
    margin-right: 0.6rem;
}

.edit-bar .btn {
    padding: 0.35rem 0.8rem;
    font-size: var(--step--1);
}

.edit-bar .end {
    margin-left: auto;
}

.editable {
    position: relative;
    outline: 2px dashed transparent;
    outline-offset: 6px;
    border-radius: 4px;
    transition: outline-color var(--t-fast) var(--ease);
}

.editable:hover {
    outline-color: #d9b929;
}

.pencil {
    position: absolute;
    top: -0.7rem;
    right: -0.7rem;
    z-index: 2;
    background: #f2d33c;
    color: var(--ink);
    border: none;
    border-radius: 99px;
    padding: 0.25rem 0.7rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(27, 39, 51, 0.2);
    transition: transform var(--t-fast) var(--ease);
}

.pencil:hover {
    transform: translateY(-1px);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(27, 39, 51, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease);
    z-index: 40;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(46rem, 100%);
    background: var(--surface);
    z-index: 41;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(27, 39, 51, 0.18);
}

.drawer-open .drawer {
    transform: none;
}

.drawer-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.drawer header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line);
}

.drawer header h2 {
    margin: 0;
    font-size: var(--step-2);
}

.drawer-close {
    margin-left: auto;
}

.drawer-body {
    overflow: auto;
    padding: 1.2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    flex: 1;
}

.drawer footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    align-items: center;
}

.rte-toolbar {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid #b9c4cc;
    border-bottom: none;
    border-radius: var(--radius-s) var(--radius-s) 0 0;
    background: var(--paper);
}

.rte-toolbar button {
    font: inherit;
    min-width: 2.2rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.rte-toolbar button:hover {
    border-color: var(--line);
    background: #fff;
}

.rte {
    min-height: 12rem;
    padding: 0.8rem;
    border: 1px solid #b9c4cc;
    border-radius: 0 0 var(--radius-s) var(--radius-s);
    background: #fff;
}

.rte:focus {
    outline: 3px solid var(--focus);
    outline-offset: 0;
}

.preview-frame {
    background: var(--paper);
    border-radius: var(--radius-m);
    padding: 1rem;
    border: 1px solid var(--line);
}

.preview-frame .label {
    font-size: var(--step--1);
    color: var(--muted);
    margin-bottom: 0.6rem;
}

/* Upload (new work) */

.upload-layout {
    max-width: 52rem;
    padding-bottom: 4rem;
}

.dropzone {
    border: 2px dashed #b9c4cc;
    border-radius: var(--radius-m);
    padding: 1.6rem;
    text-align: center;
    background: var(--surface);
    margin: 1rem 0 1.5rem;
    transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.dropzone:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
}

.file-rows {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.file-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    margin-bottom: 0.6rem;
    transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.file-row.is-missing {
    border-color: var(--accent);
    background: var(--accent-tint);
}

.file-name {
    font-weight: 700;
    word-break: break-word;
}

.file-info {
    font-size: var(--step--1);
    color: var(--muted);
}

.file-row .voice-group {
    grid-column: 1 / -1;
    gap: 0.5rem 1.1rem;
}

.voice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.field input[type="checkbox"] {
    width: auto;
}

.file-row .voice-btn {
    min-height: 2.3rem;
    min-width: 2.6rem;
    padding: 0.1rem 0.55rem;
    font-size: 0.9rem;
    border-width: 1.5px;
}

.missing-msg {
    grid-column: 1 / -1;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: var(--step--1);
    margin: 0;
}

.convert {
    font-size: var(--step--1);
    color: var(--v-t);
    font-weight: 700;
}

.save-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Voice colors last: they must override the defaults of .voice-btn and .vchip. */

[data-v="S"] {
    --c: var(--v-s);
    --tint: var(--v-s-tint);
}

[data-v="A"] {
    --c: var(--v-a);
    --tint: var(--v-a-tint);
}

[data-v="T"] {
    --c: var(--v-t);
    --tint: var(--v-t-tint);
}

[data-v="B"] {
    --c: var(--v-b);
    --tint: var(--v-b-tint);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .hero-grid,
    .event-row,
    .moments,
    .join-band .wrap,
    .dash,
    .news-grid,
    .drawer-body {
        grid-template-columns: 1fr;
    }

    .ueben-layout {
        grid-template-columns: 1fr;
        padding-top: 1rem;
    }

    .programme-nav ul {
        display: flex;
        gap: 0.3rem;
        overflow-x: auto;
        margin-bottom: 1rem;
        padding-bottom: 0.3rem;
    }

    .programme-nav button {
        white-space: nowrap;
        border: 1px solid var(--line);
        background: var(--surface);
    }

    .programme-nav button[aria-pressed="true"] {
        box-shadow: inset 0 -3px 0 var(--accent);
    }

    .programme-nav h2 {
        display: none;
    }

    .voice-bar {
        top: 4.2rem;
        padding: 0.6rem 0;
    }

    /* The bar stays sticky on phones, so it must stay short: the hint only shows until a voice is chosen. */
    .voice-label,
    .voice-bar.has-voice .voice-hint {
        display: none;
    }

    .voice-btn {
        min-height: 2.5rem;
        padding: 0.2rem 0.7rem;
    }

    .edit-bar .wrap {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .edit-bar .btn {
        white-space: nowrap;
    }

    .rec {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .rec-tools .time {
        display: none;
    }

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

    .hero-grid {
        gap: 2rem;
        padding-top: 2rem;
    }

    .logo-play {
        max-width: 17rem;
        margin: 0 auto;
    }

    .moment:first-child {
        grid-row: auto;
        min-height: 16rem;
    }

    .moment-wide {
        grid-column: auto;
    }
}

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