/* Afodabo v5 — muonekano wa Instagram: action bar yenye idadi, WhatsApp kwenye matangazo, mapendekezo ya feed,
   comments sheet, wasifu mpya, banners, story editor, muziki. Inapakiwa baada ya v4.css. */
:root { --wa: #0f7b5f; --ig-blue: #4a5cff; --st-size: 66px; }

/* ---------------- Story tray: ukubwa wa duara unaobadilika ---------------- */
.st { width: calc(var(--st-size) + 10px); }
.st .ring > .avatar, .st .ring > img { --size: calc(var(--st-size) - 6px); }
.st .add .avatar { --size: var(--st-size); }
.st .name { max-width: calc(var(--st-size) + 10px); font-size: clamp(.68rem, calc(var(--st-size) / 90), .8rem); }
.ring-size-pick { max-width: 360px; }
.ring-size-pick .ring-preview { display: flex; justify-content: center; padding: 8px 0 12px; }
.ring-size-pick .ring { display: inline-block; padding: 2.5px; border-radius: 50%; background: conic-gradient(from 200deg, #f59e0b, #d9480f, #2f7a38, #7ac142, #f59e0b); }
.ring-size-pick .ring > .avatar { --size: calc(var(--st-size) - 6px); border: 2.5px solid var(--surface-strong, #fff); display: block; }
.ring-size-pick input[type=range] { width: 100%; accent-color: var(--primary); }

/* ---------------- Post: action bar (icon + idadi pembeni) ---------------- */
body.app .post-actions.ig5 { display: flex; align-items: center; gap: 12px; padding: 8px 0 2px; }
@media (max-width: 767px) { body.app .post-actions.ig5 { padding: 8px 12px 2px; } }
body.app .post-actions.ig5 .act { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; font-size: 1.5rem; line-height: 1; border-radius: 0; color: var(--text); background: none; border: 0; cursor: pointer; }
body.app .post-actions.ig5 .act i { font-size: 1.5rem; width: 1.5rem; text-align: center; }
body.app .post-actions.ig5 .act .n { font-size: .92rem; font-weight: 600; letter-spacing: -.01em; min-width: 0; }
body.app .post-actions.ig5 .act .n:empty { display: none; }
body.app .post-actions.ig5 .act.off { opacity: .55; cursor: default; }
body.app .post-actions.ig5 .act.liked { color: var(--like, #ff3040); }
body.app .post-actions.ig5 .act.liked .n { color: var(--text); }
body.app .post-actions.ig5 .act.reposted { color: #16a34a; }
body.app .post-actions.ig5 .sp { flex: 1; }
.dots-row { display: flex; justify-content: center; padding: 8px 0 0; }
.dots-row .dots-slot { display: flex; gap: 4px; }
.dots-row .dots-slot span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.dots-row .dots-slot span.on { background: #0095f6; }
body.app .post-actions.ig5 + .post-stats, .post-stats.liked-by { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.post-stats.liked-by .faces { display: inline-flex; }
.post-stats.liked-by .faces .avatar { --size: 20px; border: 2px solid var(--surface-strong, #fff); margin-left: -7px; font-size: .5rem; }
.post-stats.liked-by .faces .avatar:first-child { margin-left: 0; }
.post-stats.liked-by b { font-weight: 600; }

/* Meta chini ya jina: Tangazo, sauti, AI */
.post-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ad-label { color: var(--text); font-size: .76rem; font-weight: 500; }
.audio-line { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: .76rem; color: var(--text); opacity: .9; cursor: default; }
a.audio-line[href] { cursor: pointer; }
.audio-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.ai-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: rgba(139, 92, 246, .14); color: #7c3aed; }
.post .media .play-ic, .post .media .vbtn { z-index: 3; }

/* Social context: picha ya unayemfuata aliyependa / kusambaza (chini kushoto ya picha/video) */
.sc-face { position: absolute; left: 10px; bottom: 10px; z-index: 4; border: 0; background: none; padding: 0; cursor: pointer; }
.sc-face > .avatar { --size: 34px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.sc-face .sc-badge { position: absolute; right: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .6rem; color: #fff; background: #a855f7; border: 2px solid #fff; }
.sc-face .sc-badge.like { background: #ff3040; }
.sc-face .sc-badge.comment { background: #0ea5e9; }
.sc-face .sc-badge.save { background: #111; }

/* WhatsApp CTA kwenye matangazo */
.wa-cta { display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: var(--wa); color: #fff !important; font-weight: 600; font-size: .95rem; text-decoration: none; }
.wa-cta i:first-child { font-size: 1.25rem; }
.wa-cta span { flex: 1; }
.wa-cta:hover { filter: brightness(1.06); }
@media (min-width: 768px) { .post .wa-cta { border-radius: 0 0 6px 6px; } }

/* "See translation / See original" — kitufe kidogo sana */
.tr-toggle { border: 0; background: none; padding: 0; margin: 0; font: inherit; font-size: .76rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.tr-toggle:hover { color: var(--text); }
.tr-toggle:disabled { opacity: .6; }
[data-tr-original].translated { animation: trfade .3s ease; }
@keyframes trfade { from { opacity: .3; } to { opacity: 1; } }
.post-time .dot { color: var(--muted); margin: 0 2px; }

/* Reel: "Watch more reels / Watch again" */
.wm-over { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(0,0,0,.42); animation: fade .25s; }
.wm-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 14px; background: #fff; color: #111 !important; font-weight: 700; font-size: 1rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); text-decoration: none; }
.wm-btn i { font-size: 1.2rem; }
.wm-again { border: 0; background: none; color: #fff; font-weight: 600; font-size: .95rem; cursor: pointer; }

/* ---------------- Mapendekezo ya feed ---------------- */
.fx-block { padding: 14px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.fx-block.fx-biz { background: var(--surface-hover); }
.fx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 14px 12px; }
.fx-head h3 { margin: 0; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-head .dot { color: var(--muted); }
.fx-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.fx-see { color: var(--ig-blue) !important; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.fx-more { border: 0; background: none; color: var(--text); font-size: 1.15rem; cursor: pointer; padding: 0 2px; }
.fx-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 14px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.fx-row::-webkit-scrollbar { display: none; }
.fx-card { position: relative; flex: none; width: min(62vw, 250px); scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-strong, #fff); text-align: center; }
.fx-card.sm { width: 168px; padding: 14px 10px 12px; border-radius: 16px; }
.fx-x { position: absolute; top: 12px; right: 12px; border: 0; background: none; color: var(--text); font-size: 1rem; cursor: pointer; z-index: 2; }
.fx-pic .avatar.xl { --size: min(46vw, 180px); font-size: 3rem; }
.fx-card.sm .fx-pic .avatar { --size: 92px; }
.fx-name { font-weight: 600; font-size: .98rem; display: inline-flex; align-items: center; gap: 3px; color: var(--text) !important; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.fx-mut { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); min-height: 22px; }
.fx-mut .faces { display: inline-flex; }
.fx-mut .faces .avatar { --size: 22px; border: 2px solid var(--surface-strong, #fff); margin-left: -7px; font-size: .5rem; }
.fx-mut .faces .avatar:first-child { margin-left: 0; }
.btn.fx-follow { width: 100%; margin-top: 8px; background: var(--ig-blue); color: #fff; border: 0; border-radius: 10px; font-weight: 600; padding: 9px 12px; }
.btn.fx-follow.btn-outline, .btn.fx-follow:not(.primary):not(.btn-primary)[data-following] { background: var(--surface-hover); color: var(--text); }
.fx-reels .fx-row { gap: 4px; }
.fx-reel { position: relative; flex: none; width: min(40vw, 190px); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #111; scroll-snap-align: start; -webkit-touch-callout: none; user-select: none; }
.fx-reel img, .fx-reel video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fx-reel .fx-dots { position: absolute; top: 8px; right: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.fx-reel .fx-cap { position: absolute; left: 8px; right: 8px; bottom: 30px; color: #fff; font-size: .74rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); line-height: 1.2; }
.fx-reel .fx-views { position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: .74rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.peek { position: fixed; inset: 0; z-index: 320; background: rgba(0,0,0,.55); display: grid; place-items: center; animation: fade .15s; backdrop-filter: blur(6px); }
.peek-card { width: min(78vw, 360px); aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #000; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: peekin .2s ease; }
.peek-card video { width: 100%; height: 100%; object-fit: cover; }
.peek-u { position: absolute; left: 12px; bottom: 12px; color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
@keyframes peekin { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- Comments sheet ---------------- */
html.cs-lock { overflow: hidden; }
html.cs-lock .sv { z-index: 270; }
.cs-bg { position: fixed; inset: 0; z-index: 240; display: flex; flex-direction: column; background: rgba(0,0,0,0); transition: background .2s; }
.cs-bg.open { background: rgba(0,0,0,.55); }
.cs-bg.on-reel.open { background: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,.25) 30%); }
.cs-top { flex: 1; min-height: 22vh; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.cs-mini { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.cs-bg.open .cs-mini { opacity: 1; }
.cs-sheet { position: relative; height: min(70vh, 720px); width: min(100vw, 620px); margin: 0 auto; background: var(--surface-strong, #fff); color: var(--text); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .24s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.18); overflow: hidden; }
html[data-ui="glass"] .cs-sheet { background: var(--bg); }
.cs-bg.open .cs-sheet { transform: none; }
.cs-load { flex: 1; display: grid; place-items: center; }
.cs-load .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cs-head { position: relative; padding: 10px 16px 10px; border-bottom: 1px solid var(--line); text-align: center; touch-action: none; }
.cs-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--muted); opacity: .5; margin: 0 auto 10px; }
.cs-title { font-weight: 700; font-size: 1.05rem; }
.cs-title .muted { font-weight: 500; font-size: .85rem; }
.cs-sort { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.cs-sort button { border: 1px solid var(--line); background: none; color: var(--muted); font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; cursor: pointer; }
.cs-sort button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.cs-x { position: absolute; top: 18px; right: 12px; border: 0; background: none; color: var(--text); font-size: 1rem; cursor: pointer; }
@media (max-width: 767px) { .cs-x { display: none; } }
.cs-list { flex: 1; overflow-y: auto; padding: 8px 0 12px; overscroll-behavior: contain; }
.cs-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 50px 20px; color: var(--muted); }
.cs-empty b { color: var(--text); font-size: 1.2rem; }
.igc { display: grid; grid-template-columns: auto minmax(0, 1fr) 36px; gap: 10px; padding: 10px 14px 6px; }
.igc.rep { padding: 8px 0 4px; grid-template-columns: auto minmax(0, 1fr) 32px; }
.igc.fresh { animation: trfade .5s ease; background: rgba(0, 149, 246, .05); }
.igc-av .avatar.sm { --size: 38px; }
.igc-av .avatar.xs { --size: 26px; }
.igc-ring { display: inline-block; padding: 2px; border-radius: 50%; background: conic-gradient(from 200deg, #f59e0b, #d9480f, #c026d3, #f59e0b); cursor: pointer; }
.igc-ring > .avatar { border: 2px solid var(--surface-strong, #fff); display: block; }
.igc-top { display: flex; align-items: center; gap: 4px; font-size: .82rem; }
.igc-top .u { font-weight: 600; color: var(--text) !important; }
.igc-top .t { color: var(--muted); margin-left: 4px; }
.igc-author { font-size: .66rem; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--surface-hover); color: var(--muted); }
.igc-body { font-size: .95rem; line-height: 1.4; margin-top: 1px; word-wrap: break-word; white-space: pre-wrap; }
.igc-gif { display: block; max-width: 180px; max-height: 180px; border-radius: 10px; margin-top: 6px; }
.igc-gift { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 5px 12px; border-radius: 99px; background: color-mix(in srgb, var(--g) 14%, transparent); color: var(--text); font-size: .85rem; }
.igc-gift i { color: var(--g); font-size: 1.1rem; }
.igc-acts { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 5px; }
.igc-acts button { border: 0; background: none; padding: 0; font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.igc-acts button:hover { color: var(--text); }
.igc-like { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 12px; }
.igc-like button, .igc-like a { border: 0; background: none; padding: 0; font-size: 1.05rem; color: var(--muted); cursor: pointer; line-height: 1; }
.igc-like button.on { color: var(--like, #ff3040); }
.igc-like button.pop i { animation: pop .35s ease; }
.igc-like span { font-size: .74rem; color: var(--muted); }
.igc-replies { display: none; }
.igc-replies.open { display: block; }
.igc-more { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 0 2px; color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer; }
.igc-more .ln { width: 26px; height: 1px; background: var(--muted); opacity: .6; }
.cs-foot { border-top: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: inherit; }
.cs-emojis { display: flex; justify-content: space-between; padding: 2px 4px 10px; }
.cs-emojis button { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 2px; transition: transform .15s; }
.cs-emojis button:active { transform: scale(1.3); }
.cs-form { display: flex; align-items: center; gap: 10px; }
.cs-form.busy { opacity: .6; pointer-events: none; }
.cs-form > .avatar { --size: 40px; flex: none; }
.cs-input { flex: 1; min-width: 0; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 26px; padding: 0 8px 0 16px; background: var(--field, transparent); }
.cs-input input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font-size: .95rem; color: var(--text); outline: none; }
.cs-gif-btn { border: 1.5px solid var(--text); border-radius: 5px; background: none; color: var(--text); font-size: .62rem; font-weight: 800; padding: 1px 4px; cursor: pointer; }
.cs-send { border: 0; background: none; color: #0095f6; font-weight: 700; cursor: pointer; }
.cs-gift-btn { border: 0; background: none; color: var(--text); font-size: 1.45rem; cursor: pointer; padding: 0 2px; }
.cs-reply-chip { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--muted); padding: 0 6px 8px; }
.cs-reply-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.cs-gifs { padding-bottom: 8px; }
.cs-gif-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 190px; overflow-y: auto; margin-top: 6px; }
.cs-gif-grid button { border: 0; padding: 0; background: var(--surface-hover); border-radius: 6px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.cs-gif-grid img { width: 100%; height: 100%; object-fit: cover; }
.cs-gifts { padding-bottom: 8px; }
.cs-gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.cs-gift-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: none; color: var(--text); font-size: .7rem; cursor: pointer; }
.cs-gift-grid button i { font-size: 1.5rem; color: var(--g); }
@media (min-width: 768px) { .cs-sheet { border-radius: 22px 22px 0 0; } }

/* ---------------- Wasifu (Instagram) ---------------- */
.p5-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.p5-top .ib { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; color: var(--text); font-size: 1.45rem; position: relative; cursor: pointer; }
.p5-top .ib .badge-dot { position: absolute; top: 0; right: -2px; }
.p5-uname { flex: 1; text-align: center; font-weight: 700; font-size: 1.12rem; display: flex; align-items: center; justify-content: center; gap: 4px; }
.p5-head { padding: 6px 0 10px; }
.p5-row { display: flex; align-items: center; gap: 20px; padding: 8px 16px 6px; }
.p5-pic { position: relative; flex: none; }
.p5-pic .avatar.xl { --size: 88px; font-size: 1.8rem; }
@media (min-width: 768px) { .p5-pic .avatar.xl { --size: 150px; font-size: 3rem; } .p5-row { gap: 40px; padding: 18px 16px 10px; } }
.p5-pic .ring { border: 0; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, #f59e0b, #d9480f, #2f7a38, #7ac142, #f59e0b); cursor: pointer; display: block; }
.p5-pic .ring > .avatar { border: 3px solid var(--surface-strong, #fff); display: block; }
.p5-pic .pic-zoom { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 50%; }
.p5-add { position: absolute; right: -2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-strong, #fff); background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 1.1rem; cursor: pointer; }
.p5-note { position: absolute; left: -6px; top: -14px; max-width: 128px; padding: 6px 10px; border-radius: 16px; border: 0; background: var(--surface-hover); color: var(--text); font-size: .72rem; line-height: 1.2; box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; text-align: left; }
.p5-note::after { content: ''; position: absolute; left: 22px; bottom: -6px; width: 10px; height: 10px; border-radius: 50%; background: inherit; }
.p5-note.ghost { color: var(--muted); }
.p5-note.playing { background: var(--ig-blue); color: #fff; }
.p5-side { flex: 1; min-width: 0; }
.p5-name { font-weight: 600; font-size: .98rem; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p5-stats { display: flex; justify-content: space-between; max-width: 340px; }
.p5-stats > * { display: flex; flex-direction: column; color: var(--text) !important; font-size: .9rem; line-height: 1.2; }
.p5-stats b { font-size: 1.12rem; font-weight: 700; }
.p5-bio { padding: 4px 16px 0; font-size: .92rem; }
.p5-bio .cat { color: var(--muted); font-size: .86rem; }
.p5-bio .bio { white-space: pre-wrap; line-height: 1.4; }
.p5-bio .facts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.p5-bio .facts i { margin-right: 4px; }
.p5-bio .trust { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.p5-bio .mutual { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .82rem; }
.p5-banners { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; }
.p5-banner { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-hover); color: var(--text) !important; font-size: .84rem; font-weight: 600; cursor: pointer; max-width: 100%; }
.p5-banner i { color: var(--b, var(--text)); }
.p5-banner.text { font-weight: 500; cursor: default; }
.p5-banner.add { background: none; color: var(--muted) !important; font-weight: 500; }
.p5-banner.playing { border-color: var(--b); }
.p5-dash { display: block; margin: 14px 16px 0; padding: 12px 16px; border-radius: 14px; background: var(--surface-hover); color: var(--text) !important; }
.p5-dash b { display: block; font-size: .95rem; }
.p5-dash span { font-size: .82rem; color: var(--muted); }
.p5-dash i { color: #16a34a; }
.p5-btns { display: flex; gap: 8px; padding: 12px 16px 0; }
.btn.p5-btn { flex: 1; justify-content: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-hover); color: var(--text); border: 0; font-weight: 600; font-size: .9rem; }
.btn.p5-btn.primary { background: var(--ig-blue); color: #fff; }
.btn.p5-btn.icon { flex: 0 0 42px; padding: 9px 0; }
.btn.p5-btn.icon.on { background: var(--text); color: var(--bg); }
.p5-links { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px 0; font-size: .8rem; }
.p5-links a { color: var(--muted) !important; }
.p5-discover { margin-top: 18px; }
.p5-discover .fx-head { padding-bottom: 10px; }
.p5-private { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px 60px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.p5-private .ic { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--text); display: grid; place-items: center; font-size: 1.8rem; color: var(--text); margin-bottom: 6px; }
.p5-private b { color: var(--text); font-size: 1rem; }
.ig-profile .ig-tabs a { gap: 6px; }
@media (max-width: 767px) { .ig-profile .ig-tabs a { font-size: 0; } .ig-profile .ig-tabs a i { font-size: 1.35rem; } }

/* ---------------- Mipangilio ya mtindo wa "Settings and activity" ---------------- */
.ig-settings .igs-title { padding: 18px 18px 6px; font-size: .82rem; font-weight: 600; color: var(--muted); border-top: 6px solid var(--line); }
.ig-settings .igs-title:first-child { border-top: 0; }
.ig-settings .igs-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--text) !important; cursor: pointer; }
.ig-settings .igs-row > i:first-child { font-size: 1.35rem; width: 26px; text-align: center; }
.ig-settings .igs-row .grow { min-width: 0; }
.ig-settings .igs-row b { font-weight: 500; font-size: .98rem; display: block; }
.ig-settings .igs-row small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; margin-top: 2px; }
.ig-settings .igs-val { color: var(--muted); font-size: .88rem; }
.ig-settings .chev { color: var(--muted); }
.ig-settings .select.sm { width: auto; min-width: 150px; padding: 6px 10px; font-size: .85rem; }
.igs-add > summary { list-style: none; }
.igs-add > summary::-webkit-details-marker { display: none; }
.igs-add .igs-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px 58px; }
.igs-add .igs-form .input, .igs-add .igs-form .select { flex: 1 1 200px; }

/* ---------------- Composer: vitufe + orodha (New post / New reel) ---------------- */
.cx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.cx-chips button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 0; background: var(--surface-hover); color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; }
.cx-rows { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0; }
.cx-row { display: flex; align-items: center; gap: 14px; padding: 12px 2px; cursor: pointer; font-size: .95rem; }
.cx-row + .cx-row, .cx-pane + .cx-row { border-top: 1px solid var(--line); }
.cx-row > i:first-child { font-size: 1.3rem; width: 24px; text-align: center; }
.cx-row small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.cx-row .cx-val { color: var(--muted); font-size: .85rem; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-row .chev { color: var(--muted); transition: transform .2s; }
.cx-row.open .chev { transform: rotate(90deg); }
.cx-row .select.sm { width: auto; padding: 6px 10px; font-size: .85rem; }
.cx-pane { padding: 0 2px 12px 38px; }

/* ---------------- Story viewer: muziki, overlays, mentions, kupakua ---------------- */
.sv .frame { container-type: inline-size; }
.sv5-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sv5-layer span { position: absolute; transform: translate(-50%, -50%); font-weight: 800; text-align: center; white-space: pre-wrap; text-shadow: 0 1px 4px rgba(0,0,0,.45); line-height: 1.15; }
.sv5-layer span.bg { background: rgba(0,0,0,.55); padding: .15em .45em; border-radius: .3em; text-shadow: none; }
.sv5-mentions { position: absolute; left: 12px; bottom: 90px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; }
.sv5-mentions a { background: #fff; color: #0f766e !important; font-weight: 800; font-size: .8rem; padding: 4px 10px; border-radius: 8px; }
.sv5-music { position: absolute; left: 12px; top: 62px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; max-width: 70%; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.4); color: #fff; font-size: .76rem; font-weight: 600; }
.sv5-music span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv5-dl { color: #fff !important; font-size: 1.1rem; padding: 0 6px; }

/* ---------------- Story editor (skrini nzima) ---------------- */
.se-dialog { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.se-dialog::backdrop { background: #000; }
.se-dialog[open] { display: block; }
.se { height: 100%; display: flex; flex-direction: column; }
.se-ic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(40,40,40,.65); color: #fff; display: grid; place-items: center; font-size: 1.2rem; cursor: pointer; }
.aa { font-weight: 700; font-size: 1.2rem; font-style: normal; font-family: Georgia, serif; }
.se-pick { position: relative; flex: 1; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #2a2f2c, #0c0f0d 70%); }
.se-top { display: flex; align-items: center; padding: 14px 14px 0; }
.se-top .sp { flex: 1; }
.se-left { position: absolute; left: 14px; top: 38%; display: flex; flex-direction: column; gap: 22px; }
.se-left button { border: 0; background: none; color: #fff; font-size: 1.6rem; cursor: pointer; }
.se-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px 60px; opacity: .85; }
.se-center i { font-size: 3rem; }
.se-center span { font-size: .8rem; opacity: .7; max-width: 280px; }
.se-shutter { display: flex; align-items: center; justify-content: space-around; padding: 10px 20px 14px; }
.se-snap { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.85); cursor: pointer; box-shadow: 0 0 0 3px rgba(0,0,0,.2) inset; }
.se-thumb { width: 44px; height: 44px; border-radius: 10px; border: 2px solid #fff; background: rgba(255,255,255,.12); color: #fff; font-size: 1.2rem; cursor: pointer; }
.se-modes { display: flex; justify-content: center; gap: 22px; padding: 6px 0 calc(16px + env(safe-area-inset-bottom)); font-size: .85rem; letter-spacing: .06em; }
.se-modes button { border: 0; background: none; color: rgba(255,255,255,.55); font: inherit; cursor: pointer; }
.se-modes b { color: #fff; }
.se-edit { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.se-stage { position: relative; flex: 1; min-height: 0; margin: 8px 6px 0; border-radius: 22px; overflow: hidden; background: #111; container-type: inline-size; touch-action: none; }
.se-media { position: absolute; inset: 0; display: grid; place-items: center; }
.se-media img, .se-media video { width: 100%; height: 100%; object-fit: contain; }
.se-draw { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.se-stage.drawing .se-draw { pointer-events: auto; cursor: crosshair; }
.se-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.se-stage.drawing .se-layer { pointer-events: none; }
.se-txt { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; font-weight: 800; text-align: center; white-space: pre-wrap; min-width: 30px; max-width: 86%; outline: none; text-shadow: 0 1px 4px rgba(0,0,0,.45); line-height: 1.15; cursor: move; touch-action: none; }
.se-txt.bg { background: rgba(0,0,0,.55); padding: .15em .45em; border-radius: .3em; text-shadow: none; }
.se-txt.mention { background: #fff; color: #0f766e !important; padding: .2em .5em; border-radius: .35em; text-shadow: none; font-size: 7cqw; }
.se-txt.tag { background: rgba(255,255,255,.92); color: #111 !important; padding: .2em .5em; border-radius: .35em; text-shadow: none; }
.se-x { position: absolute; top: 14px; left: 14px; z-index: 5; }
.se-tools { position: absolute; top: 14px; right: 12px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.se-tools > button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: #fff; cursor: pointer; padding: 0; }
.se-tools > button span { font-size: .85rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.se-tools > button > i { width: 46px; height: 46px; border-radius: 50%; background: rgba(50,50,50,.6); display: grid; place-items: center; font-size: 1.3rem; }
.se-tools.folded > button:not(.se-fold) span { display: none; }
.se-tools.folded > button:nth-child(n+5):not(.se-fold) { display: none; }
.se-fold { width: 46px; height: 30px; border-radius: 16px !important; background: rgba(50,50,50,.6) !important; justify-content: center; }
.se-tools.folded .se-fold i { transform: rotate(180deg); }
.se-drawbar { position: absolute; left: 10px; right: 10px; top: 14px; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.se-drawbar [data-se-color] { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; }
.se-drawbar [data-se-color].on { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.se-drawbar input[type=range] { width: 90px; accent-color: #fff; }
.se-done { margin-left: auto; border: 0; background: #fff; color: #111; font-weight: 700; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.se-bgbar { position: absolute; left: 0; right: 0; bottom: 70px; z-index: 5; display: flex; justify-content: center; gap: 10px; }
.se-bgbar button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; }
.se-music-chip { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: 8px; max-width: 80%; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.92); color: #111; font-weight: 700; font-size: .85rem; }
.se-music-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-music-chip button { border: 0; background: none; cursor: pointer; }
.se-caption { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 5; border: 0; background: none; color: #fff; font-size: .95rem; padding: 8px 12px; outline: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.se-caption::placeholder { color: rgba(255,255,255,.85); }
.se-bin { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 6; width: 50px; height: 50px; border-radius: 50%; border: 2px solid #fff; display: none; place-items: center; font-size: 1.2rem; background: rgba(0,0,0,.4); pointer-events: none; }
.se-bin.hot { display: grid; background: #ef4444; }
.se-more { margin: 8px 10px 0; padding: 12px; border-radius: 14px; background: #1c1c1c; color: #fff; font-size: .85rem; }
.se-more .select { background: #2a2a2a; color: #fff; }
.se-share { display: flex; align-items: center; gap: 8px; padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); }
.se-pill { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border-radius: 99px; border: 0; background: #262626; color: #fff; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.se-pill .avatar.xs { --size: 26px; }
.se-pill .cf { width: 24px; height: 24px; border-radius: 50%; background: #22c55e; display: grid; place-items: center; font-size: .75rem; }
.se-pill small { opacity: .6; }
.se-go { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 0; background: var(--ig-blue); color: #fff; font-size: 1.4rem; display: grid; place-items: center; cursor: pointer; }
.se-pill:disabled, .se-go:disabled { opacity: .5; }
.se-stk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.se-stk button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: 10px; border: 0; background: var(--surface-hover); color: var(--text); font-weight: 800; font-size: .8rem; cursor: pointer; }
@media (min-width: 768px) { .se { max-width: 460px; margin: 0 auto; } }

/* ---------------- Muziki ---------------- */
.mt-row { gap: 12px; }
.mt-play { position: relative; width: 46px; height: 46px; flex: none; border-radius: 10px; border: 0; overflow: hidden; background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1.3rem; }
.mt-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-play i { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.mt-play.playing i::before { content: "\F4C3"; }
.mp-list { padding: 6px 0 12px; }
.mp-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.mp-row .grow { min-width: 0; }
.mp-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-up { display: block; text-align: center; padding: 12px; font-weight: 600; color: var(--ig-blue) !important; }
.reel-audio { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .8rem; max-width: 70%; overflow: hidden; }
.reel-audio .marq { overflow: hidden; white-space: nowrap; }
.reel-audio .marq span { display: inline-block; padding-left: 0; animation: marq 9s linear infinite; }
@keyframes marq { 0%, 20% { transform: translateX(0); } 100% { transform: translateX(-60%); } }

/* ---------------- Session timeout ---------------- */
.idle-warn { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.idle-warn .box { width: min(360px, 100%); background: var(--surface-strong, #fff); color: var(--text); border-radius: 18px; padding: 24px 20px; text-align: center; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.idle-warn .box > i { font-size: 2rem; color: #f59e0b; }
.idle-warn .box span { color: var(--muted); font-size: .9rem; }
.idle-warn .row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.idle-warn form { margin: 0; }

/* ---------------- Reels (Instagram): juu = jani la Afodabo + Reels / Marafiki ---------------- */
.reels-head { display: none; }
.reels-top { position: fixed; top: 0; left: var(--rail-w, 0); right: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; color: #fff; background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none; }
.reels-top > * { pointer-events: auto; }
@media (max-width: 767px) { .reels-top { left: 0; } body.reels-page .m-top { display: none; } }
.reels-top .rt-ic { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: #fff; font-size: 1.45rem; cursor: pointer; }
.reels-top .rt-leaf img { width: 30px; height: 30px; object-fit: contain; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.reels-top .rt-tabs { display: flex; align-items: center; gap: 16px; }
.reels-top .rt-tabs a { color: rgba(255,255,255,.62) !important; font-weight: 700; font-size: 1.25rem; display: inline-flex; align-items: center; gap: 6px; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.reels-top .rt-tabs a.on { color: #fff !important; }
.reels-top .rt-tabs .faces { display: inline-flex; }
.reels-top .rt-tabs .faces .avatar { --size: 20px; border: 1.5px solid #000; margin-left: -6px; font-size: .45rem; }
.reels-top .rt-tabs .faces .avatar:first-child { margin-left: 0; }
.reels-top .sp { flex: 1; }
.reel .mute { top: auto; bottom: 150px; right: 14px; }
@media (max-width: 767px) { .reel .mute { display: none; } }
.reel .side { gap: 18px; bottom: 26px; right: 10px; }
.reel .side button, .reel .side a { font-size: .78rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.reel .side i { font-size: 1.75rem; }
.reel .side span:empty { display: none; }
.reel .side .reel-owner .avatar { --size: 30px; border-radius: 8px; border: 2px solid #fff; }
.reel .info { padding-bottom: 22px; }
.reel .info .u .avatar { --size: 34px; }
.reel .info .cap { max-height: 1.35em; line-height: 1.35em; transition: max-height .25s; }
.reel .info .cap.open { max-height: 40vh; overflow-y: auto; }
.reel-more { border: 0; background: none; color: rgba(255,255,255,.75); font-size: .84rem; padding: 2px 0 0; cursor: pointer; }
.reel .sc-face { bottom: 110px; }

/* Shikilia = 2x */
.speed-badge { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 7; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-weight: 700; font-size: .85rem; pointer-events: none; animation: fade .15s; }
.media .slide.is-video, .reel .stage { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Kupakua (watermark) */
.dl-over { position: fixed; inset: 0; z-index: 520; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.dl-over .box { width: min(320px, 100%); background: var(--surface-strong, #fff); color: var(--text); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.dl-over .box > i { font-size: 1.8rem; color: var(--primary); }
.dl-over .meter { width: 100%; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.dl-over .meter i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.sv5-dl { border: 0; background: none; cursor: pointer; }
@media (max-width: 767px) {
  body.profile-page .m-top { display: none; }
  body.reels-page .reel .info { padding-bottom: 96px; }
  body.reels-page .reel .side { bottom: 96px; }
  body.reels-page .reel .prog { bottom: 84px; }
}
@media (min-width: 768px) { .p5-top { display: none; } }

/* ---------------- Bottom nav v7 ----------------
   Default (kama mwanzo): bar inayoelea juu kidogo ya chini (pill), (+) ya kijani katikati kabisa na haisogei.
   Admin → Muonekano → "Mtindo wa menyu ya chini" = "Chini kabisa" → html.nav-fixed (bar ya ukingo hadi ukingo). */
@media (max-width: 767px) {
  body.app .bottom-nav.v4.v5 {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 0;
    left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 62px; padding: 0 4px 5px;
    transform: translateZ(0); contain: layout;
  }
  body.app .bottom-nav.v4.v5 .bn-side { flex: 1 1 0; min-width: 0; display: flex; justify-content: space-around; align-items: flex-end; }
  body.app .bottom-nav.v4.v5 a.bn-item { flex: 1 1 0; height: 54px; }
  body.app .bottom-nav.v4.v5 a.bn-item .ic > svg { width: 25px; height: 25px; display: block; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
  body.app .bottom-nav.v4.v5 a.bn-item.active .ic > svg { transform: scale(1.06); }
  body.app .bottom-nav.v4.v5 a.bn-item.active .ic { background: transparent; }
  body.app .bottom-nav.v4.v5 a.bn-item.active .lb { font-weight: 800; }
  /* (+) ya kijani: katikati kabisa, imeinuka kidogo, haisogei (hakuna transform ya kubonyeza) */
  body.app .bottom-nav.v4.v5 a.bn-create,
  body.app .bottom-nav.v4.v5 a.bn-create:active {
    flex: none; align-self: flex-end; width: 56px; height: 56px; margin: 0 4px 8px; transform: translateY(-12px); border-radius: 19px;
    font-size: 1.5rem; transition: filter .15s, box-shadow .15s;
  }
  body.app .bottom-nav.v4.v5 a.bn-create:active { filter: brightness(.92); }
  body.app .bottom-nav.v4.v5 a.bn-create .plus i { transition: transform .3s; }

  /* Mtindo wa pili: chini kabisa (edge to edge) */
  html.nav-fixed body.app .bottom-nav.v4.v5 {
    left: 0; right: 0; bottom: 0; align-items: center;
    height: calc(60px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
    border: 0; border-top: 1px solid var(--line); border-radius: 0;
    background: var(--surface-strong, #fff); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  html.nav-fixed[data-mode="dark"] body.app .bottom-nav.v4.v5 { background: #0d1611; }
  html.nav-fixed body.app .bottom-nav.v4.v5 .bn-side { align-items: center; height: 60px; }
  html.nav-fixed body.app .bottom-nav.v4.v5 a.bn-create,
  html.nav-fixed body.app .bottom-nav.v4.v5 a.bn-create:active { align-self: center; width: 52px; height: 52px; margin: 0 6px; transform: none; border-radius: 18px; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent); }
  html.nav-fixed body.app .content-wrap { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  html.nav-fixed body.reels-page .bottom-nav.v4.v5 { background: #000; border-top-color: rgba(255,255,255,.12); }
  html.nav-fixed body.reels-page .reels, html.nav-fixed body.reels-page .reel, html.nav-fixed body.reels-page .reel .stage { height: calc(100dvh - 60px - env(safe-area-inset-bottom)); }
  html.nav-fixed body.reels-page .reel .info { padding-bottom: 22px; }
  html.nav-fixed body.reels-page .reel .side { bottom: 26px; }
  html.nav-fixed body.reels-page .reel .prog { bottom: 0; }
  html body.app.dm-page.ch-open .bottom-nav.v4.v5 a.bn-create { width: 46px; height: 46px; transform: translateY(-4px); }
  html.nav-fixed body.app.dm-page.ch-open .bottom-nav.v4.v5 a.bn-create { transform: none; }
  body.reels-page .bottom-nav.v4.v5 a.bn-item .ic > svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
  body.app .bottom-nav.v4.v5 { --bn-cut: var(--surface, #fff); }
  html.nav-fixed body.app .bottom-nav.v4.v5 { --bn-cut: var(--surface-strong, #fff); }
  html[data-mode="dark"].nav-fixed body.app .bottom-nav.v4.v5 { --bn-cut: #0d1611; }
  body.reels-page .bottom-nav.v4.v5 { --bn-cut: #161616 !important; }
}

/* ---------------- Green Tick: hatua kwa hatua ---------------- */
.vfw { margin: 4px 0 16px; }
.vfw-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.vfw-top span { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.vfw-top b { font-size: 1rem; }
.vfw-prog { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.vfw-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s; }
.vfw-steps { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.vfw-steps::-webkit-scrollbar { display: none; }
.vfw-steps button { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; max-width: 170px; }
.vfw-steps button span { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-hover); font-weight: 800; font-size: .7rem; }
.vfw-steps button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.vfw-steps button.done span { background: var(--primary-soft); color: var(--primary); }
.vfw-steps button.on { border-color: var(--primary); color: var(--text); font-weight: 700; }
.vfw-steps button.on span { background: var(--primary); color: #fff; }
.vfw-steps button:disabled { opacity: .45; cursor: default; }
.vf-sec.vfw-off { display: none !important; }
.vfw-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.vfw-nav .btn { min-width: 130px; justify-content: center; }
.vfw-err { outline: 2px solid var(--danger, #ef4444); outline-offset: 2px; border-radius: 12px; }

/* ---------------- Accessibility ---------------- */
html.ts-sm { font-size: 14px; }
html.ts-lg { font-size: 17.5px; }
html.ts-xl { font-size: 19.5px; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
.acs-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acs-hero > i { font-size: 1.8rem; }
.acs-hero.ok > i { color: #16a34a; }
.acs-hero.warn > i { color: #f59e0b; }

/* v13 Daftari Langu: kitufe cha mwenye wasifu + beji ya umma */
.p5-daftari { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; color: var(--text) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--surface-hover)), var(--surface-hover)); }
.p5-daftari .p5-dl { width: 38px; height: 38px; border-radius: 11px; font-size: 1.1rem; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.p5-daftari .grow { min-width: 0; }
.p5-daftari > i { color: var(--muted); }
.p5-daftari b { display: block; font-size: .92rem; }
.p5-daftari small { font-size: .76rem; color: var(--muted); }
.df-pbadge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--primary); padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); }
