/* ===== Color palette ===== */
:root {
    --white: #FFFFFF;
    --light-gray: #C0C4C7;
    --mid-gray: #A0A4A8;
    --dark-gray: #7B7F83;
    --charcoal: #4B4F54;
    --green: #2f7d32;
    --bg: #F4F5F6;
    --shadow: 0 2px 12px rgba(75, 79, 84, 0.08);
    --shadow-hover: 0 6px 24px rgba(75, 79, 84, 0.14);
    --radius: 14px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --player-h: 130px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--charcoal);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, .btn { font-family: inherit; cursor: pointer; border: none; outline: none; }

/* ===== Header ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}
.logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
.logo span { color: inherit; font-weight: inherit; }
.logo b,
.logo strong { font-weight: 800; }
.logo i,
.logo em { font-style: italic; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark-gray);
    position: relative;
    padding: 0.2rem 0;
    transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--charcoal); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: var(--charcoal);
    transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 6px;
    border-radius: 6px;
}
.hamburger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--light-gray);
    padding: 0.75rem 1.25rem 1.25rem;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    font-weight: 500;
    color: var(--dark-gray);
    border-bottom: 1px solid var(--bg);
}

/* ===== Main ===== */
.main {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 2.5rem;
    width: 100%;
}
.page-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--charcoal);
}
.page-subtitle {
    color: var(--dark-gray);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* ===== Pieces list — one-line cards ===== */
.pieces-grid {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.piece-card {
    background: var(--white);
    border-radius: 10px;
    padding: 0.95rem 1.1rem 0.95rem 1.2rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 52px;
}
.piece-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--light-gray);
    transition: background var(--transition), width var(--transition);
}
.piece-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--light-gray);
}
.piece-card:hover::before {
    background: var(--charcoal);
    width: 4px;
}
.piece-card:active {
    transform: translateY(0);
}

.piece-card h3 {
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact meta icons + counts — right side */
.piece-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.piece-meta .item {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.78rem;
    color: var(--dark-gray);
    font-weight: 500;
}
.piece-meta .item .icon {
    font-size: 0.88rem;
    line-height: 1;
    opacity: 0.85;
}
.piece-meta .item .num {
    font-variant-numeric: tabular-nums;
}

/* ===== Piece detail ===== */
.piece-header { margin-bottom: 1.5rem; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    transition: color var(--transition);
}
.back-link:hover { color: var(--charcoal); }

.section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--charcoal);
}

.section-title .hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--mid-gray);
}

/* Audio track buttons */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.audio-track-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    text-align: left;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    transition: background var(--transition), border-color var(--transition);
    color: var(--charcoal);
}
.audio-track-btn:hover {
    background: #eef0f1;
    border-color: var(--light-gray);
}
.audio-track-btn.playing {
    background: #e8eaeb;
    border-color: var(--mid-gray);
}
.audio-track-btn .play-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.audio-track-btn.playing .play-icon {
    background: var(--dark-gray);
}
.audio-track-btn .track-name {
    font-size: 0.92rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gallery */
.gallery-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--bg);
}
.gallery-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: pan-y;
}
.gallery-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem;
}
.gallery-slide img {
    max-height: 68vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: opacity 0.2s;
}
.gallery-slide img:hover {
    opacity: 0.92;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--charcoal);
    transition: background var(--transition), transform var(--transition);
    z-index: 5;
}
.gallery-nav:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.06);
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
}
.gallery-dots button {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--light-gray);
    transition: background var(--transition), transform var(--transition);
}
.gallery-dots button.active {
    background: var(--charcoal);
    transform: scale(1.2);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(20, 22, 24, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(6px);
    pointer-events: none;
}
.lightbox[hidden] {
    display: none !important;
    pointer-events: none !important;
}
.lightbox.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
/* when player is open — lightbox occupies only space ABOVE the player */
body.has-sticky-player .lightbox.open {
    bottom: var(--player-h);
}
.lightbox-img {
    max-width: 96vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    user-select: none;
}
body.has-sticky-player .lightbox-img {
    max-height: calc(100% - 16px);
    max-width: min(96vw, 100%);
}
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sticky waveform player */
.sticky-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3500; /* above lightbox so notes don't cover audio */
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 -6px 28px rgba(75, 79, 84, 0.16);
    border-top: 1px solid var(--light-gray);
    padding: 0.75rem 0.9rem 0.8rem;
    transform: translateY(110%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.sticky-player[hidden] {
    display: none !important;
    pointer-events: none !important;
}
.sticky-player.open {
    transform: translateY(0);
    pointer-events: auto;
}
body.has-sticky-player {
    padding-bottom: var(--player-h);
}

.sp-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 102px;
}

.sp-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--charcoal);
    color: #fff;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.sp-play:hover {
    background: var(--dark-gray);
    transform: scale(1.05);
}
.sp-play:active {
    transform: scale(0.96);
}

