/* =========================================================
   আশেপাশে — Main Stylesheet
   ========================================================= */

:root {
  --green-50:  #ecfdf5;
  --green-100: #d1fae5;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065f46;
  --orange-500:#f97316;
  --orange-600:#ea580c;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --ink: #0f172a;
  --cream: #fdf8ef;
  --amber-50: #fffbeb;
  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 16px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12);
  --max-width: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; max-width: 100%; color-scheme: light; }

body {
  margin: 0;
  font-family: 'Noto Sans Bengali', -apple-system, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green-700);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-solid { background: var(--orange-500); color: #fff; }
.btn-solid:hover { background: var(--orange-600); }
.btn-outline { border-color: var(--slate-200); color: var(--slate-700); }
.btn-outline:hover { border-color: var(--slate-400); }
.btn-ghost { border-color: var(--slate-200); color: var(--slate-700); background: #fff; }
.btn-ghost:hover { background: var(--green-50); border-color: var(--green-600); color: var(--green-700); }
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header.has-banner { position: sticky; overflow: hidden; }
.header-bg-image {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: right center; background-repeat: no-repeat;
}
.header-bg-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.9) 40%, rgba(255,255,255,.72) 100%);
}
.site-header.has-banner .header-inner { position: relative; z-index: 2; }
[data-theme="dark"] .header-bg-overlay {
  background: linear-gradient(90deg, rgba(10,15,28,.94) 0%, rgba(10,15,28,.9) 40%, rgba(10,15,28,.7) 100%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon { font-size: 26px; }
.logo-img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; forced-color-adjust: none; -webkit-forced-color-adjust: none; }
.footer-logo-img { height: 38px; width: auto; max-width: 200px; object-fit: contain; display: block; forced-color-adjust: none; -webkit-forced-color-adjust: none; }
.logo-wordmark-img { height: 42px; width: auto; max-width: 220px; object-fit: contain; display: block; forced-color-adjust: none; -webkit-forced-color-adjust: none; }
.logo-wordmark-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.logo-wordmark-dark { display: none; }
[data-theme="dark"] .logo-wordmark-light { display: none; }
[data-theme="dark"] .logo-wordmark-dark { display: block; }
.logo-sub-below-wordmark { font-size: 10.5px; color: var(--slate-400); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title { font-weight: 700; font-size: 19px; color: var(--green-700); }
.logo-sub { font-size: 10px; color: var(--slate-400); }

.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.header-search input {
  width: 100%;
  background: var(--slate-50);
  border: none;
  border-radius: 999px;
  padding: 10px 42px 10px 18px;
  font-size: 14px;
  font-family: inherit;
  transition: all .18s ease;
  box-shadow: inset 3px 3px 7px rgba(163,177,198,.35), inset -3px -3px 7px rgba(255,255,255,.9);
}
[data-theme="dark"] .header-search input {
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.4), inset -3px -3px 7px rgba(255,255,255,.03);
}
.header-search input:focus {
  outline: none;
  background: #fff;
  box-shadow: inset 3px 3px 7px rgba(163,177,198,.35), inset -3px -3px 7px rgba(255,255,255,.9), 0 0 0 3px var(--green-100);
}
.header-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate-400);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-search button:hover { color: var(--green-600); background: var(--green-50); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bn-date-widget {
  font-size: 11.5px; font-weight: 600; color: var(--slate-500);
  white-space: nowrap; padding: 7px 14px; border-radius: 12px;
  background: var(--slate-50); border: none;
  box-shadow: 3px 3px 7px rgba(163,177,198,.3), -3px -3px 7px rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.4;
}
[data-theme="dark"] .bn-date-widget {
  box-shadow: 3px 3px 7px rgba(0,0,0,.35), -3px -3px 7px rgba(255,255,255,.03);
}
.bn-date-line1 { font-weight: 700; color: var(--slate-600); }
.bn-date-line2 { color: var(--slate-500); }
.btn-write {
  display: inline-flex; border: none; background: linear-gradient(145deg, var(--green-600), #0a7a5f); color: #fff;
  box-shadow: 3px 3px 8px rgba(5,150,105,.3), -2px -2px 6px rgba(255,255,255,.5);
  transition: all .15s ease;
}
.btn-write:hover { color: #fff; transform: translateY(-2px); box-shadow: 4px 4px 10px rgba(5,150,105,.35), -2px -2px 8px rgba(255,255,255,.6); }

.btn-header-login, .btn-header-register {
  border: none; background: linear-gradient(145deg, var(--green-600), #0a7a5f); color: #fff;
  box-shadow: 3px 3px 8px rgba(5,150,105,.3), -2px -2px 6px rgba(255,255,255,.5);
  transition: all .15s ease;
}
.btn-header-login:hover, .btn-header-register:hover {
  color: #fff; transform: translateY(-2px); box-shadow: 4px 4px 10px rgba(5,150,105,.35), -2px -2px 8px rgba(255,255,255,.6);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--slate-700);
  margin: 0 auto;
  transition: all .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  background: linear-gradient(160deg, var(--ink) 0%, #050810 100%);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.4);
}
.nav-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 24px;
}
.nav-inner::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--slate-300);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  white-space: nowrap;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #0d1420, #060a12);
  box-shadow: 3px 3px 7px rgba(0,0,0,.5), -2px -2px 6px rgba(255,255,255,.04);
  transition: all .18s ease;
}
.site-nav a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 4px 4px 10px rgba(0,0,0,.5), -2px -2px 8px rgba(255,255,255,.06);
}
.site-nav a.active {
  color: #fff;
  background: linear-gradient(145deg, var(--green-600), #0a7a5f);
  box-shadow: inset 2px 2px 5px rgba(0,0,0,.35), inset -2px -2px 5px rgba(255,255,255,.1);
}

.mobile-search-wrap { display: none; background: #fff; border-bottom: 1px solid var(--slate-200); padding: 10px 16px; }

/* ---------- Layout ---------- */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 28px;
  align-items: start;
}
.page-wrap.no-left { grid-template-columns: 1fr 320px; }
.page-wrap.single-col { grid-template-columns: 1fr; max-width: 860px; }
.main-content { min-width: 0; }

/* ---------- Sidebar cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--slate-400);
  margin: 0 0 12px;
}

/* ---------- Sidebar emboss / neumorphic treatment ---------- */
.left-sidebar .card, .right-sidebar .card {
  background: var(--slate-50);
  border: none;
  box-shadow: 6px 6px 14px rgba(163,177,198,.35), -6px -6px 14px rgba(255,255,255,.9);
}
[data-theme="dark"] .left-sidebar .card, [data-theme="dark"] .right-sidebar .card {
  background: #0f1c33 !important;
  box-shadow: 6px 6px 14px rgba(0,0,0,.4), -6px -6px 14px rgba(255,255,255,.03);
}
.left-sidebar .card-title, .right-sidebar .card-title {
  display: inline-flex; align-items: center; gap: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--slate-600);
  margin-bottom: 6px;
  background: var(--slate-50);
  box-shadow: 3px 3px 7px rgba(163,177,198,.3), -3px -3px 7px rgba(255,255,255,.85);
  transition: all .15s ease;
}
[data-theme="dark"] .sidebar-nav a {
  background: #0f1c33;
  box-shadow: 3px 3px 7px rgba(0,0,0,.35), -3px -3px 7px rgba(255,255,255,.03);
}
.sidebar-nav a:hover { transform: translateX(2px); }
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--green-600), #0a7a5f);
  color: #fff; font-weight: 700;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,.25), inset -2px -2px 5px rgba(255,255,255,.15);
}
.sidebar-nav .icon { width: 16px; text-align: center; }

.author-mini {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 8px; border-radius: 12px;
  background: var(--slate-50);
  box-shadow: 3px 3px 7px rgba(163,177,198,.3), -3px -3px 7px rgba(255,255,255,.85);
}
[data-theme="dark"] .author-mini {
  background: #0f1c33;
  box-shadow: 3px 3px 7px rgba(0,0,0,.35), -3px -3px 7px rgba(255,255,255,.03);
}
.author-mini:last-child { margin-bottom: 0; }
.fb-page-embed { min-height: 420px; border-radius: 10px; overflow-x: auto; overflow-y: hidden; }
.fb-page-embed iframe { display: block; max-width: none; }
.author-mini img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.author-mini .name { font-size: 14px; font-weight: 600; color: var(--slate-700); }
.author-mini .count { font-size: 12px; color: var(--slate-400); }

