/* Saathi layer on top of the DailyKit design system (css/app.css). Nepal flag palette, mobile-first. */
:root { --sidebar-w: 248px; --datebar-h: 58px; }
body { font-family: Poppins, Mukta, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; }
:lang(ne) body, :lang(hi) body, .np { font-family: Mukta, "Noto Sans Devanagari", Poppins, sans-serif; }
.skip { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--crimson); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue-l) 70%, transparent); outline-offset: 2px; }

/* ---------- date bar (always visible) ---------- */
.datebar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 10px; padding: calc(6px + var(--safe-t)) 14px 6px; min-height: var(--datebar-h);
  background: linear-gradient(100deg, #b80f33 0%, var(--crimson) 35%, #3a1e6b 75%, var(--blue) 100%); color: #fff; box-shadow: 0 6px 18px -10px rgba(0, 31, 84, .6); }
.datebar a { color: #fff; text-decoration: none; }
.db-date { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.db-date b { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-date small { opacity: .88; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-time { display: flex; gap: 10px; text-align: right; }
.db-time span { display: flex; flex-direction: column; }
.db-time small { font-size: .62rem; opacity: .8; white-space: nowrap; }
.db-time b { font-variant-numeric: tabular-nums; font-size: .92rem; white-space: nowrap; }
@media (max-width: 420px) { .db-time .loc { display: none; } .db-date b { font-size: .92rem; } }
.netbar { background: #78350f; color: #fff; text-align: center; font-size: .8rem; padding: 4px; }

/* the page topbar sits under the date bar */
.topbar { top: var(--datebar-h); }
.tabs-top { top: calc(var(--datebar-h) + 62px); }

/* ---------- layout: sidebar on desktop ---------- */
.sidebar { display: none; }
@media (min-width: 960px) {
  .sidebar { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); padding: 16px 12px; gap: 10px; background: var(--surface); border-right: 1px solid var(--line); z-index: 40; overflow-y: auto; }
  .shell { margin-left: var(--sidebar-w); }
  .bottom-nav { display: none !important; }
  #app { padding-bottom: 24px; }
  .fab { bottom: 28px; }
  .toast { bottom: 28px; }
  .editor { left: var(--sidebar-w); }
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 4px 8px 12px; }
.brand b { font-size: 1.35rem; font-weight: 800; background: linear-gradient(120deg, var(--crimson), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--muted); font-family: Mukta, sans-serif; font-size: 1rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--text); font-weight: 600; position: relative; }
.sidebar nav a.sub { font-weight: 500; color: var(--muted); padding: 8px 12px; }
.sidebar nav a:hover { background: var(--surface2); }
.sidebar nav a.on { background: linear-gradient(120deg, color-mix(in srgb, var(--crimson) 14%, transparent), color-mix(in srgb, var(--blue) 12%, transparent)); color: var(--crimson); }
.sidebar hr { border: 0; border-top: 1px solid var(--line); margin: 8px 4px; width: auto; }
.sidebar .nbadge { position: static; margin-left: auto; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.sb-me { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); padding: 8px; border-radius: 14px; }
.sb-me:hover { background: var(--surface2); }
.sb-me span { display: flex; flex-direction: column; min-width: 0; } .sb-me small { color: var(--muted); }

/* ---------- 6-tab bottom nav ---------- */
.bottom-nav.six { grid-template-columns: repeat(6, 1fr); width: min(620px, calc(100% - 14px)); padding: 5px; }
.bottom-nav.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); width: min(680px, calc(100% - 12px)); padding: 4px; gap: 2px; }
.bottom-nav.seven a { position: relative; font-size: .58rem; padding: 6px 0; min-width: 0; }
.bottom-nav.seven a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .bottom-nav.seven a { font-size: .55rem; } .bottom-nav.seven a svg { width: 20px; height: 20px; } }
.bottom-nav.six a { position: relative; font-size: .62rem; padding: 6px 0; }
.nbadge { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crimson); color: #fff; font-size: .62rem; font-style: normal; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.bottom-nav a.on .nbadge { background: #fff; color: var(--crimson); }

.splash { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.splash p { font-weight: 800; font-size: 1.2rem; color: var(--crimson); margin: 0; }
.page.wide { max-width: 1180px; }
.two-col { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.two-col > *, .grid2 > *, .grid3 > *, .kpis > *, .row > .grow, .list-item > .grow { min-width: 0; }
/* never let one wide element push the whole app sideways on phones */
html, body { max-width: 100%; overflow-x: clip; }
#app, .shell { min-width: 0; max-width: 100%; }
.card table.tbl, .tbl-wrap { display: block; overflow-x: auto; }
img, video, canvas { max-width: 100%; }
@media (min-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr) 320px; } .two-col > aside { position: sticky; top: calc(var(--datebar-h) + 12px); align-self: start; } }

/* ---------- avatars, names, pills ---------- */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; background: linear-gradient(140deg, hsl(var(--h) 75% 46%), hsl(var(--h) 80% 30%)); background-size: cover; background-position: center; overflow: hidden; box-shadow: 0 0 0 2px var(--surface); }
.av.has-img { color: transparent; }
.uname { font-weight: 650; color: var(--text); text-decoration: none; }
.uname:hover { text-decoration: underline; }
.vbadge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--blue-l); color: #fff; margin-left: 4px; vertical-align: middle; }
.vbadge .ic { width: 11px; height: 11px; stroke-width: 3; }
a.tag, a.mention { color: var(--blue-l); text-decoration: none; font-weight: 600; }
:root[data-theme="dark"] a.tag, :root[data-theme="dark"] a.mention { color: #8fb1ff; }

/* ---------- skeletons ---------- */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface2) 25%, color-mix(in srgb, var(--surface2) 60%, var(--surface)) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.sk-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.sk-av { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.sk-line { height: 12px; margin: 6px 0; width: 70%; } .sk-line.short { width: 40%; }
.sk-block { height: 160px; margin-top: 10px; }
.sk-post { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } .page { animation: none; } }