.sp-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
}

.sp-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

#sp-wave {
    width: 100%;
    height: 56px;
    display: block;
    cursor: pointer;
    border-radius: 4px;
    touch-action: none;
}

.sp-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--dark-gray);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sp-loop,
.sp-close {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--charcoal);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    border: none;
    padding: 0;
    line-height: 1;
}
.sp-loop:hover,
.sp-close:hover {
    background: var(--light-gray);
    transform: scale(1.05);
}
.sp-loop:active,
.sp-close:active {
    transform: scale(0.95);
}
.sp-loop.active {
    background: var(--charcoal);
    color: #fff;
}
.sp-close {
    font-size: 1.5rem;
}

@media (max-width: 480px) {
    .sticky-player {
        padding: 0.7rem 0.7rem 0.75rem;
    }
    .sp-inner {
        min-height: 96px;
        gap: 0.5rem;
    }
    .sp-play {
        width: 58px;
        height: 58px;
        font-size: 1.25rem;
    }
    .sp-loop, .sp-close {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    .sp-close { font-size: 1.4rem; }
    .sp-title { font-size: 0.88rem; }
    #sp-wave { height: 48px; }
    body.has-sticky-player { padding-bottom: var(--player-h); }
    :root { --player-h: 120px; }
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.35rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--charcoal);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--dark-gray);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(75,79,84,0.22);
}
.btn-secondary {
    background: var(--bg);
    color: var(--charcoal);
    border: 1px solid var(--light-gray);
}
.btn-secondary:hover { background: var(--light-gray); }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.video-part-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
.video-part-badge {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 999px;
    background: var(--white);
    color: var(--charcoal);
    cursor: pointer;
    font: inherit;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.video-part-badge:hover,
.video-part-badge.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}
.video-part-frame[hidden] { display: none; }

/* About */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}
.about-title {
    text-align: left;
}
.about-header-photo {
    margin: 0 auto 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 100%;
}
.about-header-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.about-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: 100%;
    text-align: left;
    margin: 0 auto;
}
.about-content h2 { margin-bottom: 0.9rem; color: var(--charcoal); }
.about-content p { margin-bottom: 0.9rem; color: var(--dark-gray); }
.about-content ul { margin: 0.9rem 0 0.9rem 1.4rem; color: var(--dark-gray); }

.about-gallery-section {
    margin-top: 2.5rem;
    text-align: center;
}
.about-gallery-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--charcoal);
}
.about-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.about-gallery-item {
    display: block;
    width: 150px;
    max-width: calc(50% - 0.4rem);
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    cursor: zoom-in;
    aspect-ratio: 1;
}
.about-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.about-gallery-item:hover img {
    transform: scale(1.05);
}
@media (max-width: 480px) {
    .about-gallery-item {
        width: calc(50% - 0.4rem);
    }
    .about-header-img {
        max-height: 260px;
    }
}

