/* --- PRINT MEDIA QUERY --- */
@media print {
    @page {
        margin: 0.4in; 
        size: letter portrait;
    }

    body {
        overflow: visible !important;
        height: auto !important;
        background-color: white !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .main-wrapper, .landing-area {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    /* HIDE non-printable elements */
    .app-header, 
    .card:not(.chart-card),
    .chart-header-screen,
    .resources-grid,
    .legal-footer,  /* Hides the long footer + border */
    .app-splash {
        display: none !important;
    }

    /* HEADER STYLING */
    .print-only-header {
        display: block !important;
        text-align: center; /* Center the title */
        margin-bottom: 1rem; 
        color: var(--text-main);
    }
    
    .print-only-header h1 {
        font-size: 24pt; 
        margin: 0;
        margin-bottom: 0.25rem;
        line-height: 1.2;
        text-align: center; /* Reinforce centering */
    }
    
    .print-only-header h2 {
        display: none; /* Hide subtitle as requested */
    }

    /* FOOTER STYLING */
    .print-only-footer {
        display: block !important;
        text-align: center;
        margin-top: 1rem; 
        font-size: 9pt;
        color: var(--text-muted);
        width: 100%;
        padding-top: 0.5rem;
    }

    /* CHART CARD */
    .chart-card {
        border: 2px solid var(--c-grey-100) !important; 
        box-shadow: none !important;
        margin: 0 auto !important;
        padding: 0.5rem !important; 
        width: 100% !important;
        page-break-inside: avoid;
    }

    /* GRID TWEAKS */
    .syllabics-grid {
        gap: 4px !important;
    }
    
    .grid-item {
        border: 1px solid var(--c-grey-100) !important; 
        break-inside: avoid;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}