:root {
    --bg-color: #002776; /* Azul Escuro */
    --card-bg: rgba(0, 155, 58, 0.7); /* Verde Brasil */
    --primary: #FFDF00; /* Amarelo Brasil */
    --primary-hover: #e5c800; 
    --secondary: #009B3A; /* Verde Claro */
    --secondary-hover: #007a2d;
    --text-main: #ffffff; /* Branco */
    --text-muted: #e2e8f0;
    --border-color: rgba(255, 223, 0, 0.3); /* Bordas amareladas */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #009B3A 0%, #FFDF00 50%, #002776 100%);
    color: var(--text-main);
    min-height: 100vh;
}

#app-container {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* Mantendo 1200px para o resto do site */
header, #groups-container, .ad-banner, footer {
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary);
}

header h1 span {
    font-weight: 300;
    color: var(--text-main);
}

header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--primary);
    color: #002776; /* Azul Escuro para contraste */
    box-shadow: 0 4px 14px rgba(255, 223, 0, 0.4);
}

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

.btn-secondary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-close {
    background: #ef4444;
    color: white;
    margin-top: 10px;
}

.btn-close:hover {
    background: #dc2626;
}

/* Ad Banners (Mock & Real) */
.ad-banner {
    width: 100%;
    min-height: 90px;
    margin: 20px 0;
    border-radius: 10px;
}

.promo-ad {
    background: linear-gradient(90deg, #1f2937 0%, #111827 100%);
    border: 2px solid #FFDF00;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.promo-ad .ad-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #FFDF00;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 10px;
    border-bottom-right-radius: 8px;
    letter-spacing: 1px;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.promo-content strong {
    font-size: 1.3rem;
    color: #FFDF00;
    white-space: nowrap;
}

.promo-text {
    font-size: 0.95rem;
    color: #e2e8f0;
}

.ad-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media screen and (max-width: 768px) {
    .promo-ad {
        flex-direction: column;
        padding: 25px 15px 15px;
        text-align: center;
        gap: 10px;
    }
    .promo-content {
        flex-direction: column;
        gap: 5px;
    }
}

/* Groups */
#groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.group-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--glass-shadow);
}

.group-card h3.group-title {
    text-align: center;
    color: #002776; /* Azul escuro */
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 
        -1px -1px 0 #FFDF00,  
         1px -1px 0 #FFDF00,
        -1px  1px 0 #FFDF00,
         1px  1px 0 #FFDF00;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

td.team-name {
    text-align: left;
    font-weight: 600;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 4px;
    border-radius: 8px;
    gap: 6px;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 68px;
    flex-shrink: 0;
}

.match-team .team-name {
    width: 32px;
    text-align: center;
    display: inline-block;
    font-size: 0.85rem;
}

.home-team {
    justify-content: flex-end;
}

.away-team {
    justify-content: flex-start;
}

.vs-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0 4px;
}

.group-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.score-input {
    width: 32px;
    height: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 5px;
    font-weight: bold;
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

.score-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 5px;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--text-muted);
}

/* Knockout Bracket Styles */
#knockout-container {
    margin-top: 50px;
    text-align: center;
    overflow-x: auto; /* Permite scroll horizontal na árvore */
    padding: 20px; /* Adicionado padding para evitar corte nas bordas */
}

#bracket-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 15px;
    margin-top: 20px;
    min-width: 1000px; /* Reduzido de 1200px */
    padding: 20px;
}

.bracket-side {
    display: flex;
    gap: 15px;
    flex: 1 1 0;
    min-width: 0;
}

.left-side {
    flex-direction: row;
}

.right-side {
    flex-direction: row-reverse;
}

.bracket-col {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex: 1 1 0;
    min-width: 0;
    gap: 2px;
}

.bracket-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.knockout-match {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: var(--glass-shadow);
    width: auto;
    min-width: 130px;
    position: relative;
    transition: transform 0.2s ease, z-index 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
}

/* Efeito de zoom ao clicar/focar no confronto */
.knockout-match:focus-within, .knockout-match:hover {
    transform: scale(1.2);
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    background: rgba(0, 155, 58, 1);
}

.knockout-team-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.team-flag {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.placeholder-flag {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.4);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: default;
}

.team-flag:hover {
    transform: scale(1.15);
}

.knockout-team-row input[type="radio"] {
    cursor: pointer;
    transform: scale(1.5);
    accent-color: var(--primary);
    margin: 0 5px;
}

