* {
    box-sizing: border-box;
}

:root {
    --e-font-body: "Outfit", system-ui, sans-serif;
    --e-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --e-bg: #ebe4d8;
    --e-bg-soft: #f3ece2;
    --e-surface: #fffaf3;
    --e-ink: #1c1612;
    --e-muted: #5c534a;
    --e-faint: #8a8178;
    --e-accent: #a8432d;
    --e-accent-2: #c9a227;
    --e-border: #d9cfc2;
    --e-topbar: #e3d9c9;
    --e-shadow: 0 12px 40px rgba(28, 22, 18, 0.09);
    --e-radius: 3px;
    --e-radius-lg: 6px;
}

body.dark-theme {
    --e-bg: #0f0c0a;
    --e-bg-soft: #14110e;
    --e-surface: #1a1613;
    --e-ink: #f2e9de;
    --e-muted: #b8aa9c;
    --e-faint: #8a7f74;
    --e-accent: #e07a52;
    --e-accent-2: #e4c46b;
    --e-border: #3a332c;
    --e-topbar: #161210;
    --e-shadow: 0 14px 42px rgba(0, 0, 0, 0.42);
}

body {
    margin: 0;
    font-family: var(--e-font-body);
    color: var(--e-ink);
    background: var(--e-bg);
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

.container.narrow {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.admin-topbar .menu a[aria-current='page'] {
    font-weight: 700;
    color: var(--e-ink);
}

body.dark-theme .admin-topbar .menu a[aria-current='page'] {
    color: var(--e-ink);
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.topbar,
.admin-topbar {
    background: var(--e-topbar);
    border-bottom: 1px solid var(--e-border);
}

.topbar-inner {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px 0 18px;
}

@media (max-width: 900px) {
    .topbar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 14px 0;
        min-height: 64px;
    }
}

.brand {
    font-family: var(--e-font-display);
    font-weight: 600;
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--e-ink);
}

.menu {
    display: flex;
    gap: 22px;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-wrap: wrap;
    justify-content: center;
}

.topbar .menu a:not(.btn) {
    color: var(--e-muted);
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.topbar .menu a:not(.btn):hover {
    color: var(--e-accent);
    border-bottom-color: var(--e-accent-2);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.lang-switch a {
    opacity: 0.55;
}

.lang-switch a.active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn {
    display: inline-block;
    border: 1px solid var(--e-accent);
    background: var(--e-accent);
    color: #fffaf3;
    border-radius: var(--e-radius);
    padding: 10px 18px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--e-shadow);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.18s ease;
}

.btn:hover {
    background: #8a3724;
    border-color: #8a3724;
    box-shadow: 0 6px 22px rgba(168, 67, 45, 0.28);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(28, 22, 18, 0.12);
}

.btn.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.btn.small {
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
}

.btn.ghost {
    border-color: var(--e-border);
    background: var(--e-surface);
    color: var(--e-muted);
    box-shadow: none;
}

.btn.ghost:hover {
    background: var(--e-bg-soft);
    border-color: var(--e-accent);
    color: var(--e-ink);
    box-shadow: none;
}

.btn.danger {
    border-color: #b91c1c;
    background: #dc2626;
    color: #ffffff;
}

.btn.danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.theme-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.25s ease;
}

.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.25s ease;
}

.theme-switch input:checked + .theme-switch-track {
    background: var(--e-accent);
}

.theme-switch input:checked + .theme-switch-track .theme-switch-thumb {
    transform: translateX(20px);
}

.theme-switch-text {
    font-size: 13px;
    color: var(--e-muted);
}

.hero {
    padding: 56px 0 40px;
}

/* Hero împărțit: imagine stânga, panou editorial dreapta (pe mobil stivuit) */
.hero-enciu {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    min-height: min(62vh, 620px);
    max-width: 1280px;
    margin: 28px auto 0;
    width: min(1280px, 94%);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    overflow: hidden;
    box-shadow: var(--e-shadow);
    background: var(--e-surface);
}

.hero-enciu-visual {
    position: relative;
    min-height: 280px;
    background-size: cover;
    background-position: center;
}

.hero-enciu-visual-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(28, 22, 18, 0.12) 0%, rgba(28, 22, 18, 0.45) 100%);
    pointer-events: none;
}

.hero-enciu-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 52px) clamp(24px, 4vw, 48px);
    background: linear-gradient(160deg, var(--e-surface) 0%, var(--e-bg-soft) 100%);
    border-left: 1px solid var(--e-border);
}

