:root {
    --ink: #172421;
    --muted: #5d6b66;
    --paper: #f7fbf8;
    --white: #ffffff;
    --teal: #21766d;
    --teal-dark: #0e4843;
    --coral: #e86f58;
    --sun: #f2b94b;
    --blue: #4e8fba;
    --line: #dce8e2;
    --shadow: 0 18px 55px rgba(18, 42, 38, .13);
    --palace-ink: #241b1c;
    --palace-paper: #fffaf5;
    --palace-rose: #7d4654;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 40;
    display: flex;
    width: min(1180px, calc(100% - 32px));
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 12px 16px;
    color: var(--white);
    background: rgba(36, 27, 28, .36);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 8px;
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.site-header.is-scrolled {
    color: var(--palace-ink);
    background: rgba(255, 250, 245, .94);
    box-shadow: 0 16px 48px rgba(36, 27, 28, .12);
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
    padding: 14px 5vw;
    color: var(--ink);
    background: rgba(247, 251, 248, .94);
    border-bottom: 1px solid rgba(220, 232, 226, .86);
    backdrop-filter: blur(16px);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand {
    flex: 0 1 auto;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    line-height: 1;
}

.brand > span:last-child,
.footer-brand > span:last-child {
    min-width: 0;
}

.brand strong,
.footer-brand strong {
    display: block;
    font-size: .95rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.brand strong {
    max-width: min(34vw, 330px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand em {
    display: block;
    max-width: min(34vw, 330px);
    overflow: hidden;
    color: inherit;
    font-size: .78rem;
    font-style: normal;
    opacity: .82;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.site-nav > a {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 8px;
    color: inherit;
    font-size: .92rem;
    text-decoration: none;
    transition: background .16s ease;
}

.site-nav > a:hover {
    background: rgba(255, 255, 255, .18);
}

.site-header.is-scrolled .site-nav > a:hover {
    background: rgba(36, 27, 28, .08);
}

.language-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.language-switch a {
    display: grid;
    min-width: 34px;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    color: inherit;
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
}

.language-switch a.is-active {
    color: var(--palace-ink);
    background: var(--white);
}

.site-header.is-scrolled .language-switch a.is-active {
    color: var(--white);
    background: var(--palace-rose);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.admin-nav,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 4px;
    color: var(--muted);
    font-weight: 700;
}

.admin-nav a:hover {
    color: var(--teal);
}

.primary-link,
.secondary-link,
.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-link {
    color: var(--white);
    background: var(--teal);
    box-shadow: 0 12px 28px rgba(33, 118, 109, .22);
}

.primary-link:hover,
.secondary-link:hover,
.icon-link:hover {
    transform: translateY(-1px);
}

.secondary-link,
.icon-link {
    color: var(--teal-dark);
    background: var(--white);
    border-color: var(--line);
}

.large {
    min-height: 50px;
    padding-inline: 22px;
}

.small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: .9rem;
}

.inverse {
    color: var(--white);
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .42);
}

.hero {
    min-height: 76vh;
    display: grid;
    align-items: end;
    gap: 34px;
    padding: 130px 5vw 34px;
    color: var(--white);
    background-color: var(--teal-dark);
    background-position: center;
    background-size: cover;
}

.hero-content {
    width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: var(--coral);
    font-size: .86rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--sun);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: 4rem;
    line-height: 1.1;
}

h2 {
    margin-bottom: 14px;
    font-size: 2.15rem;
    line-height: 1.25;
}

h3 {
    font-size: 1.2rem;
}

.hero-copy {
    max-width: 680px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, .92);
    font-size: 1.24rem;
}

.hero-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: min(920px, 100%);
}

.hero-strip span {
    min-height: 68px;
    display: grid;
    place-items: center;
    padding: 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, .92);
    border-top: 4px solid var(--sun);
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
}

.section-inner {
    width: min(1160px, 90vw);
    margin-inline: auto;
}

.about-band,
.gallery-section,
.programs-section,
.contact-section {
    padding: 82px 0;
}

.about-band {
    background: var(--white);
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 52px;
    align-items: start;
}