.cta-card,
.left-sidebar .cta-card, .right-sidebar .cta-card,
[data-theme="dark"] .left-sidebar .cta-card, [data-theme="dark"] .right-sidebar .cta-card {
  background: linear-gradient(135deg, var(--green-600), var(--green-800)) !important;
  color: #fff;
  border: none;
  box-shadow: 6px 6px 14px rgba(5,150,105,.3), -4px -4px 12px rgba(255,255,255,.15);
}
.cta-card h4 { margin: 0 0 6px; font-size: 16px; color: #fff; }
.cta-card p { margin: 0 0 16px; font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.6; }
.cta-card .btn { background: #fff; color: var(--green-700); }
.cta-card .btn:hover { background: var(--green-50); }

.popular-item {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px;
  padding: 8px; border-radius: 12px;
  background: var(--slate-50);
  box-shadow: 3px 3px 7px rgba(163,177,198,.3), -3px -3px 7px rgba(255,255,255,.85);
}
[data-theme="dark"] .popular-item {
  background: #0f1c33;
  box-shadow: 3px 3px 7px rgba(0,0,0,.35), -3px -3px 7px rgba(255,255,255,.03);
}
.popular-item:last-child { margin-bottom: 0; }
.popular-rank {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 2px;
  box-shadow: 2px 2px 5px rgba(0,0,0,.2);
}
.rank-1 { background: linear-gradient(145deg, #fb923c, var(--orange-500)); }
.rank-2 { background: linear-gradient(145deg, #cbd5e1, var(--slate-300)); }
.rank-3 { background: linear-gradient(145deg, #fcd34d, var(--amber-500)); }
.popular-item img {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
.popular-item .ptitle { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.popular-item .ptitle:hover { color: var(--green-700); }
.popular-item .pviews { font-size: 11.5px; color: var(--slate-400); margin-top: 3px; }

.discussion-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.discussion-item:last-child { margin-bottom: 0; }
.discussion-item .flame { color: var(--orange-500); flex-shrink: 0; margin-top: 3px; }
.discussion-item .dtitle { font-size: 13.5px; font-weight: 600; }
.discussion-item .dtitle:hover { color: var(--green-700); }
.discussion-item .dcount { font-size: 11.5px; color: var(--slate-400); }

.see-all { font-size: 12.5px; font-weight: 600; color: var(--green-600); display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; }
.see-all:hover { gap: 7px; }

.newsletter-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.newsletter-form input {
  border: 1px solid var(--slate-200); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; font-family: inherit;
}
.newsletter-form input:focus { outline: none; border-color: var(--green-600); }
.newsletter-form button { background: var(--green-600); color: #fff; border: none; border-radius: 8px; padding: 9px; font-size: 13.5px; font-weight: 600; }
.newsletter-form button:hover { background: var(--green-700); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream), var(--amber-50));
  border: 1px solid var(--slate-200);
  color: #1e293b;
  min-height: 216px;
}
.hero-tag {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 { font-size: 28px; margin: 0 0 10px; line-height: 1.35; max-width: 480px; color: #1e293b; }
.hero p { color: #475569; font-size: 14.5px; margin: 0 0 18px; max-width: 440px; }
.hero-emoji { font-size: 72px; flex-shrink: 0; }
.hero-slide-img { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; flex-shrink: 0; box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.1)); }
@media (max-width: 640px) {
  .hero-slide-img { width: 64px; height: 64px; border-radius: 12px; }
}

.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.hero-slide-active { opacity: 1; pointer-events: auto; z-index: 2; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; gap: 6px; justify-content: center; z-index: 3; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(30,41,59,.18); border: none; padding: 0; cursor: pointer; transition: all .2s ease; }
.hero-dot.active { width: 22px; background: var(--green-600); }
.hero-dot:hover { background: var(--green-600); }

/* ---------- Tag / category pills ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0; }
.pill-row .label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--green-700); margin-right: 4px; }
.pill {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  transition: all .15s ease;
}
.pill:hover { border-color: var(--green-600); color: var(--green-700); }
.pill.active { background: var(--green-600); color: #fff; border-color: var(--green-600); }

.cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.cat-pill {
  font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 10px;
  background: #fff; border: 1px solid var(--slate-200); color: var(--slate-600);
}
.cat-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-pill:hover:not(.active) { border-color: var(--slate-400); }

@media (max-width: 640px) {
  .pill-row, .cat-row { display: none; }
}

/* ---------- Section heading ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 16px; scroll-margin-top: 100px; }
.section-head h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head h2::before { content: ''; width: 4px; height: 20px; background: var(--green-600); border-radius: 3px; display: inline-block; }
.section-head .count { font-size: 12.5px; color: var(--slate-400); }

/* ---------- Post card (list) ---------- */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  transition: box-shadow .25s ease, transform .25s ease;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.post-card .thumb { width: 260px; height: 190px; flex-shrink: 0; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; min-width: 0; justify-content: center; }
.post-card .row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cat-badge {
  display: inline-block; background: var(--green-50); color: var(--green-700);
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 5px; margin-bottom: 8px;
}
.share-btn { background: none; border: none; color: #1877f2; flex-shrink: 0; animation: share-btn-blink 1.6s ease-in-out infinite; }
.share-btn:hover { color: #0d5bc4; animation-play-state: paused; }
@keyframes share-btn-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.post-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card h3 a:hover { color: var(--green-700); }
.post-card .excerpt { color: var(--slate-500); font-size: 14px; margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.byline { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; flex-wrap: wrap; }
.byline img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.byline .name { font-weight: 600; color: var(--slate-700); }
.byline .verified { color: var(--green-500); font-size: 11px; }
.byline .dot { color: var(--slate-300); }
.byline .muted { color: var(--slate-400); font-size: 12.5px; }
.meta-row {
  display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--slate-500);
  padding-top: 12px; border-top: 1px solid var(--slate-100);
}
.meta-row button { background: none; border: none; display: flex; align-items: center; gap: 5px; color: inherit; font-size: 13px; font-family: inherit; }
.meta-row .like-btn:hover, .meta-row .like-btn.liked { color: var(--rose-500); }
.meta-row .save-btn { margin-left: auto; color: var(--slate-300); }
.meta-row .save-btn:hover, .meta-row .save-btn.saved { color: var(--amber-500); }
.meta-row svg { display: block; }

/* ---------- Facebook-style engagement row (post cards) ---------- */
.fb-meta { gap: 2px; }
.fb-action {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px;
  color: var(--slate-500); font-size: 13px; font-weight: 600; transition: background .15s ease, color .15s ease;
}
button.fb-action { background: none; border: none; font-family: inherit; cursor: pointer; }
a.fb-action:hover, button.fb-action:hover { background: var(--slate-100); color: var(--slate-700); }
.fb-action.fb-static { cursor: default; }
.fb-action.fb-static:hover { background: none; color: var(--slate-500); }
.fb-meta .like-btn.liked { color: #1877f2; }
.fb-meta .like-btn.liked:hover { background: #e7f0fe; }
.fb-meta .save-btn { margin-left: auto; }
.fb-meta .save-btn.saved { color: var(--amber-500); }
.fb-meta .save-btn.saved:hover { background: #fef3c7; }
[data-theme="dark"] a.fb-action:hover, [data-theme="dark"] button.fb-action:hover { background: var(--slate-100); }
[data-theme="dark"] .fb-meta .like-btn.liked:hover { background: rgba(24,119,242,.15); }
[data-theme="dark"] .fb-meta .save-btn.saved:hover { background: rgba(245,158,11,.15); }

.empty-state {
  background: #fff; border: 1.5px dashed var(--slate-300); border-radius: var(--radius-md);
  padding: 50px 20px; text-align: center; color: var(--slate-400); font-size: 14px;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination a, .pagination span {
  width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--slate-200); background: #fff; font-size: 13.5px; color: var(--slate-600);
}
.pagination a:hover { border-color: var(--green-600); color: var(--green-700); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Single post page ---------- */
.post-hero-img { width: 100%; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; max-height: 440px; }
.post-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.post-header h1 { font-size: 30px; line-height: 1.4; margin: 10px 0 16px; overflow-wrap: break-word; word-break: break-word; }
.post-header .byline { font-size: 14px; margin-bottom: 4px; }
.post-header .byline img { width: 40px; height: 40px; }
.post-body { font-size: 16.5px; line-height: 1.95; color: var(--slate-700); overflow-wrap: break-word; word-break: break-word; }
.post-body p { margin: 0 0 20px; white-space: pre-line; }
.post-body img, .post-body video { max-width: 100%; height: auto; display: block; margin: 16px auto; border-radius: 8px; }
.post-body table { max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.post-body pre, .post-body code { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.post-body iframe, .post-body embed, .post-body object { max-width: 100%; }
.post-body * { max-width: 100%; box-sizing: border-box; }
.post-body .ql-align-center, .ql-align-center { text-align: center; }
.post-body .ql-align-right, .ql-align-right { text-align: right; }
.post-body .ql-align-justify, .ql-align-justify { text-align: justify; }

/* ---------- Per-category writing pad on the published post page ---------- */
.post-body.has-writing-pad {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
  border-radius: 16px;
  padding: 50px 60px;
}
@media (max-width: 640px) {
  .post-body.has-writing-pad { padding: 30px 24px; border-radius: 12px; }
}
[data-theme="dark"] .post-body.has-writing-pad {
  background-image: none !important;
  padding: 0;
  border-radius: 0;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.post-actions { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); margin: 24px 0; flex-wrap: wrap; }
.post-actions button { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--slate-600); font-family: inherit; cursor: pointer; transition: all .15s ease; }
.post-actions button:hover { border-color: var(--slate-400); }
.post-actions button:disabled { opacity: .6; cursor: default; }
.post-actions button.liked { background: #fee2e2; color: var(--rose-500); border-color: #fecaca; }
.post-actions button.saved { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.post-actions .share-btn:hover, .post-actions .comment-jump-btn:hover { border-color: var(--slate-400); }

/* ---------- Facebook-style summary line + flat action bar (single post) ---------- */
.fb-summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 0; font-size: 13.5px; color: var(--slate-500); }
.fb-summary-likes { display: flex; align-items: center; gap: 6px; }
.fb-summary-likes .like-bubble {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: #1877f2; font-size: 11px; color: #fff;
}
.fb-summary-right a { color: inherit; }
.fb-summary-right a:hover { text-decoration: underline; }
.fb-summary-right .dot { margin: 0 6px; }

.fb-action-bar {
  padding: 6px 0; margin: 8px 0 12px; border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200);
  gap: 0; flex-wrap: nowrap;
}
.fb-bar-btn {
  flex: 1; justify-content: center; background: none !important; border: none !important;
  border-radius: 8px !important; padding: 10px 8px !important; margin: 4px;
  color: var(--slate-500) !important; font-size: 14px;
}
.fb-bar-btn:hover { background: var(--slate-100) !important; color: var(--slate-700) !important; }
.fb-bar-btn.liked { color: #1877f2 !important; }
.fb-bar-btn.liked:hover { background: #e7f0fe !important; }
.fb-bar-btn.share-btn { color: #1877f2 !important; animation: share-btn-blink 1.6s ease-in-out infinite; }
.fb-bar-btn.share-btn:hover { color: #0d5bc4 !important; animation-play-state: paused; }

.post-actions-secondary { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; flex-wrap: wrap; }
.post-actions-secondary button, .post-actions-secondary a {
  background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px;
  color: var(--slate-600); font-family: inherit; cursor: pointer;
}
.post-actions-secondary button.saved { background: #fef3c7; color: #b45309; border-color: #fde68a; }

[data-theme="dark"] .fb-bar-btn:hover { background: var(--slate-100) !important; }
[data-theme="dark"] .fb-bar-btn.liked:hover { background: rgba(24,119,242,.15) !important; }

/* ---------- Facebook-style reaction picker ---------- */
.reaction-wrap { position: relative; }
.fb-action-bar .reaction-wrap { flex: 1; display: flex; }
.fb-action-bar .reaction-wrap .fb-bar-btn { flex: 1; }
.reaction-icon { font-size: 17px; line-height: 1; }
.reaction-wrap-sm .reaction-icon { font-size: 14px; }

.reaction-picker {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
  display: flex; gap: 4px; background: #fff; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); padding: 6px 8px; z-index: 30;
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.9);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none; white-space: nowrap;
}
.reaction-picker.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.reaction-picker-item {
  background: none; border: none; font-size: 26px; line-height: 1; padding: 3px;
  cursor: pointer; transition: transform .15s ease; font-family: inherit;
}
.reaction-picker-item:hover { transform: scale(1.35) translateY(-6px); }
.reaction-picker-sm { padding: 4px 6px; gap: 2px; }
.reaction-picker-sm .reaction-picker-item { font-size: 18px; padding: 2px; }
[data-theme="dark"] .reaction-picker { background: #16213a; box-shadow: 0 4px 16px rgba(0,0,0,.5); }

.author-box { display: flex; gap: 16px; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 20px; margin: 28px 0; }
.author-box img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h4 { margin: 0 0 4px; font-size: 16px; }
.author-box p { margin: 0; font-size: 13.5px; color: var(--slate-500); }

.related-posts { margin-top: 36px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); overflow: hidden; }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card .rc-body { padding: 14px; }
.related-card h5 { font-size: 14.5px; margin: 0 0 6px; line-height: 1.4; }
.related-card h5:hover { color: var(--green-700); }
.related-card .rc-meta { font-size: 12px; color: var(--slate-400); }

/* ---------- Category page ---------- */
.cat-hero {
  background: var(--ink); color: #fff; padding: 40px 0; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(56,232,225,.5);
  animation: cat-hero-heartbeat-glow 1.8s ease-in-out infinite;
}
@keyframes cat-hero-heartbeat-glow {
  0%   { box-shadow: inset 0 0 0 2px rgba(56,232,225,.35), 0 0 6px rgba(56,232,225,.25); }
  8%   { box-shadow: inset 0 0 0 2px rgba(56,232,225,.9),  0 0 22px rgba(56,232,225,.7); }
  16%  { box-shadow: inset 0 0 0 2px rgba(56,232,225,.35), 0 0 6px rgba(56,232,225,.25); }
  24%  { box-shadow: inset 0 0 0 2px rgba(56,232,225,.75), 0 0 16px rgba(56,232,225,.55); }
  32%  { box-shadow: inset 0 0 0 2px rgba(56,232,225,.35), 0 0 6px rgba(56,232,225,.25); }
  100% { box-shadow: inset 0 0 0 2px rgba(56,232,225,.35), 0 0 6px rgba(56,232,225,.25); }
}
.cat-hero-ecg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; opacity: .8; pointer-events: none; }
.cat-hero-ecg path {
  fill: none; stroke: #38e8e1; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #38e8e1) drop-shadow(0 0 8px #38e8e1);
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: cat-hero-ecg-draw 1.8s linear infinite;
}
@keyframes cat-hero-ecg-draw {
  0% { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: -600; }
}
.cat-hero h1 { margin: 0 0 8px; font-size: 26px; position: relative; z-index: 1; }
.cat-hero p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; position: relative; z-index: 1; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 30px; }
.cat-tile { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 22px; text-align: center; transition: all .18s ease; }
.cat-tile:hover { border-color: var(--green-600); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.cat-tile .emoji { font-size: 30px; margin-bottom: 10px; }
.cat-tile h3 { margin: 0 0 4px; font-size: 16px; }
.cat-tile p { margin: 0; font-size: 12.5px; color: var(--slate-400); }

/* ---------- About page ---------- */
.about-hero { text-align: center; padding: 50px 0 30px; }
.about-hero h1 { font-size: 30px; margin: 0 0 12px; }
.about-hero p { max-width: 560px; margin: 0 auto; color: var(--slate-500); font-size: 15px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px 0; }
.about-stat { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 24px; text-align: center; }
.about-stat .num { font-size: 28px; font-weight: 800; color: var(--green-700); }
.about-stat .lab { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
.about-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 30px 0; }
.team-card { text-align: center; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 22px 14px; }
.team-card img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }
.team-card h4 { margin: 0 0 4px; font-size: 15px; }
.team-card p { margin: 0; font-size: 12.5px; color: var(--slate-400); }

/* ---------- Contact page ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; margin: 30px 0 50px; }
.contact-form-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 28px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--slate-700); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; border: 1px solid var(--slate-200); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.form-row textarea { resize: vertical; min-height: 130px; }

/* ---------- Password show/hide toggle (applied automatically, site-wide) ---------- */
.password-wrap { position: relative; }
.password-wrap input[type="password"], .password-wrap input[type="text"] { padding-right: 42px !important; }
.password-toggle-btn {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--slate-400); cursor: pointer; border-radius: 6px;
}
.password-toggle-btn:hover { color: var(--slate-600); background: var(--slate-100); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.contact-info-card { background: var(--ink); color: #fff; border-radius: var(--radius-md); padding: 28px; }
.contact-info-card h3 { margin: 0 0 6px; }
.contact-info-card p { color: rgba(255,255,255,.8); font-size: 13.5px; margin: 0 0 20px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; }
.info-item .ic { color: var(--green-400); flex-shrink: 0; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 90px 20px; }
.error-page .big { font-size: 80px; font-weight: 800; color: var(--slate-200); line-height: 1; }
.error-page h1 { font-size: 22px; margin: 10px 0; }
.error-page p { color: var(--slate-500); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(160deg, var(--ink) 0%, #050810 100%);
  color: rgba(255,255,255,.75); margin-top: 56px; position: relative;
  box-shadow: inset 0 8px 20px rgba(0,0,0,.35);
}
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-600), var(--amber-500), var(--green-600));
  background-size: 200% 100%; animation: footer-shimmer 6s linear infinite;
}
@keyframes footer-shimmer { to { background-position: -200% 0; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding: 52px 24px 36px; }
.footer-col h4 {
  color: #fff; font-size: 14.5px; font-weight: 700; margin: 0 0 18px; display: inline-flex; align-items: center; gap: 8px;
  position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--green-500, var(--green-600)), var(--amber-500));
}
.footer-heading-wide { display: block; width: 100%; }
.footer-heading-wide::after { width: 100% !important; }
.footer-col p { font-size: 13.5px; line-height: 1.75; color: rgba(255,255,255,.55); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 11px; }
.footer-cat-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.footer-col ul a { font-size: 13.5px; color: rgba(255,255,255,.55); transition: color .15s ease, padding-left .15s ease; }
.footer-col ul a:hover { color: var(--amber-500); padding-left: 3px; }

.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, #0d1420, #060a12);
  border: none;
  box-shadow: 4px 4px 8px rgba(0,0,0,.5), -3px -3px 7px rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff;
  transition: all .2s ease;
}
.social-links a:hover {
  background: linear-gradient(135deg, var(--green-600), #0d9488); border-color: transparent;
  transform: translateY(-3px); box-shadow: 0 6px 16px rgba(5,150,105,.4);
}

.footer-newsletter-heading { display: flex; align-items: center; gap: 8px; }
.footer-newsletter {
  display: flex; gap: 0; margin-top: 6px; background: linear-gradient(145deg, #06090f, #0c1119);
  border: none; border-radius: 14px; padding: 5px; overflow: hidden;
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.5), inset -3px -3px 7px rgba(255,255,255,.03);
}
.footer-newsletter input {
  flex: 1; min-width: 0; border: none; background: transparent; color: #fff;
  border-radius: 8px; padding: 10px 12px; font-size: 13.5px; font-family: inherit;
}
.footer-newsletter input:focus { outline: none; }
.footer-newsletter input::placeholder { color: rgba(255,255,255,.4); }
.footer-newsletter button {
  background: linear-gradient(135deg, var(--green-600), #0d9488); color: #fff; border: none; border-radius: 10px;
  padding: 0 18px; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
  box-shadow: 3px 3px 7px rgba(0,0,0,.4), -2px -2px 6px rgba(255,255,255,.05);
  transition: filter .15s ease, transform .1s ease;
}
.footer-newsletter button:hover { filter: brightness(1.1); }
.footer-newsletter button:active { transform: scale(.97); }

.footer-bottom {
  border-top: none; padding: 18px 24px; text-align: center;
  font-size: 12.5px; color: rgba(255,255,255,.45); background: rgba(0,0,0,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 4px 8px rgba(0,0,0,.3);
}
.footer-credit { color: rgba(255,255,255,.45); border-bottom: 1px dotted rgba(255,255,255,.25); }
.footer-credit:hover { color: var(--amber-500); border-bottom-color: var(--amber-500); }
.footer-credit::before { content: '•'; margin: 0 8px; text-decoration: none; display: inline-block; }

#back-to-top {
  position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(145deg, var(--green-600), #0a7a5f); color: #fff; border: none; font-size: 18px;
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 8px rgba(255,255,255,.15), 0 6px 18px rgba(5,150,105,.35);
  display: none; align-items: center; justify-content: center; z-index: 60;
  transition: transform .15s ease;
}
#back-to-top.show { display: flex; }
#back-to-top:hover { transform: translateY(-3px); }

/* ---------- Mobile bottom navigation (app-style) ---------- */
.mobile-bottom-nav { display: none; }
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex; align-items: flex-end; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--slate-50); border-top: none;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(163,177,198,.35);
  }
  body { padding-bottom: 64px; }
  #back-to-top { bottom: calc(24px + 64px + env(safe-area-inset-bottom, 0px)); }
}
.mbn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--slate-400); font-size: 10px; font-weight: 600; flex: 1;
  padding: 6px 2px; position: relative; min-width: 0; border-radius: 12px;
  transition: all .15s ease;
}
.mbn-item span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mbn-item.active {
  color: var(--green-600);
  background: #fff;
  box-shadow: 3px 3px 7px rgba(163,177,198,.3), -3px -3px 7px rgba(255,255,255,.9);
}
[data-theme="dark"] .mbn-item.active {
  background: #16233d;
  box-shadow: 3px 3px 7px rgba(0,0,0,.35), -3px -3px 7px rgba(255,255,255,.03);
}
.mbn-item svg { flex-shrink: 0; }
.mbn-avatar { width: 23px; height: 23px; border-radius: 50%; object-fit: cover; border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.mbn-item.active .mbn-avatar { border-color: var(--green-600); }
.mbn-badge {
  position: absolute; top: -2px; right: 18%; background: linear-gradient(145deg, var(--rose-500), #be123c); color: #fff;
  font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
}
.mbn-fab-wrap { flex: 0 0 auto; padding: 0 10px; }
.mbn-fab {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, var(--green-600), #0a7a5f);
  display: flex; align-items: center; justify-content: center; margin-top: -24px;
  box-shadow: 4px 4px 10px rgba(5,150,105,.4), -2px -2px 8px rgba(255,255,255,.3), 0 6px 16px rgba(5,150,105,.3);
  border: 3px solid var(--slate-50);
  transition: transform .15s ease;
}
.mbn-fab-wrap:active .mbn-fab { transform: scale(.94); }
[data-theme="dark"] .mobile-bottom-nav { background: #0f1c33; }
[data-theme="dark"] .mbn-fab { border-color: #0f1c33; }

/* ---------- Rich text editor (Quill) ---------- */
.editor-wrap { border: 1px solid var(--slate-200); border-radius: 10px; overflow: visible; position: relative; }
#editor-toolbar {
  border: none !important; border-bottom: 1px solid var(--slate-200) !important;
  border-radius: 10px 10px 0 0; background: var(--slate-50); padding: 8px !important;
}
#editor-toolbar button, #editor-toolbar .ql-picker-label { border-radius: 5px; }
#editor-toolbar button:hover, #editor-toolbar .ql-picker-label:hover { color: var(--green-600) !important; }
#editor-toolbar .ql-stroke { transition: stroke .15s ease; }
#editor-toolbar button:hover .ql-stroke { stroke: var(--green-600) !important; }
#editor-toolbar #emoji-btn { border: none; background: none; font-size: 16px; cursor: pointer; padding: 0 6px; line-height: 24px; }
#editor-container { border: none !important; min-height: 260px; font-size: 15px; font-family: 'Noto Sans Bengali', sans-serif; }
#editor-container .ql-editor { min-height: 260px; line-height: 1.9; }
#editor-container .ql-editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
#editor-container.ql-container { border-radius: 0 0 10px 10px; }

/* ---------- Per-category writing pad background ---------- */
.editor-wrap.has-pad #editor-toolbar { background: rgba(255,255,255,.85); backdrop-filter: blur(2px); }
.editor-wrap.has-pad #editor-container.ql-container {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
}
.editor-wrap.has-pad #editor-container .ql-editor { background: transparent !important; padding: 48px 60px; min-height: 420px; }
@media (max-width: 640px) {
  .editor-wrap.has-pad #editor-container .ql-editor { padding: 28px 24px; }
}

.emoji-panel {
  display: none; position: absolute; z-index: 50; top: 44px; left: 8px; width: 300px;
  max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--slate-200);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 10px; flex-wrap: wrap; gap: 4px;
}
.emoji-panel.open { display: flex; }
.emoji-group-heading {
  flex-basis: 100%; font-size: 11px; font-weight: 700; color: var(--slate-400);
  margin: 8px 0 2px; padding: 0 2px;
}
.emoji-group-heading:first-child { margin-top: 0; }
.emoji-item { font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; }
.emoji-item:hover { background: var(--slate-100); }

/* ---------- Header dropdowns (notifications / profile) ---------- */
.dropdown-wrap { position: relative; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--slate-50);
  display: flex; align-items: center; justify-content: center; color: var(--slate-600); position: relative;
  box-shadow: 3px 3px 7px rgba(163,177,198,.35), -3px -3px 7px rgba(255,255,255,.9);
  transition: all .15s ease;
}
[data-theme="dark"] .icon-btn {
  box-shadow: 3px 3px 7px rgba(0,0,0,.4), -3px -3px 7px rgba(255,255,255,.03);
}
.icon-btn:hover { transform: translateY(-2px); }
.avatar-btn { padding: 0; overflow: hidden; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.badge-dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange-500); border: 2px solid #fff; }

/* ---------- Header bell — blinks continuously for admins/editors while
   any post is awaiting approval, so it's noticeable even on the public
   site (not just inside the admin panel) ---------- */
.icon-btn.has-pending {
  color: #b45309 !important; background: #fef3c7 !important; border-color: #fde68a !important;
  animation: header-bell-ring 1.4s ease-in-out infinite;
}
.pending-count-dot {
  position: absolute; top: -4px; right: -4px; width: auto; height: 17px; min-width: 17px;
  border-radius: 999px; background: #ea580c; border: none; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
@keyframes header-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-14deg); }
  20%, 40% { transform: rotate(14deg); }
  50% { transform: rotate(0deg); }
}
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: #fff;
  border: 1px solid var(--slate-200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 6px 0; z-index: 200; display: none;
}
.dropdown-wrap.open .dropdown-menu { display: block; }
.dropdown-head { padding: 10px 16px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--slate-100); margin-bottom: 4px; }
.dropdown-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 16px; font-size: 13.5px; color: var(--slate-600); }
.dropdown-item:hover { background: var(--slate-50); }
.dropdown-item.unread { background: var(--green-50); font-weight: 600; }
.dropdown-item .d-time { font-size: 11px; color: var(--slate-400); flex-shrink: 0; }
.dropdown-empty { padding: 20px 16px; text-align: center; font-size: 13px; color: var(--slate-400); }
.dropdown-foot { display: block; text-align: center; padding: 9px; font-size: 12.5px; font-weight: 600; color: var(--green-600); border-top: 1px solid var(--slate-100); margin-top: 4px; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto 60px; padding: 0 20px; }
.auth-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 34px 30px; text-align: center; }
.auth-logo { font-size: 38px; margin-bottom: 8px; }
.auth-logo-img { max-height: 60px; max-width: 240px; width: auto; height: auto; object-fit: contain; margin: 0 auto 4px; display: block; forced-color-adjust: none; -webkit-forced-color-adjust: none; }
.auth-logo-dark { display: none; }
[data-theme="dark"] .auth-logo-light { display: none; }
[data-theme="dark"] .auth-logo-dark { display: block; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-sub { color: var(--slate-500); font-size: 13.5px; margin: 0 0 22px; }
.auth-card form { text-align: right; }
.auth-card .form-row { margin-bottom: 14px; }
.auth-foot { font-size: 13.5px; color: var(--slate-500); margin-top: 18px; }
.auth-foot a { color: var(--green-600); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-post-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.dash-post-row img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* ---------- Post scheduling UI ---------- */
.sched-summary {
  background: linear-gradient(135deg, var(--green-50), var(--amber-50));
  border: 1px solid var(--green-100); border-radius: var(--radius-md); padding: 18px; margin-bottom: 22px;
}
.sched-date-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.sched-date-card {
  flex-shrink: 0; width: 200px; background: #fff; border: 1px solid var(--slate-200);
  border-radius: 12px; overflow: hidden;
}
.sched-date-badge {
  background: var(--slate-900); color: #fff; padding: 10px 14px; display: flex; align-items: baseline; gap: 8px;
}
.sched-day { font-size: 20px; font-weight: 800; }
.sched-month { font-size: 11.5px; color: var(--slate-300); }
.sched-date-posts { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.sched-mini-post { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--slate-200); }
.sched-mini-post:last-child { border-bottom: none; padding-bottom: 0; }
.sched-mini-time { font-size: 11px; font-weight: 700; color: var(--green-700); }
.sched-mini-title { font-size: 12.5px; color: var(--slate-700); font-weight: 600; }

.sched-toggle-btn {
  background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px;
}
.sched-inline-badge { color: var(--green-700); font-weight: 600; }
.sched-inline-form { display: none; background: var(--slate-50); border-radius: 8px; padding: 12px; margin: -4px 0 10px; }
.sched-inline-form.open { display: block; }
[data-theme="dark"] .sched-inline-form { background: #101a2e; }
.sched-inline-form input[type="datetime-local"] {
  border: 1px solid var(--slate-200); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
.dp-title { font-weight: 600; font-size: 14.5px; display: block; margin-bottom: 4px; }
.dp-title:hover { color: var(--green-700); }
.dp-meta { font-size: 12px; color: var(--slate-400); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dp-actions { display: flex; gap: 6px; flex-shrink: 0; }
.dp-actions a, .dp-actions button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--slate-200); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.dp-actions a:hover, .dp-actions button:hover { background: var(--slate-50); }
.status-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-published { background: var(--green-100); color: var(--green-700); }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #b91c1c; }
.status-draft { background: var(--slate-100); color: var(--slate-600); }
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--slate-100); font-size: 14px; color: var(--slate-700); }
.notif-row:last-child { border-bottom: none; }

/* ---------- Comments ---------- */
.comments-section { margin-top: 36px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 24px; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-form textarea { width: 100%; border: 1px solid var(--slate-200); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-family: inherit; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--green-600); }
.comment-list { display: flex; flex-direction: column; gap: 18px; }
.comment-item { display: flex; gap: 12px; }
.comment-item + .comment-item { margin-top: 18px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.comment-head .name { font-weight: 700; font-size: 13.5px; }
.comment-head .time { font-size: 12px; color: var(--slate-400); }
.comment-body p { margin: 0; font-size: 14px; color: var(--slate-600); line-height: 1.7; overflow-wrap: break-word; word-break: break-word; }
.comment-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.comment-reply-btn { background: none; border: none; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--green-600); cursor: pointer; }
.comment-reply-btn:hover { text-decoration: underline; }
.comment-delete { background: none; border: none; color: var(--slate-300); font-size: 12px; margin-top: 0; }
.comment-delete:hover { color: var(--rose-500); }
.reply-form { margin: 10px 0 4px; }
.reply-form textarea { min-height: 44px; }
.comment-replies { margin-top: 14px; padding-left: 18px; border-left: 2px solid var(--slate-100); display: flex; flex-direction: column; gap: 16px; }
.comment-replies .comment-avatar { width: 30px; height: 30px; }

/* =========================================================
   Responsive breakpoints
   ========================================================= */
@media (max-width: 1180px) {
  .page-wrap { grid-template-columns: 220px 1fr 280px; gap: 20px; }
}

/* Per spec: sidebars are visible on desktop and tablet-landscape (≥1024px
   wide), and fully hidden — not reflowed, not shown below content — on
   tablet-portrait and any mobile orientation (<1024px). Main content then
   uses the full width. */
@media (max-width: 1023px) {
  .left-sidebar, .right-sidebar { display: none !important; }
  .page-wrap, .page-wrap.no-left { grid-template-columns: 1fr !important; }
  .page-wrap { max-width: 860px; }
}

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-team { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .bn-date-widget { display: none; }
}

@media (max-width: 768px) {
  .header-search:not(.mobile-only) { display: none; }
  .btn-write span, .header-actions .btn-outline, .header-actions .btn-solid { display: none; }
  .page-wrap { padding-top: 8px; }
  .nav-toggle { display: flex; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .nav-inner { flex-direction: column; gap: 8px; padding: 14px 16px; }
  .site-nav a { border-left: 3px solid transparent; }
  .site-nav a.active { border-left-color: var(--green-500, var(--green-600)); }

  .hero { flex-direction: column; text-align: center; padding: 28px 22px; }
  .hero h1 { font-size: 22px; max-width: none; }
  .hero p { max-width: none; }
  .hero-emoji { font-size: 54px; }

  .post-card .thumb { width: 120px; height: 120px; }
  .post-card .body { padding: 12px 14px; }
  .post-card h3 { font-size: 15px; margin-bottom: 5px; -webkit-line-clamp: 2; }
  .post-card .excerpt { display: none; }
  .post-card .meta-row { padding-top: 8px; gap: 10px; font-size: 12px; }
  .post-card .cat-badge { font-size: 10.5px; padding: 2px 7px; margin-bottom: 4px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-team { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding: 34px 20px 20px; }
  .dropdown-menu { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; min-width: 0; }
  .auth-wrap { margin: 24px auto 40px; }
  .auth-card { padding: 26px 20px; }
  .comment-form { flex-direction: column; }
  .dash-post-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .container, .page-wrap { padding-left: 16px; padding-right: 16px; }
  .logo-sub { display: none; }
  .logo-sub-below-wordmark { display: none; }
  .logo-wordmark-img { height: 30px; max-width: 150px; }
  .post-header h1 { font-size: 22px; }
  .hero h1 { font-size: 19px; }
  .about-team { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   Dark mode — flips the slate scale so most components (which
   already reference --slate-* variables) adapt automatically;
   explicit overrides below cover elements with literal #fff.
   ========================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --slate-50:  #16213a;
  --slate-100: #1c2942;
  --slate-200: #2a3a58;
  --slate-300: #3d5170;
  --slate-400: #93a5c4;
  --slate-500: #a9b8d1;
  --slate-600: #c3cfe3;
  --slate-700: #dde4f0;
  --slate-800: #eef1f8;
  --slate-900: #f6f8fc;
  --green-50: #0d2b23;
  --green-100: #114031;
  color-scheme: dark;
}
[data-theme="dark"] body { background: #0a0f1c; }
[data-theme="dark"] #theme-icon-dark,
[data-theme="dark"] #theme-icon-light { color: var(--slate-700); }

[data-theme="dark"] .site-header,
[data-theme="dark"] .mobile-search-wrap,
[data-theme="dark"] .card,
[data-theme="dark"] .pill,
[data-theme="dark"] .cat-pill,
[data-theme="dark"] .related-card,
[data-theme="dark"] .cat-tile,
[data-theme="dark"] .about-stat,
[data-theme="dark"] .team-card,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .emoji-panel,
[data-theme="dark"] .avatar-btn img,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .dash-post-row,
[data-theme="dark"] .dp-actions a,
[data-theme="dark"] .dp-actions button,
[data-theme="dark"] #editor-container,
[data-theme="dark"] .related-card,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .header-search,
[data-theme="dark"] .post-card,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span,
[data-theme="dark"] .mobile-composer-bar,
[data-theme="dark"] .mobile-stories-row,
[data-theme="dark"] .sched-date-card,
[data-theme="dark"] .btn-ghost {
  background: #101a2e !important;
  border-color: var(--slate-200) !important;
}
[data-theme="dark"] .bn-date-widget {
  background: #101a2e !important;
  border-color: var(--slate-200) !important;
  color: var(--slate-500) !important;
}
[data-theme="dark"] .header-search input:focus { background: #101a2e; }
[data-theme="dark"] .header-search input,
[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row textarea,
[data-theme="dark"] .form-row select,
[data-theme="dark"] .reply-form textarea,
[data-theme="dark"] .editor-wrap {
  background: #101a2e;
  color: var(--slate-100);
  border-color: var(--slate-200);
}
[data-theme="dark"] .ql-snow .ql-picker-options,
[data-theme="dark"] #editor-toolbar { background: #16213a !important; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--slate-600); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--slate-600); }
[data-theme="dark"] .ql-editor.ql-blank::before { color: var(--slate-400); }
[data-theme="dark"] .comment-replies { border-left-color: var(--slate-200); }
[data-theme="dark"] .site-nav { background: #060a14; }
[data-theme="dark"] .site-nav a { color: #fff !important; }
[data-theme="dark"] .site-nav a:hover,
[data-theme="dark"] .site-nav a.active { color: #fff !important; }
[data-theme="dark"] .site-footer { background: #060a14; }
[data-theme="dark"] img { filter: brightness(.94); }
[data-theme="dark"] .logo-img { filter: none; }

/* ---------- Writer badges & ranking ---------- */
.writer-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  background: var(--green-50); color: var(--green-700); padding: 5px 14px; border-radius: 999px;
  margin-bottom: 10px;
}
.writer-badge .badge-emoji { font-size: 15px; }

/* ---------- Author social links & follow button ---------- */
.author-social-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.author-social-row a {
  width: 36px; height: 36px; border-radius: 50%; background: var(--slate-50); border: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--slate-600);
  transition: all .15s ease;
}
.author-social-row a:hover { background: var(--green-600); color: #fff; border-color: var(--green-600); }

/* ---------- Dashboard profile banner — always visible, every device,
   right after login (cover photo + avatar), regardless of which
   dashboard tab is open ---------- */
.dash-profile-banner {
  background: var(--slate-50); border: none; border-radius: var(--radius-lg);
  overflow: hidden; margin: 20px 0;
  box-shadow: 8px 8px 20px rgba(163,177,198,.3), -8px -8px 20px rgba(255,255,255,.85);
}
[data-theme="dark"] .dash-profile-banner { background: #16233d; box-shadow: 8px 8px 20px rgba(0,0,0,.4), -8px -8px 20px rgba(255,255,255,.03); }
.dash-profile-banner-cover { height: 260px; }
.dash-profile-banner-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash-profile-banner-info {
  display: flex; align-items: center; gap: 16px; padding: 0 20px 18px;
  margin-top: -38px; position: relative; z-index: 2;
}
.dash-profile-banner-avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: contain;
  border: 4px solid #fff; box-shadow: 3px 3px 10px rgba(0,0,0,.2); flex-shrink: 0; background: #fff;
}
.dash-profile-banner-name { font-size: 19px; font-weight: 800; color: var(--slate-800); margin-top: 30px; }
.dash-profile-banner-link { font-size: 13px; font-weight: 600; color: var(--green-700); }

@media (max-width: 640px) {
  .dash-profile-banner-cover { height: 160px; }
  .dash-profile-banner-info { padding: 0 14px 14px; gap: 12px; margin-top: -30px; }
  .dash-profile-banner-avatar { width: 68px; height: 68px; border-width: 3px; }
  .dash-profile-banner-name { font-size: 16px; margin-top: 22px; }
}

/* ---------- Mobile Instagram/Facebook-style profile hero ----------
   Hidden on tablet/laptop/desktop (the sidebar + .dash-profile-banner
   already cover those); shown only on phones, full-bleed edge to edge. */
.mph-hero { display: none; }
.dash-banner-desktop-only { display: block; }

@media (max-width: 767px) {
  .dash-banner-desktop-only { display: none; }
  .mph-hero { display: block; background: var(--slate-50); }

  .mph-banner { position: relative; height: 220px; width: 100%; }
  .mph-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

  .mph-camera-btn {
    position: absolute; width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(145deg, var(--green-600), #0a7a5f); border: 2px solid #fff;
    box-shadow: 3px 3px 8px rgba(0,0,0,.35), -1px -1px 4px rgba(255,255,255,.2);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform .15s ease;
  }
  .mph-camera-btn:active { transform: scale(.9); }
  .mph-camera-banner { bottom: 12px; right: 14px; }
  .mph-camera-avatar { bottom: 2px; right: 2px; width: 32px; height: 32px; }

  .mph-avatar-row { display: flex; justify-content: center; margin-top: -64px; position: relative; z-index: 2; }
  .mph-avatar-wrap { position: relative; }
  .mph-avatar {
    width: 128px; height: 128px; border-radius: 50%; object-fit: contain; border: 4px solid #fff;
    box-shadow: 4px 4px 14px rgba(0,0,0,.25); background: #fff;
  }

  .mph-info { text-align: center; padding: 12px 20px 20px; position: relative; z-index: 3; }
  .mph-info h1 { font-size: 20px; margin: 0 0 8px; }
  .mph-stats { font-size: 14px; color: var(--slate-600); display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
  .mph-stats strong { color: var(--slate-800); }
  .mph-dot { color: var(--slate-300); }
  .mph-bio { font-size: 13.5px; color: var(--slate-500); margin: 10px 0 0; line-height: 1.7; }
  .mph-view-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--green-700); }
  .mph-link-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
  .mph-settings-link {
    background: var(--slate-100); padding: 6px 14px; border-radius: 999px; color: var(--slate-700);
  }

  .mph-posts { border-top: 8px solid var(--slate-50); }
  .mph-post-row { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--slate-100); text-decoration: none; }
  .mph-post-row img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--slate-100); }
  .mph-post-row-body { min-width: 0; }
  .mph-post-row-body h3 { font-size: 14.5px; margin: 4px 0 4px; color: var(--slate-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Mobile composer bar + "stories" row (homepage only) ---------- */
/* Base (desktop/tablet) styling — shown on every screen size; the
   mobile-portrait media query further below overrides these with
   tighter, full-bleed spacing for phones. */
.mobile-composer-bar {
  display: none; /* removed from desktop/tablet — kept only for mobile portrait, see below */
}
.mobile-stories-label {
  display: block; font-size: 16px; font-weight: 700; color: var(--slate-700);
  max-width: var(--max-width); margin: 20px auto 0; padding: 0 4px;
}
.mobile-stories-row {
  display: flex; gap: 14px; overflow-x: auto; padding: 14px 20px;
  max-width: var(--max-width); margin: 10px auto 0; scrollbar-width: thin;
  background: var(--slate-50); border: none; border-radius: var(--radius-md);
  box-shadow: 5px 5px 12px rgba(163,177,198,.3), -5px -5px 12px rgba(255,255,255,.85);
}
[data-theme="dark"] .mobile-stories-row {
  box-shadow: 5px 5px 12px rgba(0,0,0,.35), -5px -5px 12px rgba(255,255,255,.03);
}
.mcb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mcb-avatar-guest {
  display: flex; align-items: center; justify-content: center;
  background: var(--slate-200); color: var(--slate-500);
}
.mcb-input {
  flex: 1; background: var(--slate-100); border-radius: 999px; padding: 11px 18px;
  font-size: 14px; color: var(--slate-500); text-decoration: none;
}
.mstory-card { flex-shrink: 0; width: 120px; text-decoration: none; text-align: left; }
.mstory-ring {
  display: block; width: 120px; height: 160px; border-radius: 14px; padding: 0;
  background: var(--slate-100); margin: 0 0 6px; overflow: hidden;
  box-shadow: 4px 4px 9px rgba(163,177,198,.35), -4px -4px 9px rgba(255,255,255,.9);
  transition: transform .15s ease;
}
.mstory-card:hover .mstory-ring { transform: translateY(-3px); }
[data-theme="dark"] .mstory-ring {
  box-shadow: 4px 4px 9px rgba(0,0,0,.4), -4px -4px 9px rgba(255,255,255,.03);
}
.mstory-ring img { width: 100%; height: 100%; border-radius: 14px; object-fit: cover; border: none; display: block; }
.mstory-title { display: block; font-size: 12.5px; color: var(--slate-700); font-weight: 600; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 767px) and (orientation: portrait) {
  .mobile-stories-label {
    display: block; font-size: 16px; font-weight: 700; color: var(--slate-700);
    background: #fff; padding: 8px 16px 0; max-width: none; margin: 0;
  }
  .mobile-composer-bar {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: none; border-bottom: 3px solid var(--slate-50); border-radius: 0;
    padding: 8px 16px; max-width: none; margin: 0;
  }
  .mcb-avatar { width: 38px; height: 38px; }
  .mcb-input {
    padding: 10px 16px;
    font-size: 14px;
  }

  .mobile-stories-row {
    padding: 8px 16px;
    background: #fff; border: none; border-bottom: 3px solid var(--slate-50); border-radius: 0;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    max-width: none; margin: 0; gap: 10px;
  }
  .mobile-stories-row::-webkit-scrollbar { display: none; }
  .mstory-card { width: 104px; }
  .mstory-ring { width: 104px; height: 170px; }
  .mstory-title { font-size: 11.5px; }

  [data-theme="dark"] .mobile-composer-bar,
  [data-theme="dark"] .mobile-stories-row,
  [data-theme="dark"] .mobile-stories-label { background: #0f1c33 !important; border-color: transparent !important; border-bottom-color: #0a0f1c !important; }
  [data-theme="dark"] .mobile-stories-label { color: var(--slate-300) !important; }

  /* User-requested trims: no header write/avatar buttons, no hero slider
     (all mobile-only — desktop keeps them) */
  .btn-write, .header-actions .avatar-btn, .header-actions .dropdown-wrap:has(.avatar-btn) { display: none; }
  .hero { display: none; }
  .section-head { margin: 10px 0 12px; }
}

@media (max-width: 767px) and (orientation: portrait) {
  .header-inner { gap: 4px; padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .header-inner::-webkit-scrollbar { display: none; }
  .header-actions { gap: 4px; flex-shrink: 0; }
  .logo { gap: 4px; min-width: 0; flex-shrink: 0; }
  .header-search { min-width: 90px; }
  .logo-wordmark-img { height: 32px; max-width: 84px; }
  .logo-sub, .logo-sub-below-wordmark { display: none; }
  .icon-btn { width: 28px; height: 28px; flex-shrink: 0; }
  .icon-btn svg { width: 13px; height: 13px; }
  .nav-toggle { width: 28px; height: 28px; margin-right: 0; flex-shrink: 0; }

  .bn-date-widget {
    display: flex;
    font-size: 9.5px;
    padding: 4px 8px;
    gap: 2px;
    white-space: nowrap;
    text-align: center;
    line-height: 1.35;
    flex-shrink: 0;
  }
  .bn-date-line1, .bn-date-line2 { white-space: nowrap; }
}

[data-theme="dark"] .mcb-input { background: #16233d; color: var(--slate-400); }
[data-theme="dark"] .mobile-stories-label { color: var(--slate-300); }

.follow-btn {
  background: var(--green-600); color: #fff; border: none; border-radius: 999px;
  padding: 9px 22px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.follow-btn:hover { background: var(--green-700); }
.follow-btn.following { background: #fff; color: var(--slate-600); border: 1px solid var(--slate-300); }
.follow-btn.following:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.follow-btn:disabled { opacity: .6; cursor: default; }

.rank-item { position: relative; }
.rank-medal {
  font-size: 13px; font-weight: 800; color: var(--slate-400); width: 22px; height: 22px; text-align: center; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--slate-100);
  box-shadow: inset 1px 1px 3px rgba(163,177,198,.4), inset -1px -1px 3px rgba(255,255,255,.9);
}
.rank-medal.top-1, .rank-medal.top-2, .rank-medal.top-3 { font-size: 16px; background: none; box-shadow: none; }
[data-theme="dark"] .rank-medal { background: #0f1c33; box-shadow: inset 1px 1px 3px rgba(0,0,0,.4), inset -1px -1px 3px rgba(255,255,255,.03); }

.badge-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.badge-tier { display: flex; align-items: center; gap: 10px; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; padding: 10px 12px; }
.badge-tier .badge-emoji { font-size: 22px; flex-shrink: 0; }
.badge-tier b { display: block; font-size: 13px; }
.badge-tier span { display: block; font-size: 11.5px; color: var(--slate-400); }

.rank-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--slate-100); color: inherit; text-decoration: none;
  transition: background .15s ease;
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--slate-50); }
.rank-row.me { background: var(--green-50); }
.rank-num { font-size: 15px; font-weight: 800; color: var(--slate-400); width: 30px; text-align: center; flex-shrink: 0; }
.rank-num.top-1, .rank-num.top-2, .rank-num.top-3 { font-size: 22px; }
.rank-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-badge-tag { font-size: 11px; font-weight: 700; background: var(--green-100); color: var(--green-700); padding: 2px 8px; border-radius: 999px; }
.rank-meta { font-size: 12.5px; color: var(--slate-400); margin-top: 2px; }

[data-theme="dark"] .badge-tier { background: #101a2e !important; border-color: var(--slate-200) !important; }
[data-theme="dark"] .rank-row:hover { background: #101a2e; }
[data-theme="dark"] .rank-row { border-bottom-color: var(--slate-200); }
/* ---------- Post text-to-speech player ---------- */
.tts-player {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--green-50); border: 1px solid var(--green-100);
  border-radius: 12px; padding: 10px 14px; margin: 18px 0;
  max-width: 100%; box-sizing: border-box; overflow: hidden;
}
.tts-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700;
  border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-family: inherit;
}
.tts-play { background: var(--green-600); color: #fff; }
.tts-play:hover { background: var(--green-700); }
.tts-stop { background: #fff; color: var(--slate-600); border: 1px solid var(--slate-200) !important; }
.tts-stop:hover { color: var(--rose-500); border-color: var(--rose-500) !important; }
.tts-speed-label { font-size: 12.5px; color: var(--slate-500); display: flex; align-items: center; gap: 6px; min-width: 0; }
.tts-speed-label select { border: 1px solid var(--slate-200); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; font-family: inherit; background: #fff; max-width: 100%; }
.tts-voice-label { font-size: 12.5px; color: var(--slate-500); display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.tts-voice-label select { border: 1px solid var(--slate-200); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; font-family: inherit; background: #fff; max-width: 100%; min-width: 0; flex: 1 1 auto; }
.tts-voice-hint { width: 100%; font-size: 11.5px; color: var(--slate-400); margin: 2px 0 0; }

[data-theme="dark"] .tts-player { background: #101a2e; border-color: var(--slate-200); }
[data-theme="dark"] .tts-stop, [data-theme="dark"] .tts-speed-label select, [data-theme="dark"] .tts-voice-label select { background: #101a2e !important; border-color: var(--slate-200) !important; }

/* ---------- Notice board (sidebar) ---------- */
.notice-board { border-left: 3px solid var(--orange-500, #f59e0b); }
.notice-board .card-title {
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--orange-600);
  animation: notice-blink 1.4s ease-in-out infinite;
}
@keyframes notice-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.notice-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notice-list li { font-size: 13.5px; line-height: 1.7; color: var(--slate-600); padding-bottom: 10px; border-bottom: 1px dashed var(--slate-200); }
.notice-list li:last-child { border-bottom: none; padding-bottom: 0; }

/* ---------- Notice board countdown timer ---------- */
.notice-countdown { margin-top: 8px; }
.nc-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--orange-600); margin-bottom: 6px; }
.nc-boxes { display: flex; gap: 6px; }
.nc-box {
  flex: 1; background: var(--slate-900); color: #fff; border-radius: 8px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nc-num { font-size: 16px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.nc-unit { font-size: 9px; color: var(--slate-300); }
.nc-expired { font-size: 12.5px; font-weight: 700; color: var(--rose-500); }
.notice-list a { color: var(--green-700); font-weight: 600; text-decoration: none; }
.notice-list a:hover { text-decoration: underline; }

/* ---------- Sidebar ad slot (vertical) ---------- */
.sidebar-ad-slot {
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.sidebar-ad-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--slate-300);
  text-transform: uppercase;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}
.sidebar-ad-slot img { max-width: 100%; height: auto; border-radius: 8px; }
[data-theme="dark"] .sidebar-ad-label { color: var(--slate-400); }

/* ==========================================================
   আশেপাশে সাপ্তাহিক — Weekly Magazine
   ========================================================== */
.mag-cover {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  padding: 44px 40px; margin-bottom: 22px; color: #fff;
  background: linear-gradient(160deg, #065f46 0%, #0f172a 100%);
  text-align: center;
}
.mag-cover-brand { font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-bottom: 10px; }
.mag-cover-meta { font-size: 13px; opacity: .75; margin-bottom: 20px; }
.mag-cover-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.mag-cover-headline { font-size: 30px; line-height: 1.35; margin: 0 0 18px; }
.mag-cover-headline a { color: #fff; }
.mag-cover-secondary { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; font-size: 14px; }
.mag-cover-secondary a { color: rgba(255,255,255,.85); border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 2px; }
.mag-cover-secondary a:hover { color: #fff; }

/* Template 2 — newspaper style: left-aligned, serif-like weight, thin rule */
.mag-cover-template2 { background: #fdf8ef; color: #1e293b; border: 1px solid var(--slate-200); text-align: left; }
.mag-cover-template2 .mag-cover-brand { color: #0f172a; border-bottom: 3px double #0f172a; padding-bottom: 10px; display: inline-block; }
.mag-cover-template2 .mag-cover-meta { color: #64748b; }
.mag-cover-template2 .mag-cover-headline { color: #0f172a; }
.mag-cover-template2 .mag-cover-headline a { color: #0f172a; }
.mag-cover-template2 .mag-cover-secondary { justify-content: flex-start; }
.mag-cover-template2 .mag-cover-secondary a { color: #475569; }

/* Template 3 — premium: gold accent, centered, generous spacing */
.mag-cover-template3 { background: radial-gradient(circle at 30% 20%, #1e293b 0%, #000 100%); padding: 60px 40px; }
.mag-cover-template3 .mag-cover-brand { color: #f2c94c; }
.mag-cover-template3 .mag-cover-headline { font-size: 34px; }
.mag-cover-template3 .mag-cover-secondary a { border-bottom-color: #f2c94c; color: #f2c94c; }

.mag-editorial { margin-bottom: 18px; }
.mag-toc { margin-bottom: 26px; }
.mag-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.mag-toc a { font-size: 13.5px; font-weight: 600; color: var(--green-700); }
.mag-toc a:hover { text-decoration: underline; }

.mag-section { margin-bottom: 36px; scroll-margin-top: 90px; }
.mag-section-title { font-size: 21px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--slate-200); }
.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mag-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); overflow: hidden; position: relative; transition: box-shadow .15s ease;
}
.mag-card:hover { box-shadow: var(--shadow-md); }
.mag-card img { width: 100%; height: 130px; object-fit: cover; }
.mag-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mag-card-body h3 { font-size: 14.5px; margin: 0; color: var(--slate-800); line-height: 1.4; }
.mag-card-body p { font-size: 12.5px; color: var(--slate-500); margin: 0; }
.mag-card-author { font-size: 11.5px; color: var(--slate-400); margin-top: auto; }
.mag-card-featured { border-color: var(--green-600); box-shadow: 0 0 0 1px var(--green-600); }
.mag-card-exclusive { border-color: #f2c94c; }
.mag-rank { position: absolute; top: 8px; left: 8px; background: rgba(15,23,42,.85); color: #fff; font-weight: 800; font-size: 13px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; }

.mag-final-page { text-align: center; padding: 36px 20px; border-top: 2px solid var(--slate-200); margin-top: 20px; }
.mag-final-logo img { height: 40px; margin: 0 auto 14px; }
.mag-final-page p { color: var(--slate-500); font-size: 13.5px; margin: 14px 0; }
.mag-final-nav { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; margin-top: 14px; }
.mag-final-nav a { color: var(--green-700); }

.mag-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.mag-archive-card { display: block; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .15s ease; }
.mag-archive-card:hover { box-shadow: var(--shadow-md); }
.mag-archive-card img { width: 100%; height: 150px; object-fit: cover; }
.mag-archive-body { padding: 14px; }
.mag-archive-issue { font-size: 11.5px; font-weight: 700; color: var(--green-700); text-transform: uppercase; }
.mag-archive-body h3 { font-size: 15px; margin: 6px 0; color: var(--slate-800); }
.mag-archive-date { font-size: 12px; color: var(--slate-400); }

@media (max-width: 640px) {
  .mag-cover { padding: 30px 20px; }
  .mag-cover-headline { font-size: 22px; }
  .mag-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- Horizontal ad slot (top of single post page) ---------- */
.post-top-ad-slot {
  text-align: center;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--slate-50);
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.post-top-ad-slot img { max-width: 100%; height: auto; border-radius: 8px; }
[data-theme="dark"] .post-top-ad-slot { background: #101a2e; border-color: var(--slate-200); }

.in-article-ad-slot {
  text-align: center;
  margin: 24px 0;
  padding: 12px;
  border-top: 1px dashed var(--slate-200);
  border-bottom: 1px dashed var(--slate-200);
  overflow-x: auto;
}
.in-article-ad-slot img { max-width: 100%; height: auto; border-radius: 8px; }
[data-theme="dark"] .in-article-ad-slot { border-color: var(--slate-200); }

@media (max-width: 640px) {
  .footer-col-categories, .footer-col-links { display: none; }
  .footer-col h4.footer-newsletter-heading { display: none; }
}

/* ---------- Universal emboss image-upload button ---------- */
.upload-emboss-wrap { display: inline-flex; align-items: center; gap: 12px; position: relative; }
.upload-emboss-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; flex-shrink: 0; cursor: pointer;
  background: linear-gradient(145deg, var(--green-600), #0a7a5f);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 4px 4px 10px rgba(5,150,105,.35), -3px -3px 8px rgba(255,255,255,.5);
  transition: transform .15s ease;
}
.upload-emboss-btn:hover { transform: translateY(-2px); }
.upload-emboss-btn:active { transform: scale(.95); }
.upload-emboss-filename { font-size: 13px; color: var(--slate-500); }
[data-theme="dark"] .upload-emboss-filename { color: var(--slate-400); }

/* ---------- Custom embossed share modal ---------- */
.share-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px;
  opacity: 0; transition: opacity .2s ease;
}
.share-modal-overlay.open { opacity: 1; }
.share-modal {
  width: 100%; max-width: 380px; background: var(--slate-50); border-radius: 24px; overflow: hidden;
  box-shadow: 14px 14px 32px rgba(0,0,0,.35), -6px -6px 20px rgba(255,255,255,.08);
  position: relative; transform: scale(.94) translateY(10px); transition: transform .2s ease;
}
.share-modal-overlay.open .share-modal { transform: scale(1) translateY(0); }
[data-theme="dark"] .share-modal { background: #16233d; }
.share-modal-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.share-modal-body { padding: 20px; }
.share-modal-title { font-size: 15px; font-weight: 700; color: var(--slate-800); margin: 0 0 18px; line-height: 1.5; }
.share-modal-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: var(--slate-700); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.share-modal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.share-net-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none;
  font-size: 11px; font-weight: 600; color: var(--slate-600); padding: 10px 4px; border-radius: 14px;
  background: var(--slate-50);
  box-shadow: 4px 4px 9px rgba(163,177,198,.3), -4px -4px 9px rgba(255,255,255,.85);
  transition: transform .15s ease;
}
[data-theme="dark"] .share-net-btn {
  background: #16233d; color: var(--slate-300);
  box-shadow: 4px 4px 9px rgba(0,0,0,.35), -4px -4px 9px rgba(255,255,255,.03);
}
.share-net-btn:hover { transform: translateY(-3px); }
.share-net-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--net-color); color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.share-copy-row {
  display: flex; gap: 8px; background: var(--slate-50); border-radius: 12px; padding: 4px;
  box-shadow: inset 3px 3px 7px rgba(163,177,198,.35), inset -3px -3px 7px rgba(255,255,255,.9);
}
[data-theme="dark"] .share-copy-row {
  background: #16233d;
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.4), inset -3px -3px 7px rgba(255,255,255,.03);
}
.share-copy-input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 9px 10px; font-size: 12.5px;
  color: var(--slate-600); font-family: monospace;
}
[data-theme="dark"] .share-copy-input { color: var(--slate-300); }
.share-copy-input:focus { outline: none; }
.share-copy-btn {
  background: linear-gradient(145deg, var(--green-600), #0a7a5f); color: #fff; border: none; border-radius: 9px;
  padding: 0 16px; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
  box-shadow: 2px 2px 6px rgba(5,150,105,.35);
}

/* ---------- PWA "Install App" banner ---------- */
#pwa-install-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 3000;
  max-width: 480px; margin: 0 auto;
  transform: translateY(120%); opacity: 0; transition: all .3s ease;
}
#pwa-install-banner.show { transform: translateY(0); opacity: 1; }
.pwa-install-inner {
  display: flex; align-items: center; gap: 12px; background: var(--slate-50); border-radius: 18px; padding: 14px 16px;
  box-shadow: 8px 8px 20px rgba(0,0,0,.2), -4px -4px 14px rgba(255,255,255,.7);
}
[data-theme="dark"] .pwa-install-inner { background: #16233d; box-shadow: 8px 8px 20px rgba(0,0,0,.5), -4px -4px 14px rgba(255,255,255,.03); }
.pwa-install-icon { font-size: 28px; flex-shrink: 0; }
.pwa-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pwa-install-text strong { font-size: 13.5px; color: var(--slate-800); }
[data-theme="dark"] .pwa-install-text strong { color: var(--slate-100); }
.pwa-install-text span { font-size: 11.5px; color: var(--slate-400); }
#pwa-install-btn {
  background: linear-gradient(145deg, var(--green-600), #0a7a5f); color: #fff; border: none; border-radius: 10px;
  padding: 9px 16px; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; flex-shrink: 0;
  box-shadow: 3px 3px 8px rgba(5,150,105,.35);
}
#pwa-install-close {
  background: none; border: none; font-size: 20px; color: var(--slate-400); cursor: pointer; flex-shrink: 0; line-height: 1;
}

/* ---------- Profile settings tab — emboss (scoped via general-sibling
   from the section's own anchor, so this never touches .card elsewhere) ---------- */
#profile-settings-anchor ~ .card {
  background: var(--slate-50); border: none;
  box-shadow: 8px 8px 20px rgba(163,177,198,.3), -8px -8px 20px rgba(255,255,255,.85);
}
[data-theme="dark"] #profile-settings-anchor ~ .card {
  background: #16233d; box-shadow: 8px 8px 20px rgba(0,0,0,.4), -8px -8px 20px rgba(255,255,255,.03);
}
#profile-settings-anchor ~ .card input[type="text"],
#profile-settings-anchor ~ .card input[type="email"],
#profile-settings-anchor ~ .card input[type="password"],
#profile-settings-anchor ~ .card input[type="url"],
#profile-settings-anchor ~ .card textarea {
  border: none !important; border-radius: 12px;
  background: #ffffff; box-shadow: inset 3px 3px 7px rgba(163,177,198,.35), inset -3px -3px 7px rgba(255,255,255,.9);
}
[data-theme="dark"] #profile-settings-anchor ~ .card input[type="text"],
[data-theme="dark"] #profile-settings-anchor ~ .card input[type="email"],
[data-theme="dark"] #profile-settings-anchor ~ .card input[type="password"],
[data-theme="dark"] #profile-settings-anchor ~ .card input[type="url"],
[data-theme="dark"] #profile-settings-anchor ~ .card textarea {
  background: #101a2e; color: var(--slate-100) !important;
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.4), inset -3px -3px 7px rgba(255,255,255,.03);
}

/* ---------- "Who liked this" modal ---------- */
.likers-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px;
  opacity: 0; transition: opacity .2s ease;
}
.likers-modal-overlay.open { opacity: 1; }
.likers-modal {
  width: 100%; max-width: 360px; max-height: 70vh; background: var(--slate-50); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 12px 12px 28px rgba(0,0,0,.3), -6px -6px 18px rgba(255,255,255,.08);
  transform: scale(.94) translateY(10px); transition: transform .2s ease;
}
.likers-modal-overlay.open .likers-modal { transform: scale(1) translateY(0); }
[data-theme="dark"] .likers-modal { background: #16233d; }
.likers-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
  box-shadow: inset 0 -1px 0 rgba(163,177,198,.2);
}
.likers-modal-head h3 { font-size: 15px; margin: 0; }
.likers-modal-close { background: none; border: none; font-size: 22px; color: var(--slate-400); cursor: pointer; line-height: 1; }
.likers-modal-body { overflow-y: auto; padding: 10px 12px 16px; }
.likers-loading, .likers-empty { text-align: center; padding: 30px 10px; color: var(--slate-400); font-size: 13.5px; }
.likers-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px;
}
.likers-row:hover { background: #fff; }
[data-theme="dark"] .likers-row:hover { background: #1a2740; }
.likers-avatar-wrap { position: relative; flex-shrink: 0; }
.likers-avatar-wrap img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.likers-reaction-badge {
  position: absolute; bottom: -3px; right: -3px; font-size: 13px; background: #fff; border-radius: 50%;
  width: 19px; height: 19px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
[data-theme="dark"] .likers-reaction-badge { background: #16233d; }
.likers-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--slate-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .likers-name { color: var(--slate-100); }
.likers-label { font-size: 12px; color: var(--slate-400); flex-shrink: 0; }