body.dark-theme .hero-enciu-aside {
    background: linear-gradient(160deg, var(--e-surface) 0%, var(--e-bg-soft) 100%);
}

.hero-enciu-name {
    margin: 0;
    font-family: var(--e-font-display);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--e-ink);
}

.hero-enciu-role {
    margin: 14px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--e-accent);
}

.hero-enciu-lead {
    margin: 20px 0 0;
    font-size: clamp(1.05rem, 2.1vw, 1.35rem);
    line-height: 1.45;
    color: var(--e-ink);
    font-weight: 500;
}

.hero-enciu-sublead {
    margin: 12px 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--e-muted);
}

.hero-enciu-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-enciu-actions {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .hero-enciu {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .hero-enciu-aside {
        border-left: none;
        border-top: 1px solid var(--e-border);
        text-align: center;
        align-items: center;
    }

    .hero-enciu-visual {
        min-height: min(42vh, 360px);
    }
}

.hero-after-splash {
    padding-top: 48px;
}

.badge {
    color: var(--e-accent);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 12px;
    font-family: var(--e-font-display);
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: 0.01em;
}

h2 {
    margin: 0 0 20px;
    font-family: var(--e-font-display);
    font-weight: 600;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: 0.02em;
}

.subtitle {
    color: var(--e-muted);
    max-width: 780px;
    line-height: 1.65;
}

.home-intro-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: center;
}

.home-intro-copy h1 {
    margin-bottom: 18px;
}

.home-intro-copy .subtitle {
    max-width: 650px;
}

.intro-link {
    margin-top: 24px;
    display: inline-block;
    color: var(--e-accent);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    text-decoration: none;
    border-bottom: 2px solid var(--e-accent-2);
    padding-bottom: 2px;
}

.intro-link:hover {
    color: var(--e-ink);
    border-bottom-color: var(--e-accent);
}

.home-intro-image-wrap {
    border-radius: var(--e-radius-lg);
    overflow: hidden;
    border: 1px solid var(--e-border);
    box-shadow: var(--e-shadow);
}

.home-intro-image {
    width: 100%;
    height: min(520px, 52vw);
    min-height: 260px;
    object-fit: cover;
    display: block;
}

.section {
    padding: 28px 0 48px;
}

section#gallery > .container > h2 {
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.home-quote-section {
    padding: 20px 0 36px;
}

.home-quote {
    margin: 0;
    padding: 22px 26px 22px 28px;
    border-left: 4px solid var(--e-accent-2);
    background: var(--e-bg-soft);
    border-radius: 0 var(--e-radius-lg) var(--e-radius-lg) 0;
    font-family: var(--e-font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.45;
    color: var(--e-ink);
}

.home-quote p {
    margin: 0;
}

.home-commission-block {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--e-border);
}

.contact-details-rich {
    margin-bottom: 12px;
    line-height: 1.65;
}

.contact-form-lead {
    margin-top: 16px;
}

.artist-about-single {
    padding: 28px 30px;
}

.artist-about-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--e-muted);
}

.gallery-intro {
    margin-top: -8px;
    margin-bottom: 8px;
    max-width: 640px;
}

.gallery-empty {
    grid-column: 1 / -1;
    color: var(--e-muted);
}

.painting-card-image-link {
    position: relative;
    display: block;
}

.painting-card-image-inner {
    position: relative;
    display: block;
    overflow: hidden;
}

.painting-sold-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fffaf3;
    background: rgba(28, 22, 18, 0.82);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius);
    pointer-events: none;
}

.painting-card-price-line {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.painting-price {
    font-weight: 600;
    color: var(--e-ink);
}

.painting-price--sold {
    text-decoration: line-through;
    opacity: 0.65;
    font-weight: 500;
}

.painting-price--poa {
    font-weight: 500;
    color: var(--e-muted);
    font-style: italic;
}

.painting-sold-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--e-accent);
}

.painting-card--sold .card-image {
    opacity: 0.92;
}

.painting-status-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--e-radius);
    border: 1px solid var(--e-border);
    font-weight: 600;
}

.painting-status-banner--sold {
    background: rgba(168, 67, 45, 0.1);
    color: var(--e-accent);
}

.painting-detail-price {
    font-size: 1.15rem;
    font-weight: 600;
}

.painting-price-struck {
    text-decoration: line-through;
    opacity: 0.65;
    margin-right: 10px;
}