.about-grid > p {
    margin: 0;
    color: var(--muted);
    font-size: 1.13rem;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

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

.gallery-tile {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    background: var(--line);
    border: 0;
    border-radius: 8px;
    cursor: zoom-in;
    box-shadow: var(--shadow);
}

.gallery-tile img,
.program-card > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-tile:hover img {
    transform: scale(1.04);
}

.programs-section {
    background: var(--white);
}

.program-card {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.program-card > img {
    height: 220px;
}

.program-body {
    padding: 18px;
}

.program-body h3 {
    margin-bottom: 8px;
}

.program-body p {
    min-height: 80px;
    margin-bottom: 16px;
    color: var(--muted);
}

.program-body strong {
    display: inline-block;
    color: var(--teal-dark);
    font-size: 1.05rem;
}

.contact-section {
    background: linear-gradient(135deg, #f7fbf8 0%, #eef8f4 48%, #fff8e8 100%);
}

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form label,
.admin-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}

.contact-form input,
.contact-form textarea,
.admin-field input,
.admin-field textarea,
.link-row input {
    width: 100%;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    padding: 12px 13px;
}

.contact-form textarea,
.admin-field textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.admin-field input:focus,
.admin-field textarea:focus,
.link-row input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(33, 118, 109, .13);
}

.form-button {
    width: fit-content;
    border: 0;
}

.form-success,
.notice {
    padding: 12px 14px;
    color: var(--teal-dark);
    background: #e8f7ed;
    border: 1px solid #b9e5c7;
    border-radius: 8px;
    font-weight: 800;
}

.contact-panel {
    display: grid;
    gap: 12px;
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-panel > a,
.contact-panel > span {
    display: block;
    padding: 12px;
    color: var(--teal-dark);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
}

.contact-qr {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.contact-qr img {
    width: min(220px, 100%);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: var(--white);
}

.contact-qr small {
    color: var(--muted);
    font-weight: 900;
}

.empty-note {
    padding: 18px;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 34px 24px;
    color: var(--white);
    background: #171112;
}

.footer-brand {
    max-width: 650px;
    color: var(--white);
}

.footer-brand p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .62);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--white);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 26px;
    background: rgba(9, 20, 18, .88);
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(1100px, 92vw);
    max-height: 84vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.lightbox button {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    width: 44px;
    height: 44px;
    color: var(--white);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
}

.admin-body {
    background: #eef5f1;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel,
.admin-panel {
    width: min(1120px, 92vw);
    margin-inline: auto;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-panel {
    width: min(440px, 92vw);
}

.admin-main {
    display: grid;
    gap: 26px;
    padding: 34px 0 60px;
}

.stats-grid {
    width: min(1120px, 92vw);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stats-grid article {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stats-grid span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.stats-grid strong {
    display: block;
    color: var(--teal-dark);
    font-size: 2rem;
}

.panel-heading {
    margin-bottom: 22px;
}

.panel-heading p {
    color: var(--muted);
}

.admin-form {
    display: grid;
    gap: 24px;
}

.admin-columns,
.media-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-columns.compact {
    gap: 12px;
}

.wide {
    grid-column: 1 / -1;
}

.admin-subsection {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.subsection-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gallery-admin-list,
.link-rows,
.item-admin-list,
.message-list {
    display: grid;
    gap: 12px;
}

.gallery-admin-row,
.link-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.gallery-admin-row img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--line);
}

.link-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.item-admin-row,
.message-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.item-preview {
    min-height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: 8px;
    font-weight: 900;
}

.item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.row-actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.admin-submit {
    width: fit-content;
    border: 0;
}

.message-row {
    grid-template-columns: minmax(190px, .35fr) minmax(0, 1fr) auto;
    align-items: start;
}

.message-row strong,
.message-row span,
.message-row time {
    display: block;
}

.message-row span,
.message-row time,
.message-row p {
    color: var(--muted);
}

.message-row p {
    margin-bottom: 0;
}

.clear-form {
    margin-top: 14px;
}

@media (max-width: 980px) {
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        inset-inline-end: 0;
        display: none;
        width: min(360px, calc(100vw - 20px));
        max-height: calc(100svh - 96px);
        overflow-y: auto;
        padding: 10px;
        color: var(--palace-ink);
        background: var(--palace-paper);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
        justify-items: stretch;
    }

    .site-nav > a {
        display: flex;
        width: 100%;
        align-items: center;
    }

    .site-nav > a:hover {
        background: rgba(36, 27, 28, .08);
    }

    .language-switch {
        width: 100%;
        justify-content: center;
    }

    .menu-toggle {
        display: block;
    }

    h1 {
        font-size: 3rem;
    }

    .hero-strip,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid,
    .contact-grid,
    .admin-columns,
    .media-admin-grid,
    .message-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid,
    .program-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header {
        top: 10px;
        width: calc(100% - 20px);
        min-height: 62px;
        padding: 10px;
        gap: 10px;
    }

    .admin-header {
        padding: 12px 18px;
    }

    .brand {
        min-width: 0;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 1.35rem;
    }

    .brand strong {
        max-width: calc(100vw - 164px);
    }

    .brand em {
        display: none;
    }

    .site-nav > a {
        font-size: .92rem;
    }

    .hero {
        min-height: 720px;
        padding: 120px 20px 28px;
    }

    h1 {
        font-size: 2.35rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .hero-copy {
        font-size: 1.04rem;
    }

    .hero-strip,
    .gallery-grid,
    .program-grid,
    .stats-grid,
    .gallery-admin-row,
    .link-row,
    .item-admin-row {
        grid-template-columns: 1fr;
    }

    .section-inner {
        width: calc(100vw - 36px);
    }

    .about-band,
    .gallery-section,
    .programs-section,
    .contact-section {
        padding: 58px 0;
    }

    .program-card > img {
        height: 190px;
    }

    .login-panel,
    .admin-panel {
        width: calc(100vw - 28px);
        padding: 20px;
    }

    .site-footer {
        display: grid;
        justify-items: start;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
