/* ============================================================
   SOSYAL SAYFALAR (profil, arkadaşlar, mesajlar)
   ============================================================ */
.s-wrap { max-width: 1080px; margin: 0 auto; padding: 26px 22px 60px; }
.s-wrap.wide { max-width: 1240px; }

.nav-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 5px;
    margin-left: 2px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    line-height: 16px;
}
.p-nav .links a.on { background: rgba(34,197,94,.14); color: var(--p-active-text); }

.nav-me { gap: 9px; }
.nav-me img, .nav-me .ava-dot {
    width: 24px; height: 24px; border-radius: 8px; object-fit: cover;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 800; color: #06121f;
}

.ava-img { display: grid; place-items: center; object-fit: cover; font-weight: 800; color: #06121f; border: 1px solid var(--p-hair-2); }

/* ---------- KARTLAR ---------- */
.s-card {
    background: linear-gradient(180deg, var(--p-surface) 0%, var(--p-surface-deep) 100%);
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}
.s-title { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.s-sub { color: var(--p-muted); font-size: 13px; }

.s-grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .s-grid-2 { grid-template-columns: 1fr; } }

/* ---------- PROFİL BAŞLIĞI ---------- */
.prof-head {
    display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(56,189,248,.10));
    border: 1px solid rgba(34,197,94,.22);
    margin-bottom: 20px;
}
.prof-head .big-ava {
    width: 104px; height: 104px; flex: 0 0 104px;
    border-radius: 24px; object-fit: cover;
    display: grid; place-items: center;
    font-size: 42px; font-weight: 800; color: #06121f;
    border: 2px solid var(--p-hair-2);
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.prof-head .meta { min-width: 0; flex: 1; }
.prof-head .meta h1 { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-head .meta .un { color: var(--p-muted); font-size: 14px; font-family: Consolas, monospace; }
.prof-head .meta .st { margin-top: 8px; color: var(--p-text-soft); font-size: 13.5px; font-style: italic; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 20px;
    font-size: 11.5px; font-weight: 700;
    background: rgba(148,163,184,.12); color: var(--p-text-soft); border: 1px solid rgba(148,163,184,.2);
}
.pill.green { background: rgba(34,197,94,.14); color: var(--p-green-text); border-color: rgba(34,197,94,.32); }
.pill.sky { background: rgba(56,189,248,.14); color: var(--p-sky-text); border-color: rgba(56,189,248,.32); }
.pill.purple { background: rgba(168,85,247,.14); color: var(--p-purple-text-2); border-color: rgba(168,85,247,.32); }
.pill.warn { background: rgba(245,158,11,.14); color: var(--p-warn-text); border-color: rgba(245,158,11,.32); }

.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-chip {
    padding: 10px 14px; border-radius: 12px; min-width: 90px;
    background: var(--p-card-2); border: 1px solid rgba(148,163,184,.16);
}
.stat-chip .v { font-size: 19px; font-weight: 800; color: var(--p-accent); }
.stat-chip .l { font-size: 10.5px; color: var(--p-muted-2); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }

/* ---------- FORM ---------- */
.f-group { margin-bottom: 15px; }
.f-group label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--p-muted); margin-bottom: 7px; }
.f-input, .f-select, .f-area {
    width: 100%; padding: 11px 13px;
    background: var(--p-input); color: var(--p-text);
    border: 1px solid rgba(148,163,184,.28); border-radius: 11px;
    font-family: inherit; font-size: 13.5px;
}
.f-area { min-height: 90px; resize: vertical; }
.f-input:focus, .f-select:focus, .f-area:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.f-hint { font-size: 11.5px; color: var(--p-muted-2); margin-top: 6px; }
@media (max-width: 640px) { .f-row, .f-row-3 { grid-template-columns: 1fr; } }

.s-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 11px; border: 1px solid transparent;
    font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; text-decoration: none;
    transition: .18s; white-space: nowrap;
}
.s-btn.primary { background: linear-gradient(180deg,#22c55e,#16a34a); color: #04140a; }
.s-btn.primary:hover { filter: brightness(1.08); }
.s-btn.ghost { background: rgba(148,163,184,.1); color: var(--p-text-soft); border-color: rgba(148,163,184,.24); }
.s-btn.ghost:hover { color: var(--p-text-strong); }
.s-btn.sky { background: rgba(56,189,248,.14); color: var(--p-sky-text); border-color: rgba(56,189,248,.4); }
.s-btn.danger { background: rgba(239,68,68,.14); color: var(--p-red-text); border-color: rgba(239,68,68,.4); }
.s-btn.sm { padding: 8px 13px; font-size: 12.5px; border-radius: 9px; }
.s-btn.block { width: 100%; }
.s-btn:disabled { opacity: .5; cursor: not-allowed; }

.alert { padding: 12px 14px; border-radius: 11px; font-size: 13px; margin-bottom: 16px; }

/* ============================================================
   🎨 KOZMETİK MAĞAZASI (profil · avatar/çerçeve/isim rengi)
   ============================================================ */
.csm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.csm-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 10px; text-decoration: none;
    font-size: 12.5px; font-weight: 700; color: var(--p-muted);
    background: var(--p-card-2); border: 1px solid var(--p-border);
    transition: .16s;
}
.csm-tab:hover { color: var(--p-text-strong); border-color: rgba(148,163,184,.45); }
.csm-tab.on { color: var(--p-active-text); border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.12); }
.csm-bank { float: right; font-size: 12px; font-weight: 800; color: #fbbf24; }

.csm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
/* 🌈 Profil arka planı (banner) sekmesi: geniş önizleme (16:9) */
.csm-grid.wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.csm-grid.wide .csm-prev { aspect-ratio: 16 / 9; }
.csm-card {
    position: relative; padding: 9px; border-radius: 14px; text-align: center;
    display: flex; flex-direction: column; gap: 6px;
    background: linear-gradient(180deg, var(--p-surface) 0%, var(--p-surface-deep) 100%);
    border: 1px solid var(--p-border);
}
.csm-card.on { border-color: rgba(34,197,94,.6); box-shadow: 0 0 16px rgba(34,197,94,.15); }
.csm-prev {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    border-radius: 12px; overflow: hidden; background: var(--p-input-2);
    display: grid; place-items: center;
}
.csm-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csm-color { width: 62%; height: 62%; border-radius: 50%; display: block; box-shadow: 0 0 14px rgba(0,0,0,.35); }
.csm-on {
    position: absolute; left: 5px; right: 5px; bottom: 5px;
    font-size: 8.5px; font-weight: 800; letter-spacing: .3px;
    padding: 3px 5px; border-radius: 8px;
    background: rgba(34,197,94,.88); color: #04140a;
}
.csm-nm { font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csm-rar { font-size: 10px; font-weight: 700; }
.csm-price { font-size: 12.5px; font-weight: 800; color: #fbbf24; }

.csm-btn {
    width: 100%; padding: 8px 6px; border-radius: 10px; cursor: pointer;
    font-family: inherit; font-size: 11.5px; font-weight: 800;
    border: 1px solid transparent; transition: .16s;
}
.csm-btn.primary { background: linear-gradient(180deg, #22c55e, #16a34a); color: #04140a; }
.csm-btn.ghost   { background: rgba(148,163,184,.12); color: var(--p-text-soft); border-color: rgba(148,163,184,.25); }
.csm-btn.locked  { background: rgba(148,163,184,.08); color: var(--p-muted-2); cursor: not-allowed; }
.csm-btn:hover   { filter: brightness(1.06); }

@media (max-width: 620px) {
    .csm-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
    .csm-grid.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .csm-card { padding: 7px; border-radius: 12px; gap: 5px; }
    .csm-nm { font-size: 11px; }
    .csm-btn { font-size: 10.5px; padding: 7px 5px; }
    .csm-bank { float: none; display: inline-block; margin-left: 6px; }
}
.alert.ok { background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.4); color: var(--p-green-text); }
.alert.err { background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.4); color: var(--p-red-text); }
.alert.info { background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.35); color: var(--p-sky-text); }

/* ---------- BİLGİ SATIRLARI ---------- */
.kv-list { display: grid; gap: 10px; }
.kv-list .row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding-bottom: 9px; border-bottom: 1px solid rgba(148,163,184,.08); }
.kv-list .row:last-child { border-bottom: none; }
.kv-list .k { color: var(--p-muted-2); font-weight: 700; }
.kv-list .v { color: var(--p-text-2); text-align: right; word-break: break-word; }

.social-list { display: flex; flex-wrap: wrap; gap: 9px; }
.social-list a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px; border-radius: 10px;
    background: rgba(148,163,184,.09); border: 1px solid rgba(148,163,184,.2);
    color: var(--p-text-soft); text-decoration: none; font-size: 12.5px; font-weight: 600;
}
.social-list a:hover { background: rgba(56,189,248,.14); border-color: rgba(56,189,248,.35); color: var(--p-sky-text); }
.social-list span.static { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; background: rgba(148,163,184,.07); border: 1px dashed rgba(148,163,184,.2); color: var(--p-muted); font-size: 12.5px; }

