/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
    .feed-shell {
        width: min(100%, 1000px);
    }
}

@media (max-width: 900px) {
    .hero {
        padding: var(--space-3);
    }

    .hero-card,
    .feed-empty,
    .page-note,
    .feed-toolbar {
        padding: var(--space-3) var(--space-4);
    }

    .feed-card {
        /* p-5 mobil nefes alanı — tipografiye yer açar */
        padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 4px);
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-3);
    }

    /* FIX: CSS order reorder — success+warning share row 1, info (uzun bölge metni)
       tam genişlikte row 2'yi kaplar. Auto-placement info'yu row 2'ye itiyordu,
       success sol sütunda tek başına kalıyordu → 3 ayrı satır görünüyordu. */
    .hero-stat--success { order: 1; }
    .hero-stat--warning { order: 2; }
    .hero-stat--info    { order: 3; grid-column: span 2; }


    .feed-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

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

    .modal-overlay {
        padding: var(--space-3);
        backdrop-filter: none;
    }

    .modal-panel {
        box-shadow: var(--shadow-float);
    }

    .feed-card,
    .feed-empty,
    .feed-toolbar {
        /* Mobilde de yumuşatılmış difüz gölge — sert kontrast yok */
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    }

    .feed-toolbar__panel {
        grid-template-columns: 1fr auto;
        gap: var(--space-2);
    }

    .feed-search {
        grid-column: 1;
        grid-row: 1;
    }

    .feed-toolbar__sort {
        grid-column: 2;
        grid-row: 1;
        width: auto;
    }

    .feed-filter-chips {
        grid-column: span 2;
        grid-row: 2;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .feed-filter-chips::-webkit-scrollbar {
        display: none;
    }


    .feed-toolbar__eyebrow {
        font-size: var(--font-base);
    }

    .feed-toolbar__hint {
        font-size: var(--font-xs);
    }
}

@media (max-width: 720px) {
    body {
        display: block;
    }

    .feed-shell {
        width: 100%;
        border-left: 0;
        border-right: 0;
        padding-bottom: calc(var(--space-12) + 130px);
    }

    .topbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .topbar,
    .hero,
    .feed-toolbar,
    .feed-list,
    .feed-empty,
    .page-note,
    .pagination {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }

    .feed-toolbar {
        margin-left: var(--space-3);
        margin-right: var(--space-3);
    }

    .hero-card__title {
        font-size: clamp(24px, 7.5vw, 34px);
    }

    .company-name {
        font-size: 0.9375rem;
    }

    .feed-card__body {
        font-size: 0.9375rem;
        line-height: 1.68;
    }

    .fab {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: min(100% - 32px, 380px);
        bottom: calc(76px + env(safe-area-inset-bottom));
        z-index: var(--z-fab);
    }


    .fab-btn {
        min-height: 50px;
    }

    .toast {
        top: var(--space-3);
        max-width: calc(100vw - 24px);
    }

    .modal-panel {
        width: min(100%, 440px);
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }

    .feed-empty {
        padding-top: 44px;
    }

    .feed-toolbar__eyebrow {
        font-size: var(--font-base);
    }

    /* ─── Bottom Navigation (mobile) ─────────────────────────────────────────── */
    .bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%) translateZ(0);
        z-index: var(--z-sticky);
        width: min(100%, 560px);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        will-change: transform, backdrop-filter;
    }

    html[data-theme="dark"] .bottom-nav {
        background: rgba(8, 12, 24, 0.94);
    }

    .bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        min-height: 3.625rem;
        border-radius: var(--radius-md);
        border: 1px solid transparent;
        background: transparent;
        color: var(--muted);
        text-decoration: none;
        font-size: 0.6875rem;
        font-weight: 700;
    }

    .bottom-nav__item.is-active {
        color: var(--brand-green-hover);
        background: var(--brand-green-muted);
        border-color: rgba(26, 183, 105, 0.22);
    }

    html[data-theme="dark"] .bottom-nav__item.is-active {
        color: #34d399;
        background: rgba(26, 183, 105, 0.12);
        border-color: rgba(26, 183, 105, 0.20);
    }

    /* Center search pill — brand green */
    .bottom-nav__item--center {
        color: #ffffff;
        background: var(--brand-green);
        border-color: transparent;
        width: 58px;
        height: 58px;
        padding: 0;
        gap: 0;
        border-radius: 50%;
        justify-self: center;
        align-self: end;
        transform: translateY(-16px);
        box-shadow: 0 10px 28px rgba(26, 183, 105, 0.34);
    }

    .bottom-nav__item--center:hover {
        background: var(--brand-green-hover);
        box-shadow: 0 14px 36px rgba(26, 183, 105, 0.44);
    }

    .bottom-nav__item--center .bottom-nav__label {
        display: none;
    }

    .bottom-nav__icon {
        font-size: 17px;
        line-height: 1;
    }

    .bottom-nav__item--center .bottom-nav__icon {
        font-size: 22px;
    }

    /* FAB klavye odağında gizlensin — eskiden alt taraftaki ikinci
       @media (max-width: 720px) bloğundaydı; tek breakpoint'te toplandı. */
    @supports selector(body:has(*)) {
        body:has(.suggest-form :focus) .fab {
            transform: translateX(-50%) translateY(100px);
            opacity: 0;
            pointer-events: none;
        }
    }
}

