/* Lights of Saddle Club South — site styles (PRD §4.8).
   Dark night-sky theme drawn from the logo: midnight navy, C9-bulb red, ice blue,
   warm white; green as an accent only. Plain CSS, mobile-first. All motion is
   decoration and stops under prefers-reduced-motion. */

/* ── Fonts (self-hosted, SIL Open Font License) ─────────────────────────── */

@font-face {
    font-family: "Berkshire Swash";
    src: url("../fonts/berkshire-swash-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Mountains of Christmas";
    src: url("../fonts/mountains-of-christmas-700-latin.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Rye";
    src: url("../fonts/rye-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
    --sky-deep: #050a1c;
    --sky: #0a1128;
    --sky-high: #16275a;
    --surface: rgba(19, 34, 74, 0.78);
    --surface-hover: rgba(27, 45, 96, 0.9);
    --border: rgba(159, 220, 245, 0.2);

    --text: #f2f6ff;
    --text-muted: #bccbea;
    --red: #e8303a;
    --red-deep: #b81f2a;
    --blue: #5fcdf5;
    --ice: #9fdcf5;
    --warm: #fff4d8;
    --green: #35b267;
    --gold: #ffd479;

    --glow-red: 0 0 14px rgba(232, 48, 58, 0.55);
    --glow-warm: 0 0 18px rgba(255, 244, 216, 0.35);

    --font-display: "Berkshire Swash", Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --radius: 18px;
    --page-width: 960px;
    --gutter: 16px;

    color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--sky);
    background-image:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(42, 63, 120, 0.85), transparent 70%),
        radial-gradient(ellipse 60% 30% at 50% 100%, rgba(216, 52, 74, 0.16), transparent 70%),
        linear-gradient(180deg, var(--sky-high) 0%, var(--sky) 40%, var(--sky-deep) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* A fixed, faint star field behind everything. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
    background-image:
        radial-gradient(1.2px 1.2px at 23px 41px, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 141px 87px, #fff 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 77px 163px, #dff3ff 50%, transparent 52%),
        radial-gradient(1px 1px at 189px 18px, #fff 50%, transparent 52%),
        radial-gradient(1.3px 1.3px at 211px 191px, #fff 50%, transparent 52%);
    background-size: 240px 240px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--warm);
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.3rem, 7vw, 3.4rem);
    text-align: center;
    margin: 0.4em 0 0.6em;
    text-shadow: 0 0 10px rgba(232, 48, 58, 0.5), 0 0 30px rgba(95, 205, 245, 0.3);
}

h2 {
    font-size: clamp(1.5rem, 4.5vw, 1.9rem);
    text-shadow: 0 0 12px rgba(255, 244, 216, 0.25);
}

p {
    margin: 0 0 0.9em;
}

a {
    color: var(--ice);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--warm);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 6px;
}

img {
    max-width: 100%;
    height: auto;
}

code {
    font-size: 0.9em;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
}

.skip-link:focus {
    left: var(--gutter);
    top: var(--gutter);
    padding: 0.6rem 1rem;
    background: var(--warm);
    color: var(--sky);
    border-radius: 8px;
}

.muted {
    color: var(--text-muted);
}

.eyebrow {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice);
}

/* ── Snow ───────────────────────────────────────────────────────────────── */
/* Two tiled layers drifting down. Each moves exactly a whole number of tiles
   per loop, so the animation never jumps. Behind the content, never over it. */

.snow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.55;
}

.snow::before,
.snow::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    will-change: transform;
}

.snow::before {
    top: -560px;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20px 30px, rgba(255, 255, 255, 0.95) 0 1.6px, transparent 2.2px),
        radial-gradient(circle at 90px 100px, rgba(255, 255, 255, 0.8) 0 1.2px, transparent 1.8px);
    background-size: 140px 140px;
    animation: snowfall 16s linear infinite;
}

.snow::after {
    top: -660px;
    bottom: 0;
    background-image:
        radial-gradient(circle at 60px 50px, rgba(255, 255, 255, 0.9) 0 2.4px, transparent 3px),
        radial-gradient(circle at 170px 160px, rgba(223, 243, 255, 0.85) 0 2px, transparent 2.6px);
    background-size: 220px 220px;
    animation: snowfall-big 24s linear infinite;
}

@keyframes snowfall {
    to { transform: translate3d(0, 560px, 0); }
}

@keyframes snowfall-big {
    to { transform: translate3d(0, 660px, 0); }
}

/* ── Bulb string ────────────────────────────────────────────────────────── */

.bulb-string {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    height: 34px;
    padding: 0 10px;
    overflow: hidden;
}