.painting-sold-inline {
    font-weight: 700;
    color: var(--e-accent);
}

.painting-back-gallery {
    margin: 18px 0 0;
}

section#gallery > .container > h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--e-accent), var(--e-accent-2));
    border-radius: 2px;
}

.contact-section {
    padding: 40px 0 52px;
    background: var(--e-bg-soft);
    border-top: 1px solid var(--e-border);
}

.contact-manifesto {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.contact-split {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.contact-card--form {
    padding: 16px 18px;
}

.contact-carousel-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form--contact-compact label {
    margin-bottom: 8px;
}

.form--contact-compact input,
.form--contact-compact textarea {
    padding: 8px 10px;
    font-size: 13px;
}

.form--contact-compact textarea {
    min-height: 90px;
    resize: vertical;
}

.contact-carousel {
    position: relative;
    --carousel-n: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

.contact-carousel-viewport {
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
    border-radius: var(--e-radius-lg);
    border: 1px solid var(--e-border);
    background: var(--e-surface);
    box-shadow: var(--e-shadow);
}

@media (min-width: 961px) {
    .contact-carousel-viewport {
        min-height: 0;
    }
}

.contact-carousel-track {
    display: flex;
    width: calc(var(--carousel-n) * 100%);
    height: 100%;
    align-items: stretch;
    transition: transform 0.45s ease;
    will-change: transform;
}

.contact-carousel-slide {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: calc(100% / var(--carousel-n));
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.contact-carousel-slide-link {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--e-bg-soft);
}

.contact-carousel-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.contact-carousel-caption {
    flex-shrink: 0;
    margin: 8px 10px 0;
    padding-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.contact-carousel-caption a {
    color: var(--e-ink);
    text-decoration: none;
}

.contact-carousel-caption a:hover {
    text-decoration: underline;
}

.contact-carousel-nav {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    align-items: center;
}

.contact-carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--e-radius);
    border: 1px solid var(--e-border);
    background: var(--e-surface);
    color: var(--e-ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.contact-carousel-btn:hover {
    background: var(--e-bg-soft);
    border-color: var(--e-accent);
}

.contact-carousel-dots {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.contact-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #cbd5e1;
    cursor: pointer;
}

.contact-carousel-dot.is-active {
    background: var(--e-accent);
    transform: scale(1.15);
}

.contact-split--no-carousel {
    grid-template-columns: minmax(0, 440px);
    justify-content: start;
}

@media (max-width: 960px) {
    .contact-split {
        grid-template-columns: 1fr;
    }

    .contact-split--no-carousel {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .contact-carousel-viewport {
        height: auto !important;
        min-height: min(52vh, 420px);
    }
}

.home-manifesto-inner {
    max-width: 720px;
    margin: 0 auto;
}

.home-manifesto-lead {
    margin: 0 0 20px;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--e-ink);
    letter-spacing: -0.02em;
    font-family: var(--e-font-display);
}

.home-manifesto-body {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--e-muted);
}

.artist-layout {
    display: grid;
    gap: 16px;
}

.artist-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 22px;
    align-items: center;
}

.artist-photo-wrap {
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    padding: 10px;
    box-shadow: var(--e-shadow);
}

.artist-photo {
    width: 100%;
    height: min(440px, 52vw);
    max-height: 440px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.artist-links {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.artist-timeline {
    position: relative;
    display: grid;
    gap: 14px;
    padding-left: 22px;
}

.artist-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--e-border);
}

.artist-card {
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    padding: 18px 18px 18px 22px;
    box-shadow: var(--e-shadow);
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 18px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--e-accent);
    color: #fffaf3;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.artist-card h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.artist-card p {
    margin: 0;
    color: var(--e-muted);
    line-height: 1.65;
}

.artist-gallery-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.artist-gallery-card {
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    overflow: hidden;
    box-shadow: var(--e-shadow);
}

.cards,
.painting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
}