@media (max-width: 420px) {
    .topbar__actions {
        gap: var(--space-2);
        width: auto;
        margin-left: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .feed-toolbar__panel {
        gap: var(--space-2);
    }

    /* FIX: Removed duplicate .feed-filter-chip rule — second block (below) takes precedence and was collapsing chips to 30px */

    /* FIX: WCAG 2.5.5 — 44×44px minimum tap target (was 40px) */
    .icon-btn {
        width: 44px;
        height: 44px;
    }

    /* FIX: 420px'te hero/page-note padding'i 900px'tekinden BÜYÜK (20px > 12px) idi.
       hero-card için hero.css zaten space-3 padding tanımlıyor; geniş seçici
       yalnızca empty state ve page-note'u kapsıyor. */
    .feed-empty,
    .page-note {
        padding: var(--space-4) var(--space-3);
    }

    .hero {
        padding: var(--space-2);
    }

    .hero-card {
        padding: var(--space-3) var(--space-3) var(--space-4);
        gap: var(--space-2);
    }

    .hero-card__title {
        font-size: clamp(1.3125rem, 7vw, 1.625rem);
        line-height: 1.04;
        letter-spacing: -0.04em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        overflow: hidden;
    }

    .hero-card__subtitle,
    .modal-subtitle,
    .page-note,
    .feed-empty__text {
        font-size: var(--font-xs);
        line-height: 1.5;
    }

    /* FIX: flex yerine grid-1fr kullanılıyordu → CTA tam kart genişliğine (≈350px) uzanıyordu.
       Flex + auto-width ile içerik kadar genişler, daha hafif ve şık görünür. */
    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: var(--space-3);
    }

    .hero-cta {
        min-height: 44px;
        padding: 0 20px;
        font-size: 0.84375rem;
        flex: 0 0 auto;
    }

    .hero-ghost { display: none; }

    .hero-card__top {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .hero-map { display: none !important; }

    .hero-regions {
        margin-top: 6px;
        gap: 4px;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hero-regions::-webkit-scrollbar { display: none; }

    .hero-region-pill {
        min-height: 24px;
        padding: 2px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .company-avatar {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .meta-pill {
        width: fit-content;
        max-width: 100%;
    }

    .modal-panel {
        border-radius: var(--radius-md);
    }

    .action-btn,
    .btn-submit-modal,
    .fab-btn {
        min-height: 46px;
        font-size: var(--font-sm);
    }

    /* FIX: WCAG 2.5.5 — raise to 44px minimum tap target (was 36px) */
    .pagination__link {
        min-width: 44px;
        height: 44px;
    }

    .topbar__actions { gap: var(--space-1); }
    .topbar__headline { font-size: 0.6875rem; }


    .feed-toolbar {
        padding: var(--space-3);
        gap: var(--space-2);
        margin-bottom: 4px;
    }

    .feed-toolbar__meta { gap: 2px; }
    .feed-toolbar__eyebrow { font-size: 0.8125rem; }
    .feed-toolbar__hint { display: none !important; }
    .feed-toolbar__panel { gap: var(--space-2); }

    /* FIX: WCAG 2.5.5 — raise to 44px minimum tap target (was 36px) */
    .feed-search,
    .feed-toolbar__sort {
        min-height: 44px;
        padding: 0 10px;
    }

    .feed-search svg { width: 14px; height: 14px; }

    .feed-filter-chips { gap: 4px; }

    /* FIX: WCAG 2.5.5 — raise to 44px minimum tap target (was 30px — too small for touch) */
    .feed-filter-chip {
        min-height: 44px;
        padding: 0 8px;
        font-size: 0.8125rem;
    }

    .feed-toolbar__sort { font-size: 0.8125rem; }

    .feed-toolbar__sort-label {
        max-width: 68px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bottom-nav {
        width: calc(100% - 8px);
        gap: 3px;
        padding-left: 6px;
        padding-right: 6px;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .bottom-nav__item { min-height: 52px; font-size: 0.75rem; }

    .bottom-nav__item--center {
        width: 52px;
        height: 52px;
        transform: translateY(-12px);
    }

    .feed-list { padding-top: 0; }

    /* Overflow guard (360–412px) */
    body, .feed-shell {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .feed-card {
        width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    .action-grid {
        display: flex;
        gap: 8px;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ─── Backdrop Filter Fallback ───────────────────────────────────────────────── */
@supports not (backdrop-filter: blur(1px)) {
    .topbar,
    .modal-overlay,
    .bottom-nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ─── Reduced Motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .toast,
    .modal-overlay,
    .modal-panel,
    .icon-btn,
    .action-btn,
    .fab-btn,
    .btn-submit-modal,
    .pagination__link,
    .feed-filter-chip,
    .hero-cta,
    .hero-ghost,
    .work-type-card,
    .feed-card {
        transition: none !important;
        transform: none !important;
    }
}

/* ─── Touch Target Enforcement (pointer: coarse = touch screen) ─────────────── */
/* FIX: Covers 421–900px touch devices (tablets, large phones in landscape) where
   the base layout.css still uses compact 34px chip and 42px input heights.
   @media (max-width: 420px) rules above handle the small-phone range. */
@media (pointer: coarse) {
    /* FIX: Filter chip + sort pill — 48×48 tap target (WCAG 2.5.8).
       display:inline-flex + align-items:center her iki bileşende de etiketi
       dikey ortalar; min-width tek karakterli butonlarda da 48 garantiler. */
    .feed-filter-chip,
    .feed-sort__pill {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* FIX: Search + sort inputs — minimum 48px touch height */
    .feed-search,
    .feed-toolbar__sort {
        min-height: 48px;
    }

    /* FIX: Icon buttons — 48×48px on touch screens (WCAG 2.5.8) */
    .icon-btn {
        min-width: 48px;
        min-height: 48px;
    }

    .icon-btn--search,
    .theme-toggle {
        width: 48px;
        height: 48px;
    }

    /* FIX: Modal close — 48×48px minimum tap target on touch screens */
    .modal-close {
        width: 48px;
        height: 48px;
    }

    /* FIX: Topbar brand pin — upgrade from 38px to 48px on touch screens */
    .topbar__pin {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    /* FIX: Pagination links — 48×48px on touch screens */
    .pagination__link {
        min-width: 48px;
        height: 48px;
    }
}

/* ─── Ultra-Compact Mobile Split (≤480px) — native app yoğunluğu ─────────────── */
@media (max-width: 480px) {
    .feed-shell .feed-toolbar .feed-toolbar__panel {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
        width: 100%;
    }

    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-search {
        order: 1;
        width: 100%;
    }

    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort {
        order: 2;
        display: flex;
        width: 100%;
        gap: var(--space-2);
    }

    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort .feed-sort__pill {
        flex: 1;
        text-align: center;
        justify-content: center;
        display: inline-flex;
        align-items: center;
    }

    /* Filtre çubuğu: başparmakla akıcı yatay kaydırma + snap */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips {
        order: 3;
        margin-top: var(--space-2);
        display: flex;
        flex-wrap: nowrap;
        gap: var(--space-1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-bottom: 0.125rem;
    }

    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips::-webkit-scrollbar {
        display: none;
    }

    /* Kompakt pill: mikro tipografi + dar yatay dolgu + hafif düzleştirilmiş köşe. */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip {
        /* Sabit 11px: akışkan rem kökünde 0.6875rem 9.3px'e düşüyordu (okunaksız) */
        font-size: 11px;
        letter-spacing: 0.02em;
        padding: 0 var(--space-3);
        border-radius: var(--radius-sm);
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
        line-height: 1.1;
    }

    /* Ghost-target nötralizasyonu */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip::before {
        inset: 0;
    }

    /* Kart: p-4 kompakt sınır (sol vurgu şeridi payı +4px) */
    .feed-shell .feed-list .feed-card {
        padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 4px);
    }

    /* Metadata satırı: daha sıkı aralık, 14px mikro-ikon */
    .feed-shell .feed-list .feed-card .job-specs {
        gap: var(--space-1) var(--space-3);
    }

    .feed-shell .feed-list .feed-card .job-specs .spec-icon {
        width: 0.875rem;
        height: 0.875rem;
    }

    /* Üçlü aksiyon satırı: 6px aralık — kenar taşması yok */
    .feed-shell .feed-list .feed-card .action-grid--triple {
        gap: 0.375rem;
    }

    .feed-shell .feed-list .feed-card .action-grid--triple .action-btn {
        gap: 0.25rem;
        padding: var(--space-2) var(--space-1);
    }

    /* "Çalışma Şekli": dengeli 2x2 grid — kaydırma ve kırpılma tamamen kapalı.
       @720 flex-snap çubuğu burada grid 2x2'ye düşürülür; icon konumu ve grid-row
       atamaları da work-types.css @720 bloğundan miras alındığı için
       grid-template-columns/-rows tam reset edilir. */
    .feed-shell .work-types .work-types__grid,
    .work-types .work-types__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
        overflow: hidden;
        margin: 0;
        padding: var(--space-1) 0 var(--space-2);
        scroll-snap-type: none;
    }

    .feed-shell .work-types .work-types__grid .work-type-card,
    .work-types .work-types__grid .work-type-card {
        min-width: 0;
        width: 100%;
        height: auto;
        max-height: none;
        scroll-snap-align: none;
    }

    /* [TYPO] 2x2 grid'te hint metni nowrap+ellipsis ile kesiliyordu ("Sürekli
       ve aylık i..."). 2 satıra izin ver: line-clamp ile temiz kesim.
       overflow-wrap: anywhere → Türkçe uzun sözcüklerde ("başlayanlar",
       "hizmet") gerekirse satır kıracak, tek satırlık truncation oluşmayacak. */
    .feed-shell .work-types .work-types__grid .work-type-card .work-type-card__hint,
    .work-types .work-types__grid .work-type-card .work-type-card__hint {
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
                line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        line-height: 1.3;
        font-size: 12px;
        overflow-wrap: anywhere;
        word-break: normal;
        hyphens: auto;
    }

    .feed-shell .work-types .work-types__grid .work-type-card .work-type-card__title,
    .work-types .work-types__grid .work-type-card .work-type-card__title {
        font-size: 14px;
        font-weight: 800;
        letter-spacing: -0.01em;
    }
}

/* ≤400px: dar Android'lerde card içeriği daha sıkı — hint 3 satıra çıkabilir */
@media (max-width: 400px) {
    .feed-shell .work-types .work-types__grid .work-type-card .work-type-card__hint,
    .work-types .work-types__grid .work-type-card .work-type-card__hint {
        -webkit-line-clamp: 3;
                line-clamp: 3;
        font-size: 11.5px;
        line-height: 1.28;
    }

    .feed-shell .work-types .work-types__grid .work-type-card .work-type-card__title,
    .work-types .work-types__grid .work-type-card .work-type-card__title {
        font-size: 13.5px;
    }

    .feed-shell .work-types .work-types__grid .work-type-card,
    .work-types .work-types__grid .work-type-card {
        padding: 8px 10px;
    }

    .feed-shell .work-types .work-types__grid .work-type-card .work-type-card__icon,
    .work-types .work-types__grid .work-type-card .work-type-card__icon {
        width: 28px;
        height: 28px;
    }

    /* Mobile Positioning Reset: Hide floating FAB container */
    .feed-shell .fab {
        display: none !important;
    }

    /* Stats bölümü mobilde tamamen kaldırıldı */
    .feed-shell .hero .hero-card .hero-stats {
        display: none !important;
    }

    /* Stats kalkınca "Çalışma Şekli" bölümü temiz native boşlukla yukarı kayar */
    .feed-shell .work-types {
        margin-top: var(--space-4);
    }

    /* Bottom Navigation: matematiksel kapalı 5 eşit slot — dikey senkron kilitli */
    .feed-shell .bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        justify-items: center;
        gap: 0;
        width: min(100%, 560px);
        padding-left: 0;
        padding-right: 0;
    }
    .feed-shell .bottom-nav .bottom-nav__item {
        width: 100%;
        min-height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        white-space: nowrap;
    }
    .feed-shell .bottom-nav .bottom-nav__item--center {
        grid-column: 3;
        width: 52px;
        height: 52px;
        transform: translateY(-12px);
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ─── Forms Override (Bypassing @import cache) ───────────────────────────────── */
.form-group--with-counter > .form-label {
    grid-column: 1;
}

.form-group--with-counter > .form-control,
.form-group--with-counter > .form-hint,
.form-group--with-counter > .form-error {
    grid-column: 1 / span 2;
}

.form-group--with-counter > .form-counter {
    grid-column: 2;
    grid-row: 1;
}


/* ─── Mobil Taşma Güvenlik Ağı (2026, defansif & düşük öncelik) ──────────────
   Çalışan tasarımı EZMEZ; yalnızca yaygın mobil taşma/sığma sorunlarını yakalar:
   medya viewport'u genişletmesin, uzun kelime/URL satır taşırmasın, gerçek
   <table>'lar yatay kaysın. Buton genişliği/grid'e dokunmaz. */
@media (max-width: 640px) {
    img, svg, video, canvas, iframe {
        max-width: 100%;
        height: auto;
    }
    .feed-card, .feed-empty, .feed-list, .legal-page, .job-detail,
    .hero-card, .modal-box, .topbar, .suggest-modal {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Birincil aksiyon butonları küçük ekranda kolay dokunulur (min 44px) */
    .btn-primary, .btn-submit, .btn-submit-modal {
        min-height: 44px;
    }
}

/* ─── Ultra-Compatibility Fixes for Older/Legacy Mobile Devices (≤360px) ─── */
@media (max-width: 360px) {
    .feed-filter-chips {
        gap: 2px !important;
    }
    .feed-filter-chip {
        font-size: 10px !important;
        padding: 0 6px !important;
    }
    .feed-card {
        padding: 12px !important;
    }
    .job-title {
        font-size: 13px !important;
    }
    .job-specs {
        gap: 4px 8px !important;
    }
    .spec-item {
        font-size: 11px !important;
    }
    /* Triple action grid on extremely small screen: reduce padding to avoid wrap */
    .feed-shell .feed-list .feed-card .action-grid--triple .action-btn {
        padding: 6px 4px !important;
        font-size: 10px !important;
        gap: 2px !important;
    }
    .action-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
    .bottom-nav {
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) !important;
    }
    .bottom-nav__item {
        font-size: 9px !important;
        min-height: 44px !important;
    }
    .bottom-nav__item--center {
        width: 44px !important;
        height: 44px !important;
        transform: translateY(-8px) !important;
    }
}

/* Ensure global box-sizing and overflow safety */
html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================================
   FEED TOOLBAR — MOBİL CİLA TURU
   ----------------------------------------------------------------------------
   Arama kutusu + En Yeni/En Eski toggle + filtre chip'leri mobilde native-app
   his verecek şekilde rafine edildi: segmented sort, daha vurgulu aktif chip,
   tap-feedback transform, daha güvenli touch hedefleri, focus-visible ring'i.
   ============================================================================ */
@media (max-width: 560px) {

    /* ─── Search: ikon + glow ─────────────────────────────────────────────── */
    .feed-shell .feed-toolbar .feed-search {
        min-height: 46px;
        padding: 0 14px;
        border-radius: var(--radius-md);
        border-color: var(--border-medium);
        background: var(--bg-soft);
        gap: 10px;
        transition:
            border-color var(--transition-fast),
            box-shadow var(--transition-fast),
            background var(--transition-fast);
    }
    .feed-shell .feed-toolbar .feed-search:focus-within {
        border-color: var(--brand-green);
        background: var(--panel);
        box-shadow: 0 0 0 4px var(--brand-green-ring);
    }
    .feed-shell .feed-toolbar .feed-search svg {
        width: 18px;
        height: 18px;
        color: var(--brand-green);
    }
    .feed-shell .feed-toolbar .feed-search__input {
        font-size: 15px;       /* iOS auto-zoom kilidi: <16px görünür ama input typing'i bloklar değil. 15px tipografik sweet-spot. */
        font-weight: 600;
    }

    /* ─── Sort: iOS-tarzı segmented control ──────────────────────────────── */
    /* Wrapper'ı tek bir gri-raydan ibaret hale getir, içindeki iki pill ray
       içinde "sürgülü" gibi dursun. Eski tasarımda wrapper'ın kendi bordürü +
       padding'i + pill'in kendi gölgesi üst üste bineceği için iki kat ağırlık
       oluşuyordu. */
    .feed-shell .feed-toolbar .feed-toolbar__sort {
        min-height: 46px;
        padding: 4px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-medium);
        background: var(--bg-soft);
        gap: 4px;
        position: relative;
    }
    .feed-shell .feed-toolbar .feed-toolbar__sort .feed-sort__pill {
        min-height: 38px;
        padding: 0 14px;
        border-radius: calc(var(--radius-md) - 4px);
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.01em;
        color: var(--muted);
        background: transparent;
        box-shadow: none;
        transition:
            background var(--transition-fast),
            color var(--transition-fast),
            transform 90ms ease,
            box-shadow var(--transition-fast);
    }
    .feed-shell .feed-toolbar .feed-toolbar__sort .feed-sort__pill:active {
        transform: scale(0.97);  /* tap geri-bildirimi */
    }
    .feed-shell .feed-toolbar .feed-toolbar__sort .feed-sort__pill.is-active {
        background: var(--panel);
        color: var(--brand-green-hover);
        box-shadow:
            0 1px 2px rgba(11, 35, 71, 0.06),
            0 2px 6px rgba(11, 35, 71, 0.05);
    }
    html[data-theme="dark"] .feed-shell .feed-toolbar .feed-toolbar__sort .feed-sort__pill.is-active {
        background: var(--brand-green);
        color: #06281a;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.32);
    }

    /* ─── Filter chips: daha vurgulu aktif, smooth scroll, fade-edge ──────── */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips {
        scroll-snap-type: x mandatory;
        padding: 2px 0 4px;
        /* Soldan ve sağdan yumuşak fade — daha fazla chip olduğunu hissettirir,
           hard-cut yerine native-feeling scroll. */
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip {
        min-height: 36px;
        padding: 0 14px;
        font-size: 12px;
        font-weight: 700;
        border-radius: var(--radius-pill);
        letter-spacing: 0.01em;
        transition:
            background var(--transition-fast),
            border-color var(--transition-fast),
            color var(--transition-fast),
            transform 90ms ease,
            box-shadow var(--transition-fast);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip:active {
        transform: scale(0.96);
    }
    /* Aktif chip artık brand-yeşili dolgulu — pasif yeşil-tint yerine net seçim. */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip.is-active {
        background: var(--gradient-brand);
        border-color: transparent;
        color: #ffffff;
        font-weight: 800;
        box-shadow:
            0 1px 3px rgba(11, 35, 71, 0.10),
            0 6px 14px rgba(26, 183, 105, 0.30);
    }
    html[data-theme="dark"] .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip.is-active {
        background: var(--gradient-brand);
        color: #ffffff;
        box-shadow: 0 6px 14px rgba(16, 185, 129, 0.36);
    }

    /* ─── WCAG focus-visible ring — keyboard / tab navigation görünür ──── */
    .feed-shell .feed-toolbar .feed-search:focus-within,
    .feed-shell .feed-toolbar .feed-sort__pill:focus-visible,
    .feed-shell .feed-toolbar .feed-filter-chip:focus-visible {
        outline: none;
    }
    .feed-shell .feed-toolbar .feed-sort__pill:focus-visible,
    .feed-shell .feed-toolbar .feed-filter-chip:focus-visible {
        box-shadow: 0 0 0 3px var(--brand-green-ring);
    }

    /* ─── Toolbar dış boşluğu: ekran kenarına ferah ama hızlı erişilebilir ─ */
    .feed-toolbar {
        margin: 0 var(--space-3) var(--space-3);
        padding: var(--space-3) var(--space-3);
        gap: var(--space-2);
    }
    .feed-toolbar__meta {
        padding-left: 10px;
    }
}

/* ─── Ultra-dar (≤360px) eski cihazlarda chip'ler hâlâ okunabilir kalsın ─── */
@media (max-width: 360px) {
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip {
        min-height: 34px;
        padding: 0 11px !important;
        font-size: 11px !important;
    }
    .feed-shell .feed-toolbar .feed-toolbar__sort .feed-sort__pill {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }
    .feed-shell .feed-toolbar .feed-search {
        min-height: 44px;
    }
}

/* ─── Reduced-motion: tap-scale ve geçişleri devre dışı bırak ───────────── */
@media (max-width: 560px) and (prefers-reduced-motion: reduce) {
    .feed-shell .feed-toolbar .feed-sort__pill,
    .feed-shell .feed-toolbar .feed-filter-chip,
    .feed-shell .feed-toolbar .feed-search {
        transition: none !important;
    }
    .feed-shell .feed-toolbar .feed-sort__pill:active,
    .feed-shell .feed-toolbar .feed-filter-chip:active {
        transform: none !important;
    }
}

/* ============================================================================
   FEED-TOOLBAR PROFESSIONAL MOBILE OVERHAUL (≤640px)
   ----------------------------------------------------------------------------
   Hedef: native uygulama yoğunluğu, üç yerine iki bloğa indirilmiş düzen,
   sort kontrolünü "X ilan bulundu" satırıyla birleştirip dikey alan kazanma.
   Layout:
     ┌──────────────────────────────────────────┐
     │ • 2 ilan bulundu     [En Yeni · En Eski] │  ← meta + sort (tek satır)
     │   Çerkezköy OSB, Kapaklı, …              │
     ├──────────────────────────────────────────┤
     │ [🔍 İlanlarda ara…                     ] │  ← arama (tam satır)
     ├──────────────────────────────────────────┤
     │ [Tümü][Aylıkçı][Gündelikçi][Staj][T…]→  │  ← chips (yatay scroll)
     └──────────────────────────────────────────┘
   ============================================================================ */
@media (max-width: 640px) {
    .feed-shell .feed-toolbar {
        margin: 0 var(--space-3) var(--space-3);
        padding: var(--space-3);
        gap: 10px;
        border-radius: 16px;
        /* Yatay scrolllu chip stripinin kart dışına taşmasını engelle —
           overflow-x: auto child'da çalışıyor ama parent clip yapmazsa
           negatif margin'ler ve mask-image dışarı sızabiliyor. */
        overflow: hidden;
    }

    /* Meta + sort'u tek satıra al — count solda, segmented sort sağda. */
    .feed-shell .feed-toolbar .feed-toolbar__meta {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 12px;
        padding-left: 10px;
        margin-bottom: 2px;
    }

    .feed-shell .feed-toolbar .feed-toolbar__eyebrow {
        font-size: 0.875rem;
        font-weight: 800;
        letter-spacing: -0.01em;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Hint metni ≤480'de bile gösterilsin (tam alt satır) — bağlam çok değerli */
    .feed-shell .feed-toolbar .feed-toolbar__hint {
        display: block !important;
        flex: 1 1 100%;
        font-size: 0.6875rem;
        line-height: 1.4;
        color: var(--muted);
        order: 3;
    }

    /* Panel: arama ve chips dikey istif. Sort artık panelin parçası değil —
       meta satırının sağına taşındı (aşağıdaki kural ile). */
    .feed-shell .feed-toolbar .feed-toolbar__panel {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    /* Sort kontrolünü panelden meta satırına taşımak için absolute yerine
       order ve flexbox parent reorganization. JS'siz çözüm: panel içindeki
       sort element'i grid-row değiştiremez (meta üst element), bu yüzden
       compact, sağa hizalı stil veriyoruz ama panelin ÜSTÜNDE kalsın diye
       order:-1 atıyoruz. Görsel sonuç: ilk row = sort, ikinci = search,
       üçüncü = chips. Bu meta'nın hemen altında doğal bir secondary header. */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort {
        order: -1;
        align-self: flex-end;
        width: auto;
        min-height: 36px;
        padding: 3px;
        gap: 2px;
        border-radius: 999px;
        background: var(--bg-soft);
        border: 1px solid var(--border-medium);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort .feed-sort__pill {
        min-height: 30px;
        padding: 0 12px;
        font-size: 12px;
        font-weight: 700;
        border-radius: 999px;
        color: var(--muted);
        background: transparent;
        box-shadow: none;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort .feed-sort__pill.is-active {
        background: var(--brand-green);
        color: #ffffff;
        box-shadow: 0 1px 4px rgba(26, 183, 105, 0.30);
    }
    html[data-theme="dark"] .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort .feed-sort__pill.is-active {
        color: #06281a;
    }

    /* Arama kutusu: 46px sweet spot, full width, yumuşak gri zemin. */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-search {
        order: 0;
        width: 100%;
        min-height: 46px;
        padding: 0 14px;
        border-radius: 12px;
        gap: 10px;
        background: var(--bg-soft);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-search__input {
        font-size: 15px;
        font-weight: 500;
    }

    /* Chips: tek satır yatay scroll, snap, kenarlarda fade-mask.
       Negatif margin KALDIRILDI — kart dışına taşma yapıyordu.
       min-width:0 flex-child'ın doğru shrink olması için zorunlu. */
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips {
        order: 1;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding: 2px 0 4px;
        margin: 0;
        -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
                mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips::-webkit-scrollbar {
        display: none;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
        min-height: 36px;
        padding: 0 14px;
        font-size: 12.5px;
        font-weight: 700;
        line-height: 1;
        border-radius: 999px;
    }
}

/* ─── Çok dar (≤380px) cihazlarda son ince ayarlar ─────────────────────── */
@media (max-width: 380px) {
    .feed-shell .feed-toolbar {
        margin: 0 8px var(--space-3);
        padding: 10px;
    }
    .feed-shell .feed-toolbar .feed-toolbar__eyebrow {
        font-size: 0.8125rem;
    }
    .feed-shell .feed-toolbar .feed-toolbar__hint {
        font-size: 0.625rem;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-toolbar__sort .feed-sort__pill {
        padding: 0 10px;
        font-size: 11.5px;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-search {
        min-height: 44px;
        padding: 0 12px;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-search__input {
        font-size: 14px;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chip {
        min-height: 34px;
        padding: 0 11px;
        font-size: 11.5px;
    }
}

/* ─── Landscape / küçük tablet (641–820px) — toolbar tek satırda yatay ──── */
@media (min-width: 641px) and (max-width: 820px) {
    .feed-shell .feed-toolbar .feed-toolbar__panel {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(140px, auto);
        gap: var(--space-3);
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .feed-shell .feed-toolbar .feed-toolbar__panel .feed-filter-chips::-webkit-scrollbar {
        display: none;
    }
}