/* The wire. */
.bulb-string::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    height: 2px;
    background: #1d4a2c;
}

.bulb {
    --bulb: var(--red);
    position: relative;
    flex: none;
    width: 11px;
    height: 17px;
    margin-top: 10px;
    border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
    background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.85) 0 12%, var(--bulb) 45%);
    box-shadow: 0 0 6px 1px var(--bulb), 0 0 16px 3px color-mix(in srgb, var(--bulb) 45%, transparent);
    animation: twinkle 3.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.73s);
}

/* The socket. */
.bulb::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: #1f5a34;
}

.bulb:nth-child(even) {
    margin-top: 14px;
}

.bulb:nth-child(3n) {
    animation-duration: 2.6s;
}

.bulb:nth-child(4n + 1) {
    animation-duration: 4.1s;
}

.bulb--red { --bulb: var(--red); }
.bulb--blue { --bulb: var(--blue); }
.bulb--white { --bulb: var(--warm); }
.bulb--green { --bulb: var(--green); }

@keyframes twinkle {
    0%, 100% { opacity: 1; filter: brightness(1.15); }
    50% { opacity: 0.55; filter: brightness(0.8); }
}

/* ── Header & navigation ────────────────────────────────────────────────── */

.site-header {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(5, 10, 28, 0.85), rgba(5, 10, 28, 0));
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0.25rem var(--gutter) 0.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--warm);
    text-decoration: none;
}

.brand img {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 6px rgba(95, 205, 245, 0.45));
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.1;
}

.site-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav ul {
    display: flex;
    gap: 0.35rem;
    margin: 0;
    padding: 0.15rem 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 0.45rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--warm);
}

.site-nav a.active {
    border-color: rgba(232, 48, 58, 0.7);
    background: rgba(232, 48, 58, 0.18);
    box-shadow: var(--glow-red);
}

@media (min-width: 760px) {
    .site-nav {
        width: auto;
    }
}

/* ── Page ───────────────────────────────────────────────────────────────── */

.page {
    position: relative;
    z-index: 1;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter) 3rem;
}

.page > * + * {
    margin-top: 1.25rem;
}

.lead {
    font-size: 1.15rem;
    text-align: center;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.prose > :last-child {
    margin-bottom: 0;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
    display: block;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

@media (min-width: 640px) {
    .card {
        padding: 1.5rem 1.75rem;
    }
}

.card > :last-child {
    margin-bottom: 0;
}

.card--link {
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.card--link:hover {
    color: var(--text);
    transform: translateY(-3px);
    border-color: rgba(232, 48, 58, 0.7);
    background: var(--surface-hover);
}

.card__title {
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--warm);
}

.card__text {
    display: block;
    color: var(--text-muted);
}

.empty {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.empty__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--warm);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--red), var(--red-deep));
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--glow-red);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(232, 48, 58, 0.75);
}

.button--ghost {
    border-color: var(--ice);
    background: transparent;
    color: var(--ice);
    box-shadow: none;
}

.button--ghost:hover {
    color: var(--warm);
    box-shadow: 0 0 16px rgba(95, 205, 245, 0.35);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page > .button-row {
    justify-content: center;
}

/* ── Home ───────────────────────────────────────────────────────────────── */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding-top: 0.5rem;
    text-align: center;
}

.hero__logo {
    display: block;
    width: min(420px, 86vw);
    height: auto;
    filter: drop-shadow(0 0 24px rgba(95, 205, 245, 0.25));
}

.quick-links {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.address {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--warm);
}

/* ── Status banner ──────────────────────────────────────────────────────── */

.status {
    position: relative;
    width: 100%;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 244, 216, 0.55);
    border-radius: var(--radius);
    background: rgba(10, 17, 40, 0.82);
    text-align: center;
    box-shadow: var(--glow-warm);
}

.status__headline {
    margin: 0;
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    font-weight: 700;
    color: var(--warm);
}

.status__detail {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.status--onnow {
    border-color: var(--red);
    animation: pulse-glow 2.4s ease-in-out infinite;
}

.status--cancelled {
    border-color: rgba(188, 203, 234, 0.45);
    box-shadow: none;
}

.status--seasonover {
    border-color: var(--ice);
    box-shadow: 0 0 16px rgba(95, 205, 245, 0.3);
}

.status__live {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-bottom: 0.35rem;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
    animation: twinkle 1.2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(232, 48, 58, 0.45); }
    50% { box-shadow: 0 0 30px rgba(232, 48, 58, 0.8); }
}

/* ── Schedule ───────────────────────────────────────────────────────────── */

.hours {
    margin: 0;
}

.hours__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.hours__row:last-child {
    border-bottom: 0;
}