@media (min-width: 1180px) {
    .painting-grid:not(.painting-grid--similar) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.card,
.painting-card {
    background: var(--e-surface);
    border-radius: var(--e-radius-lg);
    overflow: hidden;
    box-shadow: var(--e-shadow);
    border: 1px solid var(--e-border);
}

@media (min-width: 1100px) {
    .card--feature {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        align-items: stretch;
        gap: 0;
    }

    .card--feature .card-image-wrap {
        height: auto;
        min-height: 300px;
    }

    .card--feature .card-image {
        height: 100%;
        min-height: 300px;
    }

    .card--feature .card-body {
        padding: 28px 32px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.card-image-wrap {
    display: block;
    height: 230px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.06);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-family: var(--e-font-display);
    font-weight: 600;
    font-size: 1.35rem;
}

.card-body p,
.meta {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.painting-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
    max-width: 920px;
    margin: 0 auto;
}

.painting-image-block {
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    padding: 12px;
    box-shadow: var(--e-shadow);
    width: 100%;
}

.painting-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    display: block;
}

.painting-image.zoomable {
    cursor: zoom-in;
}

.zoom-hint {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
}

.painting-details {
    width: 100%;
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    padding: 22px;
    box-shadow: var(--e-shadow);
}

.author {
    font-size: 22px;
    margin-top: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin-bottom: 20px;
}

.detail-grid h3 {
    margin: 0;
    color: #475569;
    font-weight: 500;
}

.detail-grid p {
    margin: 4px 0 0;
    font-size: 24px;
}

.description {
    line-height: 1.6;
}

.painting-story-audio {
    margin: 18px 0 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.painting-story-audio audio {
    display: none;
}

.painting-story-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 11rem;
    text-align: left;
    line-height: 1;
}

.painting-story-btn-label {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    /* Aliniere vizuală cu rândul de 20px al iconițelor (fără spațiu în plus sub baseline). */
    min-height: 20px;
}

.painting-story-btn-lead {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    line-height: 0;
}

.painting-story-icon-slot {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.painting-story-icon {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 20px;
    height: 20px;
}

.painting-story-icon--pause {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.painting-story-play-btn.is-playing .painting-story-icon--play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.painting-story-play-btn.is-playing .painting-story-icon--pause {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.painting-story-equalizer {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.painting-story-play-btn.is-playing .painting-story-equalizer {
    display: inline-flex;
}

.painting-story-eq-bar {
    display: block;
    width: 3px;
    height: 14px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.9;
    transform-origin: bottom center;
    animation: painting-story-eq 0.55s ease-in-out infinite alternate;
}

.painting-story-eq-bar:nth-child(1) {
    animation-delay: 0s;
}

.painting-story-eq-bar:nth-child(2) {
    animation-delay: 0.08s;
}

.painting-story-eq-bar:nth-child(3) {
    animation-delay: 0.16s;
}

.painting-story-eq-bar:nth-child(4) {
    animation-delay: 0.24s;
}

.painting-story-eq-bar:nth-child(5) {
    animation-delay: 0.32s;
}

@keyframes painting-story-eq {
    0% {
        transform: scaleY(0.28);
    }

    100% {
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .painting-story-eq-bar {
        animation: none;
        transform: scaleY(0.65);
    }
}

.painting-share-row {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.painting-seo-extras {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.painting-seo-block h3 {
    font-size: 1.02rem;
    margin: 0 0 8px;
    color: #0f172a;
}

.painting-seo-block .muted {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.painting-seo-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #334155;
    line-height: 1.55;
}

.painting-similar-section {
    padding: 8px 0 12px;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
}

.painting-similar-title {
    font-size: 1.2rem;
    margin: 0 0 16px;
    color: #0f172a;
}

.painting-grid--similar {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.painting-category-nav {
    padding: 18px 0 22px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
}

.painting-category-nav-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
}

.painting-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(165deg, #ffffff 0%, #fafbfc 100%);
    text-decoration: none;
    color: #0f172a;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 20px rgba(15, 23, 42, 0.05);
    transition:
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease,
        color 0.22s ease;
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(50% - 7px);
    box-sizing: border-box;
}

.painting-nav-btn--next {
    flex-direction: row;
    margin-left: auto;
}

.painting-nav-btn--next .painting-nav-text {
    flex: 1 1 0;
    min-width: 0;
    text-align: right;
}

.painting-nav-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #64748b;
    background: rgba(15, 23, 42, 0.045);
    transition:
        background 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease;
}

.painting-nav-btn:hover:not(.is-disabled) .painting-nav-arrow {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    transform: scale(1.04);
}

.painting-nav-btn.is-disabled .painting-nav-arrow {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    transform: none;
}

.painting-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.painting-nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.painting-nav-title {
    font-size: 0.93rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.painting-nav-btn:hover:not(.is-disabled) {
    border-color: rgba(203, 213, 225, 0.95);
    background: #ffffff;
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.04),
        0 12px 28px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}

.painting-nav-btn:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 3px;
}

.painting-nav-btn:active:not(.is-disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 6px 16px rgba(15, 23, 42, 0.07);
}

.painting-nav-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    filter: saturate(0.85);
}

@media (max-width: 560px) {
    .painting-category-nav-inner {
        flex-direction: column;
    }

    .painting-nav-btn,
    .painting-nav-btn--next {
        max-width: none;
        width: 100%;
        margin-left: 0;
    }
}

.back-link {
    color: #0f172a;
    text-decoration: underline;
}

.footer {
    margin-top: 48px;
    padding: 32px 0;
    border-top: 1px solid var(--e-border);
    color: var(--e-muted);
    background: var(--e-bg-soft);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 28px 40px;
}

.footer-col--left {
    flex: 1 1 200px;
    min-width: 0;
}

.footer-col--brand {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 280px;
}

.footer-col--right {
    flex: 0 1 320px;
    max-width: min(420px, 100%);
    text-align: right;
    margin-left: auto;
}

.footer-brand-artist {
    margin: 0 0 4px;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--e-ink);
    font-family: var(--e-font-display);
}

.footer-brand-location {
    margin: 0 0 12px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--e-muted);
}

.footer-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 10px;
}

.footer-brand-sep {
    color: #94a3b8;
    user-select: none;
}

.footer-brand-link {
    color: var(--e-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--e-accent-2);
    font-size: 0.92rem;
    font-weight: 500;
}

.footer-brand-link:hover {
    color: var(--e-ink);
    border-bottom-color: var(--e-accent);
}

.footer-brand-extra {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-brand-extra .footer-brand-link {
    font-weight: 400;
}

.footer-copy {
    margin: 0;
}

.footer-voice-lead {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 1.06rem;
    line-height: 1.35;
    color: var(--e-ink);
    font-family: var(--e-font-display);
}

.footer-voice-body {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--e-muted);
}

.footer-voice-body br {
    line-height: inherit;
}

@media (max-width: 900px) {
    .footer-col--right {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .footer-inner {
        align-items: flex-start;
    }

    .footer-col--brand {
        max-width: none;
        flex-basis: 100%;
    }

    .footer-col--right {
        text-align: left;
        flex-basis: 100%;
        max-width: none;
    }
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(420px, 92%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 24px;
}

.form {
    display: grid;
    gap: 12px;
}

.form-card {
    background: #ffffff;
    border: 1px solid #dbe1e9;
    border-radius: 12px;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.form-card h3 {
    margin: 0;
}

.split.compact {
    gap: 12px;
}

.locale-tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.locale-tab {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}

.locale-tab.active {
    border-color: var(--e-accent);
    background: rgba(168, 67, 45, 0.12);
    color: var(--e-accent);
}

.locale-panel {
    display: none;
    border-top: 1px dashed #dbe1e9;
    padding-top: 12px;
    gap: 12px;
}

.locale-panel.active {
    display: grid;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.form input,
.form textarea,
.form select {
    width: 100%;
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-family: inherit;
}

/* Admin texte: toate textarea-urile pot fi mărite vertical (handle jos-dreapta) */
.form--texts textarea {
    resize: vertical;
    min-height: 3.5rem;
    overflow: auto;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* Evită suprapuneri / zone neclicabile în grid când o coloană e mult mai înaltă */
.split > * {
    min-width: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.contact-card {
    background: var(--e-surface);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-lg);
    padding: 20px;
    box-shadow: var(--e-shadow);
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #dbe1e9;
    padding: 10px;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
}

.list-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.item-actions-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.item-actions-row form {
    margin: 0;
}

.stats {
    margin: 16px 0 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stats.stats-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1020px) {
    .stats.stats-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .stats.stats-4 {
        grid-template-columns: 1fr;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.admin-dashboard-actions {
    margin-top: 12px;
}

.dashboard-panel {
    background: #ffffff;
    border: 1px solid #dbe1e9;
    border-radius: 12px;
    padding: 16px;
}

.dashboard-panel h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.dashboard-table th.num,
.dashboard-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dashboard-table thead th {
    color: #64748b;
    font-weight: 600;
}

.dashboard-chart-wrap {
    height: 280px;
    position: relative;
    margin-top: 4px;
}

.dashboard-chart-hint {
    margin: 0 0 12px;
}

.table-wrap {
    overflow-x: auto;
}

.stat-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #dbe1e9;
}

.stat-card .label {
    margin: 0;
    color: #64748b;
}

.stat-card .value {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 700;
}

.error {
    color: #b91c1c;
}

.success {
    color: #166534;
}

.muted {
    color: var(--e-faint);
}

.badge-inline {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.messages-grid {
    display: grid;
    gap: 14px;
}

.messages-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.messages-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    background: #ffffff;
    color: #334155;
}

.chip.active {
    border-color: var(--e-accent);
    color: var(--e-accent);
    background: rgba(168, 67, 45, 0.1);
}

.messages-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.messages-search input {
    min-width: 260px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.messages-search select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    background: #ffffff;
}

.messages-admin-actions {
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.message-card {
    background: #ffffff;
    border: 1px solid #dbe1e9;
    border-radius: 12px;
    padding: 14px;
}

.message-card.unread {
    border-color: var(--e-accent);
    box-shadow: 0 0 0 2px rgba(168, 67, 45, 0.2);
}

.message-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.message-head h3 {
    margin: 0 0 8px;
}

.message-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    font-size: 12px;
    color: #64748b;
}

.message-select-wrap input {
    margin: 0;
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.message-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.image-modal.open {
    display: flex;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.86);
}

.image-modal-content {
    position: relative;
    z-index: 1;
    width: min(1360px, 96vw);
    height: min(90vh, 920px);
    background: #0f172a;
    border-radius: 12px;
    padding: 48px 10px 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

.image-modal-viewport {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
    cursor: default;
    touch-action: none;
    flex-shrink: 0;
}

.modal-image.is-draggable {
    cursor: grab;
}

.modal-image.is-dragging {
    cursor: grabbing;
}

.image-modal-controls {
    flex-shrink: 0;
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-self: center;
}

.image-modal-controls button {
    border: 1px solid #334155;
    background: #1e293b;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

body.dark-theme {
    background: var(--e-bg);
    color: var(--e-ink);
}

body.dark-theme .topbar,
body.dark-theme .admin-topbar {
    background: var(--e-topbar);
    border-bottom-color: var(--e-border);
}

body.dark-theme .brand,
body.dark-theme .menu a,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme p,
body.dark-theme strong,
body.dark-theme label {
    color: var(--e-ink);
}

body.dark-theme .topbar .menu a:not(.btn) {
    color: var(--e-muted);
}

body.dark-theme .topbar .menu a:not(.btn):hover {
    color: var(--e-accent);
}

body.dark-theme .subtitle,
body.dark-theme .muted,
body.dark-theme .card-body p,
body.dark-theme .meta,
body.dark-theme .zoom-hint,
body.dark-theme .stat-card .label,
body.dark-theme .intro-link {
    color: var(--e-muted);
}

body.dark-theme .intro-link:hover {
    color: var(--e-ink);
}

body.dark-theme .card,
body.dark-theme .painting-card,
body.dark-theme .painting-image-block,
body.dark-theme .painting-details,
body.dark-theme .artist-card,
body.dark-theme .artist-gallery-card,
body.dark-theme .artist-photo-wrap,
body.dark-theme .contact-card,
body.dark-theme .auth-card,
body.dark-theme .stat-card,
body.dark-theme .list-item,
body.dark-theme .message-card,
body.dark-theme .form-card,
body.dark-theme .dashboard-panel {
    background: var(--e-surface);
    border-color: var(--e-border);
    box-shadow: var(--e-shadow);
}

body.dark-theme .admin-checkbox-row {
    color: #94a3b8;
}

body.dark-theme .contact-section {
    background: var(--e-bg-soft);
    border-top-color: var(--e-border);
}

body.dark-theme .contact-manifesto {
    border-bottom-color: var(--e-border);
}

body.dark-theme .home-manifesto-lead {
    color: #f1f5f9;
}

body.dark-theme .home-manifesto-body {
    color: #cbd5e1;
}

body.dark-theme .painting-seo-extras {
    border-top-color: #334155;
}

body.dark-theme .painting-seo-block h3 {
    color: #f1f5f9;
}

body.dark-theme .painting-seo-block .muted,
body.dark-theme .painting-seo-list {
    color: #94a3b8;
}

body.dark-theme .painting-similar-section {
    background: #0b1020;
    border-top-color: #1e293b;
}

body.dark-theme .painting-similar-title {
    color: #f1f5f9;
}

body.dark-theme .painting-category-nav {
    background: linear-gradient(180deg, #0c1222 0%, #0a0f1a 100%);
    border-top-color: rgba(51, 65, 85, 0.65);
}

body.dark-theme .painting-nav-btn {
    background: linear-gradient(165deg, #111827 0%, #0f172a 100%);
    border-color: rgba(51, 65, 85, 0.85);
    color: #f1f5f9;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

body.dark-theme .painting-nav-btn:hover:not(.is-disabled) {
    background: #151f33;
    border-color: #475569;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 14px 32px rgba(0, 0, 0, 0.45);
}

body.dark-theme .painting-nav-arrow {
    color: #94a3b8;
    background: rgba(248, 250, 252, 0.06);
}

body.dark-theme .painting-nav-btn:hover:not(.is-disabled) .painting-nav-arrow {
    background: rgba(248, 250, 252, 0.1);
    color: #e2e8f0;
}

body.dark-theme .painting-nav-btn.is-disabled .painting-nav-arrow {
    background: rgba(148, 163, 184, 0.08);
    color: #64748b;
}

body.dark-theme .painting-nav-label {
    color: #94a3b8;
}

body.dark-theme .painting-nav-title {
    color: #e2e8f0;
}

body.dark-theme .painting-nav-btn:focus-visible {
    outline-color: #64748b;
}

body.dark-theme .contact-carousel-viewport {
    background: #0f172a;
    border-color: #334155;
}

body.dark-theme .contact-carousel-slide-link {
    background: #111827;
}

body.dark-theme .contact-carousel-caption a {
    color: #e2e8f0;
}

body.dark-theme .contact-carousel-btn {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-theme .contact-carousel-btn:hover {
    background: #334155;
}

body.dark-theme .contact-carousel-dot {
    background: #475569;
}

body.dark-theme .contact-carousel-dot.is-active {
    background: #e2e8f0;
}

body.dark-theme .dashboard-panel h2 {
    color: #e5e7eb;
}

body.dark-theme .dashboard-table th,
body.dark-theme .dashboard-table td {
    border-bottom-color: #334155;
}

body.dark-theme .dashboard-table thead th {
    color: #94a3b8;
}

body.dark-theme .btn.ghost {
    background: #1e293b;
    border-color: #3d4f63;
    color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-theme .btn.ghost:hover {
    background: #273549;
    border-color: #475569;
    color: #f8fafc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

body.dark-theme .btn.danger {
    background: #b91c1c;
    border-color: #ef4444;
    color: #ffffff;
}

body.dark-theme .btn.danger:hover {
    background: #991b1b;
    border-color: #f87171;
}

body.dark-theme .form input,
body.dark-theme .form textarea,
body.dark-theme .form select {
    background: #0b1220;
    border-color: #334155;
    color: #e5e7eb;
}

body.dark-theme .chip {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-theme .chip.active {
    background: rgba(224, 122, 82, 0.15);
    border-color: var(--e-accent);
    color: var(--e-accent);
}

body.dark-theme .locale-tab {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-theme .locale-tab.active {
    background: rgba(224, 122, 82, 0.15);
    border-color: var(--e-accent);
    color: var(--e-accent);
}

body.dark-theme .locale-panel {
    border-top-color: #334155;
}

body.dark-theme .messages-search input {
    background: #0b1220;
    border-color: #334155;
    color: #e5e7eb;
}

body.dark-theme .messages-search select {
    background: #0b1220;
    border-color: #334155;
    color: #e5e7eb;
}

body.dark-theme .footer {
    border-top-color: var(--e-border);
    color: var(--e-muted);
    background: var(--e-bg-soft);
}

body.dark-theme .footer-voice-lead {
    color: #e2e8f0;
}

body.dark-theme .footer-voice-body {
    color: #94a3b8;
}

body.dark-theme .footer-brand-artist {
    color: #f1f5f9;
}

body.dark-theme .footer-brand-location {
    color: #cbd5e1;
}

body.dark-theme .footer-brand-link {
    color: #e2e8f0;
}

body.dark-theme .footer-brand-link:hover {
    color: #ffffff;
}

body.dark-theme .footer-brand-sep {
    color: #64748b;
}

body.dark-theme .theme-switch-text {
    color: #cbd5e1;
}

body.dark-theme .lang-switch a {
    color: #cbd5e1;
}

body.dark-theme .theme-switch-track {
    background: #334155;
}

body.dark-theme .artist-timeline::before {
    background: #334155;
}

.form-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.admin-audio-preview {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 8px 0 4px;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
}

.form-card-head h3 {
    margin: 0 0 6px;
}

.ai-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(12px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow: hidden;
}

.ai-modal[hidden] {
    display: none;
}

.ai-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
    z-index: 0;
}

.ai-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(640px, 100%);
    max-width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: 0 auto;
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
    border: 1px solid #dbe1e9;
}

.ai-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 48px 20px 20px;
    box-sizing: border-box;
}

.ai-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-modal-close:hover {
    background: #e2e8f0;
}

.ai-modal-label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.ai-modal-sub {
    margin: 16px 0 8px;
    font-size: 15px;
}

.ai-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 520px) {
    .ai-modal-grid {
        grid-template-columns: 1fr;
    }
}

.ai-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.ai-alt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0 4px;
}

.ai-modal-locale-tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ai-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #dbe1e9;
}

body.dark-theme .ai-modal-dialog {
    background: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}

body.dark-theme .ai-modal-close {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-theme .ai-modal-close:hover {
    background: #334155;
}

body.dark-theme .ai-modal-footer {
    border-top-color: #334155;
}

@media (max-width: 980px) {
    .cards,
    .painting-grid,
    .artist-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .artist-hero,
    .painting-layout,
    .split,
    .home-intro-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .menu {
        gap: 10px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .cards,
    .painting-grid,
    .artist-gallery-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid p {
        font-size: 20px;
    }
}

/* —— Pagină QR expoziție / poveste audio —— */
.story-listen-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
}

.story-listen-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

.story-listen-header {
    text-align: center;
    margin-bottom: 20px;
}

.story-listen-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #f8fafc;
    text-decoration: none;
}

.story-listen-brand:hover {
    color: #e2e8f0;
}

.story-listen-tagline {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.story-listen-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Conținut text mai întâi, pe fundal închis (ca template expoziție) */
.story-listen-panel {
    order: -1;
    padding: 4px 0 0;
    color: #f8fafc;
}

.story-listen-title {
    margin: 0 0 6px;
    font-size: 1.45rem;
    line-height: 1.25;
    color: #ffffff;
    font-weight: 700;
}

.story-listen-artist {
    margin: 0 0 18px;
    font-size: 1rem;
    color: #e2e8f0;
}

.story-listen-lang-label {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #cbd5e1;
}

.story-listen-lang-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.story-listen-body .story-listen-lang-btn {
    min-width: 3.5rem;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-weight: 600;
    cursor: pointer;
    color: #0f172a;
}

.story-listen-body .story-listen-lang-btn:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.story-listen-body .story-listen-lang-btn.is-active {
    border-color: #0f172a;
    background: #0f172a;
    color: #ffffff;
}

.story-listen-lang-btn.is-disabled,
.story-listen-lang-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Același tip de buton ca pe pagina tabloului: ghost + icon play / egalizator */
.story-listen-body .story-listen-player-block.painting-story-audio {
    margin: 6px 0 22px;
}

.story-listen-body .story-listen-player-block.painting-story-audio audio {
    display: none;
}

.story-listen-body .story-listen-play-btn.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.88);
    background: transparent;
    color: #ffffff;
    box-shadow: none;
}

.story-listen-body .story-listen-play-btn.btn.ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.story-listen-body .story-listen-play-btn.btn.ghost:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.story-listen-no-audio {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.story-listen-desc-heading {
    margin: 0 0 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    font-weight: 700;
}

.story-listen-desc-body {
    line-height: 1.65;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.story-listen-desc-body a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.story-listen-desc-body a:hover {
    color: #bfdbfe;
}

/* Tabloul jos, proporții păstrate */
.story-listen-image-wrap {
    order: 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.story-listen-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(65vh, 560px);
    object-fit: contain;
    object-position: center;
}

.story-listen-footer {
    order: 1;
    text-align: center;
    font-size: 0.88rem;
    color: #94a3b8;
}

.story-listen-footer a {
    color: #cbd5e1;
}

.story-listen-footer a:hover {
    color: #fff;
}

.admin-qr-block {
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    text-align: center;
}

body.dark-theme .admin-qr-block {
    border-color: #475569;
    background: #1e293b;
}

.admin-qr-block img {
    display: block;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.admin-qr-block .admin-qr-url {
    word-break: break-all;
    font-size: 0.8rem;
}

.admin-list-qr {
    margin-top: 10px;
}

.admin-list-qr img {
    border-radius: 6px;
    background: #fff;
    padding: 4px;
}
