/* ═══════════════════════════════════════════════════════════════
   Shamira v4 — Instagram-inspired mobile-first app
   Baloo 2 (headings) · Open Sans (body) · Font Awesome 6
   ═══════════════════════════════════════════════════════════════ */

/* ── Dark theme (default) ────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:        #000000;
  --bg-2:      #0D0D0D;
  --surface:   #111111;
  --surface-2: #1A1A1A;
  --surface-3: #222222;

  --accent:      #A855F7;
  --accent-2:    #9333EA;
  --accent-soft: rgba(168,85,247,.15);
  --accent-glow: rgba(168,85,247,.35);

  --text:   #FAFAFA;
  --text-2: #A8A8A8;
  --text-3: #6A6A6A;

  --border:   #262626;
  --border-2: #363636;

  --like:    #FF3040;
  --like-bg: rgba(255,48,64,.12);

  --success: #22C55E;
  --danger:  #EF4444;
  --warning: #F59E0B;
  --info:    #3B82F6;

  --shadow:    0 10px 40px rgba(0,0,0,.8);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.6);
  --shadow-xs: 0 1px 4px  rgba(0,0,0,.5);

  --topbar-h:    44px;
  --bottomnav-h: 88px;
  --sidebar-w:   244px;
}

/* ── Light theme ────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:        #FAFAFA;
  --bg-2:      #F3F3F3;
  --surface:   #FFFFFF;
  --surface-2: #F5F5F5;
  --surface-3: #EBEBEB;

  --accent:      #7C3AED;
  --accent-2:    #6D28D9;
  --accent-soft: rgba(124,58,237,.10);
  --accent-glow: rgba(124,58,237,.25);

  --text:   #0A0A0A;
  --text-2: #555555;
  --text-3: #A0A0A0;

  --border:   #DBDBDB;
  --border-2: #C7C7C7;

  --like:    #E11D48;
  --like-bg: rgba(225,29,72,.10);

  --success: #16A34A;
  --danger:  #DC2626;
  --warning: #D97706;
  --info:    #2563EB;

  --shadow:    0 4px 24px rgba(0,0,0,.12);
  --shadow-sm: 0 2px 8px  rgba(0,0,0,.08);
  --shadow-xs: 0 1px 3px  rgba(0,0,0,.06);
}

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --r-xs:   4px;
  --r-sm:   8px;
  --r:      12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  28px;
  --r-full: 9999px;
  --ease:   cubic-bezier(.4,0,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}
body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  height: 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; object-fit: cover; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }
ul { list-style: none; }

h1, h2, h3, h4, .heading {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Boot screen ─────────────────────────────────────────────── */
#boot-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 9999;
  transition: opacity .3s var(--ease);
}
#boot-screen.out { opacity: 0; pointer-events: none; }
.boot-logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 68px;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bootPulse .9s ease-in-out infinite alternate;
}
@keyframes bootPulse {
  from { opacity: .3; transform: scale(.85); }
  to   { opacity: 1;  transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ── Mobile topbar ──────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 12px;
  gap: 8px;
  z-index: 200;
}
.topbar-logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 24px;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  flex: 1;
  letter-spacing: -0.5px;
  user-select: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0;
}
.topbar-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  transition: opacity .12s;
  position: relative;
}
.topbar-btn:active { opacity: .6; }

/* Notification badge */
.notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 15px; height: 15px;
  background: var(--danger);
  border-radius: var(--r-full);
  font-size: 9px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--bg);
  line-height: 1;
  animation: badgePop .3s var(--spring);
}
.notif-badge:empty { display: none; }

/* ── Main content ─────────────────────────────────────────── */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 2px);
}
.content-inner {
  width: 100%;
  max-width: 614px;
  margin: 0 auto;
  animation: fadeIn .18s var(--ease);
}