/* ---------- KULLANICI KARTLARI / LİSTELERİ ----------
   · .u-card → ızgara kartı (istekler · arama sonuçları)
   · .u-row  → kompakt liste satırı (arkadaşlar · engellenenler)
   · .u-link → avatar + isim bloğu (kart/satır içinde tek tıklama alanı)
   · .u-icon → kare ikon düğmesi (dar satırda metinsiz aksiyon)
   ⚠️ Kart GÖVDESİ tek olmalıdır (iç içe .u-card kullanılmaz). */
.u-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.u-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 13px; border-radius: 14px;
    background: linear-gradient(180deg,var(--p-surface),var(--p-surface-deep));
    border: 1px solid rgba(148,163,184,.14);
    text-decoration: none; color: inherit;
    transition: border-color .18s;
}
.u-card:hover { border-color: rgba(34,197,94,.35); }
.u-link { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; color: inherit; }
.u-card .uc-txt { min-width: 0; flex: 1; }
.u-card .uc-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-card .uc-sub { font-size: 11.5px; color: var(--p-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Aksiyonlar: kartta eşit dağılır · satırda sağda sıkı kalır */
.u-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.u-actions .s-btn.sm { flex: 1 1 auto; padding: 7px 11px; font-size: 12px; }

/* 🧾 Kompakt liste (satır) — ~54px/satır */
.u-list { display: flex; flex-direction: column; gap: 7px; }
.u-row {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 11px; border-radius: 12px;
    background: var(--p-card-2, rgba(148,163,184,.07));
    border: 1px solid rgba(148,163,184,.13);
    transition: border-color .18s;
}
.u-row:hover { border-color: rgba(34,197,94,.32); }
.u-row .uc-txt { min-width: 0; flex: 1; }
.u-row .uc-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-row .uc-sub { font-size: 11px; color: var(--p-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-row .u-actions { flex: 0 0 auto; flex-wrap: nowrap; }
.u-row[hidden] { display: none !important; }
.u-icon {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid rgba(148,163,184,.24); background: rgba(148,163,184,.1);
    color: var(--p-text-soft); font-size: 15px; line-height: 1; text-decoration: none;
    cursor: pointer; font-family: inherit; padding: 0; transition: .16s;
}
.u-icon:hover { color: var(--p-text-strong); border-color: rgba(148,163,184,.5); }
.u-icon.sky { border-color: rgba(56,189,248,.4); color: var(--p-sky-text); background: rgba(56,189,248,.12); }
.u-icon.danger { border-color: rgba(239,68,68,.4); color: var(--p-red-text); background: rgba(239,68,68,.12); }
.u-icon:disabled { opacity: .5; cursor: not-allowed; }

/* 🔎 Liste filtresi · bölüm başlığı · bilgi notu · boş liste */
.u-search { display: flex; gap: 8px; margin-bottom: 12px; }
.u-search .f-input { flex: 1; min-width: 0; }
.u-sec { font-size: 15px; font-weight: 800; margin: 4px 0 10px; display: flex; align-items: center; gap: 8px; }
.u-sec-gap { margin-bottom: 22px; }
.u-note {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 10px 12px; margin-bottom: 12px; border-radius: 12px;
    background: rgba(245,158,11,.11); border: 1px solid rgba(245,158,11,.3);
    color: var(--p-warn-text); font-size: 12.5px; line-height: 1.5;
}
.u-empty { padding: 14px 16px; border: 1px dashed rgba(148,163,184,.24); border-radius: 12px; color: var(--p-muted-2); font-size: 12.5px; }

/* ---------- MESAJLAR ---------- */
/* ⚠️ `1fr` yerine `minmax(0, 1fr)` ŞART: `1fr`'ın otomatik minimumu = öğenin
   min-content genişliği. Sohbet satırındaki isim/son mesaj `white-space: nowrap`
   (aşağıda `.t-name` · `.t-last`) olduğu için min-content ~473px'e çıkıyordu →
   ≤860px tek kolonda `.msg-side` kartı viewport'tan taşıyor, sayfa yatay
   kayıyor ve sağ taraf kesiliyordu (390px'te ölçüldü: docSW 486 ↔ vw 390).
   `minmax(0, 1fr)` kolonun 0'a kadar küçülmesine izin verir → ellipsis devreye girer. */
.msg-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .msg-layout { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   🗂️ MESAJ KUTUSU 2.0 — Gelen Kutusu · Arşiv · Silinenler
   ------------------------------------------------------------
   • Sol panel: başlık + arama + klasör sekmeleri + konuşma listesi
   • Satır: avatar(+🖼️ çerçeve) · isim(🎨 renk) · önizleme · saat ·
     ⏳ kalan gün · okunmadı rozeti · ⋯ menüsü
   • ⋯ menüsü konuşmayı arşive / silinenlere taşır (soft delete)
   ============================================================ */
.msg-side { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.ms-head { display: flex; flex-direction: column; gap: 8px; }
.ms-title { font-size: 16px; font-weight: 800; }
.ms-search {
    width: 100%; padding: 8px 12px; border-radius: 10px; font-size: 13px;
    background: rgba(4,8,16,.35); border: 1px solid var(--p-border); color: var(--p-text-2);
}
.ms-search:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(34,197,94,.16); }

/* Klasör sekmeleri */
.ms-tabs { display: flex; gap: 5px; }
.ms-tab {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 6px; border-radius: 10px; text-decoration: none;
    background: rgba(148,163,184,.07); border: 1px solid rgba(148,163,184,.16);
    color: var(--p-text-soft); font-size: 12px; font-weight: 700;
    transition: background .18s, border-color .18s, color .18s;
}
.ms-tab:hover { color: var(--p-text-strong); border-color: rgba(148,163,184,.3); }
.ms-tab.on {
    background: linear-gradient(180deg, rgba(34,197,94,.22), rgba(34,197,94,.1));
    border-color: rgba(34,197,94,.45); color: var(--p-active-text);
}
.ms-tab .n { background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 10px; }

.ms-note {
    padding: 9px 11px; border-radius: 11px; font-size: 12px; line-height: 1.5;
    background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.28); color: var(--p-sky-text);
}
.ms-note.del { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: var(--p-red-text); }
.ms-empty {
    padding: 18px 14px; border: 1px dashed rgba(148,163,184,.24); border-radius: 12px;
    color: var(--p-muted-2); font-size: 12.5px; text-align: center;
}
.ms-empty.hide { display: none; }

.ms-list { display: flex; flex-direction: column; gap: 6px; max-height: min(560px, 62dvh); overflow-y: auto; }
.thread { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; border: 1px solid transparent; }
/* Satırın kendisi sohbeti açar (👤 ikon ayrı profil bağlantısıdır → iç içe link yok) */
.thread .t-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 4px; border-radius: 10px; text-decoration: none; color: inherit; }
.thread .t-prof {
    width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--p-hair-2);
    background: rgba(148,163,184,.08); color: var(--p-text-soft);
    font-size: 15px; text-decoration: none; opacity: .75;
    transition: opacity .15s, background .15s, border-color .15s;
}
.thread .t-prof:hover { opacity: 1; background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.4); }
.thread .t-prof:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
@media (hover: none) { .thread .t-prof { opacity: 1; } }
.thread:hover { background: rgba(148,163,184,.07); }
.thread.active { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); }
.thread .t-txt { min-width: 0; flex: 1; }
.thread .t-name { font-weight: 700; font-size: 13.5px; }
.thread .t-last { font-size: 11.5px; color: var(--p-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .t-badge { background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 10px; }

/* ---------- KONUŞMA SATIRI (2.0) ---------- */
.thread {
    position: relative; transition: background .18s, border-color .18s, transform .18s, opacity .22s;
}
.thread.is-del { opacity: .85; }
.thread.hide { display: none; }
.thread.gone { opacity: 0; transform: translateX(-14px); }
.thread .t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .t-time { font-size: 10.5px; color: var(--p-muted-2); white-space: nowrap; }
.thread .t-left {
    font-size: 10px; font-weight: 800; white-space: nowrap; padding: 1px 6px; border-radius: 9px;
    background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.3); color: var(--p-red-text);
}
.thread .t-side { display: flex; align-items: center; gap: 5px; }
.thread .t-menu-btn {
    width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center;
    border-radius: 8px; border: 1px solid transparent; background: transparent;
    color: var(--p-muted); font-size: 15px; line-height: 1; cursor: pointer; opacity: .6;
    transition: opacity .15s, background .15s, border-color .15s, color .15s;
}
.thread:hover .t-menu-btn { opacity: 1; }
.thread .t-menu-btn:hover { background: rgba(148,163,184,.12); border-color: var(--p-hair-2); color: var(--p-text-strong); }
@media (hover: none) { .thread .t-menu-btn { opacity: 1; } }

/* ⋯ açılır menü (konuşma işlemleri: arşivle · sil · geri al · kalıcı sil) */
.t-menu, .ch-menu {
    position: absolute; right: 8px; top: calc(100% - 4px); z-index: 40;
    min-width: 208px; padding: 6px; display: none;
    background: linear-gradient(180deg, var(--p-menu-1), var(--p-menu-2));
    border: 1px solid var(--p-hair-2); border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.t-menu.open, .ch-menu.open { display: block; animation: msMenuIn .14s ease-out; }
.t-menu button, .t-menu a, .ch-menu button, .ch-menu a {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 11px; border: 0; border-radius: 9px; background: transparent;
    color: var(--p-text-soft); font-size: 12.5px; font-weight: 700;
    text-align: left; text-decoration: none; cursor: pointer;
}
.t-menu button:hover, .t-menu a:hover, .ch-menu button:hover, .ch-menu a:hover { background: rgba(148,163,184,.12); color: var(--p-text-strong); }
.t-menu .danger, .ch-menu .danger { color: var(--p-red-text); }
.t-menu .danger:hover, .ch-menu .danger:hover { background: rgba(239,68,68,.14); }
@keyframes msMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.chat-box { display: flex; flex-direction: column; height: min(560px, 62vh); height: min(560px, 62dvh); }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(148,163,184,.12); margin-bottom: 12px; }
.chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: linear-gradient(180deg,#22c55e,#16a34a); color: #04140a; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--p-surface-2); color: var(--p-text-2); border: 1px solid rgba(148,163,184,.16); border-bottom-left-radius: 5px; }
.bubble .t { display: block; font-size: 10px; opacity: .7; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(148,163,184,.12); }
.chat-form input { flex: 1; }

/* ---------- 💬 SOHBET PENCERESİ (2.0) ---------- */
.chat-head { position: relative; }
.chat-head .ch-id { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.chat-head .ch-id:hover .ch-name { text-decoration: underline; }
.ch-state {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 800;
    background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.24); color: var(--p-text-soft);
}
.ch-state.hide { display: none; }
.ch-menu { right: 0; top: calc(100% + 6px); }
.m-back {
    display: none; width: 36px; height: 36px; flex: 0 0 36px; place-items: center;
    border-radius: 11px; border: 1px solid var(--p-hair-2); background: rgba(148,163,184,.08);
    color: var(--p-text-soft); font-size: 16px; cursor: pointer;
}
.m-back:hover { border-color: var(--p-accent); color: var(--p-active-text); }

/* 📅 gün ayracı (Bugün · Dün · 12 Şubat 2026) */
.chat-sep {
    display: flex; align-items: center; gap: 10px; margin: 10px 2px 2px;
    color: var(--p-muted-2); font-size: 11px; font-weight: 800;
}
.chat-sep::before, .chat-sep::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,.22), transparent);
}