/* Footer */
.footer {
    background: var(--charcoal);
    color: var(--light-gray);
    padding: 1.5rem 1.25rem;
    margin-top: auto;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
}
.footer-credit {
    margin: 0;
    font-size: 0.8rem;
    color: var(--light-gray);
}
.footer-credit .heart {
    color: #e53935;
    font-size: 1.05em;
}
.footer-author {
    color: var(--light-gray);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-author:hover {
    color: var(--white);
    text-decoration: none;
}
.footer a { color: var(--light-gray); transition: color var(--transition); text-decoration: none; }
.footer a:hover { color: var(--white); }

.admin-btn {
    background: transparent;
    border: 1px solid var(--dark-gray);
    color: var(--light-gray);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: all var(--transition);
}
.admin-btn:hover {
    background: var(--dark-gray);
    color: var(--white);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(75, 79, 84, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    backdrop-filter: blur(3px);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--white);
    border-radius: 14px;
    padding: 1.75rem;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.18);
    transform: scale(0.94) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal h2 { font-size: 1.25rem; margin-bottom: 1.1rem; text-align: center; }
.form-group { margin-bottom: 0.9rem; }
.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--dark-gray);
}
.form-group input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus {
    border-color: var(--charcoal);
    box-shadow: 0 0 0 3px rgba(75,79,84,0.12);
    outline: none;
}
.modal-actions { display: flex; gap: 0.65rem; margin-top: 1.25rem; }
.modal-actions .btn { flex: 1; justify-content: center; }
.error-msg {
    color: #c0392b;
    font-size: 0.88rem;
    margin-top: 0.65rem;
    text-align: center;
    display: none;
}
.error-msg.show { display: block; }