/* ── Bottom nav — Instagram-style icon-only ──────────────── */
/* ── Bottom nav — webapp style ───────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 12px env(safe-area-inset-bottom);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.bottom-nav-inner {
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.b-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  padding: 0 6px;
  transition: color .18s;
  border-radius: 16px;
}
.b-nav-item i {
  font-size: 22px;
  line-height: 1;
  transition: transform .2s var(--spring);
}
.b-nav-item span { display: none; }
.b-nav-item:active i { transform: scale(.82); }

/* Active state — accent colour + subtle dot indicator */
.b-nav-item.active {
  color: var(--accent);
}
.b-nav-item.active i { font-weight: 900; }
.b-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: var(--r-full);
  background: var(--accent);
}

/* Profile avatar in bottom nav */
.b-nav-avatar {
  width: 26px; height: 26px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color .18s;
}
.b-nav-item.active .b-nav-avatar { border-color: var(--accent); }
.b-nav-avatar-ph {
  width: 26px; height: 26px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  border: 2px solid transparent;
  transition: border-color .18s;
}
.b-nav-item.active .b-nav-avatar-ph { border-color: var(--accent); }

/* Create button — gradient pill */
.b-nav-create {
  width: 44px; height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .18s var(--spring), opacity .15s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.b-nav-create:active { transform: scale(.88); opacity: .85; }

/* ── Desktop sidebar ─────────────────────────────────────────── */
.sidebar {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  flex-direction: column;
  padding: 16px 12px;
  z-index: 200;
}
.sidebar-logo {
  padding: 16px 12px 28px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 26px;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  user-select: none;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.s-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
  user-select: none;
}
.s-nav-item i { width: 22px; text-align: center; font-size: 22px; }
.s-nav-item:hover { background: var(--surface-2); }
.s-nav-item.active { font-weight: 700; }
.s-nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  background: var(--danger);
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.s-nav-badge:empty { display: none; }
.sidebar-create { margin: 8px 0; }
.sidebar-create .btn { width: 100%; border-radius: var(--r-sm); font-size: 15px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background .12s;
}
.sidebar-user:hover { background: var(--surface-2); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: var(--text-3); }
.sidebar-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-2);
  cursor: pointer;
  transition: background .12s;
}
.sidebar-action:hover { background: var(--surface-2); color: var(--text); }
.sidebar-action.danger:hover { background: rgba(239,68,68,.10); color: var(--danger); }
.sidebar-action i { width: 22px; text-align: center; font-size: 20px; }

/* ── Page header ─────────────────────────────────────────────── */
.page-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.page-hd-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}
.page-hd-back {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
}
.page-hd-back:active { opacity: .6; }

/* ═══════════════════════════════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════ */
.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .7px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  transition: border-color .15s;
  appearance: none;
}
.field-input:focus { border-color: var(--text-3); }
.field-input::placeholder { color: var(--text-3); }
textarea.field-input { resize: vertical; min-height: 88px; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--r-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .14s;
  white-space: nowrap;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: .7; }
