
/* ============================================================
   MOBİL SON DÜZELTME - CACHE KIRAN OVERRIDE
   Masaüstüne dokunmaz. 900px altındaki dikey kullanım için geçerlidir.
   ============================================================ */
@media screen and (max-width: 900px) {
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .platform-wrapper,
    .app-container,
    .card,
    .quick-reference-card {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .birthdate-title {
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: clamp(0.86rem, 4vw, 1.02rem) !important;
        line-height: 1.2 !important;
        letter-spacing: -0.02em !important;
    }

    .card-title {
        justify-content: center !important;
        text-align: center !important;
    }

    .quick-reference-card .reference-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        border-radius: 16px !important;
    }

    .quick-reference-card .age-reference-table {
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        font-size: clamp(0.52rem, 1.9vw, 0.66rem) !important;
    }

    .quick-reference-card .age-reference-table thead,
    .quick-reference-card .age-reference-table thead tr,
    .quick-reference-card .age-reference-table thead th {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .quick-reference-card .age-reference-table td {
        padding: 7px 4px !important;
        line-height: 1.28 !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        hyphens: auto !important;
        text-align: center !important;
    }

    .quick-reference-card .age-reference-table .col-year {
        width: 8% !important;
        font-size: 0.86em !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    .quick-reference-card .age-reference-table .col-month {
        width: 21% !important;
        font-size: 0.9em !important;
    }

    .quick-reference-card .age-reference-table .col-age {
        width: 10% !important;
        font-size: 0.9em !important;
    }

    .quick-reference-card .age-reference-table .status-cell {
        font-size: 0.86em !important;
        line-height: 1.3 !important;
    }

    .mobile-reference-summary-title {
        display: block !important;
        width: 100% !important;
        margin: 14px 0 10px 0 !important;
        text-align: center !important;
        font-size: 0.96rem !important;
        font-weight: 900 !important;
        color: #1e3a8a !important;
    }

    .mobile-reference-list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-reference-list .mobile-ref-item {
        display: block !important;
        border-radius: 16px !important;
        padding: 13px 14px !important;
        text-align: center !important;
        border: 1px solid rgba(148,163,184,0.36) !important;
        box-shadow: 0 8px 18px rgba(15,23,42,0.055) !important;
        color: #0f172a !important;
    }

    .mobile-reference-list .mobile-ref-item .ref-age {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 88px !important;
        padding: 5px 11px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,0.84) !important;
        font-weight: 900 !important;
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
        box-shadow: 0 1px 2px rgba(15,23,42,0.05) !important;
    }

    .mobile-reference-list .mobile-ref-item strong {
        display: block !important;
        font-size: 1rem !important;
        line-height: 1.28 !important;
        margin-bottom: 5px !important;
    }

    .mobile-reference-list .mobile-ref-item p {
        display: block !important;
        margin: 0 !important;
        font-size: 0.87rem !important;
        line-height: 1.48 !important;
        color: #334155 !important;
    }

    .mobile-reference-list .ref-green { background: linear-gradient(135deg, #ecfdf5, #dcfce7) !important; border-color: #86efac !important; }
    .mobile-reference-list .ref-purple { background: linear-gradient(135deg, #f5f3ff, #ede9fe) !important; border-color: #c4b5fd !important; }
    .mobile-reference-list .ref-blue { background: linear-gradient(135deg, #eff6ff, #e0f2fe) !important; border-color: #93c5fd !important; }
    .mobile-reference-list .ref-red { background: linear-gradient(135deg, #fef2f2, #fee2e2) !important; border-color: #fca5a5 !important; }
    .mobile-reference-list .ref-orange { background: linear-gradient(135deg, #fff7ed, #ffedd5) !important; border-color: #fdba74 !important; }

    .table-caption-note {
        margin-top: 12px !important;
        text-align: center !important;
        font-size: 0.8rem !important;
        line-height: 1.55 !important;
        padding: 12px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px !important;
        color: #475569 !important;
    }
}

@media screen and (max-width: 420px) {
    .birthdate-title {
        font-size: 0.84rem !important;
    }

    .quick-reference-card .age-reference-table {
        font-size: clamp(0.49rem, 1.78vw, 0.58rem) !important;
    }

    .quick-reference-card .age-reference-table td {
        padding: 6px 3px !important;
    }
}


/* ============================================================
   MOBİL SKALA KART TASARIMI - OKUL ÖNCESİ / İLKOKUL
   ============================================================ */
@media screen and (max-width: 900px) {
    .side-panel {
        background: #ffffff !important;
        border: 1px solid #dbe4ef !important;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06) !important;
        border-radius: 22px !important;
        padding: 18px 15px !important;
        overflow: hidden !important;
    }

    .side-panel-header {
        border-bottom: 0 !important;
        padding-bottom: 8px !important;
        margin-bottom: 12px !important;
    }

    .side-panel-header h2 {
        font-size: clamp(1.06rem, 4.6vw, 1.32rem) !important;
        line-height: 1.22 !important;
        margin: 0 auto 5px auto !important;
        letter-spacing: -0.02em !important;
    }

    .side-panel-header span {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px 12px !important;
        border-radius: 999px !important;
        background: #f1f5f9 !important;
        color: #334155 !important;
        font-size: 0.82rem !important;
        font-weight: 800 !important;
    }

    .side-panel .scale-item {
        position: relative !important;
        border-left: 0 !important;
        border-top: 0 !important;
        border-radius: 17px !important;
        padding: 13px 13px 13px 13px !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        overflow: hidden !important;
        box-shadow: 0 8px 18px rgba(15,23,42,0.055) !important;
        border: 1px solid rgba(148,163,184,0.34) !important;
    }

    .side-panel .scale-item::before {
        display: none !important;
        content: none !important;
    }

    .side-panel .scale-item::after {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 5px !important;
        opacity: 0.95 !important;
    }

    .side-panel .scale-item b {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 6px 11px !important;
        margin: 3px auto 9px auto !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,0.78) !important;
        color: #0f172a !important;
        font-size: 0.92rem !important;
        line-height: 1.25 !important;
        font-weight: 900 !important;
        box-shadow: 0 1px 2px rgba(15,23,42,0.05) !important;
    }

    .side-panel .scale-item p {
        margin: 0 !important;
        text-align: center !important;
        color: #334155 !important;
        font-size: 0.9rem !important;
        line-height: 1.52 !important;
        font-weight: 500 !important;
    }

    .side-panel .scale-item p strong {
        display: block !important;
        margin-bottom: 4px !important;
        color: #0f172a !important;
        font-size: 0.96rem !important;
        font-weight: 900 !important;
        line-height: 1.28 !important;
    }

    .theme-preschool .sc-green,
    .theme-primary .sc-green {
        background: linear-gradient(135deg, #ecfdf5, #dcfce7) !important;
        border-color: #86efac !important;
    }
    .theme-preschool .sc-green::after,
    .theme-primary .sc-green::after { background: #10b981 !important; }

    .theme-preschool .sc-blue,
    .theme-primary .sc-blue {
        background: linear-gradient(135deg, #eff6ff, #e0f2fe) !important;
        border-color: #93c5fd !important;
    }
    .theme-preschool .sc-blue::after,
    .theme-primary .sc-blue::after { background: #0ea5e9 !important; }

    .theme-preschool .sc-purple,
    .theme-primary .sc-purple {
        background: linear-gradient(135deg, #f5f3ff, #ede9fe) !important;
        border-color: #c4b5fd !important;
    }
    .theme-preschool .sc-purple::after,
    .theme-primary .sc-purple::after { background: #8b5cf6 !important; }

    .theme-preschool .sc-orange,
    .theme-primary .sc-orange {
        background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
        border-color: #fdba74 !important;
    }
    .theme-preschool .sc-orange::after,
    .theme-primary .sc-orange::after { background: #f59e0b !important; }

    .theme-preschool .sc-red,
    .theme-primary .sc-red {
        background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
        border-color: #fca5a5 !important;
    }
    .theme-preschool .sc-red::after,
    .theme-primary .sc-red::after { background: #ef4444 !important; }

    .theme-primary .sc-dark {
        background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
        border-color: #93c5fd !important;
    }
    .theme-primary .sc-dark::after { background: #1e3a8a !important; }

    .side-panel > div[style] {
        margin-top: 12px !important;
        padding: 12px 13px !important;
        border-radius: 16px !important;
        text-align: center !important;
        font-size: 0.84rem !important;
        line-height: 1.5 !important;
        font-weight: 700 !important;
        border: 1px solid rgba(148,163,184,0.28) !important;
        box-shadow: 0 6px 14px rgba(15,23,42,0.04) !important;
    }

    .theme-preschool > div[style] {
        background: #f0fdf4 !important;
        color: #166534 !important;
    }

    .theme-primary > div[style] {
        background: #fef2f2 !important;
        color: #991b1b !important;
    }
}


/* ============================================================
   V6 MOBİL TABLO ESTETİK DÜZENLEME
   3. ve 4. sütunlarda heceleme/kısa çizgi ile parçalanmayı kapatır.
   ============================================================ */
@media screen and (max-width: 900px) {
    .quick-reference-card .age-reference-table,
    .quick-reference-card .age-reference-table * {
        hyphens: none !important;
        -webkit-hyphens: none !important;
        -ms-hyphens: none !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .quick-reference-card .age-reference-table {
        font-size: clamp(0.49rem, 1.8vw, 0.62rem) !important;
    }

    .quick-reference-card .age-reference-table td {
        padding: 7px 3px !important;
        line-height: 1.26 !important;
        white-space: normal !important;
    }

    .quick-reference-card .age-reference-table .col-year {
        width: 7% !important;
        font-size: 0.82em !important;
    }

    .quick-reference-card .age-reference-table .col-month {
        width: 23% !important;
        font-size: 0.88em !important;
    }

    .quick-reference-card .age-reference-table .col-age {
        width: 8% !important;
        font-size: 0.88em !important;
    }

    .quick-reference-card .age-reference-table .status-cell {
        font-size: 0.82em !important;
        line-height: 1.28 !important;
        text-align: center !important;
    }

    .quick-reference-card .age-reference-table td:nth-child(4) {
        width: 28% !important;
    }

    .quick-reference-card .age-reference-table td:nth-child(5) {
        width: 34% !important;
    }

    .quick-reference-card .reference-note {
        font-size: 0.86rem !important;
        line-height: 1.58 !important;
        max-width: 95% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .mobile-reference-summary-title {
        margin-top: 16px !important;
        margin-bottom: 12px !important;
    }

    .mobile-reference-list .mobile-ref-item {
        border-radius: 18px !important;
        padding: 14px 14px !important;
    }

    .mobile-reference-list .mobile-ref-item strong {
        font-size: 0.98rem !important;
    }

    .mobile-reference-list .mobile-ref-item p {
        font-size: 0.86rem !important;
        line-height: 1.5 !important;
    }
}

@media screen and (max-width: 420px) {
    .quick-reference-card .age-reference-table {
        font-size: clamp(0.45rem, 1.7vw, 0.55rem) !important;
    }

    .quick-reference-card .age-reference-table td {
        padding: 6px 2px !important;
    }

    .quick-reference-card .age-reference-table .status-cell {
        font-size: 0.78em !important;
    }
}


/* ============================================================
   V7 MOBİL ANA BAŞLIK KUTUSU SIKILAŞTIRMA
   Logo ve başlık alanı telefonda daha az yer kaplar.
   ============================================================ */
@media screen and (max-width: 900px) {
    .header-card {
        padding: 10px 12px 12px 12px !important;
        gap: 5px !important;
        border-radius: 16px !important;
        min-height: auto !important;
    }

    .header-logo {
        width: min(42vw, 112px) !important;
        max-width: 112px !important;
        height: 48px !important;
        margin-bottom: 0 !important;
        object-fit: contain !important;
    }

    .header-card h1 {
        font-size: clamp(0.98rem, 4.25vw, 1.2rem) !important;
        line-height: 1.14 !important;
        margin: 0 auto 4px auto !important;
        max-width: 310px !important;
    }

    .header-card p {
        font-size: 0.78rem !important;
        line-height: 1.32 !important;
        max-width: 310px !important;
        margin: 0 auto !important;
    }
}

@media screen and (max-width: 420px) {
    .header-card {
        padding: 9px 10px 11px 10px !important;
        gap: 4px !important;
        border-radius: 15px !important;
    }

    .header-logo {
        width: min(38vw, 96px) !important;
        max-width: 96px !important;
        height: 42px !important;
    }

    .header-card h1 {
        font-size: clamp(0.9rem, 4.05vw, 1.08rem) !important;
        line-height: 1.12 !important;
    }

    .header-card p {
        font-size: 0.72rem !important;
        line-height: 1.28 !important;
    }
}


@media screen and (max-width: 900px) {
    .petition-doc .doc-signature-row {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        margin-bottom: 28px !important;
    }

    .petition-doc .doc-footer,
    .petition-doc .footer-left {
        text-align: center !important;
    }

    .petition-doc .doc-body p {
        text-indent: 0 !important;
        text-align: left !important;
        font-size: 10.5pt !important;
    }
}


/* V11 mobile petition footer */
@media screen and (max-width: 900px) {
    .petition-doc .doc-footer {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        justify-items: center !important;
    }

    .petition-doc .footer-left,
    .petition-doc .footer-right {
        width: 100% !important;
        text-align: center !important;
        align-items: center !important;
    }
}