/* Admin */
.admin-bar {
    position: sticky;
    top: 0;
    z-index: 4000;
    background: var(--charcoal);
    color: var(--white);
    padding: 0.55rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.admin-bar .btn {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    font-size: 0.82rem;
    padding: 0.35rem 0.8rem;
}
.admin-bar .btn:hover { background: rgba(255,255,255,0.2); }

.admin-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
}
.admin-table th, .admin-table td {
    padding: 0.55rem 0.65rem;
    text-align: left;
    border-bottom: 0;
}
.admin-table tbody tr:not(:last-child) {
    background: linear-gradient(to right, transparent 2.5%, var(--light-gray) 2.5%, var(--light-gray) 97.5%, transparent 97.5%) bottom / 100% 1px no-repeat;
}
.admin-table tbody tr.row-chosen:not(:last-child) td {
    border-bottom: 1px solid var(--light-gray);
}
.admin-table th {
    background: var(--bg);
    font-weight: 600;
}
.admin-table .actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.admin-table td.actions > .btn-sm,
.admin-table td.actions form .btn-sm {
    width: 2.25rem;
    height: 2rem;
    padding: 0;
    justify-content: center;
}
.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    border-radius: 6px;
}
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-danger.btn-sm {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0;
    justify-content: center;
    flex: 0 0 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
.form-grid .full { grid-column: 1 / -1; }
.media-section-rows { grid-column: 1 / -1; }
textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.65rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}
textarea:focus {
    border-color: var(--charcoal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(75,79,84,0.12);
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--dark-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .page-title { font-size: 1.4rem; }
    .form-grid { grid-template-columns: 1fr; }
    .gallery-nav { width: 36px; height: 36px; font-size: 1.15rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .piece-card { padding: 1rem 1.05rem 1rem 1.15rem; }
    .piece-card h3 { font-size: 1.08rem; }
    .piece-meta { gap: 0.55rem; }
    .piece-meta .item { font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .main { padding: 1.15rem 1rem 2rem; }
    .section { padding: 1.1rem; }
    .modal { padding: 1.35rem; }
    .piece-card {
        padding: 1.05rem 1rem 1.05rem 1.1rem;
        min-height: 56px;
    }
    .piece-card h3 {
        white-space: normal;
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.piece-card { animation: fadeIn 0.4s ease backwards; }
.piece-card:nth-child(1) { animation-delay: 0.03s; }
.piece-card:nth-child(2) { animation-delay: 0.06s; }
.piece-card:nth-child(3) { animation-delay: 0.09s; }
.piece-card:nth-child(4) { animation-delay: 0.12s; }
.piece-card:nth-child(5) { animation-delay: 0.15s; }
.piece-card:nth-child(6) { animation-delay: 0.18s; }
.piece-card:nth-child(7) { animation-delay: 0.21s; }
.piece-card:nth-child(8) { animation-delay: 0.24s; }


/* Admin media fields */
.media-field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}
.media-panel {
    grid-column: 1 / -1;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
}
.media-field > label {
    margin: 0;
    white-space: nowrap;
}
.media-field .media-row {
    display: contents;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.media-field .media-name {
    flex: 1;
    min-width: 140px;
    background: var(--bg);
    color: var(--dark-gray);
}
.media-field .media-name.has-file {
    background: #f0f0f0;
    color: var(--charcoal);
}
.media-field .media-name.pending-upload {
    background: #e6f4ea;
    border-color: #34a853;
    color: #137333;
    font-weight: 600;
}
.about-media-field {
    display: block;
}
.about-media-field .media-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
}
.about-media-field .media-name {
    min-width: 0;
}
.about-media-thumb {
    display: block;
    width: auto;
    height: 40px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.video-link-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 50%) auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
}
.video-link-row .form-group label {
    text-align: left;
    line-height: 1.55;
}
.video-link-row .form-group {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.4rem;
    align-self: center;
    align-items: center;
    min-width: 0;
}
.video-link-row .form-group label {
    margin: 0;
    white-space: nowrap;
}
.video-part-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.5rem;
    align-self: end;
    transform: translateY(-0.9rem);
    white-space: nowrap;
}
.video-download-btn {
    align-self: center;
    justify-self: center;
    transform: translateY(-0.45rem);
    height: 1.8rem;
    width: fit-content;
    min-width: 2rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.2;
    margin: 0;
}
.video-description-invalid {
    border-color: #c0392b !important;
    background: #fff1ef;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.16);
}
.validation-popup {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    width: min(30rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    padding: 0.8rem 1rem;
    border: 1px solid #c0392b;
    border-radius: 8px;
    background: #fff1ef;
    color: #922b21;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.validation-popup.is-visible { animation: fadeIn 0.2s ease; }
.server-validation-popup { display: block; }
@media (max-width: 1024px) {
    .video-link-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.45rem;
    }
    .video-link-row > .form-group:first-child {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 0;
    }
    .video-link-row > .form-group:first-child label { margin-bottom: 0.3rem; }
    .video-link-row > .form-group:not(:first-child) {
        grid-template-columns: max-content minmax(0, 1fr);
        gap: 0.35rem;
    }
    .video-link-row > .form-group:not(:first-child) label { margin: 0; }
    .video-part-check { height: 2.5rem; }
}
@media (max-width: 768px) {
    .video-link-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .video-link-row > .form-group,
    .video-link-row > .form-group:first-child,
    .video-link-row > .form-group:not(:first-child) {
        grid-column: 1;
        grid-template-columns: 1fr;
    }
    .video-link-row > .form-group label {
        margin-bottom: 0.3rem;
    }
    .video-part-check {
        grid-column: 1;
        justify-self: start;
    }
}
.file-btn.disabled,
.file-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.btn:disabled,
.btn[disabled] {
    background: var(--light-gray) !important;
    color: var(--white) !important;
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}
@media (max-width: 768px) {
    .media-field {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.25rem;
    }
    .media-field > label {
        grid-column: 1 / -1;
        margin-bottom: 0.2rem;
    }
}
.readonly-title {
    background: var(--bg) !important;
    color: var(--dark-gray);
    cursor: not-allowed;
}
.hint-inline {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--mid-gray);
}
.file-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
}
.file-btn .file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.media-preview {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.media-preview a {
    color: var(--dark-gray);
    text-decoration: underline;
}
.media-add-btn {
    justify-self: end;
    background: #2e7d32;
    color: var(--white);
    margin: 0.1rem 0 0.65rem;
}
.media-add-btn:hover {
    background: #256628;
}
.media-add-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.char-count {
    font-size: 0.78rem;
    color: var(--mid-gray);
    text-align: right;
    margin-top: 0.25rem;
}
.admin-bar .btn {
    border: none;
}

#rescan-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .admin-table .col-hide-mobile {
        display: none;
    }
    .admin-table th:last-child,
    .admin-table td.actions {
        width: auto;
        white-space: nowrap;
    }
    .admin-table td.actions {
        display: table-cell;
        vertical-align: middle;
    }
    .admin-table td.actions form {
        vertical-align: middle;
    }
}

