@tailwind base;
@tailwind components;
@tailwind utilities;

/* Book text only: Webstart */
@font-face {
    font-family: 'Webstart';
    src: url('/fonts/Webstart-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* === Project font: Arial, sans-serif for the whole site === */
/* Noto Sans Armenian = fallback for Armenian script (Arial has no Armenian glyphs) */
html,
body,
main,
section,
h1, h2, h3, h4, h5, h6,
p, div, span, a, li, label, input, select, textarea, button {
    font-family: Arial, "Noto Sans Armenian", sans-serif !important;
}
/* Icon fonts must keep their font for glyphs (do not override with Arial) */
.fa, .fas, .far, .fa-solid, .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
}
.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}
.material-symbols-outlined,
.material-icons {
    font-family: "Material Symbols Outlined" !important;
}

/* Sticky footer: header + main + footer always fill viewport height */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main[role="main"] {
    flex: 1 0 auto;
    min-height: 0;
}

.site-footer {
    margin-top: auto;
}

.password-rules {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    text-align: left;
}

.password-rules li {
    list-style: disc;
}

.password-rules .rule-invalid {
    color: #dc2626;
}

.password-rules .rule-valid {
    color: #16a34a;
}

.register-pending-card {
    text-align: center;
}

.register-pending-image {
    width: 120px;
    height: auto;
    margin: 0 auto 12px;
    display: block;
}

.register-pending-text {
    margin: 8px 0 0;
}

.register-pending-back {
    display: inline-block;
    margin-top: 16px;
}

.external-login-form {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(107, 114, 128, 0.4);
}

.google-icon-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.google-icon-button:focus-visible {
    outline: 2px solid #c7d2fe;
    outline-offset: 4px;
    border-radius: 6px;
}


/* === Base Header === */
.site-header {
    background: #fff;    
    padding: 0 12px;
}

.container-header {
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Лого */
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 20px;
}

