/* ==========================================================================
   ГЕНЕРАТОР ГРАМОТ — UX/UI СТИЛІ (АЛЬБОМНИЙ А4)
   ========================================================================== */

.landscape-preview {
    width: 100%;
    /* Дозволяємо горизонтальний скрол на мобільних пристроях */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    background-color: #cbd5e1;
    border-radius: 12px;
    display: flex;
    justify-content: flex-start; /* Для правильного скролу на смартфонах */
}

@media (min-width: 1024px) {
    .landscape-preview {
        justify-content: center; /* Центруємо тільки на великих екранах */
    }
}

.landscape-scroll-wrapper {
    min-width: 297mm;
    padding: 5px;
}

.a4-page-landscape {
    width: 297mm;
    height: 210mm;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    position: relative;
    box-sizing: border-box;
    padding: 20mm;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.diploma-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    z-index: 5;
    position: relative;
}

.diploma-type { font-family: 'Comfortaa', cursive, sans-serif; font-size: 38pt; font-weight: 700; letter-spacing: 3px; margin-top: 5mm; }
.diploma-award { font-family: 'Inter', sans-serif; font-size: 14pt; font-weight: 600; letter-spacing: 5px; color: #475569; margin-top: 2mm; }
.diploma-name { font-family: 'Playfair Display', serif; font-size: 32pt; font-weight: 700; font-style: italic; color: #1e293b; border-bottom: 2px dashed #cbd5e1; min-width: 60%; padding-bottom: 2mm; margin: 4mm 0; }
.diploma-nomination { font-family: 'Comfortaa', cursive, sans-serif; font-size: 22pt; font-weight: 700; }
.diploma-description { font-family: 'Inter', sans-serif; font-size: 13pt; line-height: 1.6; color: #334155; max-width: 80%; margin-bottom: 5mm; }

.diploma-footer { width: 85%; display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 5mm; }
.footer-sign, .footer-date { display: flex; flex-direction: column; align-items: center; width: 65mm; font-family: 'Inter', sans-serif; font-size: 11pt; color: #475569; }
.sign-line { width: 100%; border-top: 1.5px solid #475569; margin-bottom: 2mm; }

.diploma-watermark { position: absolute; bottom: 5mm; right: 10mm; font-family: 'Inter', sans-serif; font-size: 10pt; font-weight: 600; color: rgba(148, 163, 184, 0.6); z-index: 10;}

/* ДИЗАЙНИ РАМОК ЗАЛИШЕНО БЕЗ ЗМІН (вони ідеальні) */
.theme-gold { background: #fffdf5; border: 12mm solid #d4af37; outline: 2px solid #aa7c11; outline-offset: -8mm; }
.theme-gold .diploma-type, .theme-gold .diploma-nomination { color: #b45309; }
.theme-gold .frame-decor-top-left { position: absolute; top: 2mm; left: 2mm; width: 20mm; height: 20mm; border-top: 4px solid #aa7c11; border-left: 4px solid #aa7c11; }
.theme-gold .frame-decor-bottom-right { position: absolute; bottom: 2mm; right: 2mm; width: 20mm; height: 20mm; border-bottom: 4px solid #aa7c11; border-right: 4px solid #aa7c11; }

.theme-joy { background: #f0fdfa; border: 10mm solid #38bdf8; box-shadow: inset 0 0 0 3px #f43f5e; }
.theme-joy .diploma-type { color: #f43f5e; }
.theme-joy .diploma-nomination { color: #0284c7; }
.theme-joy .frame-decor-top-right::after { content: '🎈 ☀️'; font-size: 30pt; position: absolute; top: 5mm; right: 5mm; }
.theme-joy .frame-decor-bottom-left::after { content: '🎉 🧸'; font-size: 25pt; position: absolute; bottom: 5mm; left: 5mm;}

.theme-space { background: #0f172a; border: 10mm solid #1e1b4b; color: #f8fafc; }
.theme-space .diploma-type, .theme-space .diploma-name { color: #38bdf8; }
.theme-space .diploma-award, .theme-space .footer-sign, .theme-space .footer-date { color: #94a3b8; }
.theme-space .diploma-nomination { color: #fbbf24; }
.theme-space .diploma-description { color: #cbd5e1; }
.theme-space .sign-line { border-top-color: #38bdf8; }
.theme-space .frame-decor-top-left::after { content: '🚀'; font-size: 35pt; position: absolute; top: 5mm; left: 5mm; }
.theme-space .frame-decor-bottom-right::after { content: '🪐'; font-size: 35pt; position: absolute; bottom: 5mm; right: 5mm; }

.theme-magic { background: #fefcbf; border: 12mm solid #7c2d12; outline: 2px dashed #fcd34d; outline-offset: -6mm; }
.theme-magic .diploma-type { color: #7c2d12; font-family: 'Playfair Display', serif; }
.theme-magic .diploma-nomination { color: #b45309; }
.theme-magic .frame-decor-top-right::after { content: '🦉'; font-size: 35pt; position: absolute; top: 4mm; right: 4mm; }
.theme-magic .frame-decor-bottom-left::after { content: '📜'; font-size: 30pt; position: absolute; bottom: 4mm; left: 4mm; }

.theme-eco { background: #f0fdf4; border: 10mm solid #22c55e; outline: 2px solid #166534; outline-offset: -4mm; }
.theme-eco .diploma-type { color: #166534; }
.theme-eco .diploma-nomination { color: #15803d; }
.theme-eco .frame-decor-top-left::after { content: '🌿'; font-size: 30pt; position: absolute; top: 4mm; left: 4mm; }
.theme-eco .frame-decor-bottom-right::after { content: '🍀'; font-size: 30pt; position: absolute; bottom: 4mm; right: 4mm; }

/* 🏛️ КЛАСИКА */
.theme-blue { background: #f8fafc; border: 12mm solid #1e3a8a; outline: 2px solid #bfdbfe; outline-offset: -8mm; }
.theme-blue .diploma-type { color: #1e3a8a; } .theme-blue .diploma-nomination { color: #2563eb; }
.theme-red { background: #fef2f2; border: 12mm solid #991b1b; outline: 2px solid #fca5a5; outline-offset: -8mm; }
.theme-red .diploma-type { color: #991b1b; } .theme-red .diploma-nomination { color: #dc2626; }
.theme-dark { background: #f8fafc; border: 12mm solid #334155; outline: 2px solid #94a3b8; outline-offset: -8mm; }
.theme-dark .diploma-type { color: #334155; } .theme-dark .diploma-nomination { color: #475569; }

/* 🌍 ПРИРОДА ТА ПОРИ РОКУ */
.theme-autumn { background: #fffbeb; border: 10mm solid #ea580c; border-radius: 15px; }
.theme-autumn .diploma-type { color: #c2410c; } .theme-autumn .diploma-nomination { color: #ea580c; }
.theme-autumn .frame-decor-top-left::after { content: '🍁'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-autumn .frame-decor-bottom-right::after { content: '🍂'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-winter { background: #f0f9ff; border: 10mm solid #0284c7; box-shadow: inset 0 0 20px #bae6fd; }
.theme-winter .diploma-type { color: #0369a1; } .theme-winter .diploma-nomination { color: #0284c7; }
.theme-winter .frame-decor-top-left::after { content: '❄️'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-winter .frame-decor-bottom-right::after { content: '⛄'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-spring { background: #fdf4ff; border: 10mm solid #d946ef; }
.theme-spring .diploma-type { color: #a21caf; } .theme-spring .diploma-nomination { color: #d946ef; }
.theme-spring .frame-decor-top-left::after { content: '🌸'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-spring .frame-decor-bottom-right::after { content: '🌷'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-summer { background: #fefce8; border: 10mm solid #eab308; }
.theme-summer .diploma-type { color: #ca8a04; } .theme-summer .diploma-nomination { color: #eab308; }
.theme-summer .frame-decor-top-left::after { content: '☀️'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-summer .frame-decor-bottom-right::after { content: '🏖️'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-ocean { background: #ecfeff; border: 10mm solid #0891b2; }
.theme-ocean .diploma-type { color: #0e7490; } .theme-ocean .diploma-nomination { color: #0891b2; }
.theme-ocean .frame-decor-top-left::after { content: '🌊'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-ocean .frame-decor-bottom-right::after { content: '🐬'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-forest { background: #f0fdf4; border: 10mm solid #15803d; }
.theme-forest .diploma-type { color: #166534; } .theme-forest .diploma-nomination { color: #15803d; }
.theme-forest .frame-decor-top-left::after { content: '🌲'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-forest .frame-decor-bottom-right::after { content: '🦊'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-flowers { background: #fff1f2; border: 10mm solid #e11d48; }
.theme-flowers .diploma-type { color: #be123c; } .theme-flowers .diploma-nomination { color: #e11d48; }
.theme-flowers .frame-decor-top-left::after { content: '🌺'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-flowers .frame-decor-bottom-right::after { content: '🦋'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

/* 🎨 ФАНТАЗІЯ ТА ДІТИ */
.theme-superhero { background: #fffbeb; border: 8mm solid #dc2626; outline: 4mm solid #2563eb; outline-offset: -12mm; }
.theme-superhero .diploma-type { color: #dc2626; font-family: 'Inter', sans-serif; font-style: italic; } 
.theme-superhero .diploma-nomination { color: #2563eb; }
.theme-superhero .frame-decor-top-left::after { content: '⚡'; font-size: 35pt; position: absolute; top: 6mm; left: 6mm; }

.theme-princess { background: #fdf2f8; border: 10mm solid #f472b6; border-radius: 30px; }
.theme-princess .diploma-type { color: #db2777; font-family: 'Playfair Display', serif; }
.theme-princess .frame-decor-top-left::after { content: '👑'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-princess .frame-decor-bottom-right::after { content: '✨'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-dino { background: #f7fee7; border: 10mm solid #4d7c0f; }
.theme-dino .diploma-type { color: #3f6212; }
.theme-dino .frame-decor-top-left::after { content: '🦖'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-dino .frame-decor-bottom-right::after { content: '🦕'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-cars { background: #f8fafc; border: 10mm dashed #0f172a; }
.theme-cars .diploma-type { color: #0f172a; } .theme-cars .diploma-nomination { color: #dc2626; }
.theme-cars .frame-decor-top-left::after { content: '🏁'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-cars .frame-decor-bottom-right::after { content: '🏎️'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-animals { background: #fefce8; border: 10mm solid #a16207; }
.theme-animals .diploma-type { color: #713f12; }
.theme-animals .frame-decor-top-left::after { content: '🦁'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-animals .frame-decor-bottom-right::after { content: '🦒'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-sweets { background: #fff1f2; border: 10mm dotted #fb7185; }
.theme-sweets .diploma-type { color: #e11d48; }
.theme-sweets .frame-decor-top-left::after { content: '🍭'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }
.theme-sweets .frame-decor-bottom-right::after { content: '🧁'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-rainbow { background: #ffffff; border: 10mm solid transparent; border-image: linear-gradient(to right, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #a855f7) 1; }
.theme-rainbow .diploma-type { background: linear-gradient(to right, #ef4444, #3b82f6); -webkit-background-clip: text; color: transparent; }

/* 🏫 ШКІЛЬНІ */
.theme-blackboard { background: #0f172a; border: 12mm solid #475569; color: #f8fafc; }
.theme-blackboard .diploma-type, .theme-blackboard .diploma-name, .theme-blackboard .diploma-nomination { color: #ffffff; font-family: 'Comic Neue', cursive; }
.theme-blackboard .diploma-award, .theme-blackboard .diploma-description, .theme-blackboard .footer-sign, .theme-blackboard .footer-date { color: #cbd5e1; }
.theme-blackboard .sign-line { border-top-color: #cbd5e1; }
.theme-blackboard .frame-decor-top-left::after { content: '📐'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }

.theme-notebook { background: repeating-linear-gradient(#f1f5f9 0, #f1f5f9 1px, transparent 1px, transparent 8mm), repeating-linear-gradient(90deg, #f1f5f9 0, #f1f5f9 1px, transparent 1px, transparent 8mm); background-color: #ffffff; border: 8mm solid #3b82f6; }
.theme-notebook .diploma-type { color: #1d4ed8; }
.theme-notebook .frame-decor-top-left::after { content: '📝'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }

.theme-watercolor { background: linear-gradient(135deg, #fdf4ff 0%, #ecfeff 50%, #fefce8 100%); border: none; box-shadow: inset 0 0 0 10mm #ffffff, inset 0 0 20px 10mm rgba(0,0,0,0.1); }
.theme-watercolor .diploma-type { color: #db2777; }
.theme-watercolor .frame-decor-top-left::after { content: '🎨'; font-size: 35pt; position: absolute; top: 8mm; left: 10mm; }

/* 🇺🇦 УКРАЇНСЬКА ТЕМАТИКА */
.theme-ua-vyshyvanka { background: #ffffff; border: 12mm solid transparent; border-image: repeating-conic-gradient(#dc2626 0% 25%, #ffffff 25% 50%, #111827 50% 75%, #ffffff 75% 100%) 14 round; box-shadow: inset 0 0 0 2mm #dc2626, 0 0 0 2mm #111827; }
.theme-ua-vyshyvanka .diploma-type { color: #dc2626; font-family: 'Playfair Display', serif; } 
.theme-ua-vyshyvanka .diploma-nomination { color: #111827; }
.theme-ua-vyshyvanka .frame-decor-top-left::after { content: '💠'; font-size: 30pt; position: absolute; top: 4mm; left: 6mm; }

.theme-ua-kalyna .frame-decor-top-left { position: absolute; top: 6mm; left: 8mm; width: 40px; height: 40px; z-index: 10;}
.theme-ua-kalyna .frame-decor-top-left::before { content: '🌿'; font-size: 35pt; position: absolute; left: 15px; top: -15px; }
.theme-ua-kalyna .frame-decor-top-left::after { content: '●'; font-size: 14pt; position: absolute; left: 0; top: 15px; color: #be123c; text-shadow: 12px -5px 0 #be123c, 24px 0 0 #be123c, 6px 10px 0 #be123c, 18px 10px 0 #be123c, 12px 20px 0 #be123c; }
.theme-ua-kalyna .frame-decor-bottom-right { position: absolute; bottom: 15mm; right: 28mm; width: 40px; height: 40px; z-index: 10;}
.theme-ua-kalyna .frame-decor-bottom-right::before { content: '🌿'; font-size: 35pt; position: absolute; left: -15px; top: -5px; transform: scaleX(-1); }
.theme-ua-kalyna .frame-decor-bottom-right::after { content: '●'; font-size: 14pt; position: absolute; left: 0; top: 5px; color: #be123c; text-shadow: -12px -5px 0 #be123c, -24px 0 0 #be123c, -6px 10px 0 #be123c, -18px 10px 0 #be123c, -12px 20px 0 #be123c; }

.theme-ua-song { background: #fdfbf7; border: 10mm double #0284c7; outline: 2px solid #eab308; outline-offset: -5mm; }
.theme-ua-song .diploma-type { color: #0369a1; } 
.theme-ua-song .diploma-nomination { color: #ca8a04; }
.theme-ua-song .frame-decor-top-left::after { content: '🎵'; font-size: 35pt; position: absolute; top: 4mm; left: 6mm; }
.theme-ua-song .frame-decor-bottom-right::after { content: '🎻'; font-size: 35pt; position: absolute; bottom: 4mm; right: 6mm; }

.theme-ua-flag { background: #ffffff; border: 12mm solid transparent; border-image: linear-gradient(to bottom, #0057b7 50%, #ffd700 50%) 1; box-shadow: inset 0 0 0 2px #1e293b; }
.theme-ua-flag .diploma-type { color: #0057b7; } 
.theme-ua-flag .diploma-nomination { color: #b45309; }

.theme-ua-sunflower { background: radial-gradient(circle, #ffffff 60%, #fefce8 100%); border: 10mm solid #eab308; outline: 3mm dashed #451a03; outline-offset: -5mm; }
.theme-ua-sunflower .diploma-type { color: #b45309; } 
.theme-ua-sunflower .diploma-nomination { color: #451a03; }
.theme-ua-sunflower .frame-decor-top-left::after { content: '🌻'; font-size: 40pt; position: absolute; top: 2mm; left: 4mm; }

.theme-ua-wheat { background: linear-gradient(to bottom, #ffffff, #fef3c7); border: 12mm solid #d97706; box-shadow: inset 0 0 20px rgba(217, 119, 6, 0.3); }
.theme-ua-wheat .diploma-type { color: #b45309; } 
.theme-ua-wheat .diploma-nomination { color: #92400e; }
.theme-ua-wheat .frame-decor-bottom-right::after { content: '🌾'; font-size: 45pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-ua-carpathians { background: #f0fdf4; border: 12mm solid transparent; border-image: repeating-linear-gradient(45deg, #14532d, #14532d 10px, #166534 10px, #166534 20px) 12; }
.theme-ua-carpathians .diploma-type { color: #14532d; } 
.theme-ua-carpathians .diploma-nomination { color: #15803d; }
.theme-ua-carpathians .frame-decor-top-left::after { content: '🏔️'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }

.theme-ua-dnipro { background: repeating-linear-gradient(180deg, #ffffff 0, #ffffff 10px, #f0f9ff 10px, #f0f9ff 20px); border: 10mm double #0284c7; }
.theme-ua-dnipro .diploma-type { color: #0369a1; } 
.theme-ua-dnipro .diploma-nomination { color: #0284c7; }
.theme-ua-dnipro .frame-decor-bottom-left::after { content: '🌊'; font-size: 40pt; position: absolute; bottom: 2mm; left: 4mm; }

.theme-ua-kyiv { background: #fdf8f6; border: 12mm solid #15803d; box-shadow: inset 0 0 0 3mm #78350f; }
.theme-ua-kyiv .diploma-type { color: #78350f; } 
.theme-ua-kyiv .diploma-nomination { color: #15803d; }
.theme-ua-kyiv .frame-decor-top-left::after { content: '🌰'; font-size: 35pt; position: absolute; top: 4mm; left: 6mm; }

.theme-ua-cossack { background: #fff1f2; border: 12mm solid #9f1239; box-shadow: inset 0 0 0 2mm #fbbf24, inset 0 0 15px rgba(159, 18, 57, 0.2); }
.theme-ua-cossack .diploma-type { color: #9f1239; font-family: 'Playfair Display', serif; } 
.theme-ua-cossack .diploma-nomination { color: #b45309; }
.theme-ua-cossack .frame-decor-top-left::after { content: '⚔️'; font-size: 35pt; position: absolute; top: 4mm; left: 4mm; }

.theme-ua-petrykivka { background: #ffffff; border: 10mm solid transparent; border-image: repeating-linear-gradient(45deg, #e11d48, #e11d48 15px, #16a34a 15px, #16a34a 30px, #ca8a04 30px, #ca8a04 45px) 10; }
.theme-ua-petrykivka .diploma-type { color: #e11d48; } 
.theme-ua-petrykivka .diploma-nomination { color: #16a34a; }

.theme-ua-peace { background: linear-gradient(to bottom, #bae6fd, #ffffff); border: 8mm solid #ffffff; box-shadow: 0 0 20px rgba(0,0,0,0.1) inset; }
.theme-ua-peace .diploma-type { color: #0284c7; } 
.theme-ua-peace .diploma-nomination { color: #0369a1; }
.theme-ua-peace .frame-decor-top-left::after { content: '🕊️'; font-size: 35pt; position: absolute; top: 2mm; left: 2mm; }

.theme-ua-mova { background: #fffdf5; border: 10mm solid #0ea5e9; outline: 2mm dotted #f59e0b; outline-offset: -4mm; }
.theme-ua-mova .diploma-type { color: #0284c7; } 
.theme-ua-mova .diploma-nomination { color: #d97706; }
.theme-ua-mova .frame-decor-bottom-right::after { content: '🐦'; font-size: 35pt; position: absolute; bottom: 4mm; right: 6mm; }

.theme-ua-freedom { background: #f8fafc; border: 12mm solid #1e293b; outline: 3mm solid #eab308; box-shadow: inset 0 0 0 3mm #3b82f6; }
.theme-ua-freedom .diploma-type { color: #1e293b; } 
.theme-ua-freedom .diploma-nomination { color: #2563eb; }
.theme-ua-freedom .frame-decor-top-left::after { content: '🛡️'; font-size: 35pt; position: absolute; top: 6mm; left: 6mm; }

.theme-ua-history { background: #fef3c7; border: 15mm double #78350f; }
.theme-ua-history .diploma-type { color: #451a03; font-family: 'Playfair Display', serif; } 
.theme-ua-history .diploma-nomination, .theme-ua-history .diploma-award, .theme-ua-history .diploma-description { color: #78350f; }
.theme-ua-history .sign-line { border-top-color: #78350f; }
.theme-ua-history .frame-decor-top-left::after { content: '📜'; font-size: 35pt; position: absolute; top: 4mm; left: 4mm; }

.theme-ua-sea { background: linear-gradient(135deg, #ffffff, #cffafe); border: 12mm solid #0f766e; }
.theme-ua-sea .diploma-type { color: #0f766e; } 
.theme-ua-sea .diploma-nomination { color: #0d9488; }
.theme-ua-sea .frame-decor-top-left::after { content: '⚓'; font-size: 35pt; position: absolute; top: 2mm; left: 4mm; }

.theme-ua-steppe { background: linear-gradient(to top, #ffedd5, #ffffff); border: 10mm solid #d97706; }
.theme-ua-steppe .diploma-type { color: #9a3412; } 
.theme-ua-steppe .diploma-nomination { color: #c2410c; }
.theme-ua-steppe .frame-decor-bottom-right::after { content: '🐎'; font-size: 35pt; position: absolute; bottom: 2mm; right: 4mm; }

.theme-ua-triumph { background: radial-gradient(circle at center, #ffffff 40%, #fefce8 100%); border: 10mm solid #f59e0b; box-shadow: inset 0 0 0 2px #dc2626; }
.theme-ua-triumph .diploma-type { color: #dc2626; } 
.theme-ua-triumph .diploma-nomination { color: #d97706; }
.theme-ua-triumph .frame-decor-top-left::after { content: '🏆'; font-size: 35pt; position: absolute; top: 4mm; left: 4mm; }

.theme-ua-family { background: #fafaf9; border: 10mm solid #b91c1c; outline: 2px dotted #78350f; outline-offset: -4mm; }
.theme-ua-family .diploma-type { color: #78350f; } 
.theme-ua-family .diploma-nomination { color: #b91c1c; }
.theme-ua-family .frame-decor-top-left::after { content: '🏠'; font-size: 35pt; position: absolute; top: 4mm; left: 4mm; }

.theme-ua-gold { background: #ffffff; border: 12mm ridge #d4af37; }
.theme-ua-gold .diploma-type { color: #a16207; } 
.theme-ua-gold .diploma-nomination { color: #b45309; }

/* Анімація генерації */
@keyframes pulseUpdate {
    0% { transform: scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
    50% { transform: scale(0.98); box-shadow: 0 0 30px rgba(17, 202, 160, 0.4); }
    100% { transform: scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
}
.update-anim {
    animation: pulseUpdate 0.4s ease-out;
}

/* ==========================================================================
   ЗАХИСТ ЕКСПОРТУ ВІД ПОРОЖНІХ СТОРІНОК ТА ПРИХОВУВАННЯ МЕНЮ
   ========================================================================== */
@media print {
    /* Жорстко задаємо альбомний формат (Landscape) для принтера */
    @page { 
        size: A4 landscape; 
        margin: 0 !important; 
    }
    html, body { 
        margin: 0 !important; 
        padding: 0 !important; 
        height: 210mm !important; 
        max-height: 210mm !important; 
        overflow: hidden !important; 
        background: #fff !important; 
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact; 
    }
    .app-header, .controls-section, .seo-text-block, .ad-placeholder, .back-link { 
        display: none !important; 
    }
    .main-layout, .preview-section { 
        display: block !important; 
        padding: 0 !important; 
        margin: 0 !important; 
        overflow: visible !important; 
        background: #fff !important; 
    }
    .a4-page-landscape { 
        margin: 0 !important; 
        box-shadow: none !important; 
        page-break-after: avoid !important; 
        page-break-inside: avoid !important; 
    }
}