.pdf-download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}
.btn-pdf-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    max-width: 100%;
    word-break: break-word;
}

.about-manual {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}
.about-manual-link {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--dark-gray);
    text-decoration: none;
    border-bottom: 1px solid var(--mid-gray);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.about-manual-link:hover {
    color: var(--charcoal);
    border-bottom-color: var(--charcoal);
}

/* Chosen pieces on index */
.piece-card--chosen {
    background: #E8F4FC;
    border-color: #B8D9F0;
}
.piece-card--chosen::before {
    background: #6BA3C9 !important;
    width: 4px !important;
}
.chosen-badge {
    color: #5A9BC4;
    font-size: 0.85em;
    margin-left: 0.15rem;
}

/* Admin hub */
.admin-hub-lead {
    color: var(--dark-gray);
    margin: 0 0 1.25rem;
    font-size: 1rem;
}
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.2rem;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}
.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--light-gray);
}
.admin-card-accent {
    background: #E8F4FC;
    border-color: #B8D9F0;
}
.admin-card-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}
.admin-card-body h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: var(--charcoal);
}
.admin-card-body p {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    color: var(--dark-gray);
}
.admin-card-meta {
    font-size: 0.8rem;
    color: var(--mid-gray);
    font-weight: 500;
}
.admin-hub-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.admin-back {
    font-size: 0.88rem;
    color: var(--dark-gray);
    text-decoration: none;
}
.admin-back:hover { color: var(--charcoal); }
.admin-hint {
    color: var(--dark-gray);
    font-size: 0.92rem;
    margin: 0.5rem 0 0;
}

/* Chosen checklist */
.chosen-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.chosen-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.chosen-row:hover { border-color: var(--light-gray); }
.chosen-row.is-on {
    background: #E8F4FC;
    border-color: #B8D9F0;
}
.chosen-title {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 1.02rem;
}
.chosen-row input[type=checkbox] {
    width: 22px;
    height: 22px;
    accent-color: #4B4F54;
    flex-shrink: 0;
    cursor: pointer;
}
.row-chosen { background: #F3F9FD; }
.row-chosen > td { background-color: #F3F9FD !important; }
.row-chosen > td.actions { background-color: #F3F9FD !important; }
.row-chosen > td.actions .btn-secondary { background-color: #F3F9FD !important; }

/* App background from settings — 50% opacity + slow zoom */
.app-bg {
    position: fixed;
    inset: -5%;
    z-index: -2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.5;
    animation: appBgKen 48s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform;
}
.app-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(244, 245, 246, 0.35);
    pointer-events: none;
}
@keyframes appBgKen {
    0%   { transform: scale(1) translate(0, 0); }
    50%  { transform: scale(1.08) translate(-1.5%, -1%); }
    100% { transform: scale(1.12) translate(1%, 0.5%); }
}
body.has-app-bg {
    background: var(--bg);
}
body.has-app-bg .main {
    background: transparent;
}
body.has-app-bg .header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}
body.has-app-bg .section,
body.has-app-bg .piece-card,
body.has-app-bg .admin-section,
body.has-app-bg .admin-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}
/* Default video background (when no custom image in settings) */
.app-bg-video {
    inset: 0;
    opacity: 0.45;
    overflow: hidden;
    animation: none;
}
.app-bg-video-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
body.has-default-video-bg .app-bg-overlay {
    background: rgba(244, 245, 246, 0.55);
}
@media (prefers-reduced-motion: reduce) {
    .app-bg { animation: none; }
    .app-bg-video-el { display: none; }
}

.admin-card-btn {
    font: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
    border: 1px solid transparent;
}
.admin-card-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--light-gray);
}
.admin-card-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}
.admin-card-btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: transparent;
}
.admin-card-limit {
    color: var(--dark-gray) !important;
    font-size: 0.8rem !important;
}