/* 🎬 canlı gelen mesaj animasyonu */
.m-in { animation: mRowIn .26s ease-out; }
@keyframes mRowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ✍️ composer (Enter = gönder · Shift+Enter = alt satır) */
.chat-form { align-items: flex-end; }
.chat-form textarea {
    flex: 1; min-height: 42px; max-height: 120px; padding: 11px 14px; resize: none;
    border-radius: 12px; line-height: 1.45; font-family: inherit;
    background: rgba(4,8,16,.35); border: 1px solid var(--p-border); color: var(--p-text-strong);
}
.chat-form textarea:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.cf-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cf-count { font-size: 10.5px; color: var(--p-muted-2); font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--p-muted-2); }
.empty-state .big { font-size: 40px; margin-bottom: 10px; opacity: .7; }

/* ---------- SEKME (tab) ---------- */
.s-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.s-tab {
    padding: 9px 15px; border-radius: 10px; text-decoration: none;
    background: rgba(148,163,184,.08); border: 1px solid rgba(148,163,184,.18);
    color: var(--p-text-soft); font-size: 13px; font-weight: 700;
}
.s-tab:hover { color: var(--p-text-strong); }
.s-tab.on { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4); color: var(--p-active-text); }
.s-tab .n { background: #ef4444; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: 5px; }

/* ============================================================
   SOHBET — AVATARLI BALONCUKLAR + MESAJ AKSİYONLARI
   ============================================================ */
.chat-head .ch-name { font-weight: 800; font-size: 15px; color: var(--p-text-strong); }
.chat-head .ch-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chat-note {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; margin-bottom: 10px; border-radius: 12px;
    background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35);
    color: var(--p-warn-text); font-size: 12.5px;
}
.chat-note.del {
    background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color: var(--p-red-text);
}
.chat-note.arch {
    background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.35); color: var(--p-sky-text);
}
.chat-form.locked {
    padding-top: 12px; border-top: 1px solid var(--p-hair);
    color: var(--p-muted-2); font-size: 13px; text-align: center;
}

