/* =====================================================================
   AFODABO SOCIAL — muonekano wa kisasa (mtindo wa Instagram)
   Inapakiwa baada ya afodabo.css. Inatumika kwenye kurasa za app (body.app).
   Icons zote ni Bootstrap Icons — hakuna emoji.
   ===================================================================== */

body.app {
  --bg: #fafafa;
  --text: #0f1419;
  --muted: #65676b;
  --faint: #8e8e8e;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-hover: #f2f2f2;
  --field: #efefef;
  --border: #dbdbdb;
  --line: #e6e6e6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .16);
  --price: #d9480f;
  --like: #ff3040;
  --radius: 12px;
  --radius-sm: 8px;
  --glass-filter: none;
  --rail-w: 244px;
  --feed-w: 470px;
  --topbar-h: 60px;
  background: var(--bg);
  font-size: 14.5px;
}
html[data-mode="dark"] body.app {
  --bg: #000000; --text: #f5f5f5; --muted: #a8a8a8; --faint: #737373;
  --surface: #000000; --surface-strong: #121212; --surface-hover: #1a1a1a; --field: #262626;
  --border: #262626; --line: #1f1f1f; --price: #ff8a3d; --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  html[data-mode="system"] body.app {
    --bg: #000000; --text: #f5f5f5; --muted: #a8a8a8; --faint: #737373;
    --surface: #000000; --surface-strong: #121212; --surface-hover: #1a1a1a; --field: #262626;
    --border: #262626; --line: #1f1f1f; --price: #ff8a3d; --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .7);
  }
}
/* Glass: mandharinyuma laini, bars zinazoonyesha kupitia */
html[data-ui="glass"] body.app .app-bg::before, html[data-ui="glass"] body.app .app-bg::after, html[data-ui="glass"] body.app .app-bg .blob { opacity: .12; }
html[data-ui="glass"] body.app { --glass-filter: blur(20px) saturate(180%); }

