/* ==========================================================================
   VLAJKY S JAKUBEM – STYLY PRO PŘÁTELSKÉ A SENZORICKY KLIDNÉ PROSTŘEDÍ (PAS)
   ========================================================================== */

:root {
    /* Senzoricky příjemné, neagresivní barvy */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --bg-card-hover: #f8fafc;
    
    /* Primární uklidňující modrá */
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --primary-soft: #f0f9ff;

    /* Šalvějová a smaragdová zelená pro pozitivní zpětnou vazbu */
    --success: #059669;
    --success-light: #ecfdf5;
    --success-border: #6ee7b7;
    --success-dark: #065f46;

    /* Teplá jemná jantarová / zlatá pro hvězdičky a odznaky */
    --accent: #d97706;
    --accent-light: #fef3c7;
    --accent-gold: #f59e0b;

    /* Jemná fialová pro úroveň 3 */
    --purple: #7c3aed;
    --purple-light: #f5f3ff;

    /* Klidný text s vysokým kontrastem, ale bez ostré černé */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Ošetření chybného kliknutí – neutrální šedá, žádný agresivní červený bzučák */
    --tried-bg: #f1f5f9;
    --tried-border: #cbd5e1;
    --tried-text: #94a3b8;

    /* Okraje a poloměry */
    --border-color: #e2e8f0;
    --border-focus: #38bdf8;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Měkké stíny bez tvrdých přechodů */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);

    /* Písma */
    --font-main: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset a základní pravidla */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    letter-spacing: 0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Focus stavy pro a11y */
:focus-visible {
    outline: 3px solid var(--border-focus);
    outline-offset: 3px;
}

/* Obalovač celé aplikace */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Univerzální karta */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   ZÁHLAVÍ (HEADER)
   ========================================================================== */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    user-select: none;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Odznak získaných hvězdiček v záhlaví */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: var(--accent-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-pill);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.stat-badge:hover {
    background: #fde68a;
    transform: translateY(-1px);
}

.stat-icon {
    font-size: 1.15rem;
}

.stat-count {
    font-size: 1.1rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Tlačítka ikon */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: var(--primary-light);
    border-color: #bae6fd;
}

.btn-icon-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1.15rem;
    transition: var(--transition-smooth);
}

.btn-icon-subtle:hover {
    background: var(--bg-card-subtle);
    border-color: var(--border-color);
}

.btn-icon-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    vertical-align: middle;
}

.btn-icon-mini:hover {
    background: var(--primary-light);
}

/* ==========================================================================
   HLAVNÍ NAVIGACE (TABS)
   ========================================================================== */
.nav-container {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
    min-height: 46px;
}

.nav-tab:hover {
    background: var(--bg-card-subtle);
    color: var(--text-main);
}

.nav-tab.active {
    background: var(--primary-light);
    border-color: #bae6fd;
    color: var(--primary);
    font-weight: 700;
}

.nav-tab.active .tab-emoji {
    transform: scale(1.15);
}

.tab-emoji {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

/* ==========================================================================
   HLAVNÍ OBSAH A ZÁLOŽKY
   ========================================================================== */
.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.tab-view {
    display: none;
    animation: fadeInView 0.25s ease-out;
}

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

@keyframes fadeInView {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-header {
    margin-bottom: 1.5rem;
}

.view-intro h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.view-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 780px;
    line-height: 1.5;
}

/* ==========================================================================
   1. ATLAS VLAJEK – KONTROLY A MŘÍŽKA
   ========================================================================== */
.atlas-controls {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-bottom: 1.75rem;
    background: #ffffff;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 460px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 2.85rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card-subtle);
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.btn-clear {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.atlas-counter {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card-subtle);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-pill);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 80px;
}

.pills-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    flex-wrap: wrap;
}

.pill-btn {
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.pill-btn:hover {
    border-color: #cbd5e1;
    background: var(--bg-card-subtle);
}

.pill-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Mřížka vlajek v Atlasu */
.flags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.country-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    text-align: left;
}

.country-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.country-card.is-mastered {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
}

.country-card.is-mastered::after {
    content: "⭐";
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    font-size: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.country-flag-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.country-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.country-card:hover .country-flag-img {
    transform: scale(1.02);
}

.country-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.country-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.country-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.country-capital {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.country-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.continent-tag {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card-subtle);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-pill);
}

.difficulty-indicator {
    font-size: 0.8rem;
    font-weight: 700;
}