.knockout-team-row input[type="number"] {
    width: 35px;
    height: 25px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.3);
    color: white;
    font-weight: bold;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
}

.knockout-team-row input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Destaque para a Grande Final */
.final-match {
    transform: scale(1.25);
    border: 2px solid #FFDF00;
    box-shadow: 0 0 25px rgba(255, 223, 0, 0.5);
    background: linear-gradient(135deg, rgba(0,155,58,1) 0%, rgba(0,39,118,1) 100%);
}

.final-match:focus-within, .final-match:hover {
    transform: scale(1.4);
    box-shadow: 0 0 40px rgba(255, 223, 0, 0.8);
}

/* Clickable Teams */
.team-name {
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.team-name:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* Stats Modal */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-box h3 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stat-box li {
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.stat-box li:last-child {
    border-bottom: none;
}

/* Árvore Vertical Indentada (Estilo Pastas) para Mobile */
@media screen and (max-width: 768px) {
    #knockout-container {
        overflow-x: hidden;
        padding: 5px;
    }
    
    #bracket-grid {
        flex-direction: column;
        align-items: flex-start;
        min-width: 100%;
        gap: 10px;
        padding: 0;
    }
    
    .bracket-side {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .left-side {
        flex-direction: column;
    }
    
    .right-side {
        flex-direction: column-reverse;
    }
    
    .bracket-col {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        border-left: 2px dashed rgba(255, 223, 0, 0.3);
        padding-left: 15px;
        padding-top: 5px;
        padding-bottom: 5px;
    }
    
    /* Indentation Tiers */
    .left-side .bracket-col:nth-child(1), .right-side .bracket-col:nth-child(1) { 
        margin-left: 0px; 
        border-left: none;
        padding-left: 0;
    }
    .left-side .bracket-col:nth-child(2), .right-side .bracket-col:nth-child(2) { 
        margin-left: 20px; 
    }
    .left-side .bracket-col:nth-child(3), .right-side .bracket-col:nth-child(3) { 
        margin-left: 40px; 
    }
    .left-side .bracket-col:nth-child(4), .right-side .bracket-col:nth-child(4) { 
        margin-left: 60px; 
    }
    
    .bracket-center { 
        margin-left: 80px; 
        align-items: flex-start;
        padding: 10px 0;
        border-left: 2px dashed rgba(255, 223, 0, 0.8);
        padding-left: 15px;
        width: 100%;
    }
    
    .bracket-center h3 {
        position: relative !important;
        transform: none !important;
        margin-bottom: 5px !important;
        font-size: 1.5rem !important;
        text-align: left;
        color: var(--primary);
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        z-index: 10;
    }

    .knockout-match {
        width: 100%;
        max-width: 200px;
        padding: 8px;
        transform: none !important; /* Desativa escalas que causam sobreposição no mobile */
    }

    .knockout-match:hover, .knockout-match:focus-within {
        transform: none !important;
    }
    
    .knockout-team-row {
        gap: 5px;
    }

    .final-match {
        transform: none !important;
        max-width: 220px; /* Ligeiramente maior apenas pela largura */
    }

    .final-match:hover, .final-match:focus-within {
        transform: none !important;
    }
}

/* Responsividade Mobile */
@media screen and (max-width: 480px) {
    header {
        padding: 20px 10px;
    }
    header h1 {
        font-size: 2rem;
    }
    #groups-container {
        grid-template-columns: 1fr;
    }
    .group-card {
        padding: 15px 10px;
    }
    .match {
        padding: 10px 5px;
        gap: 5px;
    }
    .score-input {
        width: 30px;
        height: 25px;
        margin: 0;
    }
    .match-team {
        gap: 4px;
    }
    .match-team .team-name {
        width: 30px;
        font-size: 0.8rem;
    }
    .group-flag {
        width: 20px;
        height: 20px;
    }
    .vs-text {
        margin: 0 2px;
    }
    th, td {
        padding: 6px 2px;
        font-size: 0.8rem;
    }
}

#stickers-container {
    display: none;
}