/* ---------- posts ---------- */
.post { padding: 12px 14px; margin-bottom: 12px; }
.phead { display: flex; gap: 10px; align-items: center; }
.icon-btn.ghost { border: 0; box-shadow: none; background: transparent; }
.pbody { margin: 10px 0 6px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.pbody.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--crimson, #c8102e); font: inherit; font-weight: 700; font-size: .82rem; padding: 6px 8px; border-radius: 999px; cursor: pointer; }
.more-btn { background: none; border: 0; padding: 4px 0 8px; margin: 0; color: var(--crimson, #c8102e); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.more-btn:hover { text-decoration: underline; }
.pbody.greet { font-size: 1.15rem; font-weight: 600; text-align: center; padding: 22px 14px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #b80f33, var(--crimson) 40%, var(--blue)); }
.pbody.greet a { color: #fde68a; }
.pmedia { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; margin: 8px -2px 4px; }
.pmedia.n2 { grid-template-columns: 1fr 1fr; } .pmedia.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .pmedia.n3 > :first-child { grid-row: span 2; } .pmedia.n4 { grid-template-columns: 1fr 1fr; }
.pimg { aspect-ratio: 4/3; background: var(--surface2) center/cover no-repeat; cursor: zoom-in; position: relative; }
.pmedia.n1 .pimg { aspect-ratio: auto; min-height: 220px; max-height: 70vh; height: 360px; background-size: cover; }
.pimg b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 1.5rem; }
.pmedia video { width: 100%; max-height: 70vh; background: #000; display: block; }
.plink { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface2); color: var(--text); text-decoration: none; font-weight: 600; font-size: .88rem; margin: 6px 0; overflow: hidden; }
.pfoot { display: flex; align-items: center; gap: 4px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.pfoot button, .pfoot a { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: .85rem; padding: 6px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.pfoot button:hover, .pfoot a:hover { background: var(--surface2); }
.pfoot button.on { color: var(--crimson); }
.pfoot button.on .ic { fill: currentColor; }
.pfoot button.pop .ic { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.poll { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.popt { position: relative; overflow: hidden; display: flex; justify-content: space-between; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.popt i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--blue-l) 18%, transparent); transition: width .4s; }
.popt.mine { border-color: var(--blue-l); }
.popt span, .popt em { position: relative; font-style: normal; }
.evcard { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface2); text-decoration: none; color: var(--text); margin: 8px 0; }
.evdate { width: 52px; height: 56px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: linear-gradient(160deg, var(--crimson), var(--blue)); color: #fff; font-size: .7rem; text-transform: uppercase; font-weight: 700; flex: none; }
.evdate b { font-size: 1.3rem; line-height: 1; }
.gallery .gimg { width: 100%; aspect-ratio: 1; background: #000 center/contain no-repeat; border-radius: 12px; }

/* ---------- composer ---------- */
.composer { display: flex; gap: 10px; align-items: center; padding: 12px; margin-bottom: 12px; cursor: pointer; }
.composer .fake { flex: 1; padding: 11px 14px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.cmp-media { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.cmp-media div { width: 84px; height: 84px; flex: none; border-radius: 12px; background: var(--surface2) center/cover; position: relative; }
.cmp-media button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.cmp-media .vid { position: absolute; left: 6px; bottom: 28px; color: #fff; font-style: normal; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cmp-media .cov { position: absolute; top: 4px; left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--crimson, #c8102e); color: #fff; font-size: .68rem; font-weight: 700; }
.cmp-media button.mk { right: auto; left: 3px; background: rgba(0,0,0,.6); }
.cmp-media .mv { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; justify-content: space-between; }
.cmp-media .mv button { position: static; width: 24px; height: 22px; border-radius: 8px; font-size: .7rem; }

/* ---------- stories ---------- */
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 72px; text-align: center; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.story .ring { padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, #f59e0b, var(--crimson), var(--blue-l), var(--blue), #f59e0b); display: inline-block; }
.story.seen .ring { background: var(--line); }
.story .ring .av { box-shadow: 0 0 0 3px var(--surface); }
.story small { display: block; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.story.add .ring { background: none; border: 2px dashed var(--line); }
.sviewer { position: fixed; inset: 0; z-index: 120; background: #000; display: flex; flex-direction: column; color: #fff; }
.sviewer .bars { display: flex; gap: 4px; padding: calc(10px + var(--safe-t)) 10px 6px; }
.sviewer .bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.sviewer .bars i b { display: block; height: 100%; width: 0; background: #fff; }
.sviewer .shead { display: flex; align-items: center; gap: 10px; padding: 6px 12px; }
.sviewer .sbody { flex: 1; display: grid; place-items: center; background-size: contain; background-position: center; background-repeat: no-repeat; position: relative; }
.sviewer .sbody .cap { position: absolute; left: 16px; right: 16px; bottom: 24px; text-align: center; font-size: 1.05rem; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.sviewer .sbody.text { font-size: 1.6rem; font-weight: 700; text-align: center; padding: 30px; }
.sviewer .sbody.text .cap { position: static; font-size: inherit; }
.sviewer .sfoot { display: flex; gap: 8px; padding: 10px 12px calc(12px + var(--safe-b)); }
.sviewer .sfoot input { flex: 1; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; padding: 10px 14px; font: inherit; }
.sviewer .tap { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; } .sviewer .tap.l { left: 0; } .sviewer .tap.r { right: 0; }

/* ---------- reels ---------- */
.reels { height: calc(100dvh - var(--datebar-h) - 90px); overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 18px; background: #000; }
.reel { height: 100%; scroll-snap-align: start; position: relative; display: grid; place-items: center; }
.reel video { max-height: 100%; max-width: 100%; }
.reel .rinfo { position: absolute; left: 12px; right: 70px; bottom: 16px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.reel .rside { position: absolute; right: 10px; bottom: 30px; display: flex; flex-direction: column; gap: 14px; }
.reel .rside button { background: rgba(0,0,0,.35); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer; }

/* ---------- profile ---------- */
.cover { height: 170px; border-radius: 0 0 22px 22px; background: linear-gradient(120deg, var(--crimson), var(--blue)) center/cover; margin: 0 -16px; position: relative; }
.pf-head { display: flex; align-items: flex-end; gap: 14px; margin-top: -48px; padding: 0 4px; position: relative; }
.pf-head .av { box-shadow: 0 0 0 4px var(--bg); }
.pf-stats { display: flex; gap: 6px; margin: 12px 0; }
.pf-stats a, .pf-stats div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pf-stats b { display: block; font-size: 1.1rem; }
.pf-stats small { color: var(--muted); font-size: .72rem; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.pgrid a { aspect-ratio: 1; background: var(--surface2) center/cover; display: grid; place-items: center; color: var(--muted); text-decoration: none; font-size: .75rem; padding: 6px; overflow: hidden; border-radius: 4px; }

/* ---------- messaging ---------- */
body.chat-mode .bottom-nav { display: none; }
body.chat-mode #app { padding-bottom: 0; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--datebar-h)); }
.chat .topbar { margin: 0; position: static; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.msg { max-width: 78%; align-self: flex-start; display: flex; flex-direction: column; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .bubble { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); word-wrap: break-word; overflow-wrap: anywhere; position: relative; }
.msg.me .bubble { background: linear-gradient(140deg, #ef2a51, var(--crimson) 60%, #a50e2d); color: #fff; border: 0; border-radius: 18px 18px 6px 18px; }
.msg.me .bubble a { color: #fde68a; }
.msg .bubble img, .msg .bubble video { max-width: 260px; max-height: 300px; border-radius: 12px; display: block; }
.msg .meta { font-size: .66rem; color: var(--muted); margin: 2px 6px; display: flex; gap: 4px; }
.msg .reply { font-size: .78rem; opacity: .85; border-left: 3px solid currentColor; padding-left: 6px; margin-bottom: 4px; }
.msg .reacts { font-size: .78rem; margin-top: -6px; background: var(--surface); border-radius: 10px; padding: 0 5px; border: 1px solid var(--line); }
.msg.sys { align-self: center; font-size: .75rem; color: var(--muted); }
.msg.deleted .bubble { font-style: italic; opacity: .6; }
.daysep { align-self: center; font-size: .7rem; color: var(--muted); background: var(--surface2); padding: 2px 10px; border-radius: 10px; margin: 8px 0; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; max-height: 120px; min-height: 42px; border-radius: 22px; padding: 10px 14px; }
.typing { font-size: .75rem; color: var(--muted); padding: 0 14px 4px; min-height: 1.2em; }
.replybar { display: flex; gap: 8px; align-items: center; padding: 6px 12px; background: var(--surface2); font-size: .82rem; }
.conv { position: relative; }
.conv .unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--crimson); color: #fff; font-size: .7rem; display: grid; place-items: center; font-weight: 700; padding: 0 6px; }
.online-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); position: absolute; left: 44px; top: 42px; }

/* ---------- news ---------- */
.nitem { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); margin-bottom: 10px; box-shadow: var(--shadow-1); }
.nitem .nthumb { width: 96px; height: 76px; border-radius: 12px; flex: none; background: var(--surface2) center/cover; display: grid; place-items: center; color: var(--muted); }
.nitem h3 { font-size: .98rem; margin: 2px 0 4px; line-height: 1.35; }
.nitem p { font-size: .82rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nmeta { font-size: .72rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.src { font-weight: 700; color: var(--crimson); }
.article { line-height: 1.7; }
.article h1 { font-size: 1.45rem; line-height: 1.3; margin: 8px 0; }
.attribution { padding: 12px; border-radius: 14px; background: var(--surface2); font-size: .82rem; }
.browser { display: flex; flex-direction: column; height: calc(100dvh - var(--datebar-h) - 80px); }
.browser iframe { flex: 1; width: 100%; border: 0; border-radius: 14px; background: #fff; }
.browser .bbar { display: flex; gap: 6px; align-items: center; padding: 8px 0; }
.browser .burl { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface2); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px) { .browser { height: calc(100dvh - var(--datebar-h) - 30px); } }

/* ---------- calendar ---------- */
.cal .d .tt { font-size: .5rem; color: var(--muted); line-height: 1; margin-top: 1px; max-width: 100%; overflow: hidden; white-space: nowrap; }
.cal .d.hol { color: var(--crimson); }
.cal .d.hol::after { content: ""; position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--crimson); }
.cal .d.today.hol::after { background: #fff; }
.fest { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; text-decoration: none; color: var(--text); }
.fest .fd { width: 54px; text-align: center; flex: none; }
.fest .fd b { display: block; font-size: 1.4rem; color: var(--crimson); line-height: 1; }
.fest .fd small { font-size: .65rem; color: var(--muted); text-transform: uppercase; }
.weekv { display: grid; gap: 6px; }
.weekv .wd { display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.weekv .wd.today { border-color: var(--crimson); }
.weekv .wd > b { width: 54px; flex: none; text-align: center; }

/* ---------- home ---------- */
.hero-np { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; color: #fff; background: var(--hero); box-shadow: 0 20px 40px -18px rgba(0,56,147,.55); margin-top: 12px; }
.hero-np .big { font-family: Mukta, sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.hero-np .mtn { position: absolute; left: 0; right: 0; bottom: -2px; height: 70px; opacity: .9; }
.hero-np .flag { position: absolute; right: 18px; top: 16px; width: 30px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.hscroll > * { flex: none; }
.fcard { width: 150px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3d); text-decoration: none; color: var(--text); }
.fcard b { display: block; font-size: .85rem; line-height: 1.2; margin: 6px 0 4px; }
.fcard .cnt { font-size: 1.4rem; font-weight: 800; color: var(--crimson); }
.qtools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 640px) { .qtools { grid-template-columns: repeat(8, 1fr); } }
.qtools a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-size: .7rem; font-weight: 600; text-align: center; }

/* ---------- tools hub, calculators, games ---------- */
.thub h4 { margin-top: 20px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tgrid a { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); font-weight: 600; font-size: .85rem; }
.result { padding: 16px; border-radius: 18px; background: linear-gradient(140deg, color-mix(in srgb, var(--crimson) 10%, var(--surface)), color-mix(in srgb, var(--blue) 10%, var(--surface))); border: 1px solid var(--line); }
.result .big { font-size: 1.6rem; font-weight: 800; }
.sudoku { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 420px); margin: 0 auto; border: 2px solid var(--text); }
.sudoku input { aspect-ratio: 1; width: 100%; text-align: center; font-size: 1.15rem; font-weight: 700; border: 1px solid var(--line); background: var(--surface); color: var(--blue-l); padding: 0; }
.sudoku input[readonly] { color: var(--text); background: var(--surface2); }
.sudoku input.bad { background: color-mix(in srgb, var(--err) 25%, var(--surface)); }
.sudoku input:nth-child(3n) { border-right: 2px solid var(--text); }
.sudoku input:nth-child(n+19):nth-child(-n+27), .sudoku input:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--text); }
.ludo { display: grid; grid-template-columns: repeat(15, 1fr); width: min(100%, 460px); margin: 0 auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid var(--text); }
.ludo i { border: .5px solid rgba(0,0,0,.12); position: relative; display: grid; place-items: center; }
.ludo i.r { background: #fecaca; } .ludo i.g { background: #bbf7d0; } .ludo i.y { background: #fef08a; } .ludo i.b { background: #bfdbfe; } .ludo i.path { background: #fff; } .ludo i.safe::before { content: "★"; color: #9ca3af; font-size: .6rem; } .ludo i.home { background: #e5e7eb; }
.ludo i.Rr { background: #f87171; } .ludo i.Gg { background: #4ade80; } .ludo i.Yy { background: #facc15; } .ludo i.Bb { background: #60a5fa; }
.token { width: 78%; height: 78%; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.4); cursor: pointer; position: absolute; }
.token.R { background: #dc2626; } .token.G { background: #16a34a; } .token.Y { background: #ca8a04; } .token.B { background: #2563eb; }
.token.can { animation: bounce .6s infinite alternate; outline: 3px solid #111; }
@keyframes bounce { to { transform: translateY(-3px); } }
.dice { width: 64px; height: 64px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); font-size: 2rem; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-3d); }

/* ---------- admin ---------- */
.admin-tabs { position: sticky; top: calc(var(--datebar-h) + 62px); z-index: 14; background: var(--bg); padding: 4px 0 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bars-mini { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.bars-mini i { flex: 1; background: linear-gradient(var(--crimson), var(--blue)); border-radius: 3px 3px 0 0; min-height: 2px; }
.health { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.health.ok { background: var(--ok); } .health.bad { background: var(--err); } .health.unk { background: var(--muted); }
.sentinel { min-height: 20px; }
.hide { display: none !important; }

/* ---------- Sathi social & connected accounts ---------- */
.src-badge { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; font-size: .72rem; flex: none; line-height: 1; }
.src-badge.sathi { background: linear-gradient(135deg, var(--crimson), var(--blue)); }
.src-badge.snapchat { color: #111; }
.why { display: block; margin: 6px 0 0; padding: 4px 10px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .76rem; cursor: pointer; text-align: left; }
.repost { display: block; margin-top: 8px; color: inherit; text-decoration: none; }
.sticker { position: absolute; transform: translate(-50%, -50%); font-size: 2rem; z-index: 2; text-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: auto; }
.sticker.link a { font-size: .9rem; background: #fff; color: #111; padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.avs { display: inline-flex; } .avs .av { margin-left: -8px; border: 2px solid var(--surface); }
.moment-prev { height: 220px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-weight: 700; text-align: center; padding: 16px; background: linear-gradient(135deg, #dc143c, #003893); background-size: cover; background-position: center; }
.hl-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px; }
.hl { display: grid; justify-items: center; gap: 4px; text-decoration: none; color: inherit; flex: none; width: 72px; }
.hl small { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-cover { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--line); background-size: cover; background-position: center; }
.arch { position: relative; aspect-ratio: 9 / 16; border: 2px solid transparent; border-radius: 10px; background-size: cover; background-position: center; color: #fff; font: inherit; font-size: .75rem; cursor: pointer; padding: 6px; }
.arch .tick { display: none; position: absolute; top: 6px; right: 6px; background: var(--blue); border-radius: 50%; width: 22px; height: 22px; place-items: center; font-style: normal; }
.arch.on { border-color: var(--blue); } .arch.on .tick { display: grid; }
.switcher { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sw-app { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.sw-app small { font-size: .72rem; text-align: center; }
.pcard { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start; }
.pcard .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.scopes { display: flex; flex-wrap: wrap; gap: 4px; } .scopes span { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); }
.dest { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
.dest.off { opacity: .55; }
.tstat { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface2); white-space: nowrap; }
.tstat.published, .tstat.handed_off { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tstat.failed, .tstat.requires_reauth { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.tstat.scheduled, .tstat.publishing { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.msg-tabs { margin-bottom: 10px; }
.conv .src-badge { position: absolute; left: 42px; top: 38px; border: 2px solid var(--surface); }
.conv { position: relative; }

/* ---------- Nepzaa brand alignment (same palette and type as the Nepzaa Home) ---------- */
:root { --font-display: "Fraunces", "Iowan Old Style", Georgia, serif; }
.section-title h2, .topbar h1, .page > header h1, .brand b { font-family: var(--font-display); letter-spacing: -0.015em; }
.btn.primary, .btn.pri { background: linear-gradient(135deg, var(--crimson), var(--crimson-l)); }

/* ---------- Saathi home: refresh bar, pull-to-refresh, trending-news slideshow ---------- */
.homebar { display: flex; justify-content: flex-end; margin: 4px 0 6px; }
.homebar .btn { display: inline-flex; align-items: center; gap: 6px; }
.ptr { height: 0; overflow: hidden; text-align: center; font-size: .85rem; color: var(--muted); transition: height .15s ease; }
.ptr.show { height: 30px; line-height: 30px; }
.ptr.go { color: var(--crimson); font-weight: 700; }
.tnews { margin: 6px 0 14px; }
.tnews .section-title { margin: 4px 0 8px; }
.tn-view { position: relative; height: 92px; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.tn-slide { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 12px; padding: 0; color: var(--text); text-decoration: none; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.tn-slide.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.tn-slide.sk { padding: 18px; flex-direction: column; justify-content: center; gap: 10px; opacity: 1; visibility: visible; }
.tn-img { flex: 0 0 120px; background-size: cover; background-position: center; }
.tn-txt { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 14px; min-width: 0; }
.tn-txt small { font-size: .78rem; }
.tn-txt b { font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tn-slide:not(:has(.tn-img)) .tn-txt { border-left: 4px solid var(--crimson); padding-left: 14px; }
.tn-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.tn-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.tn-dots button.on { width: 22px; background: linear-gradient(90deg, var(--crimson), var(--blue)); }
.tn-empty { padding: 20px; }
@media (prefers-reduced-motion: reduce) { .tn-slide { transition: none; } .ptr { transition: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* "Coming soon" markers for Facebook / Instagram / Snapchat sharing and messaging */
.soon-tag { font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--crimson) 14%, transparent); color: var(--crimson); vertical-align: middle; margin-left: 4px; }
.chips button.is-soon, .chips button:disabled { opacity: .6; cursor: not-allowed; }
.coming-soon { padding: 24px 16px; }

/* ---------- White like the Store: the dark gradient blocks (date bar, banners) become white cards with dark text ---------- */
.datebar { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px -12px rgba(0, 31, 84, .5); }
.datebar a { color: var(--text); }
.db-date small, .db-time small { opacity: 1; color: var(--muted); }
.hero, .hero-np, .mod-hero, .mod-hero.blue, .paywall .pw-hero { color: var(--text); background: linear-gradient(150deg, #ffffff 0%, #f3f6ff 70%, #fdeff2 130%); border: 1px solid var(--line); box-shadow: 0 10px 26px -18px rgba(0, 31, 84, .35); }
.hero::before, .mod-hero::after { display: none; }
.hero h1 { text-shadow: none; color: var(--blue-d); }
.hero p, .mod-hero p { opacity: 1; color: var(--muted); }
.hero .date-chip { background: #fff; border-color: var(--line); color: var(--text); }
.hero .sun { background: radial-gradient(circle at 35% 35%, #fff, #ffe3e8 40%, rgba(200, 16, 46, .15) 72%); }
.hero .flag, .hero-np .flag { filter: none; }
.mod-hero .orb { --c1: rgba(200, 16, 46, .9); --c2: rgba(200, 16, 46, .6); --c3: rgba(0, 56, 147, .45); color: #fff; }
.hero-np .big { color: var(--blue-d); }
.paywall .pw-hero .ic { color: var(--crimson); }

/* ---- photo editor (profile picture and cover): web/js/ui/cropper.js ---- */
.cr { display: flex; flex-direction: column; gap: 10px; }
.cr-stage { position: relative; overflow: hidden; border-radius: 16px; background: var(--surface2); touch-action: none; cursor: grab; margin: 0 auto; width: 100%; user-select: none; -webkit-user-select: none; outline-offset: 2px; }
.cr-stage:active { cursor: grabbing; }
.cr-sq { aspect-ratio: 1 / 1; max-width: 340px; }
.cr-wide { aspect-ratio: 5 / 2; }
.cr-stage canvas { position: absolute; inset: 0; display: block; }
.cr-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(8, 12, 24, .55), inset 0 0 0 2px rgba(255, 255, 255, .85); }
.cr-frame { position: absolute; inset: 0; pointer-events: none; border-radius: 16px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.cr-ctl { display: flex; align-items: center; gap: 8px; }
.cr-ctl input[type=range] { flex: 1; min-width: 0; accent-color: var(--crimson, #c8102e); }
.cr-hint { margin: 0; }
.cr-h { margin: 6px 0 0; }
.cr-prev { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.cr-mock { width: 220px; border: 1px solid var(--line); border-radius: 14px; padding-bottom: 8px; overflow: hidden; background: var(--bg); }
.cr-mock small { display: block; padding: 0 10px; }
.cr-mcover { height: 56px; background: linear-gradient(120deg, var(--crimson), var(--blue)) center/cover; }
.cr-mrow { display: flex; align-items: flex-end; gap: 8px; padding: 0 10px 4px; margin-top: -24px; position: relative; }
.cr-mrow b { padding-bottom: 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-circ { border-radius: 50%; background: var(--surface2); box-shadow: 0 0 0 3px var(--bg); flex: none; }
.cr-small { display: flex; gap: 18px; align-items: flex-end; }
.cr-small > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cr-prev-cover { flex-direction: column; }
.cr-pc { position: relative; border-radius: 0 0 14px 14px; overflow: visible; margin-bottom: 26px; }
.cr-pc canvas { display: block; width: 100%; height: 100%; border-radius: 0 0 14px 14px; background: var(--surface2); }
.cr-pc.phone { width: 230px; height: 104px; } .cr-pc.desk { width: 330px; height: 85px; }
.cr-pav { position: absolute; left: 10px; bottom: -22px; }
.cr-pav .av { box-shadow: 0 0 0 3px var(--bg); }

/* profile picture in the Community top bar: opens the person's own profile */
.my-profile-link { display: inline-flex; border-radius: 50%; line-height: 0; }
.my-profile-link:focus-visible { outline: 2px solid var(--blue, #1d4ed8); outline-offset: 2px; }
.my-profile-link .av { box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 3px var(--line, #e2e7f3); }