.hours dt {
    font-weight: 700;
}

.hours dd {
    margin: 0;
    color: var(--warm);
    font-variant-numeric: tabular-nums;
}

.exceptions {
    margin: 0;
    padding: 0;
    list-style: none;
}

.exception {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.exception:last-child {
    border-bottom: 0;
}

.exception__date {
    font-weight: 700;
}

.exception__hours {
    color: var(--warm);
}

.exception--cancelled .exception__hours {
    color: var(--red);
}

.exception__note {
    flex-basis: 100%;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Listen ─────────────────────────────────────────────────────────────── */

.radio {
    text-align: center;
}

.radio__frequency {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 16vw, 5.5rem);
    line-height: 1.05;
    color: var(--warm);
    text-shadow: 0 0 12px rgba(255, 244, 216, 0.6), 0 0 36px rgba(232, 48, 58, 0.55);
}

/* ── Songs ──────────────────────────────────────────────────────────────── */

.playlist__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
}

.playlist__title {
    margin: 0;
}

.playlist__when {
    flex-basis: 100%;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.playlist--tonight {
    border-color: rgba(232, 48, 58, 0.75);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 22px rgba(232, 48, 58, 0.35);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: var(--glow-red);
}

.songs {
    margin: 0;
    padding-left: 2.1rem;
}

.song {
    padding: 0.45rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.song:last-child {
    border-bottom: 0;
}

.song::marker {
    color: var(--ice);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.song__title {
    font-weight: 600;
}

.song__artist {
    display: block;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.song__note {
    display: block;
    color: var(--gold);
    font-size: 0.9rem;
    font-style: italic;
}

.earlier > summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--ice);
    font-weight: 600;
    text-align: center;
}

.earlier[open] > summary {
    margin-bottom: 1.25rem;
}

.earlier > .card + .card {
    margin-top: 1.25rem;
}

.other-seasons ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ── Gallery ────────────────────────────────────────────────────────────── */

.gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery__item {
    margin: 0;
}

.gallery__media {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--sky-deep);
    aspect-ratio: 16 / 9;
}

.gallery__media img,
.gallery__iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery__iframe {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.gallery__media:hover img {
    transform: scale(1.04);
}

.gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(232, 48, 58, 0.92);
    box-shadow: var(--glow-red);
}

.gallery__play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
}

.gallery__item figcaption {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gallery__year {
    margin-left: 0.4rem;
    color: var(--ice);
    font-size: 0.85rem;
}

.lightbox {
    max-width: min(94vw, 1200px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #000;
    color: var(--text);
}

.lightbox::backdrop {
    background: rgba(2, 5, 15, 0.88);
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    margin: 0 auto;
}

.lightbox__caption {
    margin: 0;
    padding: 0.6rem 1rem;
    text-align: center;
}

.lightbox__caption:empty {
    display: none;
}

.lightbox__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

/* Year filter on the public gallery. */
.year-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.year-filter a {
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.year-filter a.active {
    border-color: var(--red);
    background: rgba(232, 48, 58, 0.2);
}

/* ── Contact ────────────────────────────────────────────────────────────── */

/* The honeypot: off-screen rather than display:none, which some bots skip. */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form .button {
    margin-top: 0.25rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    position: relative;
    z-index: 1;
    padding: 2rem var(--gutter) 2.5rem;
    border-top: 1px solid var(--border);
    background: rgba(5, 10, 28, 0.6);
    color: var(--text-muted);
    text-align: center;
}

.site-footer p {
    margin: 0.25rem 0;
}

.site-footer__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
    padding: 0;
    list-style: none;
}

.site-footer__small {
    font-size: 0.9rem;
}

/* ── Admin ──────────────────────────────────────────────────────────────── */
/* Quieter than the public site: no snow or bulbs, and plain controls. */

.admin-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 10, 28, 0.85);
}

.admin-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0.6rem var(--gutter);
}

.admin-nav {
    flex: 1 1 auto;
    order: 3;
}

.admin-signout {
    margin-left: auto;
}

@media (min-width: 900px) {
    .admin-nav {
        order: 0;
        width: auto;
    }
}

.admin-page {
    padding-top: 0.5rem;
    padding-bottom: 6rem;
}

.admin-page h1 {
    text-align: left;
    font-size: clamp(2rem, 6vw, 2.6rem);
}

.admin-center {
    text-align: center;
}

.login {
    max-width: 26rem;
    margin: 2rem auto 0;
}

.login h1 {
    text-align: center;
}

.button--small {
    min-height: 36px;
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
}

.button:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Fields */

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.field--check {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    font-weight: 400;
}