.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.them { flex-direction: row; }
.msg.me   { flex-direction: row-reverse; }
.m-ava { flex: 0 0 34px; }
/* 👤 Balondaki avatar da profili açar (isim zaten bağlantılı) */
.m-ava-link { display: inline-flex; border-radius: 11px; text-decoration: none; }
.m-ava-link:hover { box-shadow: 0 0 0 2px var(--p-accent); }
.m-ava-link:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.m-ava-img {
    width: 34px; height: 34px; border-radius: 11px; object-fit: cover;
    display: grid; place-items: center; font-size: 13px; font-weight: 800;
    color: #06121f; border: 1px solid var(--p-hair-2);
}
/* 🎨 Kuşanılan avatar çerçevesi (mesaj balonları) — yalnız kuşanılmışsa görünür */
.m-ava-wrap { position: relative; display: inline-flex; width: 34px; height: 34px; flex: 0 0 34px; }
.m-frame {
    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    object-fit: contain; pointer-events: none; z-index: 2;
}
.m-main { max-width: 74%; min-width: 0; }
.msg.me .m-main { text-align: right; }
.m-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.msg.me .m-head { justify-content: flex-end; }
.m-name { font-weight: 800; font-size: 12.5px; color: var(--p-text-soft); text-decoration: none; }
.m-name:hover { color: var(--p-active-text); text-decoration: underline; }
.m-meta { font-size: 10.5px; color: var(--p-muted-2); white-space: nowrap; }
.m-text {
    display: inline-block; text-align: left; padding: 10px 14px; border-radius: 14px;
    font-size: 13.5px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap;
}
.msg.them .m-text { background: var(--p-surface-2); color: var(--p-text-2); border: 1px solid var(--p-border); border-bottom-left-radius: 5px; }
.msg.me   .m-text { background: linear-gradient(180deg,#22c55e,#16a34a); color: #04140a; border-bottom-right-radius: 5px; }
.m-text.deleted { font-style: italic; opacity: .75; background: transparent !important; border: 1px dashed var(--p-hair-2) !important; color: var(--p-muted) !important; }
.m-text.muted   { font-style: italic; opacity: .8; background: transparent !important; border: 1px dashed var(--p-hair-2) !important; color: var(--p-muted) !important; }
.m-acts { display: flex; gap: 4px; margin-top: 4px; opacity: .35; transition: opacity .15s; }
.msg.me .m-acts { justify-content: flex-end; }
.msg:hover .m-acts { opacity: 1; }
.m-act {
    border: 1px solid var(--p-border); background: rgba(4,8,16,.4); color: var(--p-text-soft);
    width: 26px; height: 24px; border-radius: 8px; cursor: pointer; font-size: 12px; line-height: 1;
    display: inline-grid; place-items: center; padding: 0;
}
.m-act:hover { border-color: var(--p-accent); color: var(--p-active-text); }
.m-edit { display: flex; flex-direction: column; gap: 6px; }
.m-edit textarea { width: 100%; min-width: 260px; resize: vertical; }
.m-edit-acts { display: flex; gap: 6px; }
@media (hover: none) { .m-acts { opacity: 1; } }

/* ---------- ŞİKAYET MODALI ---------- */
.mc-overlay {
    position: fixed; inset: 0; z-index: 400; display: none;
    align-items: center; justify-content: center; padding: 18px;
    background: var(--p-overlay); backdrop-filter: blur(4px);
}
.mc-overlay.show { display: flex; }
.mc-modal {
    width: 100%; max-width: 520px; border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, var(--p-menu-1), var(--p-menu-2));
    border: 1px solid var(--p-hair-2); box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.mc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--p-hair); }
.mc-head h3 { font-size: 15px; font-weight: 800; }
.mc-x { background: transparent; border: 0; color: var(--p-muted); font-size: 16px; cursor: pointer; }
.mc-x:hover { color: var(--p-red-text); }
.mc-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.mc-quote {
    padding: 10px 12px; border-radius: 10px; font-size: 12.5px; max-height: 110px; overflow: auto;
    background: var(--p-card-2); border-left: 3px solid var(--p-warn-text); color: var(--p-text-soft);
    white-space: pre-wrap; word-break: break-word;
}
.mc-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--p-muted); }
.mc-reasons { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-reason {
    padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 12.5px; font-weight: 700;
    background: rgba(148,163,184,.08); border: 1px solid var(--p-border); color: var(--p-text-soft);
}
.mc-reason:hover { border-color: var(--p-accent); }
.mc-reason.on { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.45); color: var(--p-red-text); }
.mc-hint { font-size: 11.5px; color: var(--p-muted-2); }
.mc-foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--p-hair); }

/* ---------- TOAST ---------- */
.chat-toast {
    position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
    padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 700;
    background: #16a34a; color: #04140a; opacity: 0; transition: .22s; z-index: 500;
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.chat-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ENGELLİ SOHBET İŞARETİ ---------- */
.thread .t-block { font-size: 11px; margin-left: 4px; opacity: .85; }

/* ============================================================
   🔐 GOOGLE İLE GİRİŞ / KAYIT (auth/login.php · auth/register.php)
   ============================================================ */
.g-sep {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0 12px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; opacity: .7;
}
.g-sep::before, .g-sep::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .22; }

.g-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 11px 16px; border-radius: 12px;
    border: 1px solid rgba(148,163,184,.35);
    background: rgba(148,163,184,.10);
    color: inherit; text-decoration: none; cursor: pointer;
    font-size: 13.5px; font-weight: 700; transition: .18s;
}
.g-btn:hover  { background: rgba(148,163,184,.20); border-color: rgba(148,163,184,.55); }
.g-btn:active { transform: translateY(1px); }

.g-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
    background: #fff; color: #4285F4;
    font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 800;
    box-shadow: 0 1px 3px rgba(0,0,0,.28);
}