body.app .card { background: var(--surface); border: 1px solid var(--border); box-shadow: none; border-radius: var(--radius); }
body.app .btn { border-radius: 8px; font-weight: 600; padding: 8px 16px; }
body.app .btn-sm { padding: 6px 12px; }
body.app .btn-primary { background: var(--primary); box-shadow: none; }
body.app .btn-outline, body.app .btn-soft.gray { background: var(--field); border-color: transparent; color: var(--text); }
body.app .btn-outline:hover { background: color-mix(in srgb, var(--field) 80%, var(--text) 8%); }
body.app .chip { border-radius: 8px; background: var(--field); border: 0; font-weight: 600; }
body.app .chip.active { background: var(--text); color: var(--bg); }
body.app .input, body.app .select, body.app .textarea { background: var(--field); border-color: transparent; border-radius: 8px; }
body.app .input:focus, body.app .select:focus, body.app .textarea:focus { background: var(--surface); border-color: var(--border); box-shadow: none; }
body.app .tick { color: var(--primary); }
html[data-mode="dark"] body.app .tick { color: var(--accent); }
body.app .muted { color: var(--muted); }
body.app a.link, body.app .rt-link, body.app .rt-tag, body.app .rt-mention { color: #0a66c2; font-weight: 600; }
html[data-mode="dark"] body.app :is(.rt-link, .rt-tag, .rt-mention) { color: #7ab7ff; }
body.app .rt-link { font-weight: 500; }

/* ---------------- App shell ---------------- */
body.app .topbar { display: none; }
body.app .shell {
  display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: 0; max-width: none; padding: 0; margin: 0;
}
body.app .shell > .side-left {
  position: sticky; top: 0; height: 100vh; max-height: none; overflow: visible; padding: 8px 12px 20px;
  border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; z-index: 30;
}
body.app .content-wrap { display: grid; grid-template-columns: minmax(0, 630px) 320px; gap: 64px; justify-content: center; padding: 22px 24px 60px; }
body.app .shell.wide .content-wrap, body.app .content-wrap.solo { grid-template-columns: minmax(0, 935px); }
body.app .main { min-width: 0; }
body.app .feed-col { max-width: var(--feed-w); margin: 0 auto; width: 100%; }
body.app .side-right { position: sticky; top: 22px; align-self: start; max-height: calc(100vh - 44px); overflow-y: auto; scrollbar-width: none; padding-top: 18px; }
body.app .side-right .card { border: 0; background: none; padding: 0; }
body.app .side-right .card + .card { margin-top: 22px; }

.rail-brand { display: flex; align-items: center; height: 74px; padding: 0 12px; }
.rail-brand img.logo { height: 30px; width: auto; }
html[data-mode="dark"] .rail-brand img.logo { filter: brightness(1.4) saturate(1.1); }
.rail-brand img.icon { height: 30px; width: 30px; display: none; }
.rail { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.rail a, .rail button, .rail summary {
  display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 10px; font-size: 1rem; color: var(--text);
  border: 0; background: none; cursor: pointer; width: 100%; text-align: left; font-weight: 400; position: relative;
}
.rail a:hover, .rail button:hover, .rail summary:hover { background: var(--surface-hover); }
.rail a i, .rail button i, .rail summary i { font-size: 1.55rem; width: 26px; text-align: center; transition: transform .15s; }
.rail a:hover i { transform: scale(1.06); }
.rail a.active { font-weight: 700; }
.rail .avatar { --size: 26px; }
.rail a.active .avatar { outline: 2px solid var(--text); outline-offset: 1px; }
.rail .badge-dot { position: absolute; left: 30px; top: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--like); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.rail .sp { flex: 1; }
.rail-more .menu { left: 0; right: auto; bottom: calc(100% + 6px); top: auto; min-width: 260px; }

/* Rail inakunja (icons tu) kwenye skrini za kati */
@media (max-width: 1264px) {
  body.app { --rail-w: 76px; }
  body.app .shell > .side-left { padding: 8px 10px 20px; }
  .rail-brand { justify-content: center; padding: 0; }
  .rail-brand img.logo { display: none; }
  .rail-brand img.icon { display: block; }
  .rail a span.lbl, .rail button span.lbl, .rail summary span.lbl { display: none; }
  .rail a, .rail button, .rail summary { justify-content: center; }
}
@media (max-width: 1160px) { body.app .content-wrap { grid-template-columns: minmax(0, 630px); } body.app .side-right { display: none; } }

/* Mobile top bar + bottom nav */
.m-top { display: none; }
@media (max-width: 767px) {
  body.app .shell { grid-template-columns: minmax(0, 1fr); }
  body.app .shell > .side-left { display: none; }
  body.app .content-wrap { padding: 0 0 70px; gap: 0; grid-template-columns: minmax(0, 1fr) !important; }
  .m-top {
    display: flex; position: sticky; top: 0; z-index: 40; height: 54px; align-items: center; gap: 6px; padding: 0 8px 0 14px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .m-top .logo { height: 26px; width: auto; }
  html[data-mode="dark"] .m-top .logo { filter: brightness(1.4); }
  .m-top .sp { flex: 1; }
  .m-top .ib { position: relative; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.45rem; color: var(--text); background: none; border: 0; cursor: pointer; }
  .m-top .ib .badge-dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--like); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); }
  body.app .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; justify-content: space-around; align-items: center;
    height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  body.app .bottom-nav a { display: grid; place-items: center; width: 56px; height: 48px; font-size: 1.55rem; color: var(--text); position: relative; background: none; border-radius: 0; }
  body.app .bottom-nav a.create { background: none; color: var(--text); width: 56px; height: 48px; font-size: 1.6rem; }
  body.app .bottom-nav a .avatar { --size: 27px; }
  body.app .bottom-nav a.active .avatar { outline: 2px solid var(--text); outline-offset: 1px; }
  body.app .bottom-nav .dot-badge { top: 6px; right: 10px; border-color: var(--surface); }
  body.app .card.flush-sm { border-radius: 0; border-left: 0; border-right: 0; }
}
@media (min-width: 768px) { body.app .bottom-nav { display: none; } .only-m { display: none !important; } }
@media (max-width: 767px) { .only-d { display: none !important; } }

/* ---------------- Stories tray ---------------- */
.story-tray { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.story-tray::-webkit-scrollbar { display: none; }
@media (max-width: 767px) { .story-tray { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); gap: 12px; } }
.st { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--text); scroll-snap-align: start; }
.st .ring { padding: 2.5px; background: conic-gradient(from 200deg, #f59e0b, #d9480f, #2f7a38, #7ac142, #f59e0b); border-radius: 50%; }
.st .ring.close { background: #22c55e; }
.st .ring.seen { background: var(--border); }
.st .ring > .avatar, .st .ring > img { --size: 60px; border: 2.5px solid var(--surface); display: block; }
.st .name { font-size: .72rem; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st .name.seen { color: var(--muted); }
.st .add { position: relative; }
.st .add .avatar { --size: 65px; border: 0; }
.st .add .plus { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: #0095f6; color: #fff; display: grid; place-items: center; font-size: .9rem; border: 2.5px solid var(--surface); }
.st .wave { position: absolute; }

/* ---------------- Story viewer ---------------- */
.sv { position: fixed; inset: 0; z-index: 200; background: #1a1a1a; display: grid; place-items: center; color: #fff; }
.sv .frame { position: relative; width: min(420px, 100vw); height: min(92vh, 100vh); max-height: 100dvh; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: #000; }
@media (max-width: 520px) { .sv .frame { width: 100vw; height: 100dvh; border-radius: 0; } }
.sv .sv-media { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.sv .sv-media img, .sv .sv-media video { width: 100%; height: 100%; object-fit: contain; }
.sv .top { position: absolute; top: 0; left: 0; right: 0; padding: 10px 10px 30px; background: linear-gradient(rgba(0,0,0,.55), transparent); z-index: 3; }
.sv .bars { display: flex; gap: 3px; }
.sv .bars span { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sv .bars span i { display: block; height: 100%; width: 0; background: #fff; }
.sv .who { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; font-size: .9rem; }
.sv .who a { color: #fff; display: flex; align-items: center; gap: 8px; }
.sv .who .t { color: rgba(255,255,255,.7); font-weight: 400; }
.sv .who .sp { flex: 1; }
.sv .who button { color: #fff; background: none; border: 0; font-size: 1.35rem; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; }
.sv .cf { background: #22c55e; color: #fff; font-size: .62rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.sv .nav-l, .sv .nav-r { position: absolute; top: 70px; bottom: 90px; width: 35%; z-index: 2; cursor: pointer; }
.sv .nav-l { left: 0; } .sv .nav-r { right: 0; }
.sv .caption { position: absolute; left: 0; right: 0; bottom: 78px; padding: 30px 16px 10px; text-align: center; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.8); z-index: 2; white-space: pre-line; }
.sv .link-sticker { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: #fff; color: #111; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.sv .link-sticker img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.sv .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; display: flex; align-items: center; gap: 10px; z-index: 3; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.sv .reply { flex: 1; display: flex; }
.sv .reply input { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 999px; padding: 11px 16px; outline: none; font-size: .9rem; }
.sv .reply input::placeholder { color: rgba(255,255,255,.8); }
.sv .reacts { display: flex; gap: 2px; }
.sv .reacts button, .sv .bottom .ib { width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 1.45rem; cursor: pointer; display: grid; place-items: center; border-radius: 50%; transition: transform .15s; }
.sv .reacts button:hover { transform: scale(1.15); }
.sv .reacts button.on { background: rgba(255,255,255,.18); }
.sv .reacts button i { color: var(--c); }
.sv .owner-bar { display: flex; align-items: center; gap: 14px; flex: 1; }
.sv .owner-bar button { background: none; border: 0; color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; font-size: .9rem; }
.sv .owner-bar button i { font-size: 1.3rem; }
.sv .close-x { position: absolute; top: 14px; right: 14px; z-index: 5; color: #fff; font-size: 1.8rem; background: none; border: 0; cursor: pointer; }
@media (max-width: 520px) { .sv .close-x { display: none; } }
.sv .burst { position: absolute; left: 50%; top: 45%; z-index: 6; font-size: 5rem; transform: translate(-50%, -50%) scale(.3); opacity: 0; pointer-events: none; animation: burst .7s ease forwards; }
@keyframes burst { 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
.sv .paused-note { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 4; font-size: 3rem; opacity: .8; display: none; }
.sv.paused .paused-note { display: block; }

/* Bottom sheet (orodha ya waliotazama, share, menus) */
.sheet-bg { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@media (min-width: 768px) { .sheet-bg { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100vw); max-height: 82vh; display: flex; flex-direction: column; background: var(--surface-strong, #fff); color: var(--text); border-radius: 16px 16px 0 0; animation: up .25s ease; overflow: hidden; }
@media (min-width: 768px) { .sheet { border-radius: 14px; max-height: 76vh; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 8px auto 2px; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.sheet .sh-head button { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--text); }
.sheet .sh-body { overflow-y: auto; padding: 6px 0; }
.sheet .sh-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.sheet .sh-row .grow .n { font-weight: 600; font-size: .9rem; }
.sheet .sh-row .grow .s { font-size: .78rem; color: var(--muted); }
.sheet .sh-actions { display: flex; flex-direction: column; }
.sheet .sh-actions > * { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-size: .95rem; cursor: pointer; color: var(--text); width: 100%; }
.sheet .sh-actions > *:first-child { border-top: 0; }
.sheet .sh-actions > * i { font-size: 1.25rem; width: 24px; text-align: center; }
.sheet .sh-actions .danger { color: var(--danger); font-weight: 600; }
.sheet .share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 16px; }
.sheet .share-grid button, .sheet .share-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--text); font-size: .74rem; }
.sheet .share-grid .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--field); }
.sheet .pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px 16px; }
.sheet .pick label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .74rem; cursor: pointer; text-align: center; position: relative; }
.sheet .pick input { position: absolute; opacity: 0; }
.sheet .pick input:checked + .avatar { outline: 3px solid #0095f6; outline-offset: 2px; }
.sheet .sh-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }

/* ---------------- Post (IG) ---------------- */
body.app .post { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 0 14px; margin: 0; overflow: visible; box-shadow: none; }
body.app .stack > .post + .post, body.app .feed-list > * + * { margin-top: 14px; }
body.app .post-head { padding: 6px 0 10px; gap: 10px; }
@media (max-width: 767px) { body.app .post-head { padding: 8px 12px 8px; } body.app .post .px { padding-left: 12px; padding-right: 12px; } body.app .post { padding-bottom: 12px; } }
body.app .post-head .avatar { --size: 36px; }
body.app .post-head .ring { padding: 2px; }
body.app .post-head .ring > .avatar { --size: 34px; border-width: 2px; border-color: var(--surface); }
body.app .post-head .name { font-weight: 600; font-size: .9rem; gap: 4px; }
body.app .post-head .name .dot { color: var(--muted); font-weight: 400; }
body.app .post-head .name time { color: var(--muted); font-weight: 400; }
body.app .post-head .meta { font-size: .76rem; color: var(--text); }
body.app .post-head .meta .muted { color: var(--muted); }
body.app .post-head .follow-inline { color: #0095f6; font-weight: 700; background: none; border: 0; cursor: pointer; padding: 0 0 0 2px; font-size: .88rem; }
body.app .post .opts { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--text); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.social-proof { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); padding: 0 0 8px; }
@media (max-width: 767px) { .social-proof { padding: 8px 12px 0; } }
.social-proof .faces { display: flex; }
.social-proof .faces .avatar { --size: 18px; border: 1.5px solid var(--surface); margin-left: -5px; font-size: .5rem; }
.social-proof .faces .avatar:first-child { margin-left: 0; }
.social-proof b { color: var(--text); font-weight: 600; }
.repost-bar { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); padding: 0 0 6px; font-weight: 600; }
@media (max-width: 767px) { .repost-bar { padding: 8px 12px 0; } }

/* Media carousel (picha + video) */
body.app .media { position: relative; background: #000; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); user-select: none; }
@media (max-width: 767px) { body.app .media { border-radius: 0; border-left: 0; border-right: 0; } }
body.app .media .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
body.app .media .slide { flex: none; width: 100%; position: relative; scroll-snap-align: center; aspect-ratio: var(--ar, 4 / 5); background: #000; display: grid; place-items: center; }
body.app .media.single .slide { aspect-ratio: auto; max-height: 700px; }
body.app .media .slide img, body.app .media .slide video { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 700px; }
body.app .media.single .slide img { object-fit: contain; height: auto; max-height: 700px; }
body.app .media.single .slide video { object-fit: contain; height: auto; max-height: 700px; }
body.app .media .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #111; display: grid; place-items: center; cursor: pointer; z-index: 3; font-size: .9rem; box-shadow: 0 2px 6px rgba(0,0,0,.2); opacity: 0; transition: opacity .2s; }
body.app .media:hover .nav { opacity: 1; }
body.app .media .nav.prev { left: 10px; } body.app .media .nav.next { right: 10px; }
body.app .media .nav[hidden] { display: none; }
@media (hover: none) { body.app .media .nav { display: none; } }
body.app .media .count { top: 12px; right: 12px; background: rgba(20,20,20,.7); z-index: 3; }
body.app .media .vbtn { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20,20,20,.7); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: .9rem; }
body.app .media .play-ic { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; color: #fff; font-size: 4rem; opacity: 0; transition: opacity .2s; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
body.app .media .slide.paused .play-ic { opacity: .9; }
body.app .media .vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.25); z-index: 3; }
body.app .media .vprog i { display: block; height: 100%; width: 0; background: #fff; }
body.app .media .heart-burst { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; }
body.app .media .heart-burst i { font-size: 6rem; color: #fff; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); animation: hb .9s ease forwards; }
@keyframes hb { 0% { transform: scale(0); opacity: 0; } 15% { transform: scale(1.2); opacity: 1; } 30% { transform: scale(.95); } 45%, 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } }
body.app .media .dots { bottom: -22px; }
body.app .media .dots span { background: var(--border); width: 6px; height: 6px; }
body.app .media .dots span.on { background: #0095f6; }
body.app .media.multi { margin-bottom: 0; overflow: visible; }
body.app .media.multi .track { border-radius: inherit; }
body.app .media .sold-ribbon { position: absolute; left: 12px; top: 12px; z-index: 3; background: #111; color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .06em; padding: 5px 10px; border-radius: 6px; }
body.app .media .sold-ribbon.few { background: var(--price); }
body.app .media .sold-ribbon.available { background: #16a34a; }

/* Soko: bei kubwa kwenye post */
.trade-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 10px; border-radius: 10px; background: color-mix(in srgb, var(--price) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--price) 22%, transparent); }
@media (max-width: 767px) { .trade-card { margin: 0 12px 10px; } }
.trade-card .price { font-size: 1.35rem; font-weight: 800; color: var(--price); letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.trade-card .price small { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.trade-card .specs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.trade-card .spec { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; }
.trade-card .spec i { color: var(--muted); }
.trade-card .total { font-size: .74rem; color: var(--muted); width: 100%; }
.trade-card .offer-btn { margin-left: auto; }
.stock-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.stock-pill.available { background: #dcfce7; color: #166534; } .stock-pill.few { background: #ffedd5; color: #9a3412; } .stock-pill.sold { background: #111; color: #fff; }
html[data-mode="dark"] .stock-pill.available { background: #14532d; color: #bbf7d0; } html[data-mode="dark"] .stock-pill.few { background: #7c2d12; color: #fed7aa; }

/* Actions */
body.app .post-actions { padding: 8px 0 0; gap: 2px; }
@media (max-width: 767px) { body.app .post-actions { padding: 6px 6px 0; } }
body.app .post-actions .act { padding: 8px; font-size: 1.5rem; border-radius: 50%; }
body.app .post-actions .act:hover { background: none; opacity: .6; }
body.app .post-actions .act.liked { color: var(--like); }
body.app .post-actions .act.saved, body.app .post-actions .act.reposted { color: var(--text); }
body.app .post-actions .act.reposted { color: #16a34a; }
body.app .post-actions .dots-slot { flex: 1; display: flex; justify-content: center; gap: 4px; }
body.app .post-actions .dots-slot span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
body.app .post-actions .dots-slot span.on { background: #0095f6; }
body.app .post-stats { padding: 2px 0 4px; font-size: .9rem; font-weight: 600; }
body.app .post-caption { padding: 0 0 4px; font-size: .9rem; white-space: pre-line; word-wrap: break-word; }
body.app .post-caption.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.app .post-caption .who { font-weight: 600; margin-right: 5px; }
body.app .more-link { padding: 0; margin: 0 0 4px; color: var(--muted); font-weight: 400; font-size: .9rem; }
body.app .post-comments { padding: 2px 0 0; font-size: .88rem; }
body.app .post-comments .c { display: flex; gap: 6px; margin-bottom: 2px; }
body.app .post-comments .c b { margin: 0; font-weight: 600; }
body.app .view-comments { color: var(--muted); font-size: .88rem; display: inline-block; padding: 2px 0; }
body.app .post-time { font-size: .74rem; color: var(--muted); text-transform: none; letter-spacing: 0; padding-top: 4px; }
body.app[data-time-case="capitalize"] .post-time a { text-transform: capitalize; }
body.app[data-time-case="upper"] .post-time { font-size: .7rem; letter-spacing: .02em; }
body.app[data-time-case="upper"] .post-time a { text-transform: uppercase; }
body.app .comment-form { border-top: 0; padding: 6px 0 0; }
body.app .comment-form input { font-size: .88rem; }
body.app .comment-form button { color: #0095f6; font-weight: 700; }
body.app .comment-form button:disabled { opacity: .4; }
@media (max-width: 767px) { body.app :is(.post-stats, .post-caption, .more-link, .post-comments, .view-comments, .post-time, .comment-form, .poll, .place-line) { margin-left: 12px; margin-right: 12px; } }
.place-line { font-size: .76rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }

/* Poll */
.poll { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.poll .opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; overflow: hidden; font-weight: 600; font-size: .9rem; text-align: left; color: var(--text); }
.poll .opt .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--primary) 16%, transparent); transition: width .5s ease; z-index: 0; }
.poll .opt > span { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.poll .opt.mine { border-color: var(--primary); }
.poll .opt.mine .bar { background: color-mix(in srgb, var(--primary) 26%, transparent); }
.poll .meta { font-size: .76rem; color: var(--muted); }

/* Caught up */
.caught-up { text-align: center; padding: 30px 10px; border-bottom: 1px solid var(--border); }
.caught-up .ic { width: 80px; height: 80px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: conic-gradient(from 200deg, #f59e0b, #d9480f, #2f7a38, #7ac142, #f59e0b); }
.caught-up h3 { margin: 0 0 2px; font-size: 1.1rem; }

/* Feed tabs (IG "For you / Following") */
.feed-tabs { display: flex; gap: 22px; padding: 4px 0 12px; font-weight: 700; font-size: .95rem; }
@media (max-width: 767px) { .feed-tabs { padding: 12px 14px 4px; } }
.feed-tabs a { color: var(--faint); display: flex; align-items: center; gap: 6px; }
.feed-tabs a.active { color: var(--text); }
.feed-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 0 14px; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.feed-chips::-webkit-scrollbar { display: none; }
@media (max-width: 767px) { .feed-chips { padding: 8px 12px 12px; } }

/* Widgets za pembeni */
.me-row { display: flex; align-items: center; gap: 12px; }
.me-row .avatar { --size: 44px; }
.me-row .n { font-weight: 600; font-size: .88rem; }
.me-row .s { color: var(--muted); font-size: .82rem; }
.side-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.side-title a { color: var(--text); font-size: .76rem; }
body.app .mini-user .avatar { --size: 40px; }
body.app .mini-user .n { font-size: .84rem; font-weight: 600; }
body.app .mini-user .s { font-size: .74rem; }
.text-btn { background: none; border: 0; color: #0095f6; font-weight: 700; font-size: .78rem; cursor: pointer; padding: 0; }
.text-btn.muted { color: var(--text); }
.tip-card { border-radius: 12px !important; padding: 14px !important; background: color-mix(in srgb, var(--primary) 8%, var(--surface)) !important; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent) !important; }
.tip-card .h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .82rem; color: var(--primary); margin-bottom: 4px; }
html[data-mode="dark"] .tip-card .h { color: var(--accent); }
.price-mini { display: flex; flex-direction: column; }
.price-mini a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .84rem; }
.price-mini .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--field); flex: none; }
.price-mini .v { margin-left: auto; font-weight: 700; white-space: nowrap; }
.chg { font-size: .72rem; font-weight: 700; }
.chg.up { color: #16a34a; } .chg.down { color: var(--danger); }
.meter { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; }
.streak-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #fff1e6; color: #c2410c; font-weight: 800; font-size: .74rem; }
html[data-mode="dark"] .streak-pill { background: #431407; color: #fdba74; }
.level-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: .72rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.online-dot { position: relative; }
.online-dot::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface); }

/* ---------------- Composer (picha + video nyingi) ---------------- */
dialog.modal.composer-x { width: min(640px, calc(100vw - 16px)); border-radius: 14px; background: var(--surface-strong); }
.composer-x .modal-head { padding: 12px 16px; }
.composer-x .modal-head h3 { font-size: 1rem; }
.composer-x .modal-body { padding: 14px 16px; }
.mpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.mpick .it { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; cursor: grab; border: 2px solid transparent; }
.mpick .it.dragging { opacity: .4; }
.mpick .it.over { border-color: #0095f6; }
.mpick .it img, .mpick .it video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mpick .it .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: .8rem; }
.mpick .it .ix { position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: #0095f6; color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.mpick .it .vd { position: absolute; left: 6px; bottom: 5px; color: #fff; font-size: .72rem; font-weight: 700; display: flex; gap: 4px; align-items: center; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.mpick .it .err { position: absolute; inset: 0; background: rgba(220, 38, 38, .8); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; text-align: center; padding: 6px; }
.mpick .add { aspect-ratio: 1; border-radius: 10px; border: 2px dashed var(--border); display: grid; place-items: center; cursor: pointer; color: var(--muted); text-align: center; font-size: .74rem; font-weight: 600; }
.mpick .add i { font-size: 1.6rem; display: block; }
.mpick .add:hover { border-color: var(--primary); color: var(--primary); }
.drop-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 16px; border: 2px dashed var(--border); border-radius: 12px; cursor: pointer; color: var(--muted); text-align: center; margin-bottom: 12px; }
.drop-big i.big { font-size: 2.6rem; color: var(--text); }
.drop-big.over { border-color: #0095f6; background: color-mix(in srgb, #0095f6 6%, transparent); }
.comp-tools { display: flex; gap: 4px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin: 10px 0; }
.comp-tools button, .comp-tools label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--text); }
.comp-tools button:hover, .comp-tools label:hover, .comp-tools .on { background: var(--field); }
.comp-tools i { font-size: 1.1rem; }
.comp-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.comp-sec .t { font-weight: 700; font-size: .84rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.upbar { height: 4px; background: var(--field); border-radius: 2px; overflow: hidden; margin-top: 10px; display: none; }
.upbar.on { display: block; }
.upbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.mention-pop { position: absolute; z-index: 300; min-width: 240px; max-height: 260px; overflow-y: auto; background: var(--surface-strong); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; }
.mention-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; cursor: pointer; border-radius: 8px; text-align: left; color: var(--text); }
.mention-pop button:hover, .mention-pop button.on { background: var(--surface-hover); }
.mention-pop .avatar { --size: 30px; }
.mention-pop .s { font-size: .74rem; color: var(--muted); }

/* ---------------- Profile (IG) ---------------- */
.ig-profile { padding: 10px 0 0; }
.ig-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 30px; align-items: start; padding: 0 16px 24px; }
.ig-head .pic { display: flex; justify-content: center; }
.ig-head .pic .avatar { --size: 150px; font-size: 3.2rem; }
.ig-head .pic .ring { padding: 4px; cursor: pointer; }
.ig-head .pic .ring > .avatar { --size: 142px; border: 4px solid var(--surface); }
.ig-head .l1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ig-head .uname { font-size: 1.25rem; font-weight: 400; margin-right: 8px; display: flex; align-items: center; gap: 4px; }
.ig-head .stats { display: flex; gap: 36px; margin-bottom: 14px; font-size: 1rem; }
.ig-head .stats a, .ig-head .stats span { color: var(--text); }
.ig-head .stats b { font-weight: 700; }
.ig-head .name { font-weight: 700; font-size: .92rem; }
.ig-head .cat { color: var(--muted); font-size: .88rem; }
.ig-head .bio { white-space: pre-line; font-size: .9rem; margin: 2px 0; }
.ig-head .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.ig-head .facts i { margin-right: 3px; }
.ig-head .mutual { font-size: .78rem; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.ig-head .trust { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.trust-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--field); font-size: .76rem; font-weight: 700; }
.trust-chip .bi-star-fill { color: #f59e0b; }
.trust-chip.fast i { color: #16a34a; }
.ig-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ig-btns .btn { padding: 7px 16px; font-size: .88rem; }
.m-stats { display: none; }
@media (max-width: 767px) {
  .ig-head { grid-template-columns: 86px minmax(0, 1fr); gap: 18px; padding: 14px 14px 12px; }
  .ig-head .pic .avatar { --size: 86px; font-size: 1.9rem; }
  .ig-head .pic .ring > .avatar { --size: 80px; border-width: 3px; }
  .ig-head .stats { display: none; }
  .ig-head .l1 { margin-bottom: 8px; }
  .ig-head .uname { font-size: 1.1rem; }
  .ig-head .desc { grid-column: 1 / -1; }
  .m-stats { display: flex; justify-content: space-around; text-align: center; border-top: 1px solid var(--border); padding: 10px 0; font-size: .82rem; color: var(--muted); }
  .m-stats b { display: block; color: var(--text); font-size: .95rem; }
  .ig-btns { width: 100%; } .ig-btns .btn { flex: 1; }
}
.hl-row { display: flex; gap: 22px; overflow-x: auto; padding: 4px 16px 26px; scrollbar-width: none; }
.hl-row::-webkit-scrollbar { display: none; }
.hl { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 80px; background: none; border: 0; cursor: pointer; color: var(--text); padding: 0; }
.hl .c { width: 78px; height: 78px; border-radius: 50%; padding: 3px; border: 1px solid var(--border); background: var(--surface); }
.hl .c img, .hl .c span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--field); font-size: 1.6rem; color: var(--muted); }
.hl .t { font-size: .74rem; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) { .hl-row { gap: 14px; padding: 4px 14px 14px; } .hl { width: 66px; } .hl .c { width: 64px; height: 64px; } }
.ig-tabs { display: flex; justify-content: center; gap: 56px; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ig-tabs a { display: flex; align-items: center; gap: 6px; padding: 14px 0; margin-top: -1px; border-top: 1px solid transparent; color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.ig-tabs a.active { color: var(--text); border-top-color: var(--text); }
.ig-tabs a i { font-size: .9rem; }
@media (max-width: 767px) { .ig-tabs { gap: 0; justify-content: space-around; } .ig-tabs a { font-size: 0; padding: 12px 10px; border-top: 0; border-bottom: 1px solid transparent; } .ig-tabs a i { font-size: 1.4rem; } .ig-tabs a.active { border-bottom-color: var(--text); } }
body.app .post-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
body.app .post-grid a { aspect-ratio: 4 / 5; border-radius: 0; background: var(--field); }
body.app .post-grid.square a { aspect-ratio: 1; }
body.app .post-grid a:hover img { transform: none; }
body.app .post-grid .overlay { background: rgba(0,0,0,.3); font-size: .95rem; gap: 22px; }
body.app .post-grid .corner { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
body.app .post-grid .pin { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); transform: rotate(45deg); }
body.app .post-grid .price-tag { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.95); color: #111; font-weight: 800; font-size: .74rem; padding: 3px 8px; border-radius: 6px; }
body.app .post-grid .views { position: absolute; left: 8px; bottom: 6px; color: #fff; font-weight: 700; font-size: .8rem; display: flex; gap: 4px; align-items: center; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
body.app .post-grid .sold { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 800; letter-spacing: .1em; font-size: .85rem; }
body.app .post-grid .text-tile { font-size: .8rem; padding: 12px; }
/* Explore: tile kubwa kila baada ya chache (kama IG) */
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 3px; }
.explore-grid a { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--field); display: block; }
.explore-grid a.tall { grid-row: span 2; aspect-ratio: auto; }
.explore-grid a img { width: 100%; height: 100%; object-fit: cover; }
.explore-grid .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 20px; color: #fff; font-weight: 800; background: rgba(0,0,0,.3); opacity: 0; transition: opacity .2s; }
.explore-grid a:hover .overlay { opacity: 1; }
.explore-grid .corner { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.explore-grid .text-tile { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 14px; text-align: center; font-weight: 700; font-size: .85rem; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, #000), var(--accent)); color: #fff; }
.explore-grid .price-tag { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.95); color: #111; font-weight: 800; font-size: .74rem; padding: 3px 8px; border-radius: 6px; }
.tag-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; }
.tag-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--field); font-weight: 700; font-size: .82rem; }
.tag-chips a span { color: var(--muted); font-weight: 500; }
.search-top { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-top .input-icon { flex: 1; }
@media (max-width: 767px) { .search-top, .tag-chips, .filters-x { padding-left: 12px; padding-right: 12px; } .search-top { padding-top: 10px; } }

/* ---------------- Reels ---------------- */
body.reels-page { background: #000; }
body.reels-page .content-wrap { padding: 0 !important; }
.reels { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; background: #000; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.reel .stage { position: relative; height: calc(100dvh - 32px); aspect-ratio: 9 / 16; max-width: 100vw; border-radius: 8px; overflow: hidden; background: #111; }
@media (max-width: 767px) { .reel .stage { height: 100dvh; width: 100vw; border-radius: 0; aspect-ratio: auto; } .reels { height: calc(100dvh - 52px); } .reel { height: calc(100dvh - 52px); } .reel .stage { height: calc(100dvh - 52px); } }
.reel video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.reel .info { position: absolute; left: 0; right: 64px; bottom: 0; padding: 60px 14px 18px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); z-index: 2; }
.reel .info .u { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.reel .info .u a { color: #fff; display: flex; align-items: center; gap: 8px; }
.reel .info .u .avatar { --size: 32px; }
.reel .info .u button { background: none; border: 1px solid rgba(255,255,255,.7); color: #fff; border-radius: 8px; padding: 3px 10px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.reel .info .cap { font-size: .88rem; max-height: 3.2em; overflow: hidden; }
.reel .info .cap a { color: #fff; font-weight: 700; }
.reel .info .price-chip { display: inline-flex; margin-top: 8px; background: #fff; color: #111; font-weight: 800; padding: 5px 10px; border-radius: 8px; font-size: .84rem; gap: 6px; align-items: center; }
.reel .side { position: absolute; right: 8px; bottom: 20px; z-index: 3; display: flex; flex-direction: column; gap: 16px; align-items: center; color: #fff; }
.reel .side button, .reel .side a { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: .74rem; font-weight: 600; }
.reel .side i { font-size: 1.7rem; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.reel .side .liked i { color: var(--like); }
.reel .mute { position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.reel .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.2); z-index: 3; }
.reel .prog i { display: block; height: 100%; width: 0; background: #fff; }
.reel .heart-burst { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; }
.reel .heart-burst i { font-size: 7rem; color: #fff; animation: hb .9s ease forwards; }
.reel .paused-ic { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; color: #fff; font-size: 4.5rem; opacity: 0; transition: opacity .2s; }
.reel.paused .paused-ic { opacity: .85; }
.reels-head { position: fixed; top: 0; left: var(--rail-w); right: 0; z-index: 30; padding: 14px 18px; color: #fff; font-weight: 800; font-size: 1.2rem; pointer-events: none; }
@media (max-width: 767px) { .reels-head { left: 0; } }

/* ---------------- Messages (IG DM) ---------------- */
body.app .dm { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: 100vh; border-left: 0; }
body.app .dm .list { border-right: 1px solid var(--border); overflow-y: auto; }
body.app .dm .list .head { padding: 26px 20px 14px; font-weight: 800; font-size: 1.2rem; display: flex; justify-content: space-between; align-items: center; }
body.app .dm .li { display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
body.app .dm .li:hover { background: var(--surface-hover); }
body.app .dm .li.active { background: var(--field); }
body.app .dm .li .avatar { --size: 54px; }
body.app .dm .li .n { font-size: .9rem; }
body.app .dm .li .p { font-size: .8rem; color: var(--muted); display: flex; gap: 4px; }
body.app .dm .li.unread .n, body.app .dm .li.unread .p { font-weight: 700; color: var(--text); }
body.app .dm .li .ud { width: 8px; height: 8px; border-radius: 50%; background: #0095f6; flex: none; }
body.app .dm .chat { height: 100vh; display: flex; flex-direction: column; min-height: 0; }
body.app .dm .chat-head { padding: 12px 18px; height: 74px; border-bottom: 1px solid var(--border); }
body.app .dm .chat-body { flex: 1; overflow-y: auto; padding: 18px; gap: 3px; }
body.app .msg { max-width: min(70%, 520px); padding: 8px 13px; border-radius: 20px; background: var(--field); font-size: .92rem; }
body.app .msg.me { background: #3797f0; color: #fff; border-bottom-right-radius: 20px; }
body.app .msg.me + .msg.me, body.app .msg.them + .msg.them { margin-top: 1px; }
body.app .msg time { font-size: .62rem; }
body.app .msg.media { padding: 3px; background: none; }
body.app .msg.media img { max-width: 260px; max-height: 340px; border-radius: 16px; display: block; cursor: zoom-in; }
body.app .msg.voice { display: flex; align-items: center; gap: 10px; min-width: 200px; }
body.app .msg.voice button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.25); color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; }
body.app .msg.them.voice button { background: var(--surface); }
body.app .msg.voice .wave { flex: 1; height: 24px; display: flex; align-items: center; gap: 2px; }
body.app .msg.voice .wave i { flex: 1; background: currentColor; opacity: .55; border-radius: 1px; }
body.app .msg.voice .wave i.p { opacity: 1; }
body.app .msg .shared { display: block; width: 240px; border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--text); border: 1px solid var(--border); margin: 2px 0; }
body.app .msg .shared .h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; font-size: .8rem; }
body.app .msg .shared img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
body.app .msg .shared .b { padding: 8px 10px; font-size: .8rem; color: var(--muted); }
body.app .msg.offer { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 12px 14px; }
body.app .msg.offer .ot { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 6px; align-items: center; }
body.app .msg.offer .op { font-size: 1.25rem; font-weight: 800; color: var(--price); margin: 2px 0 6px; }
body.app .msg.offer .oa { display: flex; gap: 8px; margin-top: 8px; }
body.app .msg.story-reply .sr { display: flex; gap: 8px; align-items: center; font-size: .72rem; opacity: .85; margin-bottom: 4px; }
body.app .msg.story-reply .sr img { width: 34px; height: 54px; object-fit: cover; border-radius: 6px; }
body.app .seen-line { align-self: flex-end; font-size: .7rem; color: var(--muted); padding: 2px 6px; }
body.app .typing { align-self: flex-start; display: none; gap: 3px; padding: 12px 14px; border-radius: 20px; background: var(--field); }
body.app .typing.on { display: flex; }
body.app .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tp 1.2s infinite; }
body.app .typing i:nth-child(2) { animation-delay: .15s; } body.app .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
body.app .chat-form { padding: 12px 16px 16px; border-top: 0; }
body.app .chat-bar { flex: 1; display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 22px; padding: 4px 6px 4px 12px; }
body.app .chat-bar input[name=body] { flex: 1; border: 0; background: none; outline: none; padding: 8px 4px; font-size: .92rem; color: var(--text); }
body.app .chat-bar .ib { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--text); font-size: 1.25rem; cursor: pointer; display: grid; place-items: center; }
body.app .chat-bar .send { color: #0095f6; font-weight: 700; background: none; border: 0; cursor: pointer; padding: 0 10px; }
body.app .chat-bar.recording { border-color: var(--danger); }
body.app .rec-ind { display: none; align-items: center; gap: 8px; color: var(--danger); font-weight: 700; font-size: .86rem; flex: 1; }
body.app .chat-bar.recording .rec-ind { display: flex; }
body.app .chat-bar.recording input[name=body] { display: none; }
body.app .rec-ind i { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
body.app .quick-replies { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
body.app .quick-replies button { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 600; cursor: pointer; }
@media (max-width: 900px) {
  body.app .dm { grid-template-columns: 1fr; height: calc(100dvh - 52px); }
  body.app .dm.has-active .list { display: none; }
  body.app .dm:not(.has-active) .chat-pane { display: none; }
  body.app .dm .chat { height: calc(100dvh - 52px); }
  body.app .dm .chat-head { height: 60px; }
}
@media (max-width: 767px) { body.app.chat-open .m-top, body.app.chat-open .bottom-nav { display: none; } body.app.chat-open .dm, body.app.chat-open .dm .chat { height: 100dvh; } }

/* ---------------- Notifications ---------------- */
.ntf-group { font-weight: 700; font-size: 1rem; padding: 18px 0 8px; }
@media (max-width: 767px) { .ntf-group { padding: 16px 14px 6px; } }
.ntf { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: .88rem; }
@media (max-width: 767px) { .ntf { padding: 8px 14px; } }
.ntf .avatar { --size: 44px; }
.ntf .ic-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--field); font-size: 1.2rem; flex: none; }
.ntf.unread { background: color-mix(in srgb, #0095f6 5%, transparent); border-radius: 10px; }
.ntf .t { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.ntf .k { width: 44px; text-align: center; font-size: 1.1rem; }

/* ---------------- Misc ---------------- */
.skel { background: linear-gradient(90deg, var(--field) 25%, color-mix(in srgb, var(--field) 60%, var(--surface)) 50%, var(--field) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }
.skel-post { padding: 10px 0 20px; }
.skel-post .h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.skel-post .h .a { width: 36px; height: 36px; border-radius: 50%; }
.skel-post .h .l { height: 12px; width: 140px; }
.skel-post .m { aspect-ratio: 1; width: 100%; }
.ptr { position: fixed; top: 60px; left: 50%; transform: translate(-50%, -80px); z-index: 60; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-strong); box-shadow: var(--shadow-lg); display: grid; place-items: center; transition: transform .2s; color: var(--text); }
.ptr.spin i { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.install-bar { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.install-bar img { width: 44px; height: 44px; border-radius: 10px; }
.install-bar .grow .n { font-weight: 700; font-size: .9rem; }
.install-bar .grow .s { font-size: .78rem; color: var(--muted); }
@media (max-width: 767px) { .install-bar { margin: 10px 12px 0; } }
.offline-banner { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 90; background: #111; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600; display: none; align-items: center; gap: 8px; }
body.is-offline .offline-banner { display: flex; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-head h1 { font-size: 1.4rem; margin: 0; }
@media (max-width: 767px) { .page-head { padding: 12px 14px 0; } .pad-m { padding-left: 12px; padding-right: 12px; } }
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.board td { padding: 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.board td .ic { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--field); margin-right: 8px; }
.board .p { font-weight: 800; color: var(--price); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lb-row .rk { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.lb-row .rk.top { color: #f59e0b; font-size: 1.1rem; }
.lb-row .pts { font-weight: 800; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.badge-x { text-align: center; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); }
.badge-x i { font-size: 1.9rem; color: var(--c); display: block; margin-bottom: 6px; }
.badge-x.locked { opacity: .4; filter: grayscale(1); }
.badge-x .n { font-size: .76rem; font-weight: 700; }
.badges-inline { display: flex; gap: 6px; flex-wrap: wrap; }
.badges-inline i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-size: .9rem; }
.stars { display: inline-flex; gap: 1px; color: #f59e0b; }
.stars .off { color: var(--border); }
.rate-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-input input { display: none; }
.rate-input label { font-size: 1.7rem; color: var(--border); cursor: pointer; }
.rate-input input:checked ~ label, .rate-input label:hover, .rate-input label:hover ~ label { color: #f59e0b; }
.crop-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.crop-pick input { display: none; }
.crop-pick span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; font-weight: 700; font-size: .86rem; text-align: center; }
.crop-pick span i { font-size: 1.6rem; color: var(--primary); }
.crop-pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.92); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 6px; }
.dsaver .media video[data-autoplay] { display: none; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kv > div { padding: 14px; border-radius: 12px; background: var(--field); }
.kv b { display: block; font-size: 1.4rem; }
.kv span { font-size: .78rem; color: var(--muted); }

/* Comments (IG) */
body.app .comments-list .comment { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
body.app .comments-list .comment .avatar.sm { --size: 32px; }
body.app .comments-list .comment.reply { margin: 12px 0 0; }
body.app .comments-list .cbody { font-size: .88rem; word-wrap: break-word; }
body.app .comments-list .cmeta { display: flex; gap: 14px; font-size: .74rem; color: var(--muted); margin-top: 4px; font-weight: 600; }
body.app .comments-list .cmeta button { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; font-size: .74rem; cursor: pointer; }
body.app .comments-list .clike { background: none; border: 0; cursor: pointer; font-size: .8rem; color: var(--muted); padding: 6px 0 0; }
body.app .comments-list .clike.on { color: var(--like); }
body.app .more-replies { background: none; border: 0; color: var(--muted); font-size: .76rem; font-weight: 600; cursor: pointer; padding: 10px 0 0; display: flex; align-items: center; gap: 10px; }
body.app .more-replies::before { content: ""; width: 24px; height: 1px; background: var(--muted); }
.reply-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; background: var(--field); border-radius: 8px; font-size: .78rem; margin-bottom: 6px; }
.reply-chip button { background: none; border: 0; cursor: pointer; color: var(--muted); }
@media (max-width: 767px) { .ig-head .desc-wrap { display: contents; } .ig-head .l1 { grid-column: 2; align-self: center; } }
body.dm-page .content-wrap { padding: 0 !important; grid-template-columns: minmax(0, 1fr) !important; }
body.dm-page .main { max-width: none; }
@media (max-width: 767px) { body.dm-page .content-wrap { padding: 0 !important; } }
.quick-compose { display: flex; align-items: center; gap: 10px; padding: 4px 0 14px; }
@media (max-width: 767px) { .quick-compose { padding: 10px 12px; border-bottom: 1px solid var(--border); } }
.quick-compose .fake { flex: 1; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 10px 16px; cursor: pointer; font-size: .9rem; }
.quick-compose .fake:hover { background: var(--surface-hover); }
.quick-compose .qc-ic { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.quick-compose .qc-ic:hover { background: var(--surface-hover); }
.trade-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.trade-card .specs { grid-column: 1 / -1; order: 3; }
.trade-card .total { grid-column: 1 / -1; order: 4; }
.trade-card .offer-btn { margin-left: 0; }
.trade-card .price:only-child { grid-column: 1 / -1; }
@media (max-width: 767px) { .ig-btns .btn.btn-icon { flex: none; width: 36px; height: 34px; } .hl-row { padding-top: 12px; } }

/* ── Chips zenye kiashiria kinachoteleza (Arifa): kidude cheusi kinasogea kwenda tab uliyochagua ── */
.feed-chips[data-chip-slider] { position: relative; scroll-behavior: smooth; cursor: grab; user-select: none; -webkit-user-select: none; }
.feed-chips[data-chip-slider].dragging { cursor: grabbing; scroll-behavior: auto; }
.feed-chips[data-chip-slider].dragging .chip { pointer-events: none; }
.feed-chips[data-chip-slider].at-end { mask-image: linear-gradient(90deg, transparent, #000 12%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); }
.feed-chips[data-chip-slider].at-start.at-end { mask-image: none; -webkit-mask-image: none; }
.feed-chips[data-chip-slider].at-start:not(.at-end) { mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.feed-chips[data-chip-slider].at-mid { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 88%, transparent); }
.feed-chips[data-chip-slider] .chip { position: relative; z-index: 1; flex-shrink: 0; transition: color .28s ease, background-color .2s ease; -webkit-user-drag: none; }
.feed-chips[data-chip-slider] .chip-ind { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 8px; background: var(--text); pointer-events: none;
  transition: transform .38s cubic-bezier(.34, 1.3, .5, 1), width .38s cubic-bezier(.34, 1.3, .5, 1); will-change: transform, width; }
.feed-chips[data-chip-slider].slide-ready .chip.active { background: transparent; color: var(--bg); }
.feed-chips[data-chip-slider].slide-ready .chip:not(.active):hover { background: var(--surface-hover); }
.feed-chips[data-chip-slider].no-anim .chip-ind { transition: none; }
[data-chip-swipe] { transition: transform .22s ease, opacity .22s ease; }
[data-chip-swipe].swipe-out-l { transform: translateX(-28px); opacity: .35; }
[data-chip-swipe].swipe-out-r { transform: translateX(28px); opacity: .35; }
@media (prefers-reduced-motion: reduce) { .feed-chips[data-chip-slider] .chip-ind, [data-chip-swipe] { transition: none; } }

/* ── Switch badala ya checkbox (site nzima): <x-switch> na label.check zote ─────────────── */
.sw-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.sw-row:last-child { border-bottom: 0; }
.sw-row.is-disabled { opacity: .5; cursor: not-allowed; }
.sw-row .sw-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--field); color: var(--primary); flex: none; font-size: 1.05rem; }
.sw-row .sw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-row .sw-txt b { font-weight: 600; font-size: .9rem; }
.sw-row .sw-txt small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.switch input:focus-visible + .slider { outline: 2px solid var(--primary); outline-offset: 2px; }
label.check > input[type="checkbox"] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 38px; height: 22px; border-radius: 22px;
  background: var(--line); cursor: pointer; transition: background .2s; margin: 0; accent-color: initial; }
label.check > input[type="checkbox"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
label.check > input[type="checkbox"]:checked { background: var(--primary); }
label.check > input[type="checkbox"]:checked::before { transform: translateX(16px); }
label.check > input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
label.check > input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
label.check.xs > input[type="checkbox"] { width: 32px; height: 18px; }
label.check.xs > input[type="checkbox"]::before { width: 12px; height: 12px; }
label.check.xs > input[type="checkbox"]:checked::before { transform: translateX(14px); }

/* "Andika comment..." chini ya post: inafungua sehemu ya comments (sheet) */
.comment-open { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; margin-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; cursor: text; text-decoration: none; }
.comment-open span:first-child { flex: 1; }
.comment-open .t { color: #0095f6; font-weight: 700; opacity: .45; font-size: .85rem; }
.comment-open:hover .t { opacity: 1; }
body.app .comment-open { border-top: 0; padding-top: 6px; }
.post-comments[data-cs-open] { cursor: pointer; }
[data-comment-count-bar].bump { animation: ccBump .5s ease; display: inline-block; }
@keyframes ccBump { 40% { transform: scale(1.3); color: var(--primary); } }
@media (max-width: 767px) { body.app .comment-open { margin-left: 12px; margin-right: 12px; } }
body.app .comment-open { padding-bottom: 10px; }

/* Sera ya jina (Mipangilio → Wasifu) */
.name-policy { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .85rem; line-height: 1.45; margin-bottom: 4px; }
.name-policy i { font-size: 1.15rem; margin-top: 1px; }
.name-policy b { display: block; margin-bottom: 2px; }
.name-policy.free { background: color-mix(in srgb, #16a34a 10%, transparent); color: #166534; }
.name-policy.warn { background: color-mix(in srgb, #f59e0b 13%, transparent); color: #92400e; }
.name-policy.locked { background: var(--field); color: var(--muted); }
html[data-theme="dark"] .name-policy.free { color: #86efac; } html[data-theme="dark"] .name-policy.warn { color: #fcd34d; }
[data-name-confirm].shake { animation: npShake .5s; }
@keyframes npShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.input[readonly] { opacity: .7; cursor: not-allowed; }

/* v14 Mahitaji: ujumbe wa "ofa imekubaliwa" kwenye Messages */
body.app .msg.demand { min-width: 220px; }
body.app .msg.demand .ot { font-weight: 800; font-size: .82rem; display: flex; align-items: center; gap: 6px; color: #16a34a; }
body.app .msg.demand .op { font-size: 1.05rem; font-weight: 800; margin: 4px 0 2px; }