.field--wide {
    flex: 1 1 18rem;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
}

.field-row > .field {
    flex: 1 1 12rem;
}

.inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inline input {
    width: 7rem;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(159, 220, 245, 0.35);
    border-radius: 10px;
    background: rgba(5, 10, 28, 0.75);
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

input:disabled {
    opacity: 0.45;
}

input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--red);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    border-color: transparent;
}

.validation-message {
    color: #ff9aa0;
    font-weight: 400;
}

.hint {
    color: var(--text-muted);
    font-size: 0.92rem;
}

fieldset.when {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem 0;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

fieldset.when legend {
    padding: 0 0.4rem;
    font-weight: 700;
}

.day-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.day-chip:has(input:checked) {
    border-color: var(--red);
    background: rgba(232, 48, 58, 0.2);
}

/* Tables */

.table-scroll {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: middle;
}

.admin-table thead th {
    color: var(--ice);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.songs-table input {
    min-width: 9rem;
}

.songs-table td:first-child {
    width: 2rem;
    color: var(--ice);
    font-variant-numeric: tabular-nums;
}

.needs-review td {
    background: rgba(255, 212, 121, 0.12);
}

.row-actions {
    white-space: nowrap;
}

/* Small buttons */

.icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
}

.icon-button:hover:not(:disabled) {
    border-color: var(--ice);
}

.icon-button:disabled {
    opacity: 0.3;
    cursor: default;
}

.icon-button--danger:hover {
    border-color: var(--red);
    color: #ff9aa0;
}

.link-button {
    padding: 0.35rem 0.4rem;
    border: 0;
    background: none;
    color: var(--ice);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.link-button--danger {
    color: #ff9aa0;
}

/* Row editors (special nights, links) */

.row-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.row-editor > .field {
    flex: 1 1 9rem;
}

.row-editor > .field--wide {
    flex: 3 1 16rem;
}

.row-editor > .field--check {
    flex: 0 0 auto;
    min-height: 44px;
}

.row-editor > .link-button {
    margin-bottom: 1rem;
}

/* Playlist editor */

.playlist-editor__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.playlist-editor__toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.playlist-editor__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--warm);
}

.playlist-editor__title::before {
    content: "▸ ";
    color: var(--ice);
    font-family: var(--font-body);
    font-size: 1rem;
}

.playlist-editor__toggle[aria-expanded="true"] .playlist-editor__title::before {
    content: "▾ ";
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.bulk {
    margin-top: 1rem;
}

.bulk > summary {
    color: var(--ice);
    font-weight: 600;
    cursor: pointer;
}

.bulk textarea {
    margin: 0.75rem 0;
}

/* Page text editor */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tab {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tab--active {
    border-color: var(--red);
    background: rgba(232, 48, 58, 0.2);
}

.editor-split {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 860px) {
    .editor-split {
        grid-template-columns: 1fr 1fr;
    }
}

.preview {
    min-height: 10rem;
}

/* Gallery editor */

.gallery-add {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 860px) {
    .gallery-add {
        grid-template-columns: 1fr 1fr;
    }
}

input[type="file"] {
    max-width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
}

.gallery-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.gallery-list__thumb {
    width: 160px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    background: var(--sky-deep);
}

.gallery-list__fields {
    flex: 1 1 16rem;
}

.gallery-list__year input {
    max-width: 8rem;
}

/* History */

.history {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 860px) {
    .history {
        grid-template-columns: 16rem 1fr;
        align-items: start;
    }
}

.history__files ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.history__file {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.55rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: none;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.history__file:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history__file--active {
    border-color: var(--red);
    background: rgba(232, 48, 58, 0.18);
}

.history__file .muted {
    font-size: 0.85rem;
    font-weight: 400;
}

.versions {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.version {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.version--active {
    background: rgba(159, 220, 245, 0.1);
}

.history__compare {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1100px) {
    .history__compare {
        grid-template-columns: 1fr 1fr;
    }
}

.history__text {
    max-height: 28rem;
    margin: 0;
    padding: 0.75rem;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(5, 10, 28, 0.75);
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Save bar and messages */

.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    padding: 0.85rem var(--gutter);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    background: rgba(5, 10, 28, 0.95);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.alert {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid;
    border-radius: 12px;
}

.alert ul {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
}

.alert p {
    margin: 0;
}

.alert--error {
    border-color: rgba(232, 48, 58, 0.8);
    background: rgba(232, 48, 58, 0.15);
}

.alert--success {
    border-color: rgba(53, 178, 103, 0.8);
    background: rgba(53, 178, 103, 0.15);
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .snow {
        display: none;
    }
}