.logo-img {
    height: 100px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.logo-text {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

    .logo-link .logo-text {
        font-size: 18px;
        font-weight: 700;
        color: #111827;
    }

/* Навигация */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.nav-links-left,
.nav-links-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.nav-links-left {
    justify-content: flex-start;    
}

.nav-links-right {
    justify-content: flex-end;
}

    .nav-links a {
        font-family: Arial, sans-serif;
        font-weight: 600;
        font-size: 15px;
        color: #5B4B8A;
        letter-spacing: 0.02em;
        text-decoration: none;
        padding: 0 10px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        border-radius: 10px;
        transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
        white-space: nowrap;
    }

        .nav-links a:hover {
            color: #6D28D9;
            background-color: rgba(109, 40, 217, 0.08);
            box-shadow: 0 2px 8px rgba(109, 40, 217, 0.12);
        }

/* CTA in header (match hero primary button style) */
.nav-links a.nav-create-tale-btn {
    background-color: #facc15;
    color: #111827 !important;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.nav-links a.nav-create-tale-btn:hover {
    background-color: #eab308;
    color: #111827 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.nav-links a.nav-create-tale-btn:active {
    background-color: #ca8a04;
}

/* Кнопка */
nav .create-your-book-btn {
    font-weight: 700;
    color: #fff !important;
    background-color: #6D28D9 !important;
    border-radius: 9999px !important;
    padding: 0 14px !important;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background-color 0.2s, transform 0.1s;
}

/* User Name Label */
.user-name-label {
    font-family: Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #4B5563;
    padding: 0 6px;
}
.user-name-link {
    text-decoration: none;
    cursor: pointer;
}
.user-name-link:hover {
    color: #6D28D9;
    text-decoration: underline;
}

.create-your-book-btn:hover {
    background-color: #5B21B6 !important;
    color: #FFFFFF;
}

.create-your-book-btn:active {
    background-color: #4C1D95 !important;
}

/* Языки */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.globe-icon {
    font-size: 16px;
}

.lang-link {
    color: #4B5563;
    text-decoration: none;
    padding: 0 4px;
    transition: color 0.2s;
}

    .lang-link:hover {
        color: #111827;
    }

    .lang-link.active {
        font-weight: 600;
        color: #111827;
    }

.divider {
    color: #9CA3AF;
}

/* === Адаптив === */

/* Tablet */
@media (max-width: 1024px) {
    .nav-links {
        gap: 8px;
    }

        .nav-links a {
            font-size: 13px;
            padding: 0 4px;
        }
}

/* Mobile */
@media (max-width: 768px) {
    .container-header {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .nav-links-left,
    .nav-links-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

        .nav-links a {
            width: 100%;
            justify-content: center;
        }

    .nav-links a.nav-create-tale-btn {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .create-your-book-btn {
        width: 100% !important;
    }

    .lang-switcher {
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }
}


/* === Test Mode Banner === */
.test-mode-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #fef08a;
    color: #713f12;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-bottom: 2px solid #facc15;
}

.test-mode-icon {
    font-size: 1.1rem;
}

/* === Hero Section === */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 1.5rem;
}

/* Двухколоночный герой: видео слева, контент справа */
.hero-section-split {
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.hero-split-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
    max-width: 1100px;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.hero-video-column {
    min-height: 280px;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #1f2937;
    border: none;
    box-shadow: none;
}

.hero-video-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.hero-video-wrap iframe,
.hero-video-wrap .hero-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.hero-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    min-height: 280px;
    color: #9ca3af;
    font-size: 1rem;
}

.hero-video-placeholder .material-symbols-outlined {
    font-size: 4rem;
    opacity: 0.7;
}

.hero-content-column {
    display: flex;
    align-items: stretch;
}

.hero-content-column .hero-card {
    max-width: none;
    flex: 1;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: none;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 35%, #fde68a 70%, #fcd34d 100%);
    border-radius: 1.25rem;
}

.hero-content-column .hero-overlay {
    display: none;
}

.hero-content-column .hero-content h1,
.hero-content-column .hero-content p {
    color: #1f2937;
}

.hero-content-column .hero-btn-secondary {
    border: 2px solid #1f2937;
    color: #1f2937;
    background: transparent;
}

.hero-content-column .hero-btn-secondary:hover {
    background-color: #1f2937;
    color: #fff;
}

/* Карточка — без рамок, мягко переходит в фон */
.hero-card {
    position: relative;
    background-image: url('/img/hero-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: 0;
    box-shadow: none;
    border: none;
    max-width: none;
    width: 100%;
    padding: 3rem;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* Затемнение */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 0;
}

/* Контент */
.hero-content {
    position: relative;
    z-index: 10;
}

    .hero-content h1 {
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1.125rem;
        color: #e5e7eb;
        margin-bottom: 2rem;
    }

/* Кнопки */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Контейнер кнопок */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Общий стиль */
.hero-btn-primary,
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

/* Основная кнопка */
.hero-btn-primary {
    background-color: #facc15; /* жёлтая */
    color: #111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

    .hero-btn-primary:hover {
        background-color: #eab308; /* темнее при hover */
        transform: translateY(-1px);
    }

/* Вторичная кнопка */
.hero-btn-secondary {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

    .hero-btn-secondary:hover {
        background-color: #fff;
        color: #000;
        transform: translateY(-1px);
    }

/* Фичи */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #e5e7eb;
    flex-wrap: wrap;
}

    .hero-features .feature {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-features .material-symbols-outlined {
        font-size: 1.25rem;
    }

/* === Адаптив === */
@media (max-width: 900px) {
    .hero-split-inner {
        grid-template-columns: 1fr;
    }

    .hero-video-column {
        min-height: 220px;
    }

    .hero-video-wrap {
        min-height: 220px;
    }

    .hero-video-placeholder {
        min-height: 220px;
    }

    .hero-content-column .hero-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        max-width: 420px;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

@media (max-width: 520px) {
    .hero-section-split {
        padding: 1rem 1rem;
    }

    .hero-video-column,
    .hero-content-column .hero-card {
        border-radius: 1rem;
    }

    .hero-card {
        padding: 1.5rem 1.25rem;
    }

    .hero-buttons {
        margin-bottom: 1.25rem;
    }
}
/* Section */
.how-section {
    background: #fff;
    padding: 5rem 1.5rem;
    text-align: center;
}

.how-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Заголовок */
.how-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.how-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

/* Сетка шагов */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.how-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .how-step span {
        font-size: 2rem;
        color: #3b82f6;
        margin-bottom: 0.75rem;
    }
    .how-step-icon {
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .how-step-icon img {
        width: 15rem;
        height: 15rem;
        object-fit: contain;
    }

    .how-step h3 {
        font-size: 1.125rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.5rem;
    }

    .how-step p {
        font-size: 0.95rem;
        color: #6b7280;
    }

/* Адаптив */
@media (max-width: 1024px) {
    .how-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .how-grid {
        grid-template-columns: 1fr;
    }
}

/* === Pricing Section === */
.pricing-section {
    background: #fff;
    padding: 5rem 1.5rem;
    text-align: center;
}

.pricing-container {
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.pricing-description {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto;
}

.pricing-counters-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
    margin-top: 1.5rem;
}

.pricing-counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pricing-counters-row .pricing-tales-counter-label {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.pricing-tales-counter-label {
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.pricing-tales-counter-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

@media (max-width: 768px) {
    .pricing-section {
        padding: 3rem 1rem;
    }

    .pricing-title {
        font-size: 1.75rem;
    }

    .pricing-description {
        font-size: 1rem;
    }

    .pricing-counters-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* === FAQ Section === */
.faq-section {
    background: #f9fafb;
    padding: 5rem 1.5rem;
    text-align: center;
}

.faq-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Заголовок */
.faq-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 3rem;
}

/* Сетка FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: left;
}

.faq-item {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .faq-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

.faq-question {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .faq-question::before {
        content: "❓";
        font-size: 1.25rem;
    }

.faq-answer {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Адаптив */
@media (max-width: 1024px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .faq-section {
        padding: 3rem 1rem;
    }

    .faq-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .faq-question {
        font-size: 1rem;
    }

    .faq-answer {
        font-size: 0.9rem;
    }
}

/* === Legal Section === */
.legal-section {
    background: #ffffff;
    padding: 4rem 1.5rem;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
    color: #1f2937;
}

.legal-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
}

.legal-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.legal-container h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-container p {
    margin-bottom: 1rem;
    color: #374151;
}

.legal-container ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.legal-container ul li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.legal-container hr {
    margin: 2.5rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .legal-title {
        font-size: 1.8rem;
    }

    .legal-container {
        font-size: 0.95rem;
    }

    .legal-container h2 {
        font-size: 1.3rem;
    }

    .legal-container h3 {
        font-size: 1.05rem;
    }
}

/* Footer */
.site-footer {
    background: #1f2937; /* тёмный фон */
    color: #9ca3af; /* светло-серый текст */
    padding: 3rem 1.5rem 1rem;
    font-family: Arial, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #374151;
}

/* Логотип */
.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Заголовки */
.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

/* Ссылки */
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-col ul li {
        margin-bottom: 0.5rem;
    }

        .footer-col ul li a {
            color: #9ca3af;
            text-decoration: none;
            font-size: 0.95rem;
            transition: color 0.2s;
        }

            .footer-col ul li a:hover {
                color: #fff;
            }

/* Соцсети */
.footer-social {
    display: flex;
    gap: 1rem;
}

    .footer-social a {
        font-size: 1.25rem;
        color: #9ca3af;
        transition: color 0.2s;
    }

        .footer-social a:hover {
            color: #fff;
        }

/* Payment methods */
.footer-payment {
    margin-top: 1.25rem;
}

.footer-payment-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-payment-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-payment-logo {
    height: 24px;
    width: auto;
    border-radius: 3px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

    .footer-payment-logo:hover {
        opacity: 1;
    }

/* Нижняя часть */
.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Адаптив */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }

    .footer-col {
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}
/* Секция логина */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px); /* чтобы было по центру */
    background: #f9fafb; /* светлый фон */
    padding: 2rem;
}

/* Карточка */
.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

/* Заголовок */
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

/* Поля */
.login-card .form-label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
    text-align: left;
}

.login-card .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

    .login-card .form-control:focus {
        border-color: #6D28D9;
        outline: none;
        box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
    }

/* Кнопка */
.btn-login {
    width: 100%;
    background-color: #6D28D9;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-login:hover {
        background-color: #5B21B6;
        transform: translateY(-1px);
    }

    .btn-login:active {
        background-color: #4C1D95;
        transform: translateY(0);
    }

/* Адаптив */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
}
/* Кнопка «Закрыть» на странице профиля */
.btn-profile-close {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid #6D28D9;
    border-radius: 9999px;
    color: #6D28D9;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.btn-profile-close:hover {
    background-color: #6D28D9;
    color: #fff;
}

/* Ссылки под кнопкой */
.login-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

    .login-links a {
        color: #6D28D9;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s;
    }

        .login-links a:hover {
            color: #5B21B6;
            text-decoration: underline;
        }

    .login-links .divider {
        color: #9ca3af;
    }

/* Секция */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    background: #f9fafb;
    padding: 2rem;
}

/* Карточка */
.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

/* Заголовок */
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

/* Поля */
.login-card .form-label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
    text-align: left;
}

.login-card .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

    .login-card .form-control:focus {
        border-color: #6D28D9;
        outline: none;
        box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
    }

/* Ошибки */
.text-danger {
    font-size: 0.85rem;
    text-align: left;
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
}

/* Список ошибок (validation summary) — как у полевых ошибок: иконка + красный текст */
.text-danger ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.text-danger ul li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc2626;
}
.text-danger ul li::before {
    content: "⚠️";
    font-size: 1rem;
}

/* Кнопка */
.btn-login {
    width: 100%;
    background-color: #6D28D9;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-login:hover {
        background-color: #5B21B6;
        transform: translateY(-1px);
    }

    .btn-login:active {
        background-color: #4C1D95;
        transform: translateY(0);
    }

/* Ссылки */
.login-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

    .login-links a {
        color: #6D28D9;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s;
    }

        .login-links a:hover {
            color: #5B21B6;
            text-decoration: underline;
        }

    .login-links .divider {
        color: #9ca3af;
    }

/* Адаптив */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
}