.difficulty-1 { color: #059669; }
.difficulty-2 { color: #d97706; }
.difficulty-3 { color: #7c3aed; }

/* Prázdný stav */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.75rem;
    margin-bottom: 0.25rem;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--text-main);
}

/* ==========================================================================
   2. & 3. KVÍZOVÉ REŽIMY (POZNEJ STÁT & NAJDI VLAJKU)
   ========================================================================== */
.quiz-container {
    max-width: 760px;
    margin: 0 auto;
}

.quiz-card {
    background: #ffffff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.quiz-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.quiz-mode-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.tag-icon {
    font-size: 1.25rem;
}

.quiz-quick-settings {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.continent-badge {
    background: var(--bg-card-subtle);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}

.quiz-prompt {
    text-align: center;
}

.quiz-prompt h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.quiz-subprompt {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Velká vlajka pro Poznej stát podle vlajky */
.flag-hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.flag-hero-frame {
    max-width: 440px;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

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

/* Cílový stát pro Najdi vlajku */
.target-name-hero {
    background: var(--primary-soft);
    border: 1.5px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.target-label {
    font-size: 0.88rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.target-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.target-country-name {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.btn-speak-prominent {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: #ffffff;
    border: 1.5px solid #bae6fd;
    border-radius: var(--radius-pill);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-speak-prominent:hover {
    background: var(--primary-light);
}

.target-capital {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Nápověda a žolík */
.hint-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hint-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent-light);
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-pill);
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.btn-hint:hover {
    background: #fde68a;
    transform: translateY(-1px);
}

.hint-icon {
    font-size: 1.15rem;
}

/* Hravé a magické tlačítko žolíka 50:50 */
.btn-joker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    border: 1.5px solid #d8b4fe;
    border-radius: var(--radius-pill);
    color: #6b21a8;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.12);
    transition: var(--transition-smooth);
    user-select: none;
}

.btn-joker:hover:not(:disabled) {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #c084fc;
    color: #581c87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
}

.btn-joker:active:not(:disabled) {
    transform: translateY(0);
}

.btn-joker:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: var(--bg-card-subtle);
    border-color: var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
    transform: none;
}

.joker-icon {
    font-size: 1.15rem;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-joker:hover:not(:disabled) .joker-icon {
    transform: rotate(15deg) scale(1.15);
}

.hint-box {
    width: 100%;
    background: #fffbeb;
    border: 1.5px dashed #fcd34d;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    text-align: left;
    animation: fadeInView 0.2s ease-out;
}

.hint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.hint-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}

.hint-content {
    font-size: 1rem;
    color: #78350f;
    line-height: 1.5;
}

/* Nápovědní mřížka pro jednotlivé indicie */
.hint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(217, 119, 6, 0.3);
}

.hint-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hint-item-full {
    grid-column: 1 / -1;
}

.hint-item-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hint-item-value {
    font-size: 1.05rem;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    flex-wrap: wrap;
}

/* Zřetelný odznak s prvním písmenem státu */
.first-letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    text-transform: uppercase;
    user-select: none;
}

/* Vyřazené možnosti po použití žolíka 50:50 */
.option-btn.option-eliminated,
.flag-option-card.option-eliminated {
    opacity: 0.22 !important;
    transform: scale(0.96) !important;
    filter: grayscale(85%) blur(0.5px) !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    border-color: var(--border-color) !important;
    background: var(--bg-card-subtle) !important;
    user-select: none;
}

/* Možnosti výběru pro Flag to Name (textová tlačítka) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    min-height: 64px;
    transition: var(--transition-smooth);
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Šetrné označení neúspěšné volby (PAS-friendly: jemné zašednutí, žádná agresivní červená!) */
.option-btn.is-tried {
    background: var(--tried-bg);
    border-color: var(--tried-border);
    color: var(--tried-text);
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.option-btn.is-tried .option-status-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Úspěšná odpověď (zelený záblesk s hvězdičkou) */
.option-btn.is-correct {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success-dark);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    font-weight: 800;
}

.option-btn.is-correct::after {
    content: "✓";
    font-size: 1.25rem;
    color: var(--success);
    font-weight: 900;
}

/* Možnosti výběru pro Name to Flag (obrázky vlajek) */
.flag-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.flag-option-card {
    border-radius: var(--radius-md);
    border: 2.5px solid var(--border-color);
    background: #ffffff;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.flag-option-card:hover:not(:disabled) {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.flag-option-card .flag-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

/* Jemné zašednutí špatné vlajky */
.flag-option-card.is-tried {
    background: var(--tried-bg);
    border-color: var(--tried-border);
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: grayscale(40%);
}

/* Správná vlajka */
.flag-option-card.is-correct {
    border-color: var(--success);
    background: var(--success-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

/* Karta se zpětnou vazbou (Feedback Card) */
.feedback-card {
    background: var(--success-light);
    border: 2px solid var(--success-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: bounceIn 0.3s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.feedback-content {
    flex: 1;
    min-width: 240px;
}

.feedback-praise-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.feedback-emoji {
    font-size: 1.75rem;
}

.feedback-praise {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--success-dark);
}

.feedback-country-details {
    font-size: 0.95rem;
    color: #065f46;
}

/* Velké tlačítko "Další" */
.btn-next {
    padding: 0.95rem 1.75rem;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    white-space: nowrap;
}

/* ==========================================================================
   4. MŮJ POKROK (MY PROGRESS)
   ========================================================================== */
.progress-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 1.5px solid #bae6fd;
    margin-bottom: 2rem;
    padding: 2rem;
}

.progress-hero-main {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.progress-big-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1.5px solid #e0f2fe;
}

.big-stat-number {
    font-size: 3.25rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.big-stat-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.progress-bar-wrapper {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.progress-bar-title {
    font-size: 1.05rem;
    color: var(--text-main);
}

.progress-bar-percent {
    font-size: 1.15rem;
    color: var(--primary);
}

.progress-bar-track {
    width: 100%;
    height: 16px;
    background: #e2e8f0;
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
    border-radius: var(--radius-pill);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-motivational-quote {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

.section-block {
    margin-bottom: 2.25rem;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* Sbírka odznaků */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.15rem;
}

.badge-card {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.badge-card.is-unlocked {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.12);
}

.badge-card.is-locked {
    opacity: 0.6;
    background: var(--bg-card-subtle);
    border-style: dashed;
}

.badge-icon-box {
    font-size: 2.2rem;
    line-height: 1;
    min-width: 44px;
    text-align: center;
}

.badge-card.is-locked .badge-icon-box {
    filter: grayscale(100%);
}

.badge-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.badge-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.badge-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.badge-status {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.badge-status.unlocked {
    color: var(--accent);
}

.badge-status.locked {
    color: var(--text-light);
}

/* Pokrok podle kontinentů */
.continents-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.continent-progress-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
}

.continent-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.continent-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.continent-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}

.continent-bar-track {
    width: 100%;
    height: 10px;
    background: var(--bg-card-subtle);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.continent-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

/* Sbírka poznaných vlajek */
.mastered-flags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
}

.mastered-flag-chip {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.mastered-flag-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.mastered-flag-thumb {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    object-fit: cover;
}

.mastered-flag-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.progress-reset-box {
    margin-top: 3rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    border: 1px solid #fee2e2;
}

.reset-desc h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #991b1b;
}

.reset-desc p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   5. NASTAVENÍ (SETTINGS)
   ========================================================================== */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 760px;
}

.setting-card {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.setting-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.setting-icon {
    font-size: 1.85rem;
    line-height: 1;
    min-width: 40px;
    text-align: center;
}

.setting-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.setting-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Volba barevného motivu (3 dlaždice) */
.theme-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.theme-choice-label {
    cursor: pointer;
    position: relative;
    display: block;
}

.theme-choice-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-tile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    transition: var(--transition-smooth);
    height: 100%;
    user-select: none;
}

.theme-tile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.theme-choice-label input[type="radio"]:focus-visible + .theme-tile-card {
    outline: 3px solid var(--border-focus);
    outline-offset: 3px;
}

.theme-choice-label input[type="radio"]:checked + .theme-tile-card {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
    transform: translateY(-2px);
}

.theme-tile-preview {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
}

.theme-tile-card:hover .theme-tile-preview {
    transform: scale(1.12);
}

.theme-tile-emoji {
    font-size: 1.85rem;
    line-height: 1;
}

.theme-tile-day .theme-tile-preview {
    background: #e0f2fe;
    border: 1.5px solid #bae6fd;
}

.theme-tile-sunset .theme-tile-preview {
    background: #faeade;
    border: 1.5px solid #f5d0b5;
}

.theme-tile-night .theme-tile-preview {
    background: #0f172a;
    border: 1.5px solid #334155;
}

.theme-tile-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.theme-tile-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.35;
}

/* Volba počtu možností (2, 3, 4) */
.options-choice-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.choice-radio-label {
    cursor: pointer;
}

.choice-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: #ffffff;
    transition: var(--transition-smooth);
    height: 100%;
}

.choice-radio-label input[type="radio"]:checked + .choice-card {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.choice-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.choice-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.choice-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Profil hráče a výběr avatara */
.setting-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Mřížka výběru avatara */
.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.75rem;
}

.avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-card-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition: var(--transition-smooth);
    user-select: none;
    text-align: left;
}

.avatar-btn:hover {
    background: #ffffff;
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.avatar-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Aktivní / vybraný avatar s jemným zvýrazněním */
.avatar-btn.active,
.avatar-btn[aria-checked="true"] {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.avatar-btn.active .avatar-label,
.avatar-btn[aria-checked="true"] .avatar-label {
    font-weight: 800;
    color: var(--primary-hover);
}

.avatar-emoji {
    font-size: 1.6rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Odznak avatara v sekci pokroku */
.progress-avatar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    font-size: 1.85rem;
    line-height: 1;
    vertical-align: middle;
}

/* Formulářové prvky */
.form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

/* Přepínače (Toggle switch) */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.setting-control-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    position: relative;
    width: 52px;
    height: 30px;
    background: #cbd5e1;
    border-radius: var(--radius-pill);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    top: 3px;
    left: 4px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ==========================================================================
   MODÁLNÍ OKNO DETAILU STÁTU
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 1000;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    animation: scaleInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleInModal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card-subtle);
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 2;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.modal-flag-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

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

.modal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    background: var(--bg-card-subtle);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.code-badge {
    text-transform: uppercase;
    background: #e2e8f0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

/* Sekce popisu státu v detailu modálu */
.modal-description-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.section-badge-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-subheading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1.3;
}

.section-title-wrap .btn-icon-subtle {
    margin-left: auto;
}

.modal-desc-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0 0 0.85rem 0;
}

.wiki-link-wrap {
    display: flex;
    align-items: center;
}

.wiki-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    transition: var(--transition-smooth);
}

.wiki-link:hover {
    color: var(--primary-hover);
    background: rgba(2, 132, 199, 0.15);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.wiki-link:focus-visible {
    outline: 3px solid var(--border-focus);
    outline-offset: 2px;
}

.wiki-link .wiki-arrow {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.wiki-link:hover .wiki-arrow {
    transform: translate(2px, -2px);
}

.modal-hint-section {
    background: #fffbeb;
    border: 1.5px dashed #fcd34d;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.modal-hint-text {
    font-size: 0.95rem;
    color: #78350f;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   TLAČÍTKA A STYLY AKCÍ
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card-subtle);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
}

.btn-outline-danger {
    background: transparent;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
}

.btn-outline-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* ==========================================================================
   OSLAVNÝ CANVAS PRO KONFETY / HVĚZDIČKY
   ========================================================================== */
.celebration-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================================================
   ZÁPATÍ (FOOTER)
   ========================================================================== */
.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-features {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONZIVITA PRO TABLETY A MOBILY
   ========================================================================== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    .brand-subtitle {
        display: none;
    }

    .nav-tabs {
        justify-content: flex-start;
    }

    .quiz-card {
        padding: 1.25rem;
    }

    .target-country-name {
        font-size: 1.65rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .flag-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem;
    }

    .flags-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.85rem;
    }

    .progress-hero-main {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .modal-card {
        padding: 1.25rem;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .avatar-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flag-options-grid {
        grid-template-columns: 1fr;
    }

    .options-choice-group {
        grid-template-columns: 1fr;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }
}

/* ==========================================================================
   UKLIDŇUJÍCÍ VEČERNÍ REŽIM (SUNSET / WARM MODE)
   ========================================================================== */
body.theme-sunset {
    --bg-page: #fbf7ee;        /* tlumený pergamen */
    --bg-card: #fdfbf7;        /* jemné teplé karty */
    --bg-card-subtle: #f5efe4; /* teplé pozadí prvků */
    --bg-card-hover: #f7f1e6;
    
    /* Měkké jantarové a terakotové akcenty šetrné pro oči před spaním */
    --primary: #c2672e;
    --primary-hover: #a55220;
    --primary-light: #faeade;
    --primary-soft: #fcf4ec;

    --text-main: #292524;      /* měkký teplý uhlík */
    --text-muted: #78716c;
    --text-light: #a8a29e;

    --border-color: #e7dfd1;
    --border-focus: #f59e0b;

    --accent: #d97706;
    --accent-light: #fef3c7;
    --accent-gold: #f59e0b;

    --success: #15803d;
    --success-light: #f0fdf4;
    --success-border: #86efac;
    --success-dark: #166534;

    --shadow-sm: 0 1px 3px rgba(68, 48, 25, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(68, 48, 25, 0.07), 0 2px 6px -2px rgba(68, 48, 25, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(68, 48, 25, 0.09), 0 4px 10px -4px rgba(68, 48, 25, 0.05);
}

body.theme-sunset .app-header {
    background-color: #f7f0e3;
    border-bottom-color: #e7dfd1;
}

body.theme-sunset .nav-container {
    background-color: #fcf8f0;
    border-bottom-color: #e7dfd1;
}

body.theme-sunset .nav-tab.active {
    background-color: #f5efe4;
    color: #c2672e;
    box-shadow: 0 -3px 0 #c2672e inset;
}

body.theme-sunset .nav-tab:hover:not(.active) {
    background-color: #f7f1e6;
    color: #a55220;
}

body.theme-sunset .pexeso-card-back {
    background: linear-gradient(135deg, #c2672e 0%, #9a3412 100%);
}

body.theme-sunset .search-box {
    background-color: #fcfbf7;
    border-color: #e7dfd1;
}

body.theme-sunset .pill-btn {
    background-color: #f5efe4;
    border-color: #e7dfd1;
    color: var(--text-main);
}

body.theme-sunset .pill-btn.active {
    background-color: #c2672e;
    border-color: #c2672e;
    color: #ffffff;
}

body.theme-sunset .app-footer {
    background-color: #f7f0e3;
    border-top-color: #e7dfd1;
}

body.theme-sunset .btn-joker {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #78350f;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.15);
}

body.theme-sunset .btn-joker:hover:not(:disabled) {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    border-color: #d97706;
    color: #451a03;
}

body.theme-sunset .btn-joker:disabled {
    background: #f5efe4;
    border-color: #e7dfd1;
    color: #a8a29e;
}

body.theme-sunset .first-letter-badge {
    background: linear-gradient(135deg, #c2672e 0%, #9a3412 100%);
    box-shadow: 0 2px 6px rgba(194, 103, 46, 0.35);
}

body.theme-sunset .hint-box {
    background-color: #fdf6e6;
    border-color: #f59e0b;
}

body.theme-sunset .hint-title,
body.theme-sunset .hint-item-label {
    color: #c2672e;
}

body.theme-sunset .hint-content {
    color: #78350f;
}

body.theme-sunset .theme-tile-card {
    background-color: #fdfbf7;
    border-color: #e7dfd1;
}

body.theme-sunset .theme-tile-card:hover {
    border-color: #d7cebd;
}

body.theme-sunset .theme-choice-label input[type="radio"]:checked + .theme-tile-card {
    background-color: #faeade;
    border-color: #c2672e;
    box-shadow: 0 0 0 2px rgba(194, 103, 46, 0.25);
}

body.theme-sunset .theme-choice-label input[type="radio"]:checked + .theme-tile-card .theme-tile-title {
    color: #a55220;
}

/* Sekce popisu státu v podvečerním režimu */
body.theme-sunset .modal-description-section {
    background-color: #fdf5eb;
    border-color: #fed7aa;
}

body.theme-sunset .section-subheading {
    color: #c2672e;
}

body.theme-sunset .modal-desc-text {
    color: #292524;
}

body.theme-sunset .wiki-link {
    color: #c2672e;
    background: rgba(194, 103, 46, 0.1);
    border-color: rgba(194, 103, 46, 0.25);
}

body.theme-sunset .wiki-link:hover {
    color: #a55220;
    background: rgba(194, 103, 46, 0.18);
    border-color: #c2672e;
}

/* ==========================================================================
   NOČNÍ TMAVÝ REŽIM (NIGHT / DARK MODE)
   ========================================================================== */
body.theme-night {
    --bg-page: #0f172a;        /* hluboká uklidňující břidlicově tmavá */
    --bg-card: #1e293b;        /* čistá tmavá karta */
    --bg-card-subtle: #243248;
    --bg-card-hover: #293952;
    
    --border-color: #334155;
    --border-focus: #38bdf8;

    --text-main: #f1f5f9;      /* měkký světlý text, který v noci neoslňuje */
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --primary: #38bdf8;        /* svěží nebeská modrá pro kontrast */
    --primary-hover: #0ea5e9;
    --primary-light: #164e63;
    --primary-soft: #1e293b;

    --accent: #fbbf24;
    --accent-light: #2d2415;
    --accent-gold: #f59e0b;

    --success: #34d399;
    --success-light: #064e3b;
    --success-border: #059669;
    --success-dark: #a7f3d0;

    --purple: #a78bfa;
    --purple-light: #2e1065;

    --tried-bg: #1e293b;
    --tried-border: #475569;
    --tried-text: #64748b;

    --pexeso-back: #1e293b;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.55);
}

/* Záhlaví a navigace v nočním režimu */
body.theme-night .app-header {
    background-color: #0f172a;
    border-bottom-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.theme-night .brand-icon {
    background-color: #1e293b;
    border: 1px solid #334155;
}

body.theme-night .nav-container {
    background-color: #0b1120;
    border-bottom-color: #334155;
}

body.theme-night .nav-tab {
    color: #94a3b8;
}

body.theme-night .nav-tab:hover:not(.active) {
    background-color: #1e293b;
    color: #f1f5f9;
}

body.theme-night .nav-tab.active {
    background-color: #1e293b;
    color: #38bdf8;
    border-color: #334155;
    box-shadow: 0 -3px 0 #38bdf8 inset;
}

body.theme-night .app-footer {
    background-color: #0b1120;
    border-top-color: #334155;
    color: #94a3b8;
}

/* Tlačítka a ikony v záhlaví */
body.theme-night .btn-icon {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .btn-icon:hover {
    background: #243248;
    border-color: #38bdf8;
    color: #38bdf8;
}

body.theme-night .btn-icon-subtle:hover,
body.theme-night .btn-icon-mini:hover {
    background: #243248;
    border-color: #334155;
}

body.theme-night .stat-badge {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

body.theme-night .stat-badge:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.5);
}

body.theme-night .stat-label {
    color: #fbbf24;
}

/* Univerzální karty a kontejnery */
body.theme-night .card {
    background: #1e293b;
    border-color: #334155;
}

body.theme-night .country-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .country-card:hover {
    background-color: #243248;
    border-color: #475569;
}

body.theme-night .country-card.is-mastered {
    background: linear-gradient(180deg, #242f44 0%, #1e293b 100%);
    border-color: #f59e0b;
}

/* Vlajky v kartách: jemné orámování 1px solid #475569, aby tmavé pruhy (Německo, Belgie apod.) nesplývaly s tmavým pozadím karty */
body.theme-night .country-flag-wrap {
    background: #0b1120;
    border: 1px solid #475569;
}

body.theme-night .flag-option-card .flag-wrap {
    background: #0b1120;
    border: 1px solid #475569;
}

body.theme-night .flag-hero-frame {
    background: #0b1120;
    border: 1px solid #475569;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

body.theme-night .modal-flag-wrap {
    background: #0b1120;
    border: 1px solid #475569;
}

body.theme-night .mastered-flag-thumb {
    border: 1px solid #475569;
}

body.theme-night .pexeso-card-flag-img {
    border: 1px solid #475569;
    border-radius: 4px;
}

/* Pexeso karty v nočním režimu: stylový rub i líc */
body.theme-night .pexeso-card-face {
    border-color: #334155;
}

body.theme-night .pexeso-card-back {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    color: #38bdf8;
}

body.theme-night .pexeso-card-back::before {
    border-color: rgba(56, 189, 248, 0.35);
}

body.theme-night .pexeso-card-front {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .pexeso-card-country-name {
    color: #f1f5f9;
}

body.theme-night .pexeso-card-country-cap {
    color: #94a3b8;
}

body.theme-night .pexeso-card-cont-badge {
    background: #243248;
    color: #cbd5e1;
}

body.theme-night .pexeso-card.matched .pexeso-card-front {
    border-color: #059669;
    background-color: #064e3b;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.35);
}

body.theme-night .pexeso-win-banner {
    background: linear-gradient(135deg, #2d2415 0%, #1e293b 70%);
    border-color: #f59e0b;
}

body.theme-night .pexeso-stat-item {
    background: #1e293b;
    border-color: #334155;
}

/* Vyhledávání a filtry v nočním režimu */
body.theme-night .atlas-controls {
    background: #1e293b;
    border-color: #334155;
}

body.theme-night .search-box {
    background-color: transparent;
}

body.theme-night .search-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .search-input:focus {
    background: #1e293b;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

body.theme-night .btn-clear {
    background: #334155;
    color: #94a3b8;
}

body.theme-night .btn-clear:hover {
    background: #475569;
    color: #f1f5f9;
}

body.theme-night .atlas-counter {
    background: #243248;
    color: #94a3b8;
}

body.theme-night .pill-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .pill-btn:hover {
    background-color: #243248;
    border-color: #475569;
}

body.theme-night .pill-btn.active {
    background-color: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

/* Kvízové režimy (Poznej stát & Najdi vlajku) */
body.theme-night .target-name-hero {
    background: #1e293b;
    border-color: #334155;
}

body.theme-night .target-name-label {
    color: #38bdf8;
}

body.theme-night .target-country-name {
    color: #f1f5f9;
}

body.theme-night .option-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .option-btn:hover:not(:disabled) {
    border-color: #38bdf8;
    background-color: #243248;
    color: #ffffff;
}

body.theme-night .option-btn.is-tried {
    background-color: #0f172a;
    border-color: #334155;
    color: #64748b;
}

body.theme-night .option-btn.is-correct {
    background-color: #064e3b;
    border-color: #34d399;
    color: #ecfdf5;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3);
}

body.theme-night .flag-option-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .flag-option-card:hover:not(:disabled) {
    border-color: #38bdf8;
    background-color: #243248;
}

body.theme-night .flag-option-card.is-tried {
    background-color: #0f172a;
    border-color: #334155;
}

body.theme-night .flag-option-card.is-correct {
    background-color: #064e3b;
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.35);
}

body.theme-night .feedback-card {
    background-color: #064e3b;
    border-color: #059669;
    color: #ecfdf5;
}

body.theme-night .feedback-praise {
    color: #a7f3d0;
}

body.theme-night .feedback-country-name {
    color: #ffffff;
}

body.theme-night .feedback-meta-item {
    color: #d1fae5;
}

body.theme-night .feedback-tag {
    background: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

body.theme-night .btn-hint {
    background: #2d2415;
    border-color: #78350f;
    color: #fbbf24;
}

body.theme-night .btn-hint:hover {
    background: #3d301b;
    border-color: #92400e;
}

body.theme-night .btn-joker {
    background: linear-gradient(135deg, #2e1065 0%, #1e1b4b 100%);
    border-color: #7c3aed;
    color: #c4b5fd;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

body.theme-night .btn-joker:hover:not(:disabled) {
    background: linear-gradient(135deg, #3b0764 0%, #2e1065 100%);
    border-color: #a78bfa;
    color: #ede9fe;
}

body.theme-night .btn-joker:disabled {
    background: #1e293b;
    border-color: #334155;
    color: #64748b;
}

body.theme-night .hint-box {
    background-color: #1e2433;
    border-color: #f59e0b;
}

body.theme-night .hint-title,
body.theme-night .hint-item-label {
    color: #fbbf24;
}

body.theme-night .hint-content {
    color: #fde68a;
}

body.theme-night .hint-grid {
    border-top-color: rgba(245, 158, 11, 0.3);
}

body.theme-night .continent-badge {
    background: #243248;
    color: #38bdf8;
    border: 1px solid #334155;
}

body.theme-night .streak-badge {
    background: #2d2415;
    border-color: #78350f;
    color: #fbbf24;
}

body.theme-night .progress-bar-wrap {
    background: #0f172a;
    border-color: #334155;
}

body.theme-night .progress-bar-fill {
    background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
}

/* Tlačítka akcí v nočním režimu */
body.theme-night .btn-primary {
    background-color: #38bdf8;
    color: #0f172a;
    font-weight: 800;
}

body.theme-night .btn-primary:hover {
    background-color: #0ea5e9;
    color: #0f172a;
}

body.theme-night .btn-secondary {
    background-color: #243248;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .btn-secondary:hover {
    background-color: #334155;
    border-color: #475569;
}

body.theme-night .btn-outline-danger {
    color: #f87171;
    border-color: #7f1d1d;
}

body.theme-night .btn-outline-danger:hover {
    background-color: #450a0a;
    border-color: #ef4444;
}

/* Formulářové prvky a Nastavení v nočním režimu */
body.theme-night .form-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .form-input:focus {
    background-color: #1e293b;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

body.theme-night .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .form-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

body.theme-night .choice-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .choice-card:hover {
    border-color: #475569;
    background-color: #243248;
}

body.theme-night .choice-number {
    color: #38bdf8;
}

body.theme-night .choice-radio-label input[type="radio"]:checked + .choice-card {
    background-color: #243248;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

body.theme-night .avatar-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.theme-night .avatar-btn:hover {
    background-color: #243248;
    border-color: #38bdf8;
}

body.theme-night .avatar-btn.active,
body.theme-night .avatar-btn[aria-checked="true"] {
    background-color: #243248;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

body.theme-night .avatar-btn.active .avatar-label,
body.theme-night .avatar-btn[aria-checked="true"] .avatar-label {
    color: #38bdf8;
}

body.theme-night .toggle-slider {
    background-color: #334155;
}

body.theme-night .toggle-slider::before {
    background-color: #f1f5f9;
}

body.theme-night .toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background-color: #38bdf8;
}

body.theme-night .toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    background-color: #0f172a;
}

/* Dlaždice výběru motivu v nočním režimu */
body.theme-night .theme-tile-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .theme-tile-card:hover {
    background-color: #243248;
    border-color: #475569;
}

body.theme-night .theme-choice-label input[type="radio"]:checked + .theme-tile-card {
    background-color: #243248;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

body.theme-night .theme-choice-label input[type="radio"]:checked + .theme-tile-card .theme-tile-title {
    color: #38bdf8;
}

/* Modální okno detailu státu v nočním režimu */
body.theme-night .modal-backdrop {
    background: rgba(0, 0, 0, 0.72);
}

body.theme-night .modal-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

body.theme-night .modal-close-btn {
    background-color: #243248;
    color: #94a3b8;
}

body.theme-night .modal-close-btn:hover {
    background-color: #334155;
    color: #f1f5f9;
}

body.theme-night .modal-info-grid {
    background-color: #0f172a;
    border: 1px solid #334155;
}

body.theme-night .code-badge {
    background-color: #334155;
    color: #38bdf8;
}

body.theme-night .modal-hint-section {
    background-color: #1e2433;
    border-color: #f59e0b;
}

body.theme-night .modal-hint-text {
    color: #fde68a;
}

/* Sekce popisu státu v nočním režimu */
body.theme-night .modal-description-section {
    background-color: #132238;
    border: 1px solid #1e3a5f;
}

body.theme-night .section-subheading {
    color: #38bdf8;
}

body.theme-night .modal-desc-text {
    color: #e2e8f0;
}

body.theme-night .wiki-link {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

body.theme-night .wiki-link:hover {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
}

/* Pokrok (Progress) v nočním režimu */
body.theme-night .progress-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

body.theme-night .progress-big-stat {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .progress-bar-track {
    background-color: #0f172a;
}

body.theme-night .badge-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .badge-card.is-unlocked {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #2d2415 0%, #1e293b 100%);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}

body.theme-night .badge-card.is-locked {
    background-color: #0f172a;
    border-color: #334155;
}

body.theme-night .continent-progress-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .continent-bar-track {
    background-color: #0f172a;
}

body.theme-night .mastered-flag-chip {
    background-color: #1e293b;
    border-color: #334155;
}

body.theme-night .mastered-flag-chip:hover {
    background-color: #243248;
    border-color: #475569;
}

body.theme-night .progress-reset-box {
    background-color: #1e293b;
    border-color: #7f1d1d;
}

body.theme-night .reset-desc h4 {
    color: #f87171;
}

/* ==========================================================================
   VLAJKOVÉ PEXESO – HERNÍ REŽIM
   ========================================================================== */
.pexeso-controls {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.pexeso-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pexeso-ctrl-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pexeso-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.pexeso-continent-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pexeso-continent-select-wrap .form-select {
    padding: 0.45rem 2rem 0.45rem 0.85rem;
    font-size: 0.95rem;
}

.btn-restart {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* Stavová lišta pexesa – žádný stres, pouze počet dvojic */
.pexeso-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.25rem 0 0.5rem;
}

.pexeso-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.25rem;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.pexeso-status-icon {
    font-size: 1.25rem;
    color: var(--accent-gold);
}

/* 3D MŘÍŽKA PEXESA */
.pexeso-grid {
    display: grid;
    gap: 1rem;
    margin: 1.25rem auto 2rem;
    perspective: 1000px;
    justify-content: center;
    width: 100%;
}

.pexeso-grid.size-4 {
    grid-template-columns: repeat(2, minmax(130px, 180px));
}

.pexeso-grid.size-6 {
    grid-template-columns: repeat(3, minmax(120px, 160px));
}

.pexeso-grid.size-8 {
    grid-template-columns: repeat(4, minmax(110px, 150px));
}

.pexeso-grid.size-12 {
    grid-template-columns: repeat(4, minmax(100px, 140px));
}

/* JEDNOTLIVÁ KARTA PEXESA S 3D OTOČENÍM */
.pexeso-card {
    position: relative;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.42s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pexeso-card:hover:not(.flipped):not(.matched) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pexeso-card:focus-visible {
    outline: 3px solid var(--border-focus);
    outline-offset: 3px;
}

.pexeso-card.flipped,
.pexeso-card.matched {
    transform: rotateY(180deg);
}

.pexeso-card.matched {
    cursor: default;
}

.pexeso-card-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ZADNÍ STRANA KARTY (RUB) */
.pexeso-card-back {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pexeso-card-back::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1.5px dashed rgba(255, 255, 255, 0.4);
    border-radius: calc(var(--radius-md) - 4px);
    pointer-events: none;
}

.pexeso-card-back-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    transition: transform 0.2s ease;
}

.pexeso-card:hover:not(.flipped):not(.matched) .pexeso-card-back-icon {
    transform: scale(1.1);
}

/* PŘEDNÍ STRANA KARTY (LÍC) */
.pexeso-card-front {
    transform: rotateY(180deg);
    background-color: var(--bg-card);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.pexeso-card-flag-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12));
}

/* KARTA S NÁZVEM STÁTU (V REŽIMU VLAJKA <-> NÁZEV) */
.pexeso-card-name-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.25rem;
    width: 100%;
}

.pexeso-card-country-name {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-main);
}

.pexeso-card-country-cap {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pexeso-card-cont-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background-color: var(--bg-card-subtle);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ÚSPĚŠNĚ SPOJENÁ DVOJICE */
.pexeso-card.matched .pexeso-card-front {
    border-color: var(--success-border);
    background-color: var(--success-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    animation: pexesoMatchPulse 0.4s ease;
}

@keyframes pexesoMatchPulse {
    0% { transform: rotateY(180deg) scale(0.96); }
    50% { transform: rotateY(180deg) scale(1.04); }
    100% { transform: rotateY(180deg) scale(1); }
}

/* OSLAVNÝ VÍTĚZNÝ BANNER */
.pexeso-win-banner {
    max-width: 520px;
    margin: 1.5rem auto 2.5rem;
    padding: 2.25rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    border: 2px solid var(--accent-gold);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-card) 60%);
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pexeso-win-icon {
    font-size: 3.5rem;
    line-height: 1;
}

.pexeso-win-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.pexeso-win-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   TISKNUTELNÝ SLAVNOSTNÍ DIPLOM A OMALOVÁNKY
   ========================================================================== */

/* Banner v Pokroku pro otevření diplomu */
.diploma-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, var(--bg-card) 65%);
}

.diploma-banner-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.diploma-banner-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.diploma-banner-text h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.diploma-banner-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-diploma {
    white-space: nowrap;
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* MODÁLY PRO DIPLOM A OMALOVÁNKU */
.modal-diploma-card {
    max-width: 900px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-coloring-card {
    max-width: 820px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-diploma-actions-top,
.modal-coloring-actions-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-print-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.7rem 1.4rem;
}

/* DIPLOM – CERTIFIKÁT PRO TISK A NÁHLED (A4 NA ŠÍŘKU) */
.diploma-certificate {
    background-color: #fffdf7;
    border: 8px double #d97706;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-md);
    color: #1e293b;
    margin: 0 auto;
    max-width: 840px;
}

.diploma-inner-frame {
    border: 1.5px solid #d97706;
    border-radius: 6px;
    padding: 1.75rem 2rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.6);
}

.diploma-corner {
    position: absolute;
    color: #d97706;
    font-size: 1.5rem;
    line-height: 1;
    user-select: none;
}

.corner-tl { top: 8px; left: 8px; }
.corner-tr { top: 8px; right: 8px; }
.corner-bl { bottom: 8px; left: 8px; }
.corner-br { bottom: 8px; right: 8px; }

.diploma-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.diploma-seal-top {
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
    margin-bottom: 0.35rem;
}

.diploma-main-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.diploma-subtitle {
    font-size: 0.95rem;
    color: #78716c;
    font-style: italic;
}

.diploma-body {
    text-align: center;
    margin: 1.5rem 0;
}

.diploma-awarded-text {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

.diploma-hero-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
}

.diploma-hero-avatar {
    font-size: 2.2rem;
    line-height: 1;
}

.diploma-hero-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    border-bottom: 2px dashed #d97706;
    padding: 0 1.25rem 0.25rem;
}

.diploma-achievement-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #334155;
    max-width: 620px;
    margin: 0 auto;
}

.diploma-highlight {
    color: #b45309;
    font-weight: 800;
    font-size: 1.3rem;
}

.diploma-motto {
    font-style: italic;
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 1.25rem;
}

.diploma-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e7dfd1;
}

.diploma-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.diploma-footer-right {
    text-align: right;
}

.diploma-footer-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.diploma-footer-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.diploma-seal-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.diploma-official-seal {
    width: 72px;
    height: 72px;
    border: 3px double #d97706;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fffbeb;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.seal-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.seal-text {
    font-size: 0.55rem;
    font-weight: 800;
    color: #92400e;
    line-height: 1.1;
    margin-top: 2px;
}

/* OMALOVÁNKA – LIST PRO TISK */
.coloring-sheet {
    background-color: #ffffff;
    border: 2px dashed #475569;
    border-radius: 8px;
    padding: 1.5rem;
    color: #0f172a;
    max-width: 780px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.coloring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
}

.coloring-country-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.coloring-title-icon {
    font-size: 1.25rem;
}

.coloring-country-meta {
    font-size: 0.95rem;
    color: #475569;
    margin-top: 0.3rem;
}

.coloring-sample-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
    background-color: #f8fafc;
    flex-shrink: 0;
}

.coloring-sample-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.coloring-sample-thumb {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    display: block;
    margin: 0 auto;
}

.coloring-flag-box {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    background-color: #fcfcfd;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

.coloring-flag-svg {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coloring-flag-svg svg {
    width: auto !important;
    max-width: 100% !important;
    max-height: 320px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    background-color: #ffffff !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06));
}

.coloring-bottom-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.coloring-crayons-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.coloring-crayons-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
}

.coloring-crayons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.coloring-crayon-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crayon-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.coloring-guide-box {
    background: #f1f5f9;
    border-left: 3.5px solid var(--primary, #0284c7);
    border-radius: 0 6px 6px 0;
    padding: 0.6rem 0.9rem;
}

.coloring-guide-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.coloring-guide-text {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.4;
    margin: 0;
}

.coloring-footer-info {
    padding-top: 0.75rem;
    border-top: 1.5px solid #e2e8f0;
}

.coloring-footer-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

.coloring-sep {
    color: #94a3b8;
}

.coloring-brand {
    font-weight: 600;
    color: #0284c7;
}

/* ==========================================================================
   TISKOVÝ REŽIM (@MEDIA PRINT)
   ========================================================================== */
@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    /* Skrytí běžného rozhraní stránky */
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-header,
    .nav-container,
    .main-content,
    .app-footer,
    #celebration-canvas,
    .no-print,
    .modal-close-btn {
        display: none !important;
    }

    /* Tisk diplomu */
    body.is-printing-diploma .modal-backdrop#diploma-modal {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 99999 !important;
    }

    body.is-printing-diploma .modal-card.modal-diploma-card {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
    }

    body.is-printing-diploma .diploma-certificate {
        max-width: 100% !important;
        width: 100% !important;
        height: 96% !important;
        box-shadow: none !important;
        border: 8px double #d97706 !important;
        background-color: #fffdf7 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Tisk omalovánky - přesně na 1 list A4 na šířku */
    body.is-printing-coloring {
        background-color: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.is-printing-coloring .app-header,
    body.is-printing-coloring .nav-container,
    body.is-printing-coloring .main-content,
    body.is-printing-coloring .app-footer,
    body.is-printing-coloring #celebration-canvas,
    body.is-printing-coloring .modal-backdrop#diploma-modal,
    body.is-printing-coloring .modal-backdrop#country-detail-modal,
    body.is-printing-coloring .no-print,
    body.is-printing-coloring .modal-close-btn,
    body.is-printing-coloring .modal-coloring-actions-top {
        display: none !important;
    }

    body.is-printing-coloring .modal-backdrop#coloring-modal {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 1 !important;
        overflow: visible !important;
    }

    body.is-printing-coloring .modal-card.modal-coloring-card {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    body.is-printing-coloring #coloring-print-area {
        max-height: 185mm !important;
        height: 185mm !important;
        width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 10mm 14mm !important;
        border: 2px dashed #475569 !important;
        border-radius: 6px !important;
        background: #ffffff !important;
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        margin: 0 auto !important;
    }

    body.is-printing-coloring .coloring-header {
        padding-bottom: 2mm !important;
        margin-bottom: 1mm !important;
        border-bottom: 1.5px solid #cbd5e1 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4mm !important;
    }

    body.is-printing-coloring .coloring-country-title {
        font-size: 15pt !important;
        line-height: 1.2 !important;
        margin: 0 0 1mm 0 !important;
        color: #0f172a !important;
    }

    body.is-printing-coloring .coloring-country-meta {
        font-size: 9.5pt !important;
        color: #475569 !important;
        margin: 0 !important;
    }

    body.is-printing-coloring .coloring-sample-card {
        padding: 1.5mm 3mm !important;
        border: 1px solid #94a3b8 !important;
        background-color: #f8fafc !important;
        border-radius: 4px !important;
    }

    body.is-printing-coloring .coloring-sample-label {
        font-size: 6.5pt !important;
        margin-bottom: 1mm !important;
    }

    body.is-printing-coloring .coloring-sample-thumb {
        height: 36px !important;
        width: auto !important;
        border: 1px solid #cbd5e1 !important;
    }

    body.is-printing-coloring .coloring-flag-box {
        flex: 1 1 auto !important;
        margin: 2mm 0 !important;
        padding: 2mm !important;
        border: none !important;
        background: transparent !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    body.is-printing-coloring #coloring-flag-svg-container {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    body.is-printing-coloring #coloring-flag-svg-container svg {
        max-height: 85mm !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        display: block !important;
        box-shadow: none !important;
        filter: none !important;
    }

    body.is-printing-coloring .coloring-bottom-block {
        display: flex !important;
        flex-direction: column !important;
        gap: 2mm !important;
        margin-top: 1mm !important;
    }

    body.is-printing-coloring .coloring-crayons-box {
        padding: 2mm 3.5mm !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 4px !important;
        background: #f8fafc !important;
    }

    body.is-printing-coloring .coloring-crayons-title {
        font-size: 9pt !important;
        font-weight: 700 !important;
        margin-bottom: 1.5mm !important;
    }

    body.is-printing-coloring .coloring-crayons-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 1.5mm 3mm !important;
        align-items: center !important;
    }

    body.is-printing-coloring .coloring-crayon-item {
        font-size: 8.5pt !important;
        font-weight: 600 !important;
        padding: 1mm 2.5mm !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 9999px !important;
        background: #ffffff !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 1.5mm !important;
        box-shadow: none !important;
    }

    body.is-printing-coloring .crayon-dot {
        width: 9px !important;
        height: 9px !important;
    }

    body.is-printing-coloring .coloring-guide-box {
        padding: 1.5mm 3.5mm !important;
        border-left: 3px solid #0284c7 !important;
        border-radius: 0 4px 4px 0 !important;
        background: #f1f5f9 !important;
    }

    body.is-printing-coloring .coloring-guide-title {
        font-size: 8pt !important;
        margin-bottom: 0.5mm !important;
    }

    body.is-printing-coloring .coloring-guide-text {
        font-size: 8.5pt !important;
        line-height: 1.25 !important;
        color: #1e293b !important;
        margin: 0 !important;
    }

    body.is-printing-coloring .coloring-footer-info {
        padding-top: 1.5mm !important;
        border-top: 1px solid #cbd5e1 !important;
    }

    body.is-printing-coloring .coloring-footer-line {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 8.5pt !important;
        color: #334155 !important;
        width: 100% !important;
    }

    body.is-printing-coloring .coloring-brand {
        font-weight: 600 !important;
        color: #0284c7 !important;
    }
}

/* ==========================================================================
   RESPONZIVITA PRO PEXESO A TISKOVÉ PRVKY
   ========================================================================== */
@media (max-width: 768px) {
    .diploma-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .diploma-banner-content {
        flex-direction: row;
    }

    .btn-diploma {
        align-self: stretch;
        text-align: center;
        justify-content: center;
    }

    .diploma-main-title {
        font-size: 1.45rem;
    }

    .diploma-hero-name {
        font-size: 1.7rem;
    }

    .diploma-hero-avatar {
        font-size: 1.8rem;
    }

    .diploma-footer {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .diploma-footer-right {
        text-align: center;
    }

    .coloring-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .coloring-sample-card {
        align-self: flex-start;
    }

    .coloring-footer-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .coloring-sep {
        display: none;
    }
}

@media (max-width: 480px) {
    .pexeso-grid.size-4 {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
        gap: 0.65rem;
    }

    .pexeso-grid.size-6 {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
        gap: 0.65rem;
    }

    .pexeso-grid.size-8 {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        gap: 0.65rem;
    }

    .pexeso-grid.size-12 {
        grid-template-columns: repeat(3, minmax(85px, 1fr));
        gap: 0.5rem;
    }

    .pexeso-card-country-name {
        font-size: 0.8rem;
    }

    .pexeso-card-country-cap {
        font-size: 0.7rem;
    }

    .pexeso-ctrl-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-restart {
        justify-content: center;
    }
}