.btn:disabled { opacity: .4; pointer-events: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-outline:hover { background: var(--surface-2); }

.btn-danger { background: rgba(239,68,68,.12); color: var(--danger); }

.btn-sm  { padding: 6px 14px; font-size: 13px; }
.btn-xs  { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.btn-icon-sm { width: 30px; height: 30px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════ */
.avatar {
  border-radius: var(--r-full);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
  display: block;
}
.avatar-ph {
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #A855F7, #EC4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  color: white;
  flex-shrink: 0;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGE
   ═══════════════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 36px 28px 28px;
  box-shadow: var(--shadow);
  animation: fadeUp .3s var(--ease);
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-brand-logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 48px;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.auth-brand-tagline {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .14s;
}
.auth-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   STORIES BAR
   ═══════════════════════════════════════════════════════════════ */
.stories-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.stories-bar::-webkit-scrollbar { display: none; }
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.story-ring {
  padding: 2px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #F97316, #EC4899, #A855F7);
}
.story-ring.seen {
  background: var(--border);
}
.story-ring-inner {
  padding: 2px;
  border-radius: var(--r-full);
  background: var(--bg);
}
.story-av {
  width: 60px; height: 60px;
  border-radius: var(--r-full);
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}
.story-av-ph {
  width: 60px; height: 60px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #A855F7, #EC4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Baloo 2', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
}
.story-name {
  font-size: 11px;
  color: var(--text-2);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
/* Your story item */
.story-own .story-ring {
  background: var(--border);
}
.story-add-icon {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 20px; height: 20px;
  background: var(--accent);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.story-av-wrap {
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   POST CARD — Instagram layout
   ═══════════════════════════════════════════════════════════════ */
.post-card {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  animation: fadeIn .15s var(--ease);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.post-meta { flex: 1; min-width: 0; }
.post-username {
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.post-username:hover { opacity: .7; }
.post-location {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 1px;
}
/* Pinned post indicator */
.post-pin-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.post-pinned { border-top: 2px solid var(--accent); }

/* Post menu items (in modal) */
.post-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: background .1s;
}
.post-menu-item:active { background: var(--surface-2); }
.post-menu-item.danger { color: var(--danger); }
.post-menu-item i { width: 20px; text-align: center; }

/* Three-dot menu button */
.post-menu-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--r-full);
}
.post-menu-btn:active { opacity: .5; }

/* Post image — full width, no border radius on mobile */
.post-img {
  width: 100%;
  display: block;
  background: var(--surface-2);
  object-fit: cover;
  max-height: 585px;
}
/* Caption text */
.post-body {
  padding: 0 12px 4px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Action bar (Instagram-style) ───────────────────────────── */
.post-actions {
  display: flex;
  align-items: center;
  padding: 6px 4px 4px;
}
.post-act-left {
  display: flex;
  align-items: center;
  flex: 1;
}
.act-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--r-full);
  transition: transform .1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.act-btn:active { transform: scale(.85); }
.act-btn.liked,
.act-btn.liked .like-icon,
.act-btn.liked .like-icon i {
  color: var(--like) !important;
}
.act-btn-bookmark {
  margin-left: auto;
}

/* Post footer */
.post-footer { padding: 0 12px 12px; }
.post-like-count {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}
.post-caption {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}
.post-caption strong {
  font-weight: 700;
  cursor: pointer;
  margin-right: 4px;
}
.post-caption strong:hover { opacity: .7; }
.post-comment-link {
  font-size: 14px;
  color: var(--text-3);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  display: block;
  margin-bottom: 3px;
  transition: color .12s;
}
.post-comment-link:hover { color: var(--text-2); }
.post-timestamp {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 5px;
}

/* ── Create bar ──────────────────────────────────────────────── */
.create-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.create-bar:active { background: var(--surface-2); }
.create-bar-ph {
  flex: 1;
  font-size: 14px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 16px;
}

/* ═══════════════════════════════════════════════════════════════
   COMMENTS
   ═══════════════════════════════════════════════════════════════ */
.comments-wrap {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.comment-body { flex: 1; min-width: 0; }
.comment-text {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.comment-text strong {
  font-weight: 700;
  cursor: pointer;
  margin-right: 4px;
}
.comment-text strong:hover { opacity: .7; }
.comment-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}
.comment-time { font-size: 11px; color: var(--text-3); }
.comment-del {
  color: var(--text-3);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: var(--r-xs);
  opacity: 0;
  transition: opacity .12s;
}
.comment-item:hover .comment-del { opacity: 1; }
.comment-del:hover { color: var(--danger); }
.comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.comment-textarea {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
  resize: none;
  max-height: 100px;
  line-height: 1.4;
  font-family: 'Open Sans', sans-serif;
}
.comment-textarea::placeholder { color: var(--text-3); }
.comment-send-btn {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  transition: opacity .12s;
}
.comment-send-btn:hover { opacity: .7; }
.comment-send-btn:disabled { opacity: .4; pointer-events: none; }

/* Old comment-bubble compat */
.comment-bubble { flex: 1; min-width: 0; }
.comment-uname {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  margin-right: 4px;
}
.comment-uname:hover { opacity: .7; }

/* ═══════════════════════════════════════════════════════════════
   PROFILE PAGE — Instagram layout
   ═══════════════════════════════════════════════════════════════ */
.profile-header {
  padding: 16px 16px 12px;
  background: var(--bg);
}
.profile-top-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 14px;
}
.profile-av-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-av-ring {
  padding: 2px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #F97316, #EC4899, #A855F7);
  display: inline-block;
}
.profile-av-ring.no-posts {
  background: var(--border);
}
.profile-av-ring-inner {
  padding: 2px;
  border-radius: var(--r-full);
  background: var(--bg);
  display: block;
}
.profile-av-edit {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 24px; height: 24px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  border: 1.5px solid var(--bg);
  font-size: 10px;
}
/* Profile cover photo (Facebook-style) */
.profile-cover {
  width: 100%;
  height: 200px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  background-color: var(--surface-2);
}
.profile-cover-edit {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.profile-cover-edit:active { opacity: .7; }
@media (min-width: 768px) {
  .profile-cover { height: 260px; }
}

.profile-stats-row {
  display: flex;
  gap: 0;
  flex: 1;
  justify-content: space-around;
}
.stat {
  text-align: center;
  flex: 1;
  cursor: default;
}
.stat-num {
  font-family: 'Baloo 2', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.stat-lbl {
  font-size: 12px;
  color: var(--text);
  font-weight: 400;
  margin-top: 3px;
}
.profile-info { margin-bottom: 10px; }
.profile-uname {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}
.profile-bio {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}
.profile-bio-empty { color: var(--text-3); }
.profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.profile-actions .btn {
  flex: 1;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--border-2);
  padding: 7px 12px;
}
.profile-actions .btn:hover { background: var(--surface-3); }

/* Profile tabs — Instagram style */
.profile-tabs {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.profile-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  color: var(--text-3);
  cursor: pointer;
  border-top: 1px solid transparent;
  margin-top: -1px;
  transition: all .14s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.profile-tab i { font-size: 22px; }
.profile-tab.active {
  color: var(--text);
  border-top-color: var(--text);
}
/* Profile grid (Instagram 3-col square thumbnails) */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.profile-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface-2);
}
.profile-grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .15s;
}
.profile-grid-item:active img { opacity: .7; }
.profile-grid-item-ph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 28px;
}
/* Multi-image indicator */
.grid-multi-badge {
  position: absolute;
  top: 6px; right: 6px;
  color: white;
  font-size: 14px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

/* ═══════════════════════════════════════════════════════════════
   ALBUMS
   ═══════════════════════════════════════════════════════════════ */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
@media (min-width: 480px) {
  .albums-grid { grid-template-columns: repeat(3, 1fr); }
}
.album-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
  -webkit-tap-highlight-color: transparent;
}
.album-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.album-card:active .album-card-img { opacity: .8; }
.album-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 30px;
}
.album-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: white;
}
.album-card-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-card-count { font-size: 11px; opacity: .8; }

/* Album detail image grid */
.album-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.album-img-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
}
.album-img-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.album-img-thumb:active img { opacity: .8; }
.album-img-thumb-del {
  position: absolute;
  top: 5px; right: 5px;
  width: 24px; height: 24px;
  background: rgba(0,0,0,.7);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s;
}
.album-img-thumb:hover .album-img-thumb-del { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   IMAGE VIEWER (fullscreen)
   ═══════════════════════════════════════════════════════════════ */
.image-viewer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  display: flex;
  flex-direction: column;
  animation: fadeIn .18s var(--ease);
}
.image-viewer-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(rgba(0,0,0,.7), transparent);
  z-index: 10;
  color: white;
}
.image-viewer-close {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  color: white;
}
.image-viewer-close:active { opacity: .6; }
.image-viewer-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.image-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.image-viewer-bottom {
  background: var(--bg);
  padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  max-height: 45vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.image-viewer-caption {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATIONS PANEL
   ═══════════════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: calc(var(--topbar-h) + env(safe-area-inset-top));
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  max-height: 70vh;
  overflow-y: auto;
  animation: slideDown .2s var(--ease);
  box-shadow: var(--shadow);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}
.notif-panel-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 17px;
  font-weight: 700;
}
.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--surface-2); }
.notif-text {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.4;
}
.notif-time {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  margin-top: 2px;
}
.notif-thumb {
  width: 44px; height: 44px;
  border-radius: var(--r-xs);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.notif-like-dot {
  width: 18px; height: 18px;
  border-radius: var(--r-full);
  background: var(--like);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL — bottom sheet on mobile
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .16s var(--ease);
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 16px; }
}
.modal-box {
  background: var(--surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-height: 96dvh;
  overflow-y: auto;
  animation: slideUp .22s var(--ease);
}
@media (min-width: 640px) {
  .modal-box {
    border-radius: var(--r-xl);
    max-width: 520px;
    max-height: 90dvh;
  }
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-handle {
  width: 32px; height: 3px;
  background: var(--border-2);
  border-radius: var(--r-full);
  margin: 10px auto 0;
}
@media (min-width: 640px) { .modal-handle { display: none; } }
.modal-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 17px;
  font-weight: 700;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  font-size: 16px;
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* Image drop zone */
.img-drop {
  border: 2px dashed var(--border-2);
  border-radius: var(--r-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  color: var(--text-3);
  font-size: 14px;
  transition: border-color .15s;
}
.img-drop:hover { border-color: var(--accent); color: var(--accent); }
.img-drop i { font-size: 36px; margin-bottom: 10px; display: block; }
.img-preview-wrap { position: relative; margin-top: 12px; }
.img-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--r-lg);
}
.img-preview-rm {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,.7);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   BADGE
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
}
/* ── Admin badge — animated gradient text ──────────────────── */
.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: linear-gradient(270deg, #f59e0b, #a855f7, #ec4899, #f59e0b);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: badge-gradient-flow 3s linear infinite;
  border: 1.5px solid transparent;
  background-origin: border-box;
  position: relative;
}
.badge-admin::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  background: linear-gradient(270deg, #f59e0b, #a855f7, #ec4899, #f59e0b) border-box;
  background-size: 300% 100%;
  animation: badge-gradient-flow 3s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}