.settings-bg-preview {
    max-width: 320px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid var(--light-gray);
}
.settings-bg-preview img {
    width: 100%;
    height: auto;
    display: block;
}

select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--charcoal);
}



.nav-logout {
    color: var(--dark-gray) !important;
    font-weight: 500;
}
.nav-logout:hover {
    color: var(--charcoal) !important;
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--light-gray);
    margin: 2rem 0 1.25rem;
}
.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1rem 0 0.5rem;
}
.user-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}
.users-panel .user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
.user-row-info {
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.users-panel .user-row-form {
    grid-column: 1 / -1;
    width: 100%;
}
.users-panel .user-row > form:not(.user-row-form) {
    grid-column: 2;
    grid-row: 1;
}
.user-role {
    font-size: 0.75rem;
    color: var(--mid-gray);
    background: var(--white);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}
.user-row-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
    align-items: center;
}
.user-row-form input[type=password] {
    min-width: 140px;
    flex: 1;
    max-width: 220px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: inherit;
}
.user-row-form button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.user-add-form .form-grid {
    margin-bottom: 0.75rem;
}
.user-add-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
}
.users-panel {
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
}
.user-add-panel h4 {
    margin: 0 0 0.75rem;
}
.user-add-form .form-group {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
}
.user-add-form .form-group label {
    margin: 0;
}

.remember-row {
    margin: 0.25rem 0 0.5rem;
}
.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--dark-gray);
    cursor: pointer;
    font-weight: 400;
}
.remember-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--charcoal);
}

/* Superadmin tenant picker */
.sa-tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}
.sa-tenant-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.1rem;
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}
.sa-tenant-id {
    font-size: 0.8rem;
    color: var(--mid-gray);
    font-family: monospace;
}
.sa-tenant-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--charcoal);
}
.sa-tenant-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin: 0.15rem 0 0.35rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}
.sa-tenant-stat {
    white-space: nowrap;
}
.admin-success {
    transition: opacity 250ms ease, max-height 250ms ease, margin 250ms ease, padding 250ms ease;
    max-height: 100px;
    overflow: hidden;
}
.admin-success.is-hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Copy button in admin table (superadmin) */
.admin-table .piece-copy-btn {
    position: static;
    width: auto;
    height: auto;
    min-width: 2rem;
    box-shadow: none;
    flex-shrink: 0;
}
.piece-copy-btn {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.piece-copy-btn:hover {
    background: #E8F4FC !important;
}

/* Choir name HTML formatting in logo */
.logo b,
.logo strong {
    font-weight: 700;
}
.logo i,
.logo em {
    font-style: italic;
}
.logo u {
    text-decoration: underline;
}

.sa-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}
.sa-edit-panel {
    max-width: 800px;
    margin: 2rem auto 0;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    text-align: left;
}
.sa-edit-panel h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.sa-edit-panel .user-row-form select {
    width: auto;
    min-width: 90px;
}

.danger-zone {
    margin-top: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #f5c6cb;
    background: #fff5f5;
    border-radius: var(--radius);
}
.wipe-form {
    max-width: 360px;
    margin-top: 0.75rem;
}
.wipe-form input[type=text] {
    font-family: monospace;
    letter-spacing: 0.05em;
}