/* Секция */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    background: #f9fafb;
    padding: 2rem;
}

/* Карточка */
.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

/* Заголовок */
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

/* Поля */
.login-card .form-label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
    text-align: left;
}

.login-card .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

    .login-card .form-control:focus {
        border-color: #6D28D9;
        outline: none;
        box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
    }


/* Кнопка */
.btn-login {
    width: 100%;
    background-color: #6D28D9;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-login:hover {
        background-color: #5B21B6;
        transform: translateY(-1px);
    }

    .btn-login:active {
        background-color: #4C1D95;
        transform: translateY(0);
    }

/* Ссылки */
.login-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

    .login-links a {
        color: #6D28D9;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s;
    }

        .login-links a:hover {
            color: #5B21B6;
            text-decoration: underline;
        }

    .login-links .divider {
        color: #9ca3af;
    }

/* Адаптив */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    background: #f9fafb;
    padding: 2rem;
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.login-card .form-label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
    text-align: left;
}

.login-card .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

    .login-card .form-control:focus {
        border-color: #6D28D9;
        outline: none;
        box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
    }


.btn-login {
    width: 100%;
    background-color: #6D28D9;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-login:hover {
        background-color: #5B21B6;
        transform: translateY(-1px);
    }

    .btn-login:active {
        background-color: #4C1D95;
        transform: translateY(0);
    }

.login-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

    .login-links a {
        color: #6D28D9;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s;
    }

        .login-links a:hover {
            color: #5B21B6;
            text-decoration: underline;
        }

    .login-links .divider {
        color: #9ca3af;
    }

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
}

.input-error {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc2626; /* красный */
}

    /* иконка добавляется только если есть текст */
    .input-error:not(:empty)::before {
        content: "⚠️";
        font-size: 1rem;
    }
/* Секция */
.result-section {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Карточка */
.result-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    width: 100%;
    padding: 2rem;
}

/* Заголовок */
.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

/* Meta info */
.result-meta {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 1rem;
}

/* Текст ответа */
.result-output {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: #1f2937;
    font-size: 1rem;
    white-space: pre-wrap; /* сохраняет переносы */
    line-height: 1.6;
}

/* Кнопка (использует твой btn-login стиль) */
.btn-login {
    display: inline-block;
    background-color: #6D28D9;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-login:hover {
        background-color: #5B21B6;
        transform: translateY(-1px);
    }

    .btn-login:active {
        background-color: #4C1D95;
        transform: translateY(0);
    }

/* === Generate Section === */
.generate-section {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
    background: #f9fafb;
}

.generate-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    padding: 2rem;
}

.generate-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin-bottom: 0.5rem;
}

.generate-subtitle {
    font-size: 1rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 2rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

    .form-control:focus {
        border-color: #6D28D9;
        outline: none;
        box-shadow: 0 0 0 3px rgba(109,40,217,0.2);
    }

.form-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.input-error {
    font-size: 0.85rem;
    color: #dc2626;
}

/* Grid row */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-col {
    flex: 1;
}

/* Traits */
.traits-block .traits-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.traits-block .traits-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}
.traits-block .traits-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.traits-block .traits-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: #f3f4f6;
}
.traits-block .btn-traits-clear {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
}
.traits-block .btn-traits-clear:hover:not(:disabled) {
    background: #f9fafb;
}
.traits-block .btn-traits-clear:disabled {
    cursor: not-allowed;
    color: #9ca3af;
    border-color: #e5e7eb;
}
.traits-search-wrap {
    margin-bottom: 1rem;
}
.traits-search-wrap .traits-search-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.35rem;
}
.traits-block .traits-search {
    max-width: 20rem;
}
.traits-limit-msg {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
}
.trait-group {
    margin-bottom: 1.25rem;
}
.trait-group:last-child {
    margin-bottom: 0;
}
.trait-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}
.traits-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trait-chip {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border: none;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

    .trait-chip input {
        display: none;
    }

    .trait-chip span {
        pointer-events: none;
    }

    .trait-chip:hover {
        background: #e5e7eb;
    }

    .trait-chip:has(input:checked) {
        background: #6D28D9;
        color: #fff;
    }

    .trait-chip input:checked + span {
        /* inherit parent background/color so the whole chip is purple */
    }

.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loader-overlay.hidden {
    display: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-content img {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.loader-content p {
    font-size: 1.1rem;
    color: #4b5563;
    font-weight: 600;
}

/* Confirm finalize modal (step 3 Next) */
.confirm-finalize-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}
.confirm-finalize-modal {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: 100%;
    padding: 1.5rem 1.75rem;
}
.confirm-finalize-line1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
}
.confirm-finalize-line2 {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}
.confirm-finalize-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}
.btn-confirm-ok,
.btn-confirm-cancel {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s;
}
.btn-confirm-ok {
    background: #6D28D9;
    color: #fff;
}
.btn-confirm-ok:hover {
    background: #5B21B6;
}
.btn-confirm-cancel {
    background: #e5e7eb;
    color: #374151;
}
.btn-confirm-cancel:hover {
    background: #d1d5db;
}