.badge-admin i {
  background: linear-gradient(270deg, #f59e0b, #a855f7, #ec4899, #f59e0b);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: badge-gradient-flow 3s linear infinite;
  font-size: 9px;
}

.badge-banned { background: rgba(239,68,68,.13); color: var(--danger); -webkit-text-fill-color: unset; }

/* ── Moderator badge — animated gradient text ───────────────── */
.badge-moderator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: linear-gradient(270deg, #06b6d4, #3b82f6, #8b5cf6, #06b6d4);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: badge-gradient-flow 3s linear infinite;
  position: relative;
}
.badge-moderator::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  background: linear-gradient(270deg, #06b6d4, #3b82f6, #8b5cf6, #06b6d4) border-box;
  background-size: 300% 100%;
  animation: badge-gradient-flow 3s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}
.badge-moderator i {
  background: linear-gradient(270deg, #06b6d4, #3b82f6, #8b5cf6, #06b6d4);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: badge-gradient-flow 3s linear infinite;
  font-size: 9px;
}

@keyframes badge-gradient-flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ── VIP star ─────────────────────────────────────────────────── */
.badge-vip-star {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  margin-right: 2px;
  vertical-align: middle;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #fcd34d, #f59e0b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: vip-pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(251,191,36,.6));
}
@keyframes vip-pulse {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 3px rgba(251,191,36,.4)); }
  50%       { background-position: 100% 50%; filter: drop-shadow(0 0 6px rgba(251,191,36,.8)); }
}