/* ---------- 🔒 reCAPTCHA (kayıt · giriş) ---------- */
.g-captcha {
    display: flex; justify-content: center; align-items: center;
    margin: 14px 0 6px; min-height: 78px;
}
.g-captcha .g-recaptcha { transform-origin: center center; }
@media (max-width: 420px) {
    .g-captcha .g-recaptcha { transform: scale(.92); }
}




/* ============================================================
   🔎 CANLI UYGUNLUK KONTROLÜ (kayıt ekranı · register-check.js)
   👤 kullanıcı adı + 📧 e-posta alanları
   ============================================================ */
.f-input.is-ok   { border-color: rgba(34, 197, 94, .65) !important; }
.f-input.is-bad  { border-color: rgba(239, 68, 68, .65) !important; }
.f-input.is-busy { border-color: rgba(148, 163, 184, .55) !important; }

.field-state {
    margin-top: 6px;
    min-height: 15px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    transition: color .15s ease;
}
.field-state.is-checking  { color: #94a3b8; }
.field-state.is-available { color: #4ade80; }
.field-state.is-taken,
.field-state.is-invalid   { color: #fca5a5; }


/* ============================================================
   MOBİL — PANEL/PROFİL BAŞLIĞI + İSTATİSTİK ÇİPLERİ (<= 620px)
   ------------------------------------------------------------
   Panelim (/dashboard) ve profil başlıklarında avatar + metin
   yan yana sığmadığı için küçük ekranda dikey ve ortalanmış
   düzene geçilir; istatistik çipleri düzgün 2 sütunlu ızgaraya
   alınır (eski flex-wrap dağınık dizilimi önler).
   ⚠️ Dosyanın SONUNDA olmalı: aynı özgüllükteki temel
   kuralları bilinçli olarak geçersiz kılar.
   ============================================================ */
@media (max-width: 620px) {

    .s-wrap { padding: 18px 13px 46px; }

    /* --- Başlık kartı (avatar + isim + buton/rozetler) --- */
    .prof-head {
        flex-direction: column; align-items: center; text-align: center;
        gap: 12px; padding: 16px; border-radius: 16px; margin-bottom: 16px;
    }
    /* avatarBox() boyutu inline yazar → !important gerekir */
    .prof-head .ava-img {
        width: 64px !important; height: 64px !important;
        flex: 0 0 64px !important; border-radius: 16px !important;
        font-size: 24px;
    }
    .prof-head .big-ava {
        width: 68px; height: 68px; flex: 0 0 68px;
        border-radius: 18px; font-size: 26px;
    }
    .prof-head .meta { flex: none; width: 100%; }
    .prof-head .meta h1 { font-size: 19px; gap: 7px; justify-content: center; }
    .prof-head .meta .un { font-size: 12px; }
    .prof-head .meta .st { font-size: 12.5px; }
    .prof-head .social-list { justify-content: center; }
    .prof-head > .s-btn { width: 100%; }

    /* --- İstatistik çipleri: düzgün 2 sütun --- */
    .stat-chips {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px; margin-top: 12px;
    }
    .stat-chip { min-width: 0; padding: 8px 10px; border-radius: 11px; }
    .stat-chip .v { font-size: 16px; }
    .stat-chip .l { font-size: 9.5px; letter-spacing: .4px; }

    .alert { padding: 10px 12px; font-size: 12.5px; margin-bottom: 13px; }
}


/* ============================================================
   🎨 KOZMETİK SAYFASI (/cosmetics) — kahraman · dolap · mağaza
   ------------------------------------------------------------
   Kart/düğme görünümü mevcut `.csm-*` sınıflarından gelir; bu blok
   yalnızca SAYFA düzenini ekler (mobil öncelikli).
   `/profile` → kompakt "🎨 Görünümüm" kartı da `.cx-slots-sm` kullanır.
   ============================================================ */
.cx-hero {
    position: relative;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 22px; margin-bottom: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34,197,94,.14), rgba(168,85,247,.12));
    border: 1px solid rgba(34,197,94,.25);
}
.cx-ava-zone { position: relative; display: inline-flex; width: 104px; height: 104px; flex: 0 0 104px; }
.cx-ava, .cx-frame { border-radius: 24px; }
.cx-ava {
    width: 104px; height: 104px; object-fit: cover;
    border: 2px solid var(--p-hair-2);
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.cx-ava-ini { display: grid; place-items: center; font-size: 42px; font-weight: 800; color: #06121f; }
.cx-frame {
    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    object-fit: contain; border-radius: 0; pointer-events: none; z-index: 2;
}
.cx-hero-meta { min-width: 0; flex: 1; }
.cx-hero-nm { font-size: 26px; font-weight: 800; margin-bottom: 2px; word-break: break-word; }
.cx-hero-un { color: var(--p-muted); font-size: 13.5px; font-family: Consolas, monospace; }
.cx-hero-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cx-prog {
    margin-top: 12px; height: 8px; max-width: 320px;
    border-radius: 99px; background: rgba(148,163,184,.16); overflow: hidden;
}
.cx-prog > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#22c55e,#38bdf8); transition: width .3s; }
.cx-hero-hint { margin-top: 10px; font-size: 12.5px; color: var(--p-muted); }

/* 👁️ Önizleme rozeti (kahraman sağ üst) */
.cx-prevbadge {
    position: absolute; right: 14px; top: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 11px; border-radius: 99px;
    font-size: 12px; font-weight: 700;
    background: rgba(6,18,31,.74); border: 1px solid rgba(56,189,248,.45);
    color: var(--p-sky-text);
}
.cx-prevx {
    cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 800;
    padding: 4px 9px; border-radius: 99px;
    border: 1px solid rgba(148,163,184,.35); background: rgba(148,163,184,.14); color: var(--p-text-soft);
}
.cx-prevx:hover { background: rgba(239,68,68,.2); color: #fecaca; border-color: rgba(239,68,68,.45); }

.cx-title-sub { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--p-muted); }
.cx-bank { float: right; font-size: 12.5px; font-weight: 800; color: #fbbf24; }

/* 🔗 Çapa hedefleri (`#dolap` · `#koleksiyon`): sticky üst menünün altında kalmasın
   (mobilde menü 2 satır ≈ 100px → @media bloğunda büyütülür) */
.cx-anchor { scroll-margin-top: 78px; }

/* ---------- 🎽 DOLAP (4 yuva) ---------- */
.cx-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cx-slot {
    display: flex; flex-direction: column; gap: 7px; text-align: center;
    padding: 12px 10px; border-radius: 14px; text-decoration: none; color: inherit;
    background: var(--p-card-2); border: 1px solid var(--p-border);
    transition: .16s;
}
.cx-slot:hover { border-color: rgba(56,189,248,.45); transform: translateY(-1px); }
.cx-slot.on { border-color: rgba(34,197,94,.5); box-shadow: 0 0 16px rgba(34,197,94,.14); }
.cx-slot-prev {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    border-radius: 12px; overflow: hidden; background: var(--p-input-2);
    display: grid; place-items: center;
}
.cx-slot-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-slot-off { font-size: 24px; opacity: .32; }
.cx-color { width: 58%; height: 58%; border-radius: 50%; display: block; box-shadow: 0 0 14px rgba(0,0,0,.35); }
.cx-slot-k { font-size: 11.5px; font-weight: 800; color: var(--p-text-2); }
.cx-slot-v { font-size: 11px; color: var(--p-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* `/profile` kompakt kart: dar sütunda 2'li ızgara */
.cx-slots-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.cx-slots-sm .cx-slot { padding: 9px 8px; border-radius: 12px; }


/* ---------- 🧭 SEKMELER (mobilde yatay kaydırma) ---------- */
.cx-tabs {
    display: flex; gap: 8px; margin: 6px 0 14px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.cx-tabs .csm-tab { flex: 0 0 auto; padding: 10px 13px; font-size: 13px; border-radius: 12px; }
.cx-tab-ic { font-size: 15px; }
.cx-tab-n { margin-left: 2px; padding: 1px 7px; border-radius: 99px; background: rgba(148,163,184,.18); font-size: 10.5px; font-weight: 800; }
.csm-tab.on .cx-tab-n { background: rgba(34,197,94,.25); }

/* ---------- 🔎 ARAÇ ÇUBUĞU (ara · sırala · filtre) ---------- */
.cx-tools { display: grid; grid-template-columns: 1fr 250px; gap: 10px; margin-bottom: 10px; }
.cx-search { position: relative; display: block; }
.cx-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .7; }
.cx-input {
    width: 100%; padding: 11px 13px 11px 36px;
    border-radius: 11px; background: var(--p-input-2); border: 1px solid var(--p-border);
    color: var(--p-text-strong); font-family: inherit; font-size: 13.5px;
}
.cx-input:focus { outline: none; border-color: rgba(34,197,94,.55); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.cx-sel { padding-left: 13px; cursor: pointer; }
.cx-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 13px; border-radius: 99px;
    font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    color: var(--p-muted); background: var(--p-card-2); border: 1px solid var(--p-border);
    transition: .16s;
}
.cx-chip:hover { color: var(--p-text-strong); border-color: rgba(148,163,184,.45); }
.cx-chip.on { color: var(--p-active-text); background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.5); }
.cx-count { font-size: 12.5px; font-weight: 700; color: var(--p-muted); margin-bottom: 10px; }

/* ---------- 🖼️ KARTLAR (nadirlik kenarı · önizleme · eksik tutar) ---------- */
.cx-card.cx-r-common    { border-color: rgba(74,222,128,.28); }
.cx-card.cx-r-rare      { border-color: rgba(56,189,248,.32); }
.cx-card.cx-r-epic      { border-color: rgba(168,85,247,.34); }
.cx-card.cx-r-legendary { border-color: rgba(251,191,36,.38); box-shadow: 0 0 14px rgba(251,191,36,.08); }
.cx-card.cx-r-season    { border-color: rgba(244,114,182,.34); }
.cx-prevbtn { border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.cx-prevbtn:focus-visible { outline: 2px solid rgba(56,189,248,.75); outline-offset: 2px; }
.cx-eye {
    position: absolute; right: 5px; top: 5px; width: 22px; height: 22px;
    border-radius: 8px; display: grid; place-items: center; font-size: 11px;
    background: rgba(6,18,31,.66); border: 1px solid rgba(148,163,184,.3);
    opacity: 0; transition: .16s;
}
.cx-prevbtn:hover .cx-eye, .cx-prevbtn:focus-visible .cx-eye { opacity: 1; }
/* 📱 Dokunmatik cihazlarda hover yok → 👁️ önizleme ipucu her zaman görünür */
@media (hover: none) { .cx-eye { opacity: .9; } }
.cx-owned { font-size: 10.5px; font-weight: 800; color: var(--p-sky-text); }
.cx-lack { font-size: 10.5px; font-weight: 700; color: var(--p-muted-2); }
.cx-none { padding: 16px 4px; text-align: center; color: var(--p-muted); font-size: 13px; display: grid; gap: 4px; }
.cx-none b { color: var(--p-text-2); font-size: 14px; }
.cx-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--p-text-soft); }
.cx-list li { display: flex; gap: 8px; align-items: flex-start; }
.cx-list a { color: var(--p-sky-text); font-weight: 700; text-decoration: none; }
.cx-list a:hover { text-decoration: underline; }

/* ⚠️ JS `hidden` kullanır: sınıf kuralı (display:flex/grid) UA'nın
   [hidden]{display:none} kuralını ezdiği için burada zorlanır. */
.cx-ava[hidden], .cx-ava-ini[hidden], .cx-frame[hidden],
.cx-card[hidden], .cx-slot[hidden], .cx-none[hidden], .cx-prevbadge[hidden] { display: none !important; }

/* ---------- 🧭 YAPIŞKAN ARAÇ ÇUBUĞU (sekmeler + ara/sırala) ----------
   Uzun katalogda (15-20 öğe) sekmeler ve arama kaybolmasın: mağaza
   kartının İÇİNDE sticky kalır. Üst menü `z-index:50` + sticky →
   çubuk 20'de durur, hep menünün ALTINA kayar (üstüne çıkmaz). */
.cx-toolbar {
    position: sticky; top: 74px; z-index: 20;
    margin: 0 -6px 10px; padding: 6px 6px 9px;
    background: var(--p-surface);
    border-bottom: 1px solid rgba(148,163,184,.14);
    border-radius: 0 0 12px 12px;
}

/* 🧭 Tür etiketi: masaüstünde tam ad (`.cx-lg`), dar ekranda kısa ad (`.cx-sm`) */
.cx-sm { display: none; }

/* 🏷️ Filtre çipi sayacı (JS canlı günceller) */
.cx-chip-n { padding: 0 6px; border-radius: 99px; background: rgba(148,163,184,.22); font-size: 10.5px; font-weight: 800; }
.cx-chip.on .cx-chip-n { background: rgba(34,197,94,.3); color: var(--p-active-text); }

/* 🏆 Alt ipucu: kahramanın altında TAM GENİŞLİK satır (dar ekranda
   avatar kolonunu sıkıştırmaz) */
.cx-hero-hint { flex: 1 0 100%; }

/* ---------- ℹ️ "NASIL ÇALIŞIR?" (kapalı başlar → sayfa kısa kalır) ---------- */
.cx-help { padding: 0; }
.cx-help > summary {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px; cursor: pointer; list-style: none;
    font-size: 20px; font-weight: 800;
}
.cx-help > summary::-webkit-details-marker { display: none; }
.cx-help-hint { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--p-muted); }
.cx-help-ar { font-size: 13px; color: var(--p-muted); transition: transform .2s; }
.cx-help[open] .cx-help-ar { transform: rotate(180deg); }
.cx-help[open] > summary { border-bottom: 1px solid rgba(148,163,184,.12); margin-bottom: 14px; }
.cx-help .cx-list { padding: 0 20px 18px; }

/* ---------- 📱 MOBİL ---------- */
@media (max-width: 860px) {
    .cx-hero { padding: 18px; gap: 16px; }
    .cx-toolbar { top: 62px; }                 /* mobil üst menü tek satır (~54px) */
    .cx-anchor { scroll-margin-top: 108px; }   /* çapa hedefi sticky çubuğun altında kalsın */
}
@media (max-width: 620px) {
    /* 🧱 Sayfa + kart içi boşluk daralır → 3'lü ızgaraya daha çok yer kalır */
    .cx-wrap { padding: 18px 14px 48px; }
    .cx-wrap .s-card { padding: 15px; }
    .cx-wrap .s-title { font-size: 17px; margin-bottom: 11px; }
    .cx-title-sub { display: none; }
    .cx-bank { float: none; display: inline-block; margin-left: 6px; }

    /* ---------- 🏆 KAHRAMAN (kompakt) ---------- */
    .cx-hero { gap: 12px; padding: 15px; border-radius: 16px; }
    .cx-ava-zone, .cx-ava { width: 68px; height: 68px; flex-basis: 68px; border-radius: 18px; }
    .cx-ava-ini { font-size: 28px; }
    .cx-hero-nm { font-size: 18px; }
    .cx-hero-un { font-size: 12px; }
    .cx-hero-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
    .cx-hero-row .pill {
        justify-content: center; gap: 4px;
        padding: 6px 4px; font-size: 10.5px; border-radius: 9px;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    }
    .cx-prog { margin-top: 10px; height: 6px; max-width: 100%; }
    .cx-hero-hint { margin-top: 8px; font-size: 11.5px; line-height: 1.4; }
    .cx-prevbadge { position: static; margin-top: 8px; width: 100%; justify-content: space-between; }

    /* ---------- 🎽 DOLABIM: 4 yuva tek satır (ikon buton) ----------
       ⚠️ `.cx-wrap` ile kapsamlandı: 👤 /profile özet kartı da `.cx-slots`
       kullanır ama orada 2'li (`.cx-slots-sm`) kalmalı. */
    .cx-wrap .cx-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .cx-wrap .cx-slot { padding: 7px 5px; gap: 5px; border-radius: 12px; }
    .cx-wrap .cx-slot-prev { border-radius: 9px; }
    .cx-wrap .cx-slot-k {
        font-size: 9.5px; font-weight: 700; line-height: 1.25;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .cx-wrap .cx-slot-v { font-size: 9.5px; }
    .cx-wrap .cx-slot .csm-btn { font-size: 11px; padding: 6px 3px; border-radius: 8px; }
    .cx-wrap .cx-slot .cx-btn-t { display: none; }   /* dar yuvada yalnız ikon */

    /* ---------- 🧭 SEKMELER: 4 kısa etiket TEK satır ---------- */
    .cx-toolbar { top: 58px; margin: 0 -3px 9px; padding: 5px 3px 8px; }
    .cx-tabs {
        display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px; overflow: visible; margin: 2px 0 9px;
    }
    .cx-tabs .csm-tab {
        justify-content: center; gap: 4px; white-space: nowrap;
        padding: 7px 4px; font-size: 10.5px; border-radius: 10px;
    }
    .cx-tabs .csm-tab .cx-tab-n { display: none; }   /* sahip/toplam çip sayacında */
    .cx-tab-ic { font-size: 14px; }
    .cx-lg { display: none; }
    .cx-sm { display: inline; }

    /* ---------- 🔎 ARAÇLAR: tek satır ---------- */
    .cx-tools { grid-template-columns: minmax(0, 1fr) 152px; gap: 7px; }
    .cx-input { font-size: 16px; padding: 9px 12px 9px 33px; }   /* iOS: odakta zoom olmasın */
    .cx-sel { padding-left: 12px; }
    .cx-search-ic { font-size: 13px; left: 10px; }

    /* ---------- 🎛️ ÇİPLER: tek satır yatay kaydırma ---------- */
    .cx-chips {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 6px; padding-bottom: 3px;
        -ms-overflow-style: none; scrollbar-width: none;
    }
    .cx-chips::-webkit-scrollbar { height: 0; }
    .cx-chip { flex: 0 0 auto; padding: 7px 11px; font-size: 11.5px; }
    .cx-count { margin-bottom: 9px; }

    /* ---------- 🃏 IZGARA: 3'lü kompakt kart (banner 2'li · 16:9) ---------- */
    .csm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .csm-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .csm-card { padding: 6px; border-radius: 12px; gap: 4px; }
    .csm-prev { border-radius: 9px; }
    .csm-color { width: 52%; height: 52%; }
    .csm-nm { font-size: 10.5px; }
    .csm-rar { font-size: 9.5px; }
    .csm-price { font-size: 11.5px; }
    .csm-btn { font-size: 10.5px; padding: 7px 4px; border-radius: 8px; }
    .csm-on { left: 4px; right: 4px; bottom: 4px; padding: 2px 3px; font-size: 8px; }
    .cx-on-t { display: none; }                 /* dar kartta yalnız ✅ kalır */
    .cx-owned, .cx-lack { font-size: 10px; }
    .cx-eye { right: 4px; top: 4px; width: 20px; height: 20px; font-size: 10px; }

    /* ---------- ℹ️ NASIL ÇALIŞIR (kapalı · liste okunur kalır) ---------- */
    .cx-help > summary { padding: 13px 15px; font-size: 16.5px; gap: 8px; }
    .cx-help-hint { display: none; }
    .cx-help .cx-list { padding: 0 15px 14px; font-size: 13px; }
    .cx-list li { flex-direction: column; gap: 2px; }
}
/* Çok dar ekran (≤340px): 3'lü ızgara sığmıyor → 2'li */
@media (max-width: 340px) {
    .csm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-hero-row .pill { font-size: 10px; }
}
/* Çok dar ekran (≤380px): üst menü 3 satıra çıkar (~142px) → çapa payı büyür */
@media (max-width: 380px) {
    .cx-anchor { scroll-margin-top: 152px; }
}

/* ============================================================
   📱 MOBİL — 👥 SOSYAL KULLANICI LİSTELERİ / SEKMELERİ (≤620px)
   ------------------------------------------------------------
   Amaç: /friends sayfası mobilde de masaüstünde de kompakt kalsın.
   · Sekmeler 4'lü TEK satır (uzun etiket .u-lg ↔ kısa .u-sm)
   · Kart ızgarası 2 sütun · satır listesi tek sütun (~50px)
   ⚠️ Dosyanın SONUNDA olmalı: önceki kuralları bilinçli geçersiz kılar.
   ============================================================ */
.u-sm { display: none; }          /* kısa sekme etiketi yalnız mobilde görünür */

@media (max-width: 620px) {

    .s-title { font-size: 17px; margin-bottom: 11px; }
    .s-card { padding: 15px; border-radius: 14px; }

    /* --- 🧭 SEKMELER: 4'lü tek satır ------------------------------------
       ⚠️ KAPSAM: bu blok SADECE 👥 Arkadaşlar sayfası için yazıldı.
       `.s-tabs` paylaşılan bir bileşen sınıfı: /farm sekme çubukları da
       aynı sınıfı taşır (`games/farm/index.php` → `nav.s-tabs.farm-tabs`,
       `nav.s-tabs.an-tabs` ve 💧🛢️ rezerv alt şeridi `nav.s-tabs.wr-tabs`).
       Kapsamsız bırakıldığında 4 kolonlu ızgara çiftlik çubuğunu da
       yakalıyor, alt sekme satırı (🌱 Tarlam · 🏭 Üretim · …) ekranın
       ~1/4'üne sıkışıp yazılar 11.5px'e düşüyordu; rezerv şeridinde ise
       2 sekme 4 kolona sıkışıp `white-space: nowrap` yüzünden MOBİLDE
       TAŞIYORDU. Çiftlik/rezerv şeritleri dışarıda bırakılır; onlar kendi
       @media kurallarını kullanır (games/farm/farm.css: ≤760px tek satır +
       yatay kaydırma · games/farm/water.css: ≤620px 2 sekme yarım genişlik).
       📦🏬 Depo ↔ Ambar geçiş şeridi `dep-tabs` (§24.4) de aynı sebeple
       dışlanır (games/farm/farm.css: ≤620px 2 sekme yarım genişlik). */
    .s-tabs:not(.farm-tabs):not(.an-tabs):not(.wr-tabs):not(.dep-tabs) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
    .s-tabs:not(.farm-tabs):not(.an-tabs):not(.wr-tabs):not(.dep-tabs) .s-tab { justify-content: center; padding: 8px 4px; font-size: 11.5px; border-radius: 10px; white-space: nowrap; }
    .s-tabs:not(.farm-tabs):not(.an-tabs):not(.wr-tabs):not(.dep-tabs) .s-tab .n { margin-left: 3px; padding: 1px 5px; }
    .u-lg { display: none; }
    .u-sm { display: inline; }

    /* --- 🃏 KART: 2 sütun · sıkı --- */
    .u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .u-card { padding: 10px; gap: 8px; border-radius: 12px; }
    .u-link { gap: 8px; }
    /* avatarBox() boyutu inline yazar → !important şart */
    .u-card .ava-img, .u-row .ava-img {
        width: 34px !important; height: 34px !important; flex: 0 0 34px !important; border-radius: 10px !important;
    }
    .u-card .uc-name, .u-row .uc-name { font-size: 12.5px; }
    .u-card .uc-sub, .u-row .uc-sub { font-size: 10px; }
    .u-actions .s-btn.sm { padding: 6px 8px; font-size: 11px; border-radius: 8px; flex: 1 1 0; }
    .u-act-t { display: none; }        /* dar düğmede yalnız ikon kalır */

    /* --- 🧾 SATIR LİSTESİ: tek sütun · ~50px --- */
    .u-list { gap: 6px; }
    .u-row { padding: 7px 9px; gap: 9px; border-radius: 11px; }
    .u-row .u-actions { gap: 5px; }
    .u-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }

    /* --- 🔎 ARAÇLAR / BAŞLIKLAR --- */
    .u-search { gap: 6px; }
    .u-sec { font-size: 14px; }
    .u-note, .u-empty { font-size: 12px; }
    .empty-state { padding: 26px 14px; }
}
/* Çok dar ekran (≤360px): 2'li kart ızgarası sığmıyor → tek sütun */
@media (max-width: 360px) {
    .u-grid { grid-template-columns: 1fr; }
}



/* ============================================================
   📱 MESAJLAR (chat ekranı) — 620px altı
   ------------------------------------------------------------
   • Sohbet kutusu yüksekliği ekrana bağlanır: sabit 560px telefonda
     adres çubuğu/klavye ile taşıyordu → `dvh` tabanlı esnek yükseklik
   • Dokunma hedefleri büyür · iOS sayfa zoomlamasın diye giriş 16px
   ============================================================ */
@media (max-width: 620px) {

    /* --- Sohbet listesi --- */
    .thread { padding: 6px 8px; }
    .thread .t-open { gap: 10px; }
    .thread .t-prof { width: 40px; height: 40px; flex: 0 0 40px; font-size: 17px; }

    /* --- Sohbet penceresi --- */
    .chat-box { height: auto; min-height: min(560px, calc(100dvh - 210px)); }
    .chat-head { flex-wrap: wrap; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; }
    .chat-head .ch-acts { margin-left: 0; width: 100%; }
    .chat-body { gap: 10px; }
    .m-main { max-width: 86%; }
    .m-act { width: 32px; height: 30px; font-size: 13px; }
    .m-edit textarea { min-width: 0; }

    /* 📱 iOS: 16px altı giriş yazısı sayfayı zoomlar */
    .chat-form input { font-size: 16px; }
    .chat-form .s-btn { padding: 12px 16px; }
}

/* ============================================================
   📱 MESAJLAR — TEK PANEL AKIŞI (≤700px)
   ------------------------------------------------------------
   • Önce liste; konuşmaya dokunulunca `body.chat-open` ile sohbet
     TAM EKRAN açılır (üstte ⬅ geri butonu, `.m-back`)
   • Composer altta sabit · güvenli alan (`env(safe-area-inset-bottom)`)
   • Giriş 16px → iOS sayfa zoomu olmaz · ⋯ menüleri hep görünür
   • Bu blok dosyanın SONUNDA: ≤620px kurallarını da kapsar
   ============================================================ */
@media (max-width: 700px) {
    .msg-layout { gap: 12px; }
    .ms-list { max-height: none; }

    /* sekmeler: yalnız ikon + sayaç (uzun etiket 3 sekmeye sığmıyor) */
    .ms-tab { padding: 10px 6px; font-size: 15px; }
    .ms-tab .ms-tx { display: none; }

    /* başlık: ⬅ + kimlik üstte, aksiyonlar altta tam genişlik */
    .chat-head { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
    .chat-head .ch-id { grid-column: 2; }
    .chat-head .ch-acts { grid-column: 1 / -1; margin-left: 0; width: 100%; }
    .m-back { display: grid; }

    /* sohbet açıkken liste gizlenir, sohbet ekranı kaplar */
    body.chat-open { overflow: hidden; }
    body.chat-open .msg-side { display: none; }
    body.chat-open .chat-col {
        position: fixed; inset: 0; z-index: 70; margin: 0;
        border-radius: 0; border: 0; padding: 12px 12px 8px;
        display: flex; flex-direction: column; height: 100dvh;
        background: linear-gradient(180deg, var(--p-surface) 0%, var(--p-surface-deep) 100%);
    }
    body.chat-open .chat-body { flex: 1; min-height: 0; }
    body.chat-open .chat-form {
        position: sticky; bottom: 0; gap: 8px;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    }
    body.chat-open .chat-form.locked { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

    /* dokunma hedefleri + okunabilirlik */
    .thread { padding: 9px 10px; }
    .thread .t-menu-btn { width: 32px; height: 32px; flex: 0 0 32px; font-size: 17px; }
    .t-menu, .ch-menu { min-width: min(260px, calc(100vw - 32px)); }
    .chat-form textarea { font-size: 16px; }
    .cf-side { flex-direction: row; align-items: center; gap: 8px; }
    .cf-count { display: none; }
    .chat-sep { margin-top: 12px; }
}

/* ♿ Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .t-menu.open, .ch-menu.open, .m-in { animation: none; }
    .thread, .ms-tab, .thread .t-menu-btn { transition: none; }
}