/* Hero preview (before/after slider) */
.hero-preview-block {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.hero-preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}
.hero-preview-slider {
    position: relative;
    max-width: 360px;
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}
.hero-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.hero-preview-after {
    z-index: 0;
}
.hero-preview-before-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.hero-preview-before {
    width: 100%;
    height: 100%;
}
.hero-preview-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    margin-left: -12px;
    z-index: 2;
    pointer-events: none;
}
.hero-preview-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.hero-preview-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 2px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    pointer-events: none;
}
.hero-preview-handle::before,
.hero-preview-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 2px;
    background: #374151;
    left: 50%;
    transform: translate(-50%, -50%);
}
.hero-preview-handle::after {
    margin-left: -12px;
    width: 6px;
}
.hero-preview-line {
    pointer-events: auto;
    cursor: ew-resize;
}
.hero-preview-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    background: #f5f3ff;
    border: 2px solid #e9e5ff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}
.hero-preview-checkbox:hover {
    background: #ede9fe;
    border-color: #ddd6fe;
}
.hero-preview-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #6D28D9;
    cursor: pointer;
    flex-shrink: 0;
}
.hero-preview-checkbox-label {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.hero-preview-single-wrap {
    margin-bottom: 0.75rem;
}

.hero-preview-second-upload {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.hero-preview-second-upload .form-label {
    display: block;
    margin-bottom: 0.35rem;
}

.hero-preview-variants-choice {
    margin-top: 0.5rem;
}

.hero-preview-choose-text {
    font-size: 0.95rem;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.hero-preview-variants-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 480px;
    margin-bottom: 1rem;
}

.hero-preview-variant-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-preview-variant-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.hero-preview-variant-slider .hero-preview-variant-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.hero-preview-variant-slider .hero-preview-variant-after {
    z-index: 0;
}

.hero-preview-variant-slider .hero-preview-variant-before-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-preview-variant-slider .hero-preview-variant-before {
    width: 100%;
    height: 100%;
}

.hero-preview-variant-slider .hero-preview-variant-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    margin-left: -10px;
    z-index: 2;
    pointer-events: auto;
    cursor: ew-resize;
}

.hero-preview-variant-slider .hero-preview-variant-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: #fff;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.hero-preview-variant-slider .hero-preview-variant-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    pointer-events: none;
}

.hero-preview-variant-slider .hero-preview-variant-handle::before,
.hero-preview-variant-slider .hero-preview-variant-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 2px;
    background: #374151;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-preview-variant-slider .hero-preview-variant-handle::after {
    margin-left: -10px;
    width: 4px;
}

.hero-preview-variant-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.hero-preview-variant-card.selected {
    border-color: #6D28D9;
    box-shadow: 0 0 0 1px #6D28D9;
}

.hero-preview-variant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-preview-variant-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.hero-preview-variant-card.selected .hero-preview-variant-check {
    opacity: 1;
    background: #6D28D9;
    color: #fff;
}

.hero-preview-variant-check-icon {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
}

.hero-preview-variant-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.5rem 0.6rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-preview-variants-choice .hero-preview-cover-cb {
    margin-top: 0.5rem;
}

@media (max-width: 520px) {
    .hero-preview-variants-grid {
        grid-template-columns: 1fr;
    }
}

/* Picture mode: image radio buttons */
.picture-mode-radios {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.picture-mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.picture-mode-option:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.15);
}
.picture-mode-option:has(input:checked) {
    border-color: #6D28D9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.35);
    background: #f5f3ff;
}
.picture-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.picture-mode-option img {
    display: block;
    width: 125px;
    height: 185px;
    object-fit: cover;
    border-radius: 6px;
}
.picture-mode-name {
    margin-top: 2px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
}
.picture-mode-option:has(input:checked) .picture-mode-name {
    color: #6D28D9;
}

/* Address confirm modal (Order payment) */
.address-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}
.address-confirm-modal {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: 100%;
    padding: 1.5rem;
}
.address-confirm-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}
.address-confirm-label {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #6b7280;
}
.address-confirm-value {
    margin: 0 0 1.25rem 0;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #111827;
    line-height: 1.4;
}
.address-confirm-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.btn-address-edit {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border: 2px solid #6D28D9;
    color: #6D28D9;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.btn-address-edit:hover {
    background: #6D28D9;
    color: #fff;
}
.btn-address-confirm {
    padding: 0.6rem 1.25rem;
    background: #6D28D9;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn-address-confirm:hover {
    background: #5B21B6;
    transform: translateY(-1px);
}

    .trait-chip.add-custom {
        background: #e0f2fe;
        color: #111827;
        font-weight: 600;
    }

/* Actions */
.form-actions {
    text-align: right;
    margin-top: 2rem;
}

.btn-next {
    background-color: #facc15;
    color: #111827;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-next:hover {
        background-color: #eab308;
        transform: translateY(-1px);
    }

    .btn-next:active {
        background-color: #ca8a04;
        transform: translateY(0);
    }