/* ── Post role badge (small icon inline) ──────────────────────── */
.post-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: var(--r-full);
  font-size: 8px;
  margin-left: 4px;
  vertical-align: middle;
}
.post-role-admin {
  background: linear-gradient(270deg, #f59e0b, #a855f7, #ec4899, #f59e0b);
  background-size: 300% 100%;
  animation: badge-gradient-flow 3s linear infinite;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.post-role-moderator {
  background: linear-gradient(270deg, #06b6d4, #3b82f6, #8b5cf6, #06b6d4);
  background-size: 300% 100%;
  animation: badge-gradient-flow 3s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
}
@media (min-width: 480px) {
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
}
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.admin-stat-val {
  font-family: 'Baloo 2', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.admin-stat-lbl {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.admin-toolbar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.admin-search { flex: 1; min-width: 140px; }
.admin-filter {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.admin-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background .12s;
}
.admin-user-card:hover { background: var(--surface-2); }
.auc-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.auc-info { min-width: 0; }
.auc-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auc-email { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.auc-badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.auc-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 480px) {
  .admin-user-card { flex-direction: column; align-items: flex-start; }
  .auc-actions { width: 100%; }
}
.auc-btn {
  padding: 5px 12px;
  border-radius: var(--r-full);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.auc-btn:hover { opacity: .8; }
.auc-btn:disabled { opacity: .4; cursor: default; }
.auc-btn-danger { background: rgba(239,68,68,.13); color: var(--danger); }
.auc-btn-warn   { background: rgba(245,158,11,.13);  color: var(--warning); }
.auc-btn-ok     { background: rgba(34,197,94,.13);   color: var(--success); }
.auc-btn-soft   { background: var(--accent-soft);     color: var(--accent); }
.auc-btn-ghost  { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════════════════ */
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-xs);
}
.skel-card {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px;
}
.skel-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.skel-circle { border-radius: var(--r-full); flex-shrink: 0; }
.skel-line { height: 12px; border-radius: var(--r-xs); }

/* ═══════════════════════════════════════════════════════════════
   UTILS
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-3);
  animation: fadeUp .3s var(--ease);
}
.empty-icon { font-size: 48px; margin-bottom: 14px; opacity: .3; }
.empty-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}
.empty-sub { font-size: 13px; }

.divider { height: 1px; background: var(--border); margin: 10px 0; }
.hidden  { display: none !important; }
.mt-8    { margin-top: 8px; }
.mt-12   { margin-top: 12px; }
.mt-16   { margin-top: 16px; }
.flex    { display: flex; }
.items-center { align-items: center; }
.gap-8   { gap: 8px; }
.text-muted   { color: var(--text-3); }
.text-danger  { color: var(--danger); }
.text-accent  { color: var(--accent); }
.font-bold    { font-weight: 700; }
.text-sm      { font-size: 12.5px; }
.w-full       { width: 100%; }
.load-more-wrap { text-align: center; padding: 20px 16px; }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeUp    { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp   { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes shimmer   { from { background-position:200% 0; } to { background-position:-200% 0; } }
@keyframes heartPop  { 0%{transform:scale(1)} 25%{transform:scale(0)} 60%{transform:scale(1.7)} 100%{transform:scale(1)} }
@keyframes toastIn   { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut  { to { opacity:0; transform:translateX(18px); } }
@keyframes badgePop  { 0%{transform:scale(0)} 70%{transform:scale(1.3)} 100%{transform:scale(1)} }

.heart-anim { animation: heartPop .36s var(--spring); }

/* ── Toast ──────────────────────────────────────────────────── */
#toasts {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
  width: calc(100vw - 32px);
  max-width: 380px;
}
.toast {
  background: var(--surface-3);
  color: var(--text);
  padding: 11px 18px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 500;
  animation: toastIn .22s var(--ease);
  pointer-events: auto;
  box-shadow: var(--shadow);
  text-align: center;
  width: auto;
  max-width: 100%;
}
.toast.success { background: #111; color: #fff; }
.toast.error   { background: var(--danger); color: #fff; }
.toast.warning { background: var(--warning); color: #fff; }
.toast.out     { animation: fadeIn .2s var(--ease) reverse forwards; }

/* ═══════════════════════════════════════════════════════════════
   DESKTOP (≥ 768px)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  body { overflow: auto; }

  .sidebar { display: flex; }
  .bottom-nav { display: none; }
  .topbar { display: none; }

  .app-layout {
    flex-direction: row;
    min-height: 100dvh;
    height: auto;
  }
  .app-content {
    margin-left: var(--sidebar-w);
    padding-top: 0;
    padding-bottom: 32px;
    overflow: visible;
    height: auto;
    min-height: 100dvh;
  }
  .content-inner { padding: 20px 0; }

  /* On desktop, add nice borders/radius to post cards */
  .post-card {
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 0 12px;
    overflow: hidden;
  }
  .post-img { border-radius: 0; }
  .create-bar {
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    margin-bottom: 10px;
  }
  .notif-panel {
    top: 0;
    left: var(--sidebar-w);
    right: auto;
    width: 380px;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    border: 1px solid var(--border);
    border-top: none;
  }
  .stories-bar { border-radius: var(--r-xl); border: 1px solid var(--border); margin-bottom: 12px; }
  #toasts { bottom: 20px; }
  .profile-grid { gap: 3px; }
  .albums-grid { gap: 3px; }
}

@media (min-width: 1100px) {
  :root { --sidebar-w: 260px; }
}

/* ═══════════════════════════════════════════════════════════════
   @MENTION AUTOCOMPLETE DROPDOWN
   ═══════════════════════════════════════════════════════════════ */
.mention-dropdown {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  min-width: 180px;
  max-width: 260px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background .1s;
}
.mention-item:hover { background: var(--surface-2); }
.mention-item span { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   COMMENT REPLIES & LIKES
   ═══════════════════════════════════════════════════════════════ */
.comment-replies {
  margin-left: 40px;
  border-left: 2px solid var(--border);
  padding-left: 10px;
}
.comment-reply-item .avatar,
.comment-reply-item .avatar-ph {
  width: 24px !important;
  height: 24px !important;
  font-size: 10px !important;
}
.comment-reply-form {
  margin-left: 40px;
  margin-top: 4px;
  padding-top: 4px;
}
.reply-form-wrap { margin-left: 40px; }

.comment-reply-btn {
  background: none;
  border: none;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.comment-reply-btn:hover { color: var(--text-2); }

.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  transition: color .14s;
}
.comment-like-btn:hover { color: var(--like); }
.comment-like-btn.liked { color: var(--like); }
.comment-like-count { font-size: 11px; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   FOLLOW BUTTON IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */
#follow-btn {
  min-width: 100px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  transition: all .18s var(--ease);
}

/* ═══════════════════════════════════════════════════════════════
   REMOVE HEAVY SHADOWS — flat design
   ═══════════════════════════════════════════════════════════════ */
.auth-card { box-shadow: none !important; }
.modal-box { box-shadow: none !important; }
.notif-panel { box-shadow: none !important; border: 1px solid var(--border-2) !important; }
.toast { box-shadow: none !important; border: 1px solid var(--border-2); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Better landscape mobile support */
@media (max-height: 500px) and (orientation: landscape) {
  .bottom-nav { display: none; }
  .app-content { padding-bottom: 12px; }
}

/* Better small phone support */
@media (max-width: 360px) {
  .post-actions { gap: 2px; }
  .act-btn { width: 34px; height: 34px; font-size: 18px; }
  .b-nav-item i { font-size: 20px; }
  .b-nav-create { width: 38px; height: 32px; font-size: 16px; }
  .profile-stats-row .stat-num { font-size: 17px; }
}

/* Stat row on profile — equal spacing */
.profile-stats-row {
  display: flex;
  gap: 0;
  justify-content: space-around;
  flex: 1;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.stat-num {
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}
.stat-lbl {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  text-transform: lowercase;
}

/* Profile actions row */
.profile-actions {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  flex-wrap: wrap;
}
.profile-actions .btn {
  font-size: 13px;
  padding: 7px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
}
.profile-actions .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Better touch targets ────────────────────────────────────── */
.b-nav-item, .b-nav-create, .topbar-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Larger tappable area for action buttons */
.act-btn {
  min-width: 40px;
  min-height: 40px;
}