/* ========== Landing hero (atmospheric) ========== */
body.is-landing-hero {
    background: #0b1220;
}
body.is-landing-hero .main-landing {
    max-width: none;
    padding: 0;
    margin: 0;
}
body.is-landing-hero .footer-landing {
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
}
body.is-landing-hero .footer-landing .footer-author,
body.is-landing-hero .footer-landing .heart {
    color: rgba(255,255,255,0.75);
}
body.is-landing-hero .footer-landing .admin-btn {
    display: none;
}

.lp {
    position: relative;
    min-height: calc(100vh - 80px);
    color: #f3f5f8;
    overflow: hidden;
}
.lp-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #0b1220;
}
.lp-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.lp-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8,12,24,0.45) 0%, rgba(8,12,24,0.25) 40%, rgba(8,12,24,0.55) 100%),
        radial-gradient(ellipse at center, transparent 35%, rgba(5, 8, 16, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .lp-video { display: none; }
}
.lp-shell {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 3rem;
}
.lp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0;
}
.lp-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.lp-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.lp-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}
.lp-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.lp-nav a {
    color: rgba(243, 245, 248, 0.75);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}
.lp-nav a:hover { color: #fff; }
.lp-nav-cta {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}
.lp-nav-cta:hover {
    background: rgba(255,255,255,0.2);
    color: #fff !important;
}

.lp-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
    min-height: min(58vh, 520px);
    margin-bottom: 3rem;
}
.lp-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d4a574;
    margin: 0 0 1rem;
}
.lp-title {
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
    color: #fff;
}
.lp-title em {
    font-style: normal;
    background: linear-gradient(120deg, #f0e6d8 0%, #d4a574 50%, #e8d5b5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lp-lead {
    font-size: 1.08rem;
    line-height: 1.65;
    color: rgba(243, 245, 248, 0.78);
    max-width: 34rem;
    margin: 0 0 1.75rem;
}
.lp-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.lp-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.88rem;
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
}
.lp-hi-icon { font-size: 0.95rem; }

.lp-auth-card {
    background: rgba(18, 24, 38, 0.72);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 1.35rem 1.4rem 1.5rem;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.lp-auth-tabs {
    display: flex;
    gap: 0.35rem;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 1.15rem;
}
.lp-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.lp-tab.is-active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.lp-form .form-group label {
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
}
.lp-form input[type=text],
.lp-form input[type=password] {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}
.lp-form input:focus {
    outline: none;
    border-color: rgba(212, 165, 116, 0.6);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}
.lp-form input::placeholder {
    color: rgba(255,255,255,0.3);
}
.lp-remember {
    color: rgba(255,255,255,0.7) !important;
    margin: 0.15rem 0 0.85rem;
}
.lp-submit {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8d5b5, #d4a574);
    color: #1a1208 !important;
    border: none;
    font-weight: 700;
}
.lp-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.lp-form-note {
    margin: 0.75rem 0 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
    text-align: center;
}
.lp-form .error-msg {
    color: #ffb4b4;
    margin-bottom: 0.5rem;
}

.lp-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.lp-feature {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.25rem 1.1rem;
    backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.2s;
}
.lp-feature:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.lp-feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.65rem;
}
.lp-feature h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}
.lp-feature p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(243, 245, 248, 0.65);
}

@media (max-width: 900px) {
    .lp-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
    }
    .lp-features {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .lp-nav a:not(.lp-nav-cta) { display: none; }
    .lp-features { grid-template-columns: 1fr; }
    .lp-title { font-size: 2.15rem; }
    .lp-shell { padding: 1rem 1rem 2.5rem; }
}

.confirm-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.confirm-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow);
}
.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.confirm-icon.ok { background: #e8f8ef; color: #1e7a45; }
.confirm-icon.err { background: #fdecea; color: #c0392b; }
.confirm-card h1 { font-size: 1.35rem; margin: 0 0 0.75rem; }
.confirm-card p { color: var(--dark-gray); margin: 0 0 1.25rem; line-height: 1.5; }