/* Wizard container */
.wizard-section {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
    background: #f9fafb;
}

.wizard-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    max-width: 950px;
    width: 100%;
    padding: 2rem;
}

/* Incomplete tale banner */
.first-tale-banner {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1px solid #a78bfa;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.first-tale-banner-text {
    margin: 0;
    font-size: 0.95rem;
    color: #5b21b6;
    line-height: 1.5;
}

.incomplete-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.incomplete-banner-text {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #92400e;
    line-height: 1.4;
}

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

/* Steps indicator */
.wizard-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

    .wizard-steps .step {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: #374151;
    }

        .wizard-steps .step.active {
            background: #6D28D9;
            color: #fff;
        }

    .wizard-steps .divider {
        flex: 1;
        height: 2px;
        background: #e5e7eb;
    }

/* Step */
.wizard-step {
    display: none;
}

    .wizard-step.active {
        display: block;
    }

.wizard-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    text-align: center;
}

.wizard-subtitle {
    font-size: 1rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-next, .btn-prev {
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-next {
    background-color: #facc15;
    color: #111827;
}

    .btn-next:hover {
        background-color: #eab308;
    }

.btn-prev {
    background: #e5e7eb;
    color: #374151;
}

    .btn-prev:hover {
        background: #d1d5db;
    }

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
    text-align: center;
}

.progress-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    background: #6D28D9;
    height: 8px;
    border-radius: 9999px;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Final Result Display */
.final-result-display {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #111827;
}

.final-result-display img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === Dashboard === */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Tabs */
.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.tab-button:hover {
    color: #6D28D9;
}

.tab-button.active {
    color: #6D28D9;
    border-bottom-color: #6D28D9;
    font-weight: 600;
}

.tab-badge {
    background-color: #6D28D9;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Fairy Tales Grid */
.fairy-tales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Fairy Tale Card */
.fairy-tale-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.fairy-tale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-body {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.card-image-container {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 120px;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #6D28D9;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.card-order-number {
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #6D28D9;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.card-title {
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.card-date {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #6B7280;
    margin: 0 0 1rem 0;
}

.card-button {
    width: 100%;
    background-color: #6D28D9;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.card-button:hover {
    background-color: #5B21B6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6B7280;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6B7280;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #DC2626;
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #FEF2F2;
    border-radius: 8px;
    border: 1px solid #FECACA;
}

/* === Payment Page === */
.payment-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.payment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.payment-title {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2rem 0;
    text-align: center;
}

.payment-method-section {
    margin-bottom: 2rem;
}

.payment-method-label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.payment-method-options {
    display: flex;
    gap: 1rem;
}

.payment-method-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.payment-method-option:hover {
    border-color: #6D28D9;
    background-color: #f9fafb;
}

.payment-method-option input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.payment-method-option-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-width: 0;
    text-align: center;
}

.payment-method-icon {
    display: block;
    width: auto;
    height: 28px;
    max-height: 28px;
    max-width: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Idram logo — скруглённые углы плашки */
.payment-method-icon--idram {
    border-radius: 7px;
    overflow: hidden;
}

.payment-method-text {
    text-align: center;
    line-height: 1.2;
    font-size: 12px;
}

.payment-method-option:has(input[type="radio"]:checked) .payment-method-text {
    color: #6D28D9;
    font-weight: 600;
}

.payment-method-option:has(input[type="radio"]:checked) {
    border-color: #6D28D9;
    background-color: #f3f4f6;
}

.card-payment-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #6D28D9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-error {
    display: block;
    color: #DC2626;
    font-size: 12px;
    margin-top: 0.25rem;
}

.btn-payment {
    width: fit-content;
    max-width: min(100%, 22rem);
    min-width: 12.5rem;
    margin: 1rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6D28D9;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.75rem;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-payment:hover {
    background-color: #5B21B6;
}

.payment-submit-wrap {
    margin-top: 2rem;
    text-align: center;
}

/* === Story Viewer === */
/* No vertical scroll, full viewport layout when viewing a story */
body.story-view-page {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
body.story-view-page main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
body.story-view-page .site-footer {
    display: none;
}

.story-viewer-container {
    height: 100%;
    min-height: 0;
    background: #fff;
    padding: 0 12px 0.25rem;
    --story-shell-width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.story-viewer-header {
    flex-shrink: 0;
    width: 100%;
    max-width: var(--story-shell-width);
    margin: 0 auto 0;
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #6D28D9;
    text-decoration: none;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.back-link:hover {
    color: #4C1D95;
    text-decoration: underline;
}

.story-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    font-family: Arial, sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-container {
    /* Square book; fills available flex space; bigger by default */
    --book-size: min(1024px, min(100%, calc(100vh - 30px)));
    width: var(--book-size);
    height: var(--book-size);
    max-width: 1024px;
    margin: 0 auto;
    min-height: 520px;
    flex-shrink: 0;
    position: relative;
    perspective: 1500px;
    overflow: hidden;
    border-radius: 16px;
    cursor: grab;
}

@media (max-width: 1100px) {
    .book-container {
        --book-size: min(100%, min(1024px, calc(100vh - 30px)));
        width: var(--book-size);
        height: var(--book-size);
    }
}

.book-container.is-drag-turning {
    cursor: grabbing;
}

.book-page {
    width: 100%;
    min-height: 70vh;
    background: #e2d5a0;
    border-radius: 16px;
    box-shadow: none;
    padding: 3rem 4rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    overflow: hidden;
}

/* FB3D pages: full-bleed image, and warm text background */
.book-page.fb3d-page-image {
    padding: 0 !important;
    background: #ffffff !important;
}

.book-page.fb3d-page-text {
    background: linear-gradient(135deg, #FFFDF2 0%, #FDD854 100%) !important;
    padding: 0 !important;
}

.book-page.fb3d-page-empty,
.fb3d-page-empty {
    background: linear-gradient(135deg, #FFFDF2 0%, #FDD854 100%) !important;
    padding: 0 !important;
}

/* Texture sandbox: solid background so html2canvas does not throw (addColorStop non-finite) */
#fb3dSandbox .book-page.fb3d-page-text,
#fb3dSandbox .book-page.fb3d-page-empty,
#fb3dSandbox .fb3d-page-empty {
    background: #faeebe !important;
}

/* Cover: full-bleed image with title overlay (big font) */
.fb3d-cover-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fb3d-cover-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.fb3d-cover-title {
    position: absolute;
    bottom: 12%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 1rem;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 800;
    color: #fff;
    text-align: center;
    font-family: Arial, sans-serif;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
    line-height: 1.2;
}

.fb3d-full-bleed {
    width: 100%;
    height: 100%;
    display: block;
    background: #fff;
    overflow: hidden;
}

.fb3d-full-bleed img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.book-page.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

.book-page.page-slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.book-page.page-slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.book-page.page-slide-out-left {
    animation: slideOutLeft 0.3s ease-in forwards;
}

.book-page.page-slide-out-right {
    animation: slideOutRight 0.3s ease-in forwards;
}

.book-page.page-flip-out-next {
    transform-origin: center center;
    animation: flipOutNext 0.22s ease-in forwards;
}

.book-page.page-flip-in-next {
    transform-origin: center center;
    animation: flipInNext 0.38s ease-out forwards;
}

.book-page.page-flip-out-prev {
    transform-origin: center center;
    animation: flipOutPrev 0.22s ease-in forwards;
}

.book-page.page-flip-in-prev {
    transform-origin: center center;
    animation: flipInPrev 0.38s ease-out forwards;
}


.book-page.page-under-turn {
    opacity: 0.9;
    transition: opacity 0.25s ease;
}

.book-page.page-reveal-under-turn {
    animation: revealUnderTurn 0.42s ease-out forwards;
}

/* Half of the page that lifts; same size as book page (clipped by container). .next = right half, .prev = left half */
.book-page-turn-sheet {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    z-index: 12;
    background:
        linear-gradient(120deg, rgba(248, 248, 248, 0.98) 0%, rgba(255, 255, 255, 1) 50%, rgba(238, 238, 238, 0.96) 100%);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform, opacity, box-shadow;
}

.book-page-turn-sheet.next {
    left: 50%;
    right: auto;
    transform-origin: left center;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.12), inset 1px 0 0 rgba(255, 255, 255, 0.8);
}

.book-page-turn-sheet.prev {
    left: 0;
    right: auto;
    transform-origin: right center;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.12), inset -1px 0 0 rgba(255, 255, 255, 0.8);
}

.book-page-turn-sheet.drag {
    animation: none !important;
}

.book-page-turn-sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -12deg,
        rgba(0, 0, 0, 0.02) 0,
        rgba(0, 0, 0, 0.02) 2px,
        transparent 2px,
        transparent 8px
    );
    opacity: 0.6;
}

.book-page-turn-sheet.next::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 55%, rgba(230, 230, 230, 0.7) 100%);
    transform-origin: bottom right;
    transform: skewX(-2deg);
}

.book-page-turn-sheet.prev::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 50px;
    background: linear-gradient(225deg, rgba(255, 255, 255, 0) 55%, rgba(230, 230, 230, 0.7) 100%);
    transform-origin: bottom left;
    transform: skewX(2deg);
}

.book-page-turn-sheet-photo {
    position: absolute;
    inset: 0;
    width: 200%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    backface-visibility: hidden;
    filter: saturate(1.02) contrast(1.01);
}

.book-page-turn-sheet-photo.turn-front {
    transform: rotateY(0deg);
}

.book-page-turn-sheet-photo.turn-back {
    transform: rotateY(180deg);
}

.book-page-turn-sheet.next .book-page-turn-sheet-photo {
    object-position: right center;
}

.book-page-turn-sheet.prev .book-page-turn-sheet-photo {
    object-position: left center;
}

.book-page-turn-sheet.next {
    animation: rightHalfTurnNext 0.52s cubic-bezier(0.22, 0.72, 0.2, 1) forwards;
}

.book-page-turn-sheet.prev {
    animation: rightHalfTurnPrev 0.52s cubic-bezier(0.22, 0.72, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes flipOutNext {
    from {
        opacity: 1;
        transform: perspective(1500px) rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
    to {
        opacity: 0.25;
        transform: perspective(1500px) rotateY(-34deg) translateX(-6%) scale(0.985);
        box-shadow: -22px 20px 50px rgba(0, 0, 0, 0.26);
    }
}

@keyframes flipInNext {
    from {
        opacity: 0.25;
        transform: perspective(1500px) rotateY(34deg) translateX(6%) scale(0.985);
        box-shadow: 22px 20px 50px rgba(0, 0, 0, 0.26);
    }
    to {
        opacity: 1;
        transform: perspective(1500px) rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
}

@keyframes flipOutPrev {
    from {
        opacity: 1;
        transform: perspective(1500px) rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
    to {
        opacity: 0.25;
        transform: perspective(1500px) rotateY(34deg) translateX(6%) scale(0.985);
        box-shadow: 22px 20px 50px rgba(0, 0, 0, 0.26);
    }
}

@keyframes flipInPrev {
    from {
        opacity: 0.25;
        transform: perspective(1500px) rotateY(-34deg) translateX(-6%) scale(0.985);
        box-shadow: -22px 20px 50px rgba(0, 0, 0, 0.26);
    }
    to {
        opacity: 1;
        transform: perspective(1500px) rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
}

/* Page turns from spine: right half rotates; softer perspective = less bend */
@keyframes rightHalfTurnNext {
    0% {
        opacity: 1;
        transform: perspective(2800px) rotateY(0deg);
        box-shadow: -6px 0 20px rgba(0, 0, 0, 0.12), inset 1px 0 0 rgba(255, 255, 255, 0.8);
    }
    50% {
        opacity: 1;
        transform: perspective(2800px) rotateY(-90deg);
        box-shadow: -14px 2px 24px rgba(0, 0, 0, 0.14);
    }
    100% {
        opacity: 0;
        transform: perspective(2800px) rotateY(-180deg);
        box-shadow: -16px 4px 28px rgba(0, 0, 0, 0.12);
    }
}

/* Left half folds to the left (pivot at right edge = spine) */
@keyframes rightHalfTurnPrev {
    0% {
        opacity: 1;
        transform: perspective(2800px) rotateY(0deg);
        box-shadow: 6px 0 20px rgba(0, 0, 0, 0.12), inset -1px 0 0 rgba(255, 255, 255, 0.8);
    }
    50% {
        opacity: 1;
        transform: perspective(2800px) rotateY(90deg);
        box-shadow: 14px 2px 24px rgba(0, 0, 0, 0.14);
    }
    100% {
        opacity: 0;
        transform: perspective(2800px) rotateY(180deg);
        box-shadow: 16px 4px 28px rgba(0, 0, 0, 0.12);
    }
}

@keyframes revealUnderTurn {
    0% {
        opacity: 0.5;
        transform: scale(0.994);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.page-cover {
    text-align: center;
    width: 100%;
}

.cover-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: white;
    padding: 0.5rem;
}

.cover-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #111827;
    margin-top: 2rem;
    font-family: Arial, sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-with-image {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.page-image-container {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.page-with-image .page-image-container:only-child {
    flex: 1 1 100%;
    max-width: 100%;
}

.page-with-image .page-text-before-image {
    flex: 0 0 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #FFFDF2 0%, #faeebe 50%, #FDD854 100%);
}

/* Story narrative (left part of page) — Webstart only in book */
.page-text-before-image {
    font-size: 1.75rem;
    line-height: 2;
    color: #1f2937;
    text-align: justify;
    font-family: 'Webstart', sans-serif !important;
    padding: 1.5rem 2rem;
    letter-spacing: 0.01em;
    width: 100%;
}

.page-text-before-image p {
    margin: 0 0 1rem 0;
    text-indent: 1.5em;
    font-family: 'Webstart', sans-serif !important;
}

.page-text-before-image p:first-child {
    text-indent: 0;
}

.story-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: white;
    padding: 0.5rem;
    display: block;
    margin: 0 auto;
}

.page-with-image .story-image {
    max-height: 65vh;
}

.page-content {
    width: 100%;
}

/* Story narrative text only — Webstart only in book */
.page-text {
    font-size: 1.25rem;
    line-height: 2;
    color: #1f2937;
    text-align: justify;
    font-family: 'Webstart', sans-serif !important;
    padding: 0 1rem;
    letter-spacing: 0.01em;
    width: 100%;
}

.page-text p {
    margin: 0 0 1rem 0;
    text-indent: 1.5em;
    font-family: 'Webstart', sans-serif !important;
}

.page-text p:first-child {
    text-indent: 0;
}

.book-navigation {
    max-width: 1200px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
}

.nav-button {
    background: white;
    border: 2px solid #6D28D9;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #6D28D9;
}

.nav-button:hover:not(:disabled) {
    background: #6D28D9;
    color: white;
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    min-width: 80px;
    text-align: center;
}

/* Story toolbar (FlipBook-style) */
.story-toolbar {
    max-width: 1200px;
    margin: 0 auto 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Bottom floating toolbar like typical 3D flipbook UI */
.fb3d-bottom-toolbar {
    position: absolute;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(8px);
    z-index: 30;
}

.fb3d-toolbar-sep {
    width: 1px;
    height: 24px;
    background: rgba(148, 163, 184, 0.7);
    margin: 0 0.25rem;
}

.fb3d-bottom-toolbar .page-indicator {
    min-width: auto;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
    padding: 0 0.25rem;
}

.fb3d-bottom-toolbar .page-goto-input {
    width: 3.25rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.toolbar-group.toolbar-nav {
    gap: 0.5rem;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.toolbar-btn:hover:not(:disabled) {
    background: #6D28D9;
    color: #fff;
    border-color: #6D28D9;
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar-btn .material-symbols-outlined {
    font-size: 20px;
}

.page-goto-input {
    width: 3.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
}

.story-content-wrap {
    flex: 1;
    min-height: 0;
    max-width: var(--story-shell-width);
    margin: 0 auto;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.story-preview-notice {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1px solid #a78bfa;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 0.5rem 0 0.4rem;
    font-size: 0.95rem;
    font-family: 'Webstart', 'Noto Sans Armenian', sans-serif !important;
    font-weight: bold;
    color: #5b21b6;
    line-height: 1.5;
    text-align: center;
}

.book-zoom-wrapper {
    flex: 1;
    min-height: 0;
    transform-origin: top center;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    max-width: var(--story-shell-width);
    margin: 0 auto;
    width: 100%;
}

.book-zoom-inner {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
    padding-top: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.book-zoom-wrapper {
    padding-bottom: 0.25rem;
}

.side-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #9ca3af;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    display: none !important;
}

/* Make side arrows closer to screenshot (lighter, softer) */
.side-nav-arrow {
    background: rgba(255, 255, 255, 0.82);
    color: #64748b;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.side-nav-arrow-left {
    left: -74px;
}

.side-nav-arrow-right {
    right: -74px;
}

.side-nav-arrow .material-symbols-outlined {
    font-size: 34px;
    font-variation-settings: "wght" 350;
}

.side-nav-arrow:hover:not(:disabled) {
    color: #6b7280;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.side-nav-arrow:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Panels (thumbnails, bookmarks) */
.story-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 95vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.story-panel.open {
    transform: translateX(0);
}

.story-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.story-panel .panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.story-panel .panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.story-panel .panel-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.story-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Thumbnails grid */
.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.thumbnail-card {
    position: relative;
    aspect-ratio: 3/4;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.thumbnail-card:hover {
    border-color: #6D28D9;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.2);
}

.thumbnail-card.active {
    border-color: #6D28D9;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6D28D9;
}

.thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-num {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.thumbnail-text {
    padding: 0.5rem;
    font-size: 0.7rem;
    line-height: 1.3;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bookmarks */
.bookmark-add {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bookmark-add input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
}

.btn-add-bookmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: #6D28D9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-bookmark:hover {
    background: #5B21B6;
}

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

.bookmarks-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.35rem;
}

.bookmarks-list li:hover {
    background: #f3f4f6;
}

.bookmarks-list a {
    flex: 1;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
}

.bookmarks-list a:hover {
    color: #6D28D9;
}

.bookmark-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.bookmark-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

@media print {
    .story-viewer-header,
    .story-toolbar,
    .story-panel,
    .book-navigation,
    .no-print {
        display: none !important;
    }
    .story-viewer-container {
        background: #fff;
        padding: 0;
    }
    .book-zoom-wrapper {
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .book-page {
        padding: 1.5rem 2rem;
    }
    
    .story-title {
        font-size: 1.75rem;
    }
    
    .cover-title {
        font-size: 2rem;
    }
    
    .page-with-image {
        flex-direction: column;
    }
    
    .page-image-container {
        flex: none;
        max-width: 100%;
    }
    
    .page-text-before-image,
    .page-text {
        font-size: 1.5rem;
        line-height: 1.8;
    }
    
    .cover-image,
    .story-image {
        max-height: 50vh;
    }

    .side-nav-arrow {
        width: 44px;
        height: 44px;
    }

    .side-nav-arrow-left {
        left: -18px;
    }

    .side-nav-arrow-right {
        right: -18px;
    }

    .side-nav-arrow .material-symbols-outlined {
        font-size: 28px;
    }
}

/* === Corner character + animated speech bubble (bottom right) === */
.corner-character-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    pointer-events: none;
}

.corner-character-img {
    width: 100px;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: auto;
    cursor: pointer;
}

.corner-character-widget.bubble-minimized .speech-bubble {
    display: none !important;
}

.speech-bubble {
    background: linear-gradient(135deg, #FFFDF2 0%, #faeebe 50%, #FDD854 100%);
    border-radius: 20px 20px 4px 20px;
    padding: 12px 18px;
    padding-top: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
    max-width: 260px;
    margin-bottom: 8px;
    position: relative;
    pointer-events: auto;
}

.speech-bubble-minimize {
    position: absolute;
    top: 6px;
    left: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    pointer-events: auto;
}
.speech-bubble-minimize:hover {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.06);
}
.speech-bubble-minimize:focus {
    outline: none;
    color: #1f2937;
}

/* Pointer from bubble down to robot — тот же цвет, что и фон облачка */
.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: 24px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid #faeebe;
    border-top-color: #faeebe;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

.speech-bubble-text {
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
    display: block;
    text-align: justify;
}

/* Entrance animation for the cloud */
.speech-bubble-animate {
    animation: speechBubbleAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes speechBubbleAppear {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 480px) {
    .corner-character-widget {
        bottom: 12px;
        right: 12px;
    }
    .corner-character-img {
        width: 72px;
    }
    .speech-bubble {
        max-width: 200px;
        padding: 10px 14px;
        padding-top: 26px;
        margin-bottom: 8px;
    }
    .speech-bubble-text {
        font-size: 0.85rem;
    }
}

/* Password field + show/hide (eye) toggle */
.password-field-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.password-field-wrap .form-control {
    padding-right: 2.75rem;
}

/* Auth cards: pill-shaped password field (mockup — soft blue-grey, large radius) */
.login-card .password-field-wrap .form-control {
    background-color: #e8eef5;
    border: 1px solid #d0dae6;
    border-radius: 9999px;
    padding: 0.8rem 1.15rem;
    padding-right: 3rem;
    margin-bottom: 0;
    box-shadow: none;
    font-size: 1rem;
    line-height: 1.35;
    color: #111827;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card .password-field-wrap .form-control:focus {
    background-color: #f0f5fa;
    border-color: #b8c5d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.14);
}

.login-card .password-field-wrap .form-control::placeholder {
    color: #94a3b8;
}

.login-card .password-field-wrap + .input-error,
.login-card .password-field-wrap ~ .input-error {
    margin-top: 0.35rem;
}

.login-card .password-field-wrap .password-toggle-btn {
    right: 0.55rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    color: #475569;
    background: transparent;
}

.login-card .password-field-wrap .password-toggle-btn:hover {
    color: #1e293b;
    background-color: rgba(255, 255, 255, 0.65);
}

.login-card .password-field-wrap .password-toggle-btn:focus-visible {
    outline: 2px solid #6d28d9;
    outline-offset: 2px;
}

.login-card .password-field-wrap .password-toggle-btn .material-symbols-outlined {
    font-size: 1.4rem;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Password label slightly closer to mockup (bold, dark) */
.login-card .mb-3:has(.password-field-wrap) > .form-label {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.45rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #374151;
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus:not(:focus-visible) {
    outline: none;
}

.password-toggle-btn:focus-visible {
    outline: 2px solid #6d28d9;
    outline-offset: 1px;
}

.password-toggle-btn .material-symbols-outlined {
    font-size: 1.35rem;
    line-height: 1;
}

/* Password strength indicator */
.pwd-strength-wrap {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding: 0 0.25rem;
}

.pwd-strength-bar {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.pwd-strength-seg {
    flex: 1;
    height: 4px;
    border-radius: 9999px;
    background-color: #d1d5db;
    transition: background-color 0.25s ease;
}

.pwd-strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 5rem;
    text-align: right;
    transition: color 0.25s ease;
}

/* ── Drop-zone file upload ── */
.drop-zone {
    position: relative;
    border: 2px dashed #a78bfa;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: #faf5ff;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone--over {
    border-color: #6D28D9;
    background: #f3e8ff;
}

.drop-zone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone__icon {
    width: 2.5rem;
    height: 2.5rem;
    color: #7c3aed;
    margin: 0 auto 0.75rem;
    display: block;
}

.drop-zone__text {
    color: #374151;
    font-size: 0.95rem;
    margin: 0 0 0.25rem;
}

.drop-zone__text span {
    color: #6D28D9;
    text-decoration: underline;
}

.drop-zone__hint {
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0;
}

.drop-zone__filename {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    word-break: break-all;
}