/* --- Estilos de Impressão de Alta Performance para PDF Preto e Branco (Modo Paisagem & Árvore Horizontal Compacta) --- */
@media print {
    @page {
        size: landscape;
        margin: 8mm; /* Margens finas para aproveitar o espaço máximo do papel A4 */
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 9pt !important;
    }

    #app-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
    }

    /* Ocultar elementos desnecessários na impressão */
    .actions, 
    .ad-banner, 
    footer, 
    .modal, 
    button, 
    #btn-undo, 
    #btn-clear-ko, 
    .actions-bar,
    header p { 
        display: none !important;
    }

    /* Título do Cabeçalho P&B Fino */
    header {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 0 8px 0 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        border-bottom: 2px solid #000000 !important;
    }

    header h1 {
        color: #000000 !important;
        font-size: 20pt !important;
        margin-bottom: 0 !important;
    }

    header h1 span {
        color: #555555 !important;
    }

    /* PÁGINA 1: FASE DE GRUPOS - 4 COLUNAS EM PAISAGEM P&B COMPACTO */
    #groups-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; /* 4 colunas horizontais */
        gap: 8px !important;
        page-break-after: always !important;
        break-after: page !important;
        width: 100% !important;
    }

    .group-card {
        background: #ffffff !important;
        border: 1px solid #444444 !important;
        box-shadow: none !important;
        border-radius: 8px !important;
        padding: 6px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .group-card h3.group-title {
        color: #000000 !important;
        text-shadow: none !important;
        font-size: 11pt !important;
        margin-bottom: 4px !important;
        border-bottom: 1px solid #000000 !important;
        padding-bottom: 2px !important;
    }

    table {
        margin-bottom: 6px !important;
    }

    th, td {
        border-bottom: 1px solid #cccccc !important;
        color: #000000 !important;
        padding: 2px 3px !important;
        font-size: 7.5pt !important;
    }

    th {
        color: #333333 !important;
    }

    td.team-name {
        text-decoration: none !important;
        color: #000000 !important;
    }

    .match {
        background: #f3f4f6 !important;
        border: 1px solid #dddddd !important;
        padding: 2px 3px !important;
        gap: 3px !important;
        border-radius: 4px !important;
    }

    .match-team .team-name {
        color: #000000 !important;
        font-size: 7.5pt !important;
    }

    .vs-text {
        color: #666666 !important;
        font-size: 6.5pt !important;
    }

    /* Estilo de Input de Placar impresso */
    .score-input {
        border: none !important;
        border-bottom: 1px solid #000000 !important;
        background: transparent !important;
        color: #000000 !important;
        font-size: 8pt !important;
        width: 18px !important;
        height: 18px !important;
        text-align: center !important;
    }

    /* Bandeiras Grayscale */
    .group-flag, .team-flag {
        filter: grayscale(100%) !important;
        opacity: 0.7 !important;
        border: 1px solid #999999 !important;
    }

    /* PÁGINA 2: MATA-MATA HORIZONTAL P&B IDÊNTICO AO PRINT DO MONITOR (COMPACTADO PARA 1 PÁGINA) */
    #knockout-container {
        page-break-before: always !important;
        break-before: page !important;
        page-break-after: always !important;
        break-after: page !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
        text-align: center !important;
        height: 100% !important;
    }

    #knockout-container h2 {
        color: #000000 !important;
        font-size: 14pt !important;
        margin: 0 0 5px 0 !important;
        text-align: left !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 2px !important;
    }

    #bracket-grid {
        display: flex !important;
        flex-direction: row !important; /* Mantém a árvore horizontal original convergente */
        justify-content: space-between !important;
        align-items: stretch !important;
        gap: 20px !important; /* Excelente espaçamento horizontal entre as fases */
        min-width: 1080px !important;
        max-width: 1100px !important;
        width: 1080px !important; /* ESTICA ATÉ AS EXTREMIDADES LATERAIS DO PAPEL */
        margin-left: auto !important;
        margin-right: auto !important;
        transform: scale(0.98) !important; /* Escala máxima para preenchimento horizontal completo da folha */
        transform-origin: top center !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        height: 620px !important; /* ALTURA MÁXIMA DA FOLHA: Ocupa de cima a baixo toda a vertical do papel Paisagem! */
        padding: 0 !important;
        margin-top: 10px !important;
    }

    /* Mantém o alinhamento e flexibilidade originais do chaveamento horizontal */
    .bracket-side {
        display: flex !important;
        flex-direction: row !important;
        gap: 20px !important; /* Excelente espaçamento horizontal */
        width: auto !important;
        height: 100% !important; /* CRUCIAL: Garante que as laterais herdem a altura inteira do grid pai! */
    }

    .left-side {
        flex-direction: row !important;
    }

    .right-side {
        flex-direction: row-reverse !important;
    }

    .bracket-col {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-evenly !important; /* Distribui os confrontos de cima a baixo preenchendo toda a altura! */
        width: auto !important;
        gap: 2px !important;
        border-left: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100% !important; /* CRUCIAL: Distribui os cards por toda a vertical da folha! */
    }

    .bracket-center { 
        margin: 0 !important; 
        align-items: center !important;
        padding: 0 2px !important;
        border-left: none !important;
        width: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        height: 100% !important; /* CRUCIAL: Centraliza a Final de cima a baixo! */
    }

    .bracket-center h3 {
        color: #000000 !important;
        font-size: 12pt !important;
        margin-bottom: 4px !important;
    }

    /* Cards de Confrontos Confortáveis, Robustos e Otimizados (Evita 100% de colisões laterais) */
    .knockout-match {
        background: #ffffff !important;
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        color: #000000 !important;
        border-radius: 6px !important;
        padding: 4px 6px !important; 
        min-width: 90px !important; /* Largura ideal ampliada que preenche a folha sem colidir */
        width: 90px !important;
        max-width: 90px !important;
        transform: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        gap: 4px !important;
        height: 62px !important; /* Altura ampliada confortável para o manuseio das figurinhas */
    }

    .knockout-match:hover, .knockout-match:focus-within {
        transform: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    .knockout-team-row {
        height: 24px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .knockout-team-row label {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
        width: auto !important;
    }

    .knockout-team-row input[type="radio"] {
        display: none !important; /* Oculta os botões radio na impressão */
    }

    /* Bandeiras Impressas de Volta como Base de Colagem Ampliada (36x24px) */
    .team-flag {
        width: 36px !important; /* Caixa de colagem ampliada para caber as figurinhas perfeitamente! */
        height: 24px !important;
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        display: inline-block !important;
        border-radius: 3px !important;
        box-shadow: none !important;
        margin: 0 !important;
        filter: grayscale(100%) !important; /* P&B econômico elegante */
        opacity: 0.95 !important;
    }

    /* Oculta as siglas/nomes na árvore eliminatória para liberar espaço horizontal */
    .knockout-team-row .team-name {
        display: none !important;
    }

    /* Caixa de Placar Elegante */
    .knockout-team-row input[type="number"] {
        width: 22px !important; /* Caixa de placar robusta ao lado */
        height: 20px !important;
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-weight: bold !important;
        font-size: 10pt !important;
        text-align: center !important;
        border-radius: 3px !important;
        padding: 0 !important;
    }

    .final-match {
        transform: scale(1.15) !important; /* Destaque magnífico na Final */
        border: 2px solid #000000 !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    .final-match:hover {
        transform: scale(1.15) !important;
        box-shadow: none !important;
    }

    /* PÁGINA 3 E 4: FIGURINHAS P&B COMPACTAS EM PAISAGEM */
    #stickers-container {
        display: block !important;
        page-break-before: always !important;
        break-before: page !important;
        margin-top: 20px !important;
        text-align: center !important;
        background: #ffffff !important;
        border: 1px solid #000000 !important;
        border-radius: 12px !important;
        padding: 15px !important;
        box-shadow: none !important;
    }

    #stickers-container h2 {
        color: #000000 !important;
        font-size: 15pt !important;
        margin-bottom: 4px !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 4px !important;
    }

    .stickers-instruction {
        font-size: 9pt !important;
        color: #333333 !important;
        margin-bottom: 15px !important;
    }

    #stickers-grid {
        display: grid !important;
        grid-template-columns: repeat(18, 1fr) !important; /* 18 figurinhas por linha para caber muitas em Paisagem */
        gap: 8px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    .sticker-item {
        border: 1px dashed #555555 !important; /* Linha de corte tracejada P&B */
        padding: 1px !important;
        width: 40px !important; /* Tamanho de corte perfeitamente dimensionado */
        height: 28px !important;
        background: #ffffff !important;
        border-radius: 3px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .sticker-flag {
        width: 36px !important; /* Tamanho exato correspondente à nova caixa de colagem (36x24px) */
        height: 24px !important;
        border: 1px solid #000000 !important;
        object-fit: cover !important; /* Mantém a proporção exata da bandeira sem distorcer */
        margin: 0 !important;
        filter: grayscale(100%) !important; /* Tudo em P&B economizador de tinta */
        opacity: 0.85 !important;
    }
}
}

