/* Niizi web shell — aligné sur l'app Flutter (AppTheme + ChatColors) */
:root {
  --niizi-bg: #0b0e13;
  --niizi-surface: #0b0e13;
  --niizi-header: #171717;
  --niizi-text: #e0e0e0;
  --niizi-text-secondary: #888888;
  --niizi-divider: #333333;
  --niizi-accent: #1db954;
  --niizi-nav-selected: #576777;
  --niizi-badge: #ff3b30;
  --niizi-chat-bg: #0b141a;
  --niizi-bubble-sent: #145a45;
  --niizi-bubble-received: #1f2c34;
  --niizi-bubble-text: #e9edef;
  --niizi-meta: #8696a0;
  --niizi-read: #53bdeb;
  --niizi-input-bar: #1f2c34;
  --niizi-sheet-bg: rgba(42, 41, 45, 0.86);
  --niizi-sheet-header: rgba(75, 63, 58, 0.89);
  --niizi-sheet-radius: 16px;
  --niizi-sheet-header-radius: 20px;
  --niizi-sheet-header-chat-border: #2a3942;
  --niizi-btn-circle-size: 46px;
  --niizi-btn-pill-height: 30px;
  --niizi-btn-pill-radius: 16px;
  --niizi-btn-rect-radius: 8px;
  --niizi-btn-rect-radius-sm: 6px;
  --niizi-btn-filled-bg: #2a2b2e;
  --niizi-btn-filled-fg: #e0e0e0;
  --footer-h: calc(54px + env(safe-area-inset-bottom, 0px));
  --app-bar-h: calc(52px + env(safe-area-inset-top, 0px));
  --feed-header-extra: 0px;
  --phone-frame-max: 430px;
  --feed-wide-breakpoint: 960px;
  --feed-reader-min: 480px;
  --feed-sidebar-width: 280px;
}

/* ——— Phone viewport (Flutter mobile form factor on web) ——— */
body.app-shell,
body.page-feed-home,
body.page-fullscreen-post {
  background: #050608;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.app-shell .phone-frame,
body.page-feed-home .phone-frame,
body.page-fullscreen-post .phone-frame {
  position: relative;
  width: 100%;
  max-width: var(--phone-frame-max);
  margin-left: auto;
  margin-right: auto;
  isolation: isolate;
}

body.app-shell .phone-frame > .app-footer-nav,
body.page-feed-home .phone-frame > .app-footer-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
}

.phone-frame > .niizi-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 99998;
}

/* Overlays globaux (commentaires, likes, partage) — une seule instance dans la page */
.niizi-app-overlays {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
}

.niizi-app-overlays > .niizi-sheet-backdrop,
.niizi-app-overlays > .comments-overlay,
.niizi-app-overlays > .likes-overlay,
.niizi-app-overlays > .share-overlay {
  pointer-events: auto;
}

.phone-frame > .niizi-sheet,
.phone-frame > .comments-overlay,
.phone-frame > .likes-overlay,
.phone-frame > .share-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  z-index: 99999;
}

body.page-fullscreen-post .phone-frame {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

body.page-fullscreen-post .fullscreen-container {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

body.page-fullscreen-post .fullscreen-reel-viewport {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
}

body.page-fullscreen-post .fullscreen-reel-track {
  height: 100%;
}

body.page-fullscreen-post .fullscreen-reel-track > .fullscreen-slide {
  flex: 0 0 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

/* Fullscreen likes/share sheets — scope to phone frame, not browser viewport */
body.page-fullscreen-post .fullscreen-container .fullscreen-likes-overlay,
body.page-fullscreen-post .fullscreen-container .fullscreen-share-overlay,
body.page-fullscreen-post .fullscreen-container > #commentsOverlay {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
}

body.page-fullscreen-post .fullscreen-container > .niizi-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 99998;
}

body.page-fullscreen-post .fullscreen-container > #commentsOverlay {
  bottom: 0;
  z-index: 99999;
}

body.page-fullscreen-post .fullscreen-sheet-backdrop {
  position: absolute;
  inset: 0;
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}

body.page-fullscreen-post .fullscreen-container > .niizi-sheet-backdrop {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}

body.page-fullscreen-post .fullscreen-container.overlay-active .fullscreen-media {
  filter: none;
}

@media (min-width: 960px) {
  body.page-fullscreen-post {
    --fs-side-sheet-width: min(420px, 36vw);
  }

  body.page-fullscreen-post .phone-frame {
    max-width: none;
    width: 100%;
    margin: 0;
  }

  /* Panneaux latéraux — commentaires, likes, partage */
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open {
    flex-direction: row;
    align-items: stretch;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .fullscreen-reel-viewport {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .fullscreen-likes-overlay,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .fullscreen-share-overlay,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open > #commentsOverlay {
    position: relative;
    flex: 0 0 var(--fs-side-sheet-width);
    width: var(--fs-side-sheet-width);
    max-width: var(--fs-side-sheet-width);
    height: 100%;
    max-height: 100%;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    border-radius: 0;
    animation: none;
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    z-index: 5;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open > #commentsOverlay .comments-sheet-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .likes-overlay-list,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .share-overlay-options,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open > #commentsOverlay .comments-sheet-body {
    overflow-y: auto;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .likes-overlay-header,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .share-overlay-header,
  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open > #commentsOverlay .comments-header {
    border-radius: 0;
  }

  body.page-fullscreen-post .fullscreen-container.fs-side-sheet-open .fullscreen-action-band {
    opacity: 0;
    pointer-events: none;
  }
}

body.user-authenticated.app-shell-active,
body.page-feed-home {
  background: var(--niizi-bg);
  color: var(--niizi-text);
  overflow: hidden !important;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
}

/* Guest feed home — Flutter-style shell without auth */
body.page-feed-home .phone-frame > .header,
body.page-feed-home .phone-frame > .header-search-drawer,
body.page-feed-home .header,
body.page-feed-home .header-search-drawer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body.page-feed-home .phone-frame {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--niizi-bg);
}

/* Seul #main-content défile — header et footer restent fixes (comme Flutter Scaffold) */
body.page-feed-home .content,
body.page-feed-home .app-content,
body.page-feed-home .phone-frame > .content.app-content {
  flex: 1 1 0%;
  min-height: 0 !important;
  max-height: none !important;
  height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--footer-h) + 8px);
  background: var(--niizi-bg);
  scroll-behavior: auto;
}

body.page-feed-home .app-bar,
body.page-feed-home .app-bar:has(.feed-home-header) {
  position: relative;
  top: auto;
  flex-shrink: 0;
  height: auto;
  min-height: unset;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  background: #171717;
  border-bottom: none;
  z-index: 110;
}

body.page-feed-home .posts-container,
body.page-feed-home .feed-home-page,
body.page-feed-home .feed-root {
  background: var(--niizi-bg);
  padding: 0;
  min-height: 0;
}

/* Feed home — parité Flutter PostCard : fond plat #0b0e13, aucun assombrissement legacy */
body.page-feed-home .post,
body.page-feed-home .post-media-carousel,
body.page-feed-home .post-media-container,
body.page-feed-home .media-container,
body.page-feed-home .media-item {
  filter: none !important;
  opacity: 1 !important;
  --post-bg-image: none !important;
}

body.page-feed-home .post {
  background: transparent;
  border-bottom: none;
  border-radius: 17px;
  margin-bottom: 1px;
}

/* style.css .post::before — blur(26px) brightness(0.38); .post::after — radial dark overlay */
body.page-feed-home .post::before,
body.page-feed-home .post::after,
body.page-feed-home .media-container::before,
body.page-feed-home .media-container::after,
body.page-feed-home .post-media-carousel::before,
body.page-feed-home .post-media-carousel::after,
body.page-feed-home .post-media-container::before,
body.page-feed-home .post-media-container::after,
body.page-feed-home .media-item::before,
body.page-feed-home .media-item::after,
body.user-authenticated.app-shell-active.page-feed-home .post::before,
body.user-authenticated.app-shell-active.page-feed-home .post::after,
body.user-authenticated.app-shell-active.page-feed-home .media-container::before,
body.user-authenticated.app-shell-active.page-feed-home .media-container::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  filter: none !important;
  background: none !important;
  background-image: none !important;
  pointer-events: none !important;
}

/* style.css .media-container::before — blur(20px) brightness(0.4) via background-image: inherit */
body.page-feed-home .media-container {
  background-image: none !important;
  background-color: transparent !important;
}

body.page-feed-home .post-media-carousel {
  background: #0b0e13 !important;
  /*border-radius: 13px;*/
}

body.page-feed-home .post-image,
body.page-feed-home .post-video,
body.page-feed-home .post-media-container img,
body.page-feed-home .post-media-container video,
body.page-feed-home .media-item img,
body.page-feed-home .media-item video,
body.user-authenticated.app-shell-active.page-feed-home .post-video,
body.user-authenticated.app-shell-active.page-feed-home .post-image {
  opacity: 1 !important;
  filter: none !important;
}

body.page-feed-home .phone-frame,
body.page-feed-home .app-content,
body.page-feed-home #main-content,
body.page-feed-home .posts-container,
body.page-feed-home .feed-home-page,
body.page-feed-home .feed-root {
  filter: none !important;
  opacity: 1 !important;
}

body.page-feed-home .post-header,
body.page-feed-home .post-actions,
body.page-feed-home .post-caption {
  color: inherit;
}

body.page-feed-home .posts-container.sticky-mode {
  padding-top: 0 !important;
}

body.page-feed-home .post-active {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  height: auto !important;
  z-index: auto !important;
  display: block !important;
}

/* style.css .sticky-media-bg — blur(20px) brightness(0.9) when body.sticky-active */
body.page-feed-home .sticky-media-bg,
body.page-feed-home.sticky-active .sticky-media-bg {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  filter: none !important;
}

body.page-feed-home .search-header h2,
body.page-feed-home .search-users-results h3 {
  color: var(--niizi-text);
  padding: 12px 14px 0;
}

body.app-shell.user-authenticated {
  background: var(--niizi-bg);
  color: var(--niizi-text);
}

body.app-shell.user-authenticated .phone-frame,
body.user-authenticated.app-shell-active .phone-frame {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--niizi-bg);
}

body.app-shell.user-authenticated .phone-frame > .header,
body.app-shell.user-authenticated .phone-frame > .header-search-drawer,
body.user-authenticated .phone-frame > .header,
body.user-authenticated .phone-frame > .header-search-drawer,
body.user-authenticated.app-shell-active .header,
body.user-authenticated.app-shell-active .header-search-drawer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: none !important;
}

body.user-authenticated.sticky-active .phone-frame > .header,
body.user-authenticated.sticky-active .header {
  display: none !important;
  transform: none !important;
}

body.page-login .phone-frame > .header,
body.page-login .phone-frame > .header-search-drawer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.app-shell.user-authenticated .content,
body.app-shell.user-authenticated .app-content,
body.user-authenticated.app-shell-active .content,
body.user-authenticated.app-shell-active .app-content,
body.user-authenticated.app-shell-active .phone-frame > .content.app-content {
  flex: 1 1 0%;
  min-height: 0 !important;
  max-height: none !important;
  height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--footer-h) + 8px);
  background: var(--niizi-bg);
  scroll-behavior: auto;
}

body.user-authenticated.app-shell-active .app-bar {
  position: relative;
  top: auto;
  flex-shrink: 0;
}

/* App bar */
.app-bar {
  height: var(--app-bar-h);
  min-height: var(--app-bar-h);
  background: var(--niizi-header);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  border-bottom: 1px solid var(--niizi-divider);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.app-bar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--niizi-text);
  cursor: pointer;
  border-radius: 50%;
  text-decoration: none;
}

.app-bar-back:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app-bar-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--niizi-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar-subtitle {
  font-size: 12px;
  color: var(--niizi-text-secondary);
  font-weight: 400;
}

.app-bar-brand {
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.app-bar-brand .brand-n {
  color: #1565c0;
}

.app-bar-brand .brand-rest {
  color: var(--niizi-text);
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-bar-btn {
  border: none;
  background: transparent;
  color: var(--niizi-text);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-bar-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Footer nav (Flutter AppFooterNav) */
.app-footer-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--footer-h);
  background: var(--niizi-header);
  border-top: 1px solid var(--niizi-divider);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.app-footer-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--niizi-text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 0;
  position: relative;
  min-width: 0;
}

.app-footer-item.is-active {
  color: var(--niizi-nav-selected);
}

.app-footer-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3a3a3a;
  background: #232427;
}

.app-footer-item.is-active .app-footer-icon-wrap {
  border-color: var(--niizi-nav-selected);
}

.app-footer-item svg {
  width: 20px;
  height: 20px;
  fill: #dcdcdc;
}

.app-footer-item.is-active svg {
  fill: var(--niizi-nav-selected);
}

.app-footer-icon-wrap.has-avatar {
  padding: 0;
  overflow: hidden;
}

.app-footer-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.app-footer-item.is-active .app-footer-icon-wrap.has-avatar {
  border-color: var(--niizi-nav-selected);
}

.app-footer-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 24px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--niizi-badge);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.app-footer-badge.is-visible {
  display: flex;
}

/* Messages hub — 3 onglets Flutter */
.messages-hub {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--app-bar-h) - var(--footer-h));
}

.messages-hub-tabs {
  display: flex;
  background: var(--niizi-header);
  border-bottom: 1px solid var(--niizi-divider);
}

.messages-hub-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
}

.messages-hub-tab.is-active {
  color: var(--niizi-accent);
  border-bottom-color: var(--niizi-accent);
}

.messages-hub-tab svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.messages-hub-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.messages-hub-panel.is-active {
  display: block;
}

.messages-search {
  padding: 8px 12px 4px;
  background: var(--niizi-bg);
  position: relative;
}

.messages-search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--niizi-text-secondary);
  pointer-events: none;
  z-index: 1;
}

.messages-search-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.messages-search-clear {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.messages-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 36px 10px 40px;
  border-radius: 12px;
  border: none;
  background: var(--niizi-surface);
  color: var(--niizi-text);
  font-size: 14px;
}

.messages-search input::placeholder {
  color: var(--niizi-text-secondary);
}

.conv-row,
.group-row,
.notif-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.conv-trailing,
.group-trailing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.group-member-count {
  font-size: 12px;
  color: var(--niizi-text-secondary);
}

.group-badge {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.group-badge--public {
  background: rgba(136, 136, 136, 0.12);
  color: var(--niizi-text-secondary);
}

.group-badge--join {
  background: rgba(29, 185, 84, 0.15);
  color: var(--niizi-accent);
}

.conv-sel-check,
.notif-sel-check {
  display: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--niizi-text-secondary);
}

#hub-panel-notifications.is-notif-selection .notif-sel-check {
  display: block;
}

#hub-panel-notifications.is-notif-selection .notif-unread-dot {
  display: none;
}

.conv-row.is-selected .conv-sel-check,
#hub-panel-notifications.is-notif-selection .notif-row.is-selected .notif-sel-check {
  border-color: var(--niizi-accent);
  background: var(--niizi-accent);
  box-shadow: inset 0 0 0 3px var(--niizi-surface);
}

.conv-row[data-selection-mode] .conv-sel-check {
  display: block;
}

.conv-row[data-selection-mode] .unread-pill--count {
  display: none;
}

.conv-row[data-selection-mode] .conv-trailing {
  display: none;
}

.hub-card {
  margin: 4px 12px;
  border-radius: 12px;
  background: var(--niizi-surface);
  border: none;
  border-bottom: none !important;
}

.hub-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.conv-row.is-selected,
.notif-row.is-selected {
  outline: 1.5px solid var(--niizi-accent);
  background: rgba(29, 185, 84, 0.08);
}

.conv-row[data-selection-mode] {
  padding-left: 10px;
}

.hub-selection-bar {
  display: none;
}

body.page-messages .hub-app-bar-close,
body.page-messages .hub-app-bar-delete {
  border: none;
  background: transparent;
  color: var(--niizi-text);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-messages .hub-app-bar-delete {
  color: #ff3b30;
  margin-left: auto;
}

body.page-messages .hub-app-bar-delete:disabled {
  opacity: 0.35;
  cursor: default;
}

body.page-messages.is-selection-mode .app-bar {
  gap: 8px;
}

.messages-hub.is-selection-mode .messages-hub-tabs {
  display: none;
}

.hub-sel-close,
.hub-sel-delete {
  border: none;
  background: transparent;
  color: var(--niizi-text);
  cursor: pointer;
  font-size: 16px;
}

.hub-sel-delete { color: #ff3b30; margin-left: auto; }

.hub-sel-label {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.conv-row:hover,
.group-row:hover,
.notif-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.conv-avatar,
.group-avatar,
.notif-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #222327;
  flex-shrink: 0;
}

.conv-body,
.group-body,
.notif-body {
  flex: 1;
  min-width: 0;
}

.conv-top,
.group-top {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.conv-name,
.group-name,
.notif-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--niizi-text);
}

.conv-time,
.group-time,
.notif-time {
  font-size: 11px;
  color: var(--niizi-text-secondary);
  flex-shrink: 0;
}

.conv-preview,
.group-preview,
.notif-text {
  font-size: 13px;
  color: var(--niizi-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.conv-preview > span,
.group-preview > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.hub-att-icon {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--niizi-text-secondary);
  width: 16px;
  text-align: center;
}

.hub-att-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(136, 136, 136, 0.55);
  background: rgba(136, 136, 136, 0.18);
  font-size: 9px;
}

.group-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--niizi-accent);
}

.conv-time.is-unread,
.group-time.is-unread {
  color: var(--niizi-accent);
  font-weight: 600;
}

.unread-pill {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--niizi-badge);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.unread-pill--tab {
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
}

.unread-pill--count {
  align-self: center;
  background: #e53935;
}

.notif-row.is-unread {
  background: rgba(29, 185, 84, 0.06);
}

.notif-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 4px;
}

.notif-clear-btn {
  border: none;
  background: transparent;
  color: #e53935;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notif-clear-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.notif-selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--niizi-surface);
  border-bottom: 1px solid var(--niizi-divider);
  font-size: 13px;
}

.notif-sel-count {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--niizi-text);
}

.notif-sel-cancel,
.notif-sel-delete {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--niizi-text);
  font-size: 13px;
}

.notif-sel-delete {
  margin-left: auto;
  color: #e53935;
}

.notif-sel-all {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--niizi-accent);
  font-size: 13px;
  font-weight: 600;
}

.notif-leading {
  display: none;
}

.notif-avatar-stack {
  position: relative;
  flex-shrink: 0;
}

.notif-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #222327;
}

.notif-type-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--niizi-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-type-badge::after {
  content: '';
  width: 12px;
  height: 12px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.notif-type-like::after,
.notif-type-friend_like::after {
  content: '♥';
  font-size: 10px;
  color: #ff3040;
  width: auto;
  height: auto;
}

.notif-type-comment::after,
.notif-type-reply::after,
.notif-type-friend_comment::after,
.notif-type-live_comment::after {
  content: '💬';
  font-size: 10px;
  width: auto;
  height: auto;
}

.notif-type-follow::after {
  content: '+';
  font-size: 12px;
  font-weight: 700;
  color: var(--niizi-accent);
  width: auto;
  height: auto;
}

.notif-type-live::after {
  content: '▶';
  font-size: 9px;
  color: var(--niizi-accent);
  width: auto;
  height: auto;
}

.notif-type-message::after {
  content: '✉';
  font-size: 10px;
  width: auto;
  height: auto;
}

.notif-type-icon {
  display: none;
}

.hub-search-empty {
  padding-top: 16px;
}

.hub-action-sheet,
.chat-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hub-action-sheet button,
.chat-action-sheet button {
  display: block;
  width: 100%;
  max-width: 520px;
  border: none;
  background: var(--niizi-surface);
  color: var(--niizi-text);
  padding: 14px 16px;
  font-size: 15px;
  border-top: 1px solid var(--niizi-divider);
  cursor: pointer;
}

.hub-action-sheet button.is-danger,
.chat-action-sheet button.is-danger {
  color: #e53935;
}

.chat-confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chat-confirm-panel {
  width: 100%;
  max-width: 340px;
  background: var(--niizi-surface);
  border-radius: 12px;
  padding: 20px 18px 14px;
}

.chat-confirm-panel h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--niizi-text);
}

.chat-confirm-panel p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--niizi-text-secondary);
}

.chat-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-confirm-actions button {
  border: none;
  background: transparent;
  color: var(--niizi-accent);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.chat-confirm-actions button.is-danger {
  color: #e53935;
}

.app-bar-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  flex-shrink: 0;
}

.app-bar-chat-identity {
  flex: 1;
  min-width: 0;
}

.app-bar-chat-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.app-bar-chat-username {
  font-size: 16px;
  font-weight: 500;
  color: var(--niizi-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar-chat-title-row .verified-badge {
  flex-shrink: 0;
}

.group-visitor-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--niizi-surface);
  border-bottom: 1px solid var(--niizi-divider);
  font-size: 13px;
  color: var(--niizi-text-secondary);
}

.group-visitor-banner p {
  margin: 0;
  flex: 1;
}

.group-join-btn {
  border: none;
  background: var(--niizi-accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.group-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0;
  max-width: 100%;
}

.group-msg-row.is-me {
  justify-content: flex-end;
  padding-left: 48px;
}

.group-msg-row.is-peer {
  padding-right: 48px;
}

.group-msg-avatar-slot {
  width: 36px;
  flex-shrink: 0;
}

.group-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.group-msg-col {
  min-width: 0;
  max-width: 78%;
}

.chat-composer-stack {
  background: var(--niizi-input-bar);
}

/* display:flex below overrides browser [hidden]; keep hidden panels truly hidden */
.chat-composer-stack [hidden] {
  display: none !important;
}

.chat-reply-strip,
.chat-pending-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--niizi-input-bar);
  border-top: 1px solid var(--niizi-divider);
}

.chat-reply-bar {
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: var(--niizi-accent);
  flex-shrink: 0;
}

.chat-reply-body,
.chat-pending-body {
  flex: 1;
  min-width: 0;
}

.chat-reply-name,
.chat-pending-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--niizi-accent);
}

.chat-reply-preview,
.chat-pending-hint {
  display: block;
  font-size: 12px;
  color: var(--niizi-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reply-close,
.chat-pending-remove {
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  cursor: pointer;
  font-size: 16px;
}

.chat-pending-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #1f2c34;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-pending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-pending-icon {
  font-size: 20px;
}

.chat-quote-block {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.chat-quote-block.is-sent {
  background: #0e3d32;
}

.chat-quote-block.is-sent .chat-quote-name {
  color: var(--niizi-accent);
}

.chat-quote-block.is-received {
  background: #2a3942;
}

.chat-quote-block.is-received .chat-quote-name {
  color: #9b7bff;
}

.chat-quote-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.chat-quote-text {
  display: block;
  font-size: 12px;
  color: var(--niizi-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-unavailable {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(11, 14, 19, 0.45);
  border: 1px solid var(--niizi-divider);
}

.msg-unavailable-icon {
  color: var(--niizi-meta);
  font-size: 18px;
  line-height: 1;
}

.msg-unavailable-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--niizi-text);
}

.msg-unavailable-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--niizi-text-secondary);
}

.chat-recording-discard {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-recording-discard svg {
  width: 22px;
  height: 22px;
  fill: #ea4335;
}

.chat-attach-btn.is-send-mode .chat-attach-icon { display: none; }
.chat-attach-btn.is-send-mode .chat-attach-send-icon { display: block; }
.chat-attach-btn:not(.is-send-mode) .chat-attach-send-icon { display: none; }

.chat-attach-btn.is-uploading .chat-attach-icon,
.chat-attach-btn.is-uploading .chat-attach-send-icon {
  display: none;
}

.chat-attach-btn.is-uploading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(134, 150, 160, 0.35);
  border-top-color: var(--niizi-accent);
  border-radius: 50%;
  animation: chat-attach-spin 0.7s linear infinite;
}

@keyframes chat-attach-spin {
  to { transform: rotate(360deg); }
}

.chat-page .message.has-attachment:not(:has(.chat-att-caption)) {
  padding: 0;
  overflow: hidden;
}

.chat-page .message.has-attachment .chat-att-image {
  border-radius: 8px;
}

.message-meta .pending-clock,
.message-meta .upload-progress {
  margin-right: 3px;
  font-size: 10px;
  color: var(--niizi-meta);
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.message-meta .pending-clock svg {
  display: block;
}

.chat-emoji-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.chat-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: var(--niizi-input-bar);
  border-top: 1px solid var(--niizi-divider);
}

.chat-emoji-picker button {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

.chat-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  min-height: 42px;
}

.chat-recording-ui {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  min-height: 42px;
  position: absolute;
  inset: 0;
  z-index: 2;
  color: var(--niizi-bubble-text);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: var(--niizi-background, #0b0e13);
  border-radius: 23px;
  width: 100%;
  box-sizing: border-box;
}

.chat-recording-time {
  flex-shrink: 0;
  min-width: 36px;
}

.chat-recording-waveform {
  flex: 1;
  max-width: 194px;
  height: 34px;
  display: block;
}

.chat-send-btn .chat-action-icon {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.chat-send-btn.is-mic-mode .chat-action-send { display: none; }
.chat-send-btn.is-send-mode .chat-action-mic { display: none; }
.chat-send-btn:not(.is-send-mode):not(.is-mic-mode) .chat-action-mic { display: block; }
.chat-send-btn:not(.is-send-mode):not(.is-mic-mode) .chat-action-send { display: none; }

body.page-chat-fullscreen .chat-page {
  height: calc(100dvh - var(--app-bar-h));
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  flex-shrink: 0;
  align-self: center;
}

.notif-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--niizi-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.notif-row.is-unread .notif-title {
  font-weight: 600;
}

.notif-row:not(.is-unread) .notif-title {
  font-weight: 400;
}

.hub-empty--multiline {
  line-height: 1.4;
  padding-left: 24px;
  padding-right: 24px;
}

.notif-type-icon {
  display: none;
}

.hub-search-section {
  padding: 8px 16px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--niizi-text-secondary);
  margin: 0;
}

.hub-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--niizi-text-secondary);
  font-size: 14px;
}

.hub-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--footer-h) + 16px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--niizi-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.hub-fab.is-visible {
  display: flex;
}

.hub-fab svg,
.hub-fab-icon {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Chat Flutter style */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--app-bar-h) - var(--footer-h));
  background:#3c3c3c;
  background-image: radial-gradient(circle at 1px 1px, rgba(233, 237, 239, 0.04) 1px, transparent 0);
  background-size: 18px 18px;
}

.chat-page .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
}

.message-wrap {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  margin: 2px 0;
}

.message-wrap.is-sent {
  align-self: flex-end;
  align-items: flex-end;
  margin-left: 48px;
}

.message-wrap.is-received {
  align-self: flex-start;
  align-items: flex-start;
  margin-right: 48px;
}

.chat-date-pill {
  align-self: center;
  margin: 12px 0;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(31, 44, 52, 0.92);
  font-size: 11px;
  font-weight: 500;
  color: var(--niizi-meta);
}

.chat-page .message {
  max-width: 100%;
  width: fit-content;
  padding: 8px 10px 6px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.chat-page .message.received {
  background: var(--niizi-bubble-received);
  border-bottom-left-radius: 4px;
}

.chat-page .message.sent {
  background: #a0a2b836;
  border-bottom-right-radius: 4px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  padding: 0 2px;
}

.message-time {
  font-size: 10px;
  color: var(--niizi-meta);
}

.message-status {
  font-size: 10px;
  color: var(--niizi-meta);
  line-height: 1;
  white-space: nowrap;
}

.msg-deleted {
  margin: 0;
  font-style: italic;
  color: var(--niizi-meta);
  font-size: 14px;
}

.chat-page .message p {
  margin: 0;
  color: var(--niizi-bubble-text);
  line-height: 1.35;
  font-size: 15px;
}

/* legacy timestamp inside bubble — unused after meta refactor */
.chat-page .message .timestamp {
  display: none;
}

.chat-page .chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px 10px;
  background: var(--niizi-input-bar);
}

.chat-page .chat-composer input,
.chat-page .chat-composer textarea {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--niizi-bubble-text);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  min-height: 42px;
  max-height: calc(1.35em * 5 + 20px);
  overflow-y: hidden;
  box-sizing: border-box;
}

.chat-page .chat-composer input:focus,
.chat-page .chat-composer textarea:focus {
  outline: none;
}

.chat-page .chat-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--niizi-accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-page .chat-send-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.chat-page .group-sender {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.1;
}

/* Create group form */
.create-group-form {
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.create-group-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--niizi-text-secondary);
}

.create-group-form input,
.create-group-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--niizi-divider);
  background: #1f2c34;
  color: var(--niizi-text);
  font-size: 15px;
}

.create-group-form .submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--niizi-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.create-group-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--niizi-text);
}

/* ——— Feed dark overrides (Flutter home) ——— */
body.user-authenticated.app-shell-active .posts-container {
  background: var(--niizi-bg);
  padding: 0;
}

body.user-authenticated.app-shell-active.page-feed-home .post,
body.page-feed-home .post {
  background: transparent;
  border-bottom: none;
  border-radius: 17px;
  margin-bottom: 1px;
}

body.user-authenticated.app-shell-active .post-header,
body.user-authenticated.app-shell-active .post-actions,
body.user-authenticated.app-shell-active .post-caption {
  color: inherit;
}

body.user-authenticated.app-shell-active .search-header h2,
body.user-authenticated.app-shell-active .search-users-results h3 {
  color: var(--niizi-text);
  padding: 12px 14px 0;
}

/* ——— Feed home (FeedScreen Flutter) ——— */
body.user-authenticated.app-shell-active .app-bar:has(.feed-home-header) {
  height: auto;
  min-height: unset;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  background: #171717;
  border-bottom: none;
}

.feed-home-header {
  background: #171717;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 4px;
  width: 100%;
  box-sizing: border-box;
}

.feed-home-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.feed-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #e0e0e0;
  cursor: pointer;
  padding: 4px;
  text-decoration: none;
  flex-shrink: 0;
}

.feed-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(204, 204, 204, 0.79);
  font-size: 14px;
  font-weight: 200;
  flex-shrink: 0;
  padding-left: 2px;
  padding-right: 6px;
}

.feed-live-dot {
  color: rgba(200, 56, 53, 0.79);
  font-size: 50px;
  line-height: 0.8;
  display: inline-block;
  animation: feed-live-pulse 2s ease-in-out infinite;
}

@keyframes feed-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.feed-home-wordmark {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
}

/* Bouton bibliothèque header : mobile natif uniquement (pas iframe desktop) */
@media (min-width: 960px) {
  body:not(.phone-embed-mode) .feed-library-header-toggle {
    display: none !important;
  }
}
.feed-home-wordmark .brand-n { color: #1565c0; }
.feed-home-wordmark .brand-rest { color: #e0e0e0; }

.feed-home-search {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.feed-home-search.is-open {
  max-height: 56px;
  opacity: 1;
  padding: 6px 0 4px;
}

.feed-home-search-form {
  display: flex;
  align-items: center;
  height: 44px;
  background: #2c2c2c;
  border-radius: 8px;
  overflow: hidden;
}

.feed-home-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  color: #e0e0e0;
  padding: 10px 12px;
  font-size: 15px;
  min-width: 0;
}

/* ——— Bibliothèque mobile (historique / enregistrés) ——— */
body.page-feed-home .feed-library-drawer {
  position: fixed;
  inset: 0;
  z-index: 220;
  pointer-events: none;
  visibility: hidden;
}

body.page-feed-home .feed-library-drawer.is-drawer-open {
  pointer-events: auto;
  visibility: visible;
}

body.page-feed-home .feed-library-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

body.page-feed-home .feed-library-drawer.is-drawer-open .feed-library-drawer-backdrop {
  opacity: 1;
}

body.page-feed-home .feed-library-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(300px, 88vw);
  max-width: 100%;
  background: #0a0c10;
  border-right: 1px solid var(--niizi-divider);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
}

body.page-feed-home .feed-library-drawer.is-drawer-open .feed-library-drawer-panel {
  transform: translateX(0);
}

body.feed-library-drawer-open.page-feed-home .phone-frame,
body.feed-library-drawer-open.page-feed-home .phone-frame > .content.app-content {
  overflow: hidden;
}

body.page-feed-home .feed-library-drawer .feed-library-menu {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 10px 16px;
}

body.page-feed-home .feed-library-drawer .feed-library-section + .feed-library-section {
  margin-top: 8px;
}

body.page-feed-home .feed-library-drawer .feed-library-section-toggle {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--niizi-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body.page-feed-home .feed-library-drawer .feed-library-section-toggle.is-expanded {
  background: rgba(255, 255, 255, 0.1);
}

.feed-library-section-scroll-wrap {
  position: relative;
}

.feed-library-section-scroll-wrap::before,
.feed-library-section-scroll-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.feed-library-section-scroll-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(26, 29, 36, 0.92), transparent);
}

.feed-library-section-scroll-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(26, 29, 36, 0.92), transparent);
}

.feed-library-section-scroll-wrap.has-scroll-above::before {
  opacity: 1;
}

.feed-library-section-scroll-wrap.has-more-below::after {
  opacity: 1;
}

body.page-feed-home .feed-library-drawer .feed-library-section-body {
  padding: 8px 0 4px;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

body.page-feed-home .feed-library-drawer .feed-library-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 8px;
  background: transparent;
  color: var(--niizi-text);
  text-align: left;
  cursor: pointer;
}

body.page-feed-home .feed-library-drawer .feed-library-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.page-feed-home .feed-library-drawer .feed-library-item-thumb-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

body.page-feed-home .feed-library-drawer .feed-library-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-feed-home .feed-library-drawer .feed-library-item-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.page-feed-home .feed-library-drawer .feed-library-item-user {
  font-size: 13px;
  font-weight: 600;
}

body.page-feed-home .feed-library-drawer .feed-library-item-caption {
  font-size: 12px;
  color: var(--niizi-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-feed-home .feed-library-drawer .feed-library-item-viewed {
  font-size: 11px;
  color: var(--niizi-nav-selected, #6ea8fe);
}

body.page-feed-home .feed-library-drawer .feed-library-item-stats {
  font-size: 11px;
  color: var(--niizi-text-secondary);
}

body.page-feed-home .feed-library-drawer .feed-library-empty {
  margin: 8px 4px;
  font-size: 13px;
  color: var(--niizi-text-secondary);
}

body.page-feed-home .post.highlighted-post {
  outline: 2px solid var(--niizi-nav-selected, #6ea8fe);
  outline-offset: 2px;
  border-radius: 17px;
  transition: outline-color 0.3s ease;
}

.feed-home-search-form input::placeholder { color: #888; }

.feed-home-search-form .feed-home-search-submit {
  border: none;
  background: transparent;
  color: #888;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.feed-ptr-indicator {
  position: fixed;
  top: calc(var(--app-bar-h) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(35, 36, 39, 0.95);
  border: 1px solid #3a3a3a;
  color: #e0e0e0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0;
  pointer-events: none;
}

.feed-ptr-indicator.is-visible {
  opacity: 1;
}

.feed-ptr-indicator.is-ready {
  transform: translateX(-50%) translateY(0);
}

.feed-ptr-indicator svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  animation: feed-ptr-spin 0.8s linear infinite;
}

.feed-ptr-indicator.is-ready svg {
  animation: none;
}

@keyframes feed-ptr-spin {
  to { transform: rotate(360deg); }
}

.feed-offline-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2a2a2a;
  color: #888;
  font-size: 12px;
  padding: 8px 12px;
}

body.page-feed-home .app-bar .feed-offline-banner {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Sheet backdrop — parité Flutter barrierColor Colors.black54; scoped to phone-frame (not viewport) */
.niizi-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
  z-index: 99998;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.niizi-sheet-backdrop[hidden] {
  display: none !important;
}

/* Share option brand icons — parité SocialShareOption Flutter */
.share-brand-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.share-brand-icon svg {
  display: block;
}

.share-brand-icon--messenger { background: #0084ff; }
.share-brand-icon--copy { background: #444444; }
.share-brand-icon--whatsapp { background: #25d366; }
.share-brand-icon--telegram { background: #0088cc; }
.share-brand-icon--facebook { background: #1877f2; }
.share-brand-icon--twitter { background: #000000; }

.share-option-btn {
  display: flex;
  align-items: center;
  gap: 15px;
}

.share-option-btn > span:last-child {
  flex: 1;
  text-align: left;
}

/* [hidden] must win over display:flex (otherwise banner stays visible when online) */
.feed-offline-banner[hidden],
.offline-banner[hidden] {
  display: none !important;
}

.feed-section-card {
  margin: 10px 12px 6px;
  padding: 10px 8px 12px 12px;
  border: 1px solid var(--niizi-divider);
  border-radius: 12px;
  background: transparent;
}

.feed-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--niizi-text-secondary);
}

.feed-status-section .status-rail-scroll {
  height: 210px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: 0 -4px;
}

.feed-suggestions-section .suggestions-rail-scroll {
  height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: 0 -4px;
}

.feed-status-section .status-rail-scroll::-webkit-scrollbar,
.feed-suggestions-section .suggestions-rail-scroll::-webkit-scrollbar {
  display: none;
}

.status-rail-inner,
.suggestions-rail-inner {
  display: flex;
  padding-right: 4px;
}

.status-rail-inner {
  gap: 0;
  align-items: flex-start;
}

.suggestions-rail-inner {
  gap: 10px;
  align-items: flex-start;
}

.status-bubble-col {
  flex: 0 0 auto;
  width: 116px;
  text-align: center;
  padding-right: 12px;
}

.status-bubble-col:last-child {
  padding-right: 4px;
}

.status-bubble-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.status-ring-host {
  position: relative;
  width: 102px;
  height: 102px;
  margin: 0 auto;
}

.status-ring-svg-wrap {
  position: relative;
  width: 102px;
  height: 102px;
}

.status-ring-svg {
  width: 102px;
  height: 102px;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.status-ring-inner {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  overflow: hidden;
  background: #222327;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.status-inner-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-inner-letter {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.status-ring-add .status-add-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3897f0;
  color: #fff;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  border: 2px solid #0b0e13;
  z-index: 2;
}

.status-time-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(136, 136, 136, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-name-label {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--niizi-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-name-label.is-unseen,
.status-bubble-link.is-unseen .status-name-label {
  color: var(--niizi-text);
  font-weight: 600;
}

.inline-verified {
  display: inline-flex;
  vertical-align: middle;
}

.inline-verified .verified-icon {
  width: 13px;
  height: 13px;
  fill: #3897f0;
}

.feed-status-rail-clone {
  margin-top: 4px;
}

/* Suggestions rail */
.suggestion-card {
  flex: 0 0 auto;
  width: 150px;
  text-align: center;
  padding: 0;
  transition: opacity 0.28s ease;
}

.suggestion-avatar-link {
  display: block;
  margin: 0 auto;
}

.suggestion-avatar {
  width: 126px;
  height: 126px;
  border-radius: 16px;
  object-fit: cover;
  background: #222327;
  display: block;
}

.suggestion-name {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.71);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-name .inline-verified {
  margin-left: 2px;
}

.suggestion-name .verified-icon {
  width: 11px;
  height: 11px;
  fill: #3897f0;
  vertical-align: middle;
}

.suggestion-friends {
  display: block;
  font-size: 11px;
  color: var(--niizi-text-secondary);
  margin-top: 4px;
}

.suggestion-follow-btn {
  margin-top: 8px;
  height: 30px;
  min-width: 72px;
  padding: 0 12px;
  border: 1px solid var(--niizi-divider);
  border-radius: 16px;
  background: #2a2b2e;
  color: #adadad;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.suggestion-follow-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.feed-root {
  background: var(--niizi-bg);
}

#feed-posts-stream {
  min-height: 40px;
}

/* Posts fil accueil — parité PostCard Flutter */
body.page-feed-home .post-header-overlay {
  padding: 12px 15px 8px;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.page-feed-home .post-header-overlay .post-avatar {
  width: 40px;
  height: 40px;
  margin-right: 0;
  border: 1px solid #a76f22;
}

body.page-feed-home .post-header-overlay .post-user-info {
  position: absolute;
  left: 15px;
  margin-left: 52px;
}

body.page-feed-home .post-caption-overlay {
  padding: 2px 16px;
  min-height: 0;
  background: transparent !important;
  background-image: none !important;
}

body.page-feed-home .post-header-overlay .inline-verified {
  margin-left: 4px;
  vertical-align: middle;
}

body.page-feed-home .post-header-overlay .verified-icon--post {
  width: 16px;
  height: 16px;
  fill: #3897f0;
}

body.page-feed-home .post-bottom-compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body.page-feed-home .post-location-label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  padding-bottom: 10px;
  color: #aaa;
}

body.page-feed-home .post-location-city {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-feed-home .post-bottom-compact-row .post-actions-bottom {
  flex-shrink: 0;
  gap: 16px;
  padding-bottom: 2px;
}

body.page-feed-home .post-bottom-video-row .post-actions-bottom {
  gap: 16px;
}

body.page-feed-home .post-bottom-container {
  background: transparent;
  border: none;
  border-radius: 0;
  min-height: 52px;
  padding: 6px 12px;
  gap: 6px;
}

body.page-feed-home .post-bottom-container.has-video-feed-controls {
  min-height: 92px;
  padding: 2px 15px 14px;
  gap: 6px;
}

body.page-feed-home .post-bottom-main {
  justify-content: flex-start;
}

body.page-feed-home .post-actions-bottom {
  margin-top: 0;
  padding: 0;
  border: none;
}

body.page-feed-home .post-bottom-compact-row,
body.page-feed-home .post-bottom-video-row {
  justify-content: flex-start;
}

body.page-feed-home .post {
  position: relative;
}

body.page-feed-home .post-caption-overlay {
  min-height: 0;
  max-height: none;
  font-size: 1.1rem;
  line-height: 1.6rem;
  color: rgba(255, 255, 255, 0.59);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

body.page-feed-home .post-caption-overlay:not(.is-expanded) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-height: calc(1.6rem * 2 + 4px);
  background: transparent !important;
  background-image: none !important;
}

body.page-feed-home .post-caption-overlay.is-expanded {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(12px + 40px + 8px);
  z-index: 12;
  background: rgba(16, 16, 20, 0.9);
  max-height: 55vh;
  overflow-y: auto;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  padding: 8px 16px 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  text-shadow: none;
}

body.page-feed-home .media-nav,
body.page-feed-home .media-dots,
body.page-feed-home .media-item:not(:first-child) {
  display: none !important;
}

body.page-feed-home .post-actions-bottom .action-btn .icon {
  fill: rgba(224, 224, 224, 0.78);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

body.page-feed-home .post-actions-bottom .action-btn .icon.icon-stroke {
  fill: none;
  stroke: rgba(224, 224, 224, 0.78);
  color: rgba(224, 224, 224, 0.78);
}

body.page-feed-home .post-actions-bottom .like-icon:not(.liked) {
  fill: rgba(219, 219, 219, 0.74);
  stroke: none;
  stroke-width: 0;
}

body.page-feed-home .post-actions-bottom .like-icon.liked {
  fill: #ff3040;
  stroke: none;
  stroke-width: 0;
}

body.page-feed-home .post-actions-bottom .action-btn .action-count,
body.page-feed-home .post-actions-bottom .reaction-interaction-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-top: 0;
}

body.page-feed-home .feed-video-control-row {
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding: 3px 8px;
}

body.page-feed-home .feed-video-toggle-play {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1.2px solid #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.page-feed-home .feed-video-toggle-sound {
  display: none !important;
}

body.page-feed-home .feed-video-toggle-play svg {
  width: 11px;
  height: 11px;
  fill: #fff;
}

body.page-feed-home .post.has-video-feed-controls,
body.page-feed-home .post:has(.has-video-feed-controls) {
  margin-bottom: 10px;
}

body.page-feed-home .feed-offline-banner {
  flex-shrink: 0;
}

/* ——— Boutons Niizi (parité AppTheme / ChatComposerBar Flutter) ——— */
.niizi-btn-circle {
  width: var(--niizi-btn-circle-size);
  height: var(--niizi-btn-circle-size);
  border-radius: 50%;
  border: none;
  background: var(--niizi-accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.niizi-btn-circle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.niizi-btn-pill {
  height: var(--niizi-btn-pill-height);
  min-width: 72px;
  padding: 0 12px;
  border: 1px solid var(--niizi-divider);
  border-radius: var(--niizi-btn-pill-radius);
  background: var(--niizi-btn-filled-bg);
  color: #adadad;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.niizi-btn-pill--accent {
  background: var(--niizi-accent);
  border-color: var(--niizi-accent);
  color: #fff;
}

.niizi-btn-rect {
  padding: 6px 16px;
  border-radius: var(--niizi-btn-rect-radius-sm);
  border: none;
  background: #2c2c2c;
  color: var(--niizi-btn-filled-fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.niizi-btn-rect--outline {
  border: 1px solid #444444;
  background: #2c2c2c;
}

.niizi-btn-ghost {
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ——— Bottom sheets — parité PostInteractionOverlays Flutter ——— */
@keyframes niizi-sheet-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes comment-highlight {
  0% { background: rgba(29, 185, 84, 0.2); }
  100% { background: transparent; }
}

.niizi-sheet,
.comments-overlay,
.likes-overlay,
.share-overlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  z-index: 99999;
  flex-direction: column;
  height: 56vh;
  height: 56dvh;
  border-radius: var(--niizi-sheet-radius) var(--niizi-sheet-radius) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  animation: niizi-sheet-slide-up 0.3s ease;
  overflow: hidden;
}

/* Commentaires — thème chat (useChatTheme: true) */
.niizi-sheet--chat,
.comments-overlay {
  background: var(--niizi-chat-bg);
}

/* Likes / partage — coque translucide classique */
.niizi-sheet--classic,
.likes-overlay,
.share-overlay {
  background: var(--niizi-sheet-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.niizi-sheet-header,
.comments-header,
.likes-header,
.share-header {
  padding: 15px 12px;
  border-bottom: 1px solid var(--niizi-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.niizi-sheet-header--chat,
.comments-header {
  background: var(--niizi-input-bar);
  border-bottom-color: var(--niizi-sheet-header-chat-border);
  border-radius: 0;
  padding: 6px 12px;
}

.likes-header,
.share-header {
  background: var(--niizi-sheet-header);
  border-radius: var(--niizi-sheet-header-radius) var(--niizi-sheet-header-radius) 0 0;
}

.niizi-sheet-title,
.comments-header h5,
.likes-header h5,
.share-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--niizi-text);
  flex: 1;
}

.comments-header h5,
.niizi-sheet-header--chat .niizi-sheet-title {
  font-size: 15px;
}

.likes-header h5,
.share-header h5 {
  color: #fff;
}

.niizi-sheet-close,
.comments-header .btn-close,
.likes-header .btn-close,
.share-header .btn-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  opacity: 1;
  background-image: none;
}

.likes-header .niizi-sheet-close,
.likes-header .btn-close,
.share-header .niizi-sheet-close,
.share-header .btn-close {
  color: rgba(255, 255, 255, 0.7);
}

.niizi-sheet-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.niizi-sheet-header--chat .niizi-sheet-close,
.comments-header .btn-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.niizi-sheet-header--chat .niizi-sheet-close svg,
.comments-header .btn-close svg {
  width: 20px;
  height: 20px;
}

.comments-sheet-body,
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
  background-color: var(--niizi-chat-bg);
  background-image:
    radial-gradient(circle at 8px 8px, rgba(233, 237, 239, 0.04) 1.1px, transparent 1.2px),
    radial-gradient(circle at 32px 24px, rgba(233, 237, 239, 0.035) 0.9px, transparent 1px),
    radial-gradient(circle at 20px 40px, rgba(233, 237, 239, 0.03) 0.7px, transparent 0.8px);
  background-size: 48px 48px;
}

.comments-sheet-body:empty::before,
.comments-list:empty::before {
  content: '';
}

.comments-empty-state {
  text-align: center;
  color: var(--niizi-text-secondary);
  font-size: 14px;
  padding: 32px 16px;
}

.comment-thread {
  margin-bottom: 2px;
}

.comment-thread.is-highlighted {
  padding: 4px;
  border-radius: 8px;
  background: rgba(29, 185, 84, 0.12);
  animation: comment-highlight 2s ease-out;
}

.comment-thread.is-me {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.comment-replies-toggle {
  display: inline-block;
  margin: 2px 0 4px 48px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.comment-replies-toggle.is-me {
  margin-left: 0;
  align-self: flex-end;
}

.comment-replies-block {
  margin-left: 48px;
}

.comment-replies-block.is-me {
  margin-left: 0;
  align-self: flex-end;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 2px 4px;
}

.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 16px;
  color: var(--niizi-meta);
  font-size: 12px;
  font-weight: 600;
}

.comment-like-btn.is-liked {
  color: var(--niizi-accent);
}

.comment-like-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.comment-reply-btn {
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 12px;
}

/* Composer commentaires — réutilise le barre chat Flutter */
.niizi-sheet--chat .chat-composer-stack,
.comments-overlay .chat-composer-stack {
  flex-shrink: 0;
  background: var(--niizi-input-bar);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.niizi-sheet--chat .chat-composer,
.comments-overlay .chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 6px;
  background: var(--niizi-input-bar);
}

.niizi-sheet--chat .chat-composer input,
.comments-overlay .chat-composer input {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--niizi-bubble-text);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.35;
  min-height: 42px;
  box-sizing: border-box;
}

.niizi-sheet--chat .chat-composer input:focus,
.comments-overlay .chat-composer input:focus {
  outline: none;
}

.niizi-sheet--chat .chat-send-btn,
.comments-overlay .chat-send-btn {
  width: var(--niizi-btn-circle-size);
  height: var(--niizi-btn-circle-size);
  border-radius: 50%;
  border: none;
  background: var(--niizi-accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.niizi-sheet--chat .chat-send-btn svg,
.comments-overlay .chat-send-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.niizi-sheet--chat .chat-send-btn.is-mic-mode .chat-action-send,
.comments-overlay .chat-send-btn.is-mic-mode .chat-action-send {
  display: none;
}

.niizi-sheet--chat .chat-send-btn.is-send-mode .chat-action-mic,
.comments-overlay .chat-send-btn.is-send-mode .chat-action-mic {
  display: none;
}

.niizi-sheet--chat .chat-send-btn.recording,
.comments-overlay .chat-send-btn.recording {
  background: #ea4335;
}

.likes-list,
.share-options-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  min-height: 0;
}

.likes-list::-webkit-scrollbar {
  width: 6px;
}

.likes-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.like-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--niizi-divider);
}

.like-item:last-child {
  border-bottom: none;
}

.like-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
}

.like-item .username {
  color: #fff;
  font-weight: 500;
}

.share-option-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  background: #252525;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.share-option-btn:hover {
  background: #333;
}

.body-no-scroll {
  overflow: hidden !important;
  touch-action: none;
  height: 100vh;
  height: 100dvh;
}

/* Bulles commentaires — parité _CommentChatRow Flutter */
.comments-overlay .group-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  max-width: 100%;
}

.comments-overlay .group-msg-row.is-me {
  justify-content: flex-end;
  padding-left: 48px;
  padding-top: 8px;
  padding-bottom: 2px;
}

.comments-overlay .group-msg-row.is-peer.has-avatar {
  padding-right: 48px;
  padding-bottom: 2px;
}

.comments-overlay .group-msg-row.is-peer.has-header {
  padding-top: 8px;
}

.comments-overlay .group-msg-row.is-peer:not(.has-header) {
  padding-top: 2px;
}

.comments-overlay .group-msg-row.is-peer.has-avatar:not(.has-header) .group-msg-avatar-slot {
  visibility: hidden;
}

.comments-overlay .comment-replies-block .group-msg-row {
  padding-top: 4px;
  padding-left: 0;
  padding-right: 0;
}

.comments-overlay .group-msg-avatar-slot {
  width: 36px;
  flex-shrink: 0;
}

.comments-overlay .group-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.comments-overlay .group-msg-col {
  min-width: 0;
  max-width: 72%;
}

.comments-overlay .comment-replies-block .group-msg-col {
  max-width: 62%;
}

.comments-overlay .group-sender {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.1;
}

.comments-overlay .message {
  max-width: 100%;
  width: fit-content;
  padding: 6px 8px 4px;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.comments-overlay .message.received {
  background: var(--niizi-bubble-received);
  border-bottom-left-radius: 4px;
}

.comments-overlay .message.sent {
  background: var(--niizi-bubble-sent);
  border-bottom-right-radius: 4px;
}

.comments-overlay .message p,
.comments-overlay .message .comment-text {
  margin: 0;
  color: var(--niizi-bubble-text);
  line-height: 1.35;
  font-size: 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

.comments-overlay .message-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  padding: 0 2px;
}

.comments-overlay .message-time {
  font-size: 10px;
  color: var(--niizi-meta);
}

.comments-overlay .comment-replies-block .group-msg-row.is-peer {
  padding-left: 0;
}

.comments-overlay .comment-replies-block .group-msg-avatar {
  width: 32px;
  height: 32px;
}

.comments-overlay .comment-replies-block .comment-like-btn,
.comments-overlay .comment-replies-block .comment-reply-btn {
  font-size: 11px;
}

.comments-overlay .comment-replies-block .comment-like-btn svg {
  width: 16px;
  height: 16px;
}

/* Bulle vocale dans commentaires — parité VoiceMessagePlayer Flutter */
.comments-overlay .message.is-audio-only {
  padding: 6px 6px 4px;
  min-width: 248px;
  max-width: 272px;
}

.comments-overlay .message.is-audio-only .chat-voice-player {
  width: 100%;
}

.comments-overlay .message-wrap.is-audio .message-meta {
  max-width: 272px;
}

.comments-overlay .message-wrap.is-audio .comment-actions-row {
  max-width: 272px;
}

.comments-overlay .chat-voice-player.is-voice-msg.is-me {
  border-color: rgba(233, 237, 239, 0.28);
  background: linear-gradient(90deg, rgba(233, 237, 239, 0.1), rgba(233, 237, 239, 0.03));
}

.comments-overlay .chat-voice-player.is-voice-msg.is-me .chat-voice-clef {
  color: rgba(233, 237, 239, 0.88);
}

/* Composer commentaires — live toggle + emoji SVG (parité ChatComposerBar) */
.comments-overlay .chat-composer .live-voice-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 42px;
  padding: 0;
  margin: 0;
}

.comments-overlay .chat-composer .live-voice-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.comments-overlay .chat-composer .chat-emoji-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 42px;
  padding: 0;
  color: var(--niizi-meta);
}

.comments-overlay .chat-composer .chat-emoji-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.comments-overlay audio {
  display: none;
}

/* Posts texte — parité Flutter PostCard */
body.page-feed-home .post-media-container.post-text-media {
  aspect-ratio: auto;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #12171f;
  border-radius: 0;
}

body.page-feed-home .post-text-content.flutter-text-post {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #12171f;
  color: #e8e8ea;
  font-size: 24px;
  line-height: 1.45;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

body.page-feed-home .post-text-content.flutter-text-post.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  white-space: normal;
}

body.page-feed-home .custom-video-controls,
body.page-feed-home .video-controls,
body.page-feed-home .fullscreen-format-btn,
body.page-feed-home .post-text-controls,
body.page-feed-home .image-controls {
  display: none !important;
}

/* Live stream card — parité LiveStreamCard Flutter */
body.page-feed-home .live-stream-container {
  margin-bottom: 10px;
  background: transparent;
}

body.page-feed-home .live-stream-player-wrap {
  margin: 0 0 2px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

body.page-feed-home .live-stream-player {
  width: 100%;
  height: 100%;
}

body.page-feed-home .live-stream-title {
  padding: 2px 16px;
  color: rgba(255, 255, 255, 0.59);
  font-size: 17.6px;
  line-height: 1.45;
  max-height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: pointer;
}

body.page-feed-home .live-stream-title.is-expanded {
  max-height: none;
  -webkit-line-clamp: unset;
}

body.page-feed-home .live-stream-footer {
  min-height: 52px;
  padding: 6px 12px;
  background: transparent;
  border: none;
}

body.page-feed-home .live-stream-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body.page-feed-home .live-location-pin {
  flex: 1;
  color: #aaa;
  display: flex;
  align-items: center;
  padding-left: 4px;
}

body.page-feed-home .live-footer-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgb(6, 13, 16);
  color: rgba(246, 246, 246, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

body.page-feed-home .live-footer-btn.live-mute-toggle .live-icon-sound-on {
  display: none;
}

body.page-feed-home .live-footer-btn.live-mute-toggle.live-sound-on .live-icon-sound-off {
  display: none;
}

body.page-feed-home .live-footer-btn.live-mute-toggle.live-sound-on .live-icon-sound-on {
  display: block;
}

body.page-feed-home .live-placeholder-text {
  color: #888;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

body.page-feed-home .live-actions.post-actions-bottom {
  margin-top: 0;
  padding: 0;
}

/* Live plein écran immersif (parité LiveStreamCard Flutter) */
.live-immersive-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #000;
  display: flex;
  flex-direction: column;
}

.live-immersive-overlay .live-immersive-video {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #000;
}

.live-immersive-overlay .live-immersive-video .live-stream-player-wrap,
.live-immersive-overlay .live-immersive-video .live-stream-player {
  width: 100%;
  height: 100%;
  border-radius: 0;
  aspect-ratio: auto;
}

.live-immersive-overlay .live-stream-title.is-expanded {
  position: absolute;
  inset: 0;
  z-index: 4;
  max-height: none;
  background: rgba(16, 16, 20, 0.9);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  overflow-y: auto;
}

.live-immersive-overlay .live-immersive-footer {
  flex-shrink: 0;
  background: #000;
}

/* Status viewer */
.status-viewer {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}

.status-viewer-top {
  padding: max(8px, env(safe-area-inset-top)) 10px 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
  z-index: 3;
  transition: opacity 0.2s ease;
}

.status-viewer.is-immersive .status-viewer-top,
.status-viewer.is-immersive .status-viewer-footer {
  opacity: 0;
  pointer-events: none;
}

.status-progress-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.status-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.status-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
}

.status-viewer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  padding: 0 4px 4px;
}

.status-viewer-identity {
  flex: 1;
  min-width: 0;
}

.status-viewer-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-viewer-name {
  font-weight: 700;
  font-size: 15px;
}

.status-viewer-verified .verified-icon {
  width: 15px;
  height: 15px;
  fill: #1db954;
}

.status-viewer-time {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.status-viewer-delete,
.status-viewer-close {
  color: #fff;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-viewer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.status-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  touch-action: pan-y;
}

.status-media-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-height: 100%;
}

.status-viewer-media {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.status-caption {
  color: #fff;
  padding: 12px;
  text-align: center;
}

.status-caption-bar {
  flex-shrink: 0;
  padding: 0 16px 8px;
  z-index: 4;
  pointer-events: auto;
}

.status-caption-bar .status-caption-text {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0,0,0,0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.status-caption-bar.is-expanded .status-caption-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.status-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
}

.status-nav-prev { left: 0; }
.status-nav-next { right: 0; }

.status-viewer-footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px max(20px, env(safe-area-inset-bottom));
  align-items: center;
  position: relative;
  z-index: 3;
  transition: opacity 0.2s ease;
}

.status-viewer-footer--peer {
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.status-reply-emoji-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.status-reply-form {
  flex: 1;
  display: flex;
  min-width: 0;
}

.status-reply-form input {
  flex: 1;
  width: 100%;
  border-radius: 24px;
  border: none;
  padding: 10px 16px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 15px;
}

.status-reply-form input::placeholder {
  color: rgba(255,255,255,0.6);
}

.status-reply-emoji-picker {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 4px);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #1a1a1a;
  border-radius: 12px;
  max-height: 140px;
  overflow-y: auto;
  z-index: 10;
}

.status-reply-emoji-picker[hidden] {
  display: none !important;
}

.status-reply-emoji-item {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.status-reply-emoji-item:hover {
  background: rgba(255,255,255,0.1);
}

.status-like-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.status-like-btn.is-liked { color: #ff3b30; }

.status-viewer-footer--owner {
  justify-content: center;
  gap: 28px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.status-insight-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 24px;
}

.status-insights-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.status-insights-modal[hidden] {
  display: none !important;
}

.status-insights-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.status-insights-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 55vh;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  padding: 8px 16px 16px;
  color: #fff;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.status-insights-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.24);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.status-insights-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 8px;
}

.status-insights-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.54);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.status-insights-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

.status-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
}

.status-insights-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.status-insights-name {
  flex: 1;
  min-width: 0;
}

.status-insights-when {
  font-size: 12px;
  color: rgba(255,255,255,0.54);
  flex-shrink: 0;
}

.status-insights-row img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.status-insights-empty,
.status-insights-loading {
  color: rgba(255,255,255,0.6);
  padding: 12px 0;
}

.status-insights-close {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
}

.status-viewer.is-dismissing {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Chat attachments + inline video */
.chat-attach-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--niizi-meta);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-attach-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.chat-att-image {
  max-width: 240px;
  max-height: 280px;
  border-radius: 8px;
  display: block;
}

.chat-att-image-wrap {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  line-height: 0;
}

.chat-att-image-wrap:focus-visible {
  outline: 2px solid var(--niizi-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Voice message player */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.chat-voice-player.is-voice-msg {
  width: 100%;
  padding: 4px 4px 4px 2px;
  border-radius: 14px;
  border: 1px solid rgba(233, 237, 239, 0.28);
  background: linear-gradient(90deg, rgba(233, 237, 239, 0.1), rgba(233, 237, 239, 0.03));
  box-sizing: border-box;
}

.chat-voice-player.is-voice-msg.is-peer {
  border-color: rgba(29, 185, 84, 0.28);
  background: linear-gradient(90deg, rgba(29, 185, 84, 0.1), rgba(29, 185, 84, 0.03));
}

.chat-voice-clef {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
  color: rgba(233, 237, 239, 0.88);
}

.chat-voice-player.is-peer .chat-voice-clef {
  color: rgba(29, 185, 84, 0.88);
}

.chat-voice-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(233, 237, 239, 0.12);
  color: var(--niizi-bubble-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-voice-play:disabled {
  cursor: default;
}

.chat-voice-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.chat-voice-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(233, 237, 239, 0.25);
  border-top-color: var(--niizi-bubble-text);
  border-radius: 50%;
  animation: chat-attach-spin 0.7s linear infinite;
}

.chat-voice-wave-wrap {
  flex: 1;
  min-width: 0;
  max-width: 194px;
}

.chat-voice-waveform {
  width: 100%;
  height: 28px;
  display: block;
}

.chat-att-audio {
  width: 220px;
  max-width: 100%;
}

.chat-att-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  color: var(--niizi-bubble-text);
  text-decoration: none;
}

.chat-attachment-expired {
  font-size: 13px;
  color: var(--niizi-meta);
  font-style: italic;
}

.chat-att-caption {
  margin: 6px 0 0;
  font-size: 14px;
}

.inline-video {
  position: relative;
  max-width: 260px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.inline-video-el {
  width: 100%;
  max-height: 220px;
  display: block;
}

.inline-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: opacity 0.2s;
}

.inline-video-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.inline-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

.inline-video-controls input[type=range] {
  flex: 1;
}

.inline-video-time {
  font-size: 10px;
  color: #fff;
}

.message.is-pending { opacity: 0.85; }
.message.send-failed { outline: 1px solid #ff3b30; }

.pending-clock, .upload-progress {
  margin-right: 4px;
  font-size: 10px;
  color: var(--niizi-meta);
}

/* In-app chat image lightbox */
.chat-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-image-lightbox[hidden] {
  display: none !important;
}

body.chat-lightbox-open {
  overflow: hidden;
}

.chat-lightbox-close,
.chat-lightbox-zoom {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-lightbox-close {
  top: 12px;
  right: 12px;
}

.chat-lightbox-zoom {
  top: 12px;
  right: 64px;
  font-size: 18px;
}

.chat-lightbox-stage {
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  padding: 56px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-lightbox-img {
  max-width: min(100vw - 32px, 1200px);
  max-height: calc(100dvh - 80px);
  object-fit: contain;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.chat-lightbox-img.is-zoomed {
  transform: scale(2);
  cursor: zoom-out;
}

.offline-banner {
  background: #b45309;
  color: #fff;
  text-align: center;
  padding: 6px 12px;
  font-size: 13px;
}

/* Auth phone tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--niizi-divider);
}

.auth-tab {
  flex: 1;
  border: none;
  padding: 12px;
  background: #1f2c34;
  color: var(--niizi-text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.auth-tab.is-active {
  background: var(--niizi-accent);
  color: #fff;
}

.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-hint {
  font-size: 13px;
  color: var(--niizi-text-secondary);
  margin-bottom: 12px;
}

body.user-authenticated.app-shell-active .auth-container input {
  background: #1f2c34;
  color: var(--niizi-text);
  border: 1px solid var(--niizi-divider);
}

/* Group settings */
.group-settings {
  padding: 16px;
  max-width: 520px;
  margin: 0 auto;
}

.group-settings-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.group-settings-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1db954;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}

.group-settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.group-avatar-upload {
  color: var(--niizi-accent);
  cursor: pointer;
  font-size: 14px;
}

.group-members-title {
  margin: 24px 0 12px;
  font-size: 15px;
  color: var(--niizi-text);
}

.group-members-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.group-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--niizi-divider);
}

.group-member-role {
  font-size: 12px;
  color: var(--niizi-text-secondary);
  display: block;
}

.group-role-form select {
  background: #1f2c34;
  color: var(--niizi-text);
  border: 1px solid var(--niizi-divider);
  border-radius: 8px;
  padding: 6px 8px;
}

.form-error {
  color: #ff3b30;
  font-size: 13px;
  margin-bottom: 10px;
}

/* PWA install — absent du fil Flutter */
body.page-feed-home .install-button {
  display: none !important;
}

/* PWA install — petit bouton coin bas-droit, au-dessus du footer */
body.app-shell.user-authenticated .install-button {
  position: fixed;
  bottom: calc(var(--footer-h) + 12px + env(safe-area-inset-bottom, 0px));
  right: 12px;
  left: auto;
  top: auto;
  transform: none;
  min-width: 0;
  width: auto;
  max-width: 160px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 18px;
  background: rgba(35, 36, 39, 0.92);
  color: #e0e0e0;
  border: 1px solid #3a3a3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  animation: none;
  z-index: 180;
  opacity: 0.9;
}

body.app-shell.user-authenticated .install-button:hover {
  transform: none;
  background: rgba(45, 46, 49, 0.95);
  opacity: 1;
}

/* Pied de post vidéo — contrôles + actions sur une ligne (Flutter post_card) */
body.app-shell.user-authenticated.page-feed-home .post-bottom-container.has-video-feed-controls,
body.page-feed-home .post-bottom-container.has-video-feed-controls {
  min-height: 92px;
  padding: 2px 15px 14px;
  gap: 6px;
}

body.app-shell.user-authenticated.page-feed-home .post-bottom-video-row,
body.page-feed-home .post-bottom-video-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
}

body.app-shell.user-authenticated.page-feed-home .post-bottom-video-row .feed-video-control-row,
body.page-feed-home .post-bottom-video-row .feed-video-control-row {
  flex: 1;
  min-width: 0;
}

body.app-shell.user-authenticated.page-feed-home .post-bottom-video-row .post-actions-bottom,
body.page-feed-home .post-bottom-video-row .post-actions-bottom {
  margin-top: 0;
  flex-shrink: 0;
  padding: 0;
  border: none;
}

/* Fil accueil téléphone — contrôles in-frame (parité Flutter post_card) */
body.page-feed-home .post-media-container,
body.page-feed-home .post-media-container.post-text-media {
  position: relative;
}

body.page-feed-home .feed-post-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  transform: none;
  z-index: 5;
  padding: 3px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  line-height: 0;
  pointer-events: none;
}

body.page-feed-home .feed-post-type-badge--video {
  padding: 0;
  background: transparent;
}

body.page-feed-home .feed-post-type-badge--video svg {
  width: 18px;
  height: 18px;
  display: block;
}

body.page-feed-home .feed-post-type-badge--video.feed-post-type-badge--hidden {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

body.page-feed-home .feed-post-type-badge svg {
  display: block;
}

body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .feed-post-type-badge {
  display: none;
}

body.page-feed-home:not(.phone-embed-mode) .media-item {
  position: relative;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-overlay-bottom-left,
body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-toggle-play,
body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-sound-side-btn {
  pointer-events: auto;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-sound-side {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  z-index: 5;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1.2px solid #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  -webkit-appearance: none;
  appearance: none;
  opacity: 1;
  transition: opacity 0.45s ease;
  pointer-events: auto;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn.is-fading-out,
body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn.is-faded-away {
  opacity: 0;
  pointer-events: none;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn.is-sound-btn-visible {
  opacity: 1;
  pointer-events: auto;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn[hidden] {
  display: none !important;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn svg {
  width: 15px;
  height: 15px;
  fill: #fff;
  display: none;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn.is-muted .icon-sound-off {
  display: block;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-sound-side-btn:not(.is-muted) .icon-sound-on {
  display: block;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-overlay-bottom-left,
body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-toggle-sound {
  pointer-events: auto;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-overlay-bottom-left {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-overlay-bottom-left .feed-video-toggle-play {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1.2px solid #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-overlay-bottom-left .feed-video-time-display {
  min-width: 0;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(6, 13, 16, 0.54);
  font-size: 10px;
  font-weight: 500;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-time-display .feed-current-time {
  color: #c0bba4;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-toggle-sound {
  display: none !important;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-toggle-play svg {
  width: 11px;
  height: 11px;
  fill: #fff;
}

body.page-feed-home:not(.phone-embed-mode) .post:not(.video-is-playing) .feed-video-overlay-controls .feed-video-time-display {
  opacity: 0.55;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-overlay-controls .feed-video-toggle-play {
  opacity: 1;
  pointer-events: auto;
}

body.page-feed-home:not(.phone-embed-mode) .post.video-is-playing .feed-video-overlay-controls .feed-video-toggle-sound {
  display: none;
}

body.page-feed-home:not(.phone-embed-mode) .post-bottom-container.has-video-overlay-controls {
  min-height: auto;
  padding: 4px 12px 6px;
  gap: 4px;
}

body.page-feed-home:not(.phone-embed-mode) .post-bottom-video-row--overlay {
  align-items: center;
  gap: 8px;
}

body.page-feed-home:not(.phone-embed-mode) .post-bottom-video-row--overlay .post-actions-bottom {
  margin-left: auto;
}

body.page-feed-home:not(.phone-embed-mode) .feed-video-progress-line {
  margin-top: 0;
}

body.page-feed-home .app-footer-nav {
  display: flex !important;
  visibility: visible !important;
}

/* Screen app bar (Friends, Calls, Messages, Profile) */
.screen-app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.screen-app-bar-title {
  color: #b0b0b0;
  font-size: 20px;
  font-weight: 600;
  flex: 1;
  margin: 0;
}

.screen-app-bar-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--niizi-text);
  font-size: 16px;
  padding: 0;
  min-width: 0;
}

.screen-app-bar-search-input:focus {
  outline: none;
}

.screen-app-bar.is-search-open .screen-app-bar-title {
  display: none;
}

.screen-app-bar.is-search-open .screen-app-bar-search-input {
  display: block !important;
}

.screen-app-bar.is-search-open .icon-search {
  display: none;
}

.screen-app-bar.is-search-open .icon-check {
  display: block !important;
}

/* Flutter-style social tabs (Friends / Calls) */
.social-page-flutter {
  padding: 0;
}

.social-page-flutter .social-page-header {
  display: none;
}

.social-tabs-flutter {
  display: flex;
  gap: 0;
  margin: 0;
  background: var(--niizi-header);
  border-bottom: 1px solid var(--niizi-divider);
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}

.social-tabs-flutter::-webkit-scrollbar {
  display: none;
}

.social-tabs-flutter .social-tab {
  flex: 0 0 auto;
  min-width: max-content;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 12px 8px;
  color: #757575 !important;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.social-tabs-flutter .social-tab.is-active {
  color: #b8b8b8 !important;
  background: transparent !important;
  border-bottom-color: var(--niizi-nav-selected) !important;
}

.social-tab-label {
  line-height: 1.2;
}

.social-tab-count {
  font-size: 12px;
  color: #666666;
  font-weight: 600;
  line-height: 1.2;
}

.social-tabs-flutter .social-tab.is-active .social-tab-count {
  color: var(--niizi-nav-selected);
}

.social-page-flutter .social-tab-panel {
  padding: 4px 0 12px;
}

.social-page-flutter .social-user-row {
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(51, 51, 51, 0.55);
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-page-flutter .social-user-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.friends-user-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.friends-user-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.friends-user-subtitle {
  font-size: 13px;
  color: var(--niizi-text-secondary);
}

.social-avatar-contact {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.social-avatar-friend {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friends-contact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.friends-contact-action-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 22px;
  background: rgba(34, 35, 39, 0.45);
  color: #8f8f8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.friends-contact-action-btn:hover {
  background: rgba(34, 35, 39, 0.7);
}

.social-page-flutter .social-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--niizi-text-secondary);
  font-size: 14px;
  margin: 0;
}

.screen-search-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 4px 16px;
}

.screen-search-chip-text {
  flex: 1;
  min-width: 0;
  color: var(--niizi-text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-search-chip-clear {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  font-size: 20px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  line-height: 1;
}

.friends-action-btn,
.social-page-flutter .call-action-btn {
  height: 36px;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: none;
  box-shadow: none;
}

.friends-action-filled {
  border: none !important;
  background: var(--niizi-text) !important;
  color: var(--niizi-bg) !important;
}

.friends-action-filled:hover,
.friends-action-filled:focus {
  background: var(--niizi-text) !important;
  color: var(--niizi-bg) !important;
  opacity: 0.92;
}

.friends-action-outline {
  border: 1px solid var(--niizi-divider) !important;
  background: #222327 !important;
  color: var(--niizi-text) !important;
  padding: 0 12px;
  font-weight: 600;
}

.friends-action-outline:hover,
.friends-action-outline:focus {
  background: #222327 !important;
  color: var(--niizi-text) !important;
}

.friends-action-soft {
  border: 1px solid var(--niizi-divider) !important;
  background: #2a2b2e !important;
  color: #adadad !important;
  font-weight: 500;
}

.friends-action-soft:hover,
.friends-action-soft:focus {
  background: #2a2b2e !important;
  color: #adadad !important;
}

.friends-action-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.social-page-flutter .call-action-btn {
  border: none;
  background: var(--niizi-text);
  color: var(--niizi-bg);
}

.social-page-flutter .social-username {
  color: rgba(255, 255, 255, 0.71);
  font-size: 15px;
  font-weight: 500;
}

.social-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.calls-history-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.calls-history-user-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* Profile (Flutter profile_screen) */
body.page-profile .app-bar {
  position: relative;
  justify-content: center;
}

body.page-profile .profile-settings-btn {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

body.page-profile .profile-app-bar-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--niizi-text);
}

body.page-profile .profile-app-bar-username {
  max-width: calc(100vw - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-profile .profile {
  text-align: center;
  padding: 20px 20px 80px;
  color: var(--niizi-text);
  background: var(--niizi-bg);
}

body.page-profile .profile-header-own,
body.page-profile .profile-header-other {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

body.page-profile .profile-status-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.page-profile .profile-status-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.page-profile .profile-status-ring-host {
  position: relative;
  width: 72px;
  height: 72px;
}

body.page-profile .profile-status-ring-host .status-ring-svg-wrap,
body.page-profile .profile-status-ring-host .status-ring-host {
  width: 72px;
  height: 72px;
}

body.page-profile .profile-status-ring-host .status-ring-svg {
  width: 72px;
  height: 72px;
}

body.page-profile .profile-status-ring-host .status-ring-inner,
body.page-profile .profile-status-ring-host .status-inner-avatar {
  width: 64px;
  height: 64px;
}

body.page-profile .profile-status-add {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #444444;
  background: #2c2c2c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body.page-profile .profile-status-add-icon {
  color: rgba(255, 255, 255, 0.5);
  display: flex;
}

body.page-profile .profile-status-add-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3897f0;
  border: 2px solid #000;
  color: #fff;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
}

body.page-profile .profile-status-time {
  font-size: 10px;
  color: var(--niizi-text-secondary);
  margin-top: 4px;
  min-height: 12px;
}

body.page-profile .profile-status-label {
  font-size: 11px;
  color: var(--niizi-text-secondary);
  margin-top: 2px;
}

body.page-profile .profile-status-ring-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

body.page-profile .profile-status-add-overlay {
  position: absolute;
  top: 50px;
  right: -2px;
  z-index: 4;
  text-decoration: none;
}

body.page-profile .profile-status-add-overlay .profile-status-add-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-profile .profile-pic-container {
  position: relative;
  display: inline-block;
}

body.page-profile .profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

body.page-profile .edit-profile-pic {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #3a4762;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

body.page-profile .edit-profile-pic .edit-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body.page-profile .username-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

body.page-profile .username-container h2 {
  color: var(--niizi-text);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

body.page-profile .profile-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 15px 0 0;
}

body.page-profile .stats-btn {
  background: transparent;
  border: none;
  color: var(--niizi-text-secondary);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

body.page-profile .stats-btn .count {
  display: block;
  color: var(--niizi-text);
  font-size: 18px;
  font-weight: 700;
}

body.page-profile .stats-btn .label {
  font-size: 13px;
}

body.page-profile .admin-btn {
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  background: #2c2c2c;
  color: #808080;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

body.page-profile .follow-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #2c2c2c !important;
  color: #e0e0e0 !important;
  cursor: pointer;
}

body.page-profile .follow-btn:hover,
body.page-profile .follow-btn:focus {
  background: #2c2c2c !important;
  color: #e0e0e0 !important;
  opacity: 0.92;
}

body.page-profile .follow-btn.following {
  background: #2c2c2c !important;
  color: #e0e0e0 !important;
  border: 1px solid #444444;
}

body.page-profile .profile-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  background: #2c2c2c;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
}

body.page-profile .profile-suggestions-section {
  padding: 10px 20px;
  text-align: left;
}

body.page-profile .profile-suggestions-scroll {
  height: 196px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

body.page-profile .profile-suggestions-scroll::-webkit-scrollbar {
  display: none;
}

body.page-profile .profile-suggestions-inner {
  display: flex;
  gap: 12px;
  padding: 4px 0;
}

body.page-profile .profile-suggestion-card {
  flex: 0 0 88px;
  width: 88px;
  text-align: center;
}

body.page-profile .profile-suggestion-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

body.page-profile .profile-suggestion-name {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--niizi-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-profile .profile-suggestion-name .verified-icon {
  width: 11px;
  height: 11px;
}

body.page-profile .profile-suggestion-friends {
  display: block;
  font-size: 10px;
  color: var(--niizi-text-secondary);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-profile .profile-suggestion-follows-you {
  display: block;
  font-size: 9px;
  font-style: italic;
  color: var(--niizi-text-secondary);
  margin-top: 2px;
}

body.page-profile .profile-suggestion-follow-btn {
  margin-top: 6px;
  width: 100%;
  height: 28px;
  border-radius: 14px;
  border: 1px solid var(--niizi-divider) !important;
  background: #2a2b2e !important;
  color: #adadad !important;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 6px;
}

body.page-profile .profile-suggestion-follow-btn:hover,
body.page-profile .profile-suggestion-follow-btn:focus {
  background: #2a2b2e !important;
  color: #adadad !important;
}

body.page-profile .profile-suggestion-follow-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

body.page-profile .profile-suggestions-empty {
  display: none;
}

body.page-profile .media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 2px;
  padding: 2px;
}

body.page-profile .media-grid .media-itemX img,
body.page-profile .media-grid .media-itemX video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

body.page-profile .profile-grid-tile {
  position: relative;
  overflow: hidden;
  background: var(--niizi-surface);
}

body.page-profile .profile-grid-text-preview {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #2a2a2e;
  color: #e8e8ea;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

body.page-profile .profile-grid-views {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 10px 6px 5px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

body.page-profile .profile-grid-play-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  left: auto;
  transform: none;
  line-height: 0;
  pointer-events: none;
}

body.page-profile .profile-grid-type-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  left: auto;
  transform: none;
  padding: 3px;
  border-radius: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  line-height: 0;
  pointer-events: none;
}

body.page-profile .profile-grid-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

body.page-profile .media-item-video-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--niizi-surface);
  color: var(--niizi-text-secondary);
}

body.page-profile .profile-media-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--niizi-text-secondary);
  margin: 0;
}

.profile-friends-modal,
.profile-settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
}

.profile-friends-modal[hidden],
.profile-settings-sheet[hidden] {
  display: none !important;
}

.profile-settings-sheet[hidden] {
  display: none !important;
}

.profile-edit-sheet {
  position: fixed;
  inset: 0;
  z-index: 520;
}

.profile-edit-sheet[hidden] {
  display: none !important;
}

.profile-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
}

.profile-edit-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1e1e1e;
  border-radius: 16px 16px 0 0;
  padding: 12px 20px max(24px, env(safe-area-inset-bottom));
}

.profile-edit-title {
  margin: 8px 0 16px;
  text-align: center;
  color: #fff;
  font-size: 17px;
}

.profile-edit-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
}

.profile-edit-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-edit-camera-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #1e1e1e;
  background: #3897f0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-edit-label {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-bottom: 6px;
}

.profile-edit-username-input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  margin-bottom: 6px;
}

.profile-edit-username-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.profile-edit-username-hint.is-error {
  color: #ff6b6b;
}

.profile-edit-username-hint.is-ok {
  color: #4cd964;
}

.profile-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.profile-edit-cancel,
.profile-edit-save {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.profile-edit-cancel {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.profile-edit-save {
  background: #3897f0;
  color: #fff;
}

.profile-friends-modal-backdrop,
.profile-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
}

.profile-friends-modal-sheet,
.profile-settings-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 70vh;
  background: #1e1e1e;
  border-radius: 16px 16px 0 0;
  overflow: auto;
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.profile-friends-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-friends-modal-header h3,
.profile-settings-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--niizi-text);
}

.profile-friends-modal-close {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.profile-friends-modal-list .profile-friend-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
}

.profile-friends-modal-list .profile-friend-row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-friend-row-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.profile-friend-row-name {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--niizi-text);
  font-size: 15px;
  font-weight: 500;
}

.profile-friend-row-relation {
  margin-top: 4px;
  font-size: 11px;
  font-style: italic;
  color: var(--niizi-text-secondary);
  line-height: 1.25;
}

.profile-friend-follow-btn {
  height: 30px;
  border-radius: 6px;
  border: 1px solid #444444;
  background: transparent;
  color: var(--niizi-text);
  font-size: 11px;
  padding: 0 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-friend-follow-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.profile-delete-dialog {
  position: fixed;
  inset: 0;
  z-index: 600;
}

.profile-delete-dialog[hidden] {
  display: none !important;
}

.profile-delete-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
}

.profile-delete-dialog-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100vw - 32px));
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px 16px 12px;
}

.profile-delete-dialog-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--niizi-text);
}

.profile-delete-dialog-panel p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--niizi-text-secondary);
  line-height: 1.4;
}

.profile-delete-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.profile-delete-dialog-cancel,
.profile-delete-dialog-confirm {
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
}

.profile-delete-dialog-cancel {
  color: var(--niizi-text-secondary);
}

.profile-delete-dialog-confirm {
  color: #e53935;
}

.profile-delete-dialog-confirm.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.profile-logged-out-dialog {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.54);
}

.profile-logged-out-dialog[hidden] {
  display: none !important;
}

.profile-logged-out-dialog-panel {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px 24px;
  color: var(--niizi-text);
  font-size: 16px;
  text-align: center;
}

.profile-settings-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #555;
  margin: 0 auto 16px;
}

.profile-settings-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--niizi-text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}

.profile-settings-item-danger {
  color: #e53935;
}

.niizi-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--footer-h) + 16px);
  transform: translateX(-50%) translateY(12px);
  background: #2c2c2c;
  color: var(--niizi-text);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.niizi-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Messages hub: title-only app bar */
body.page-messages .app-bar {
  justify-content: flex-start;
  gap: 0;
}

body.page-messages .app-bar .app-bar-title {
  color: var(--niizi-text);
  font-size: 18px;
  flex: 1;
}

.live-voice-toggle {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-voice-toggle.is-enabled {
  color: var(--niizi-accent);
}

.live-voice-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.chat-attach-btn--add svg {
  width: 26px;
  height: 26px;
}

/* Chat fullscreen: hide footer */
body.page-chat-fullscreen .app-footer-nav {
  display: none !important;
}

body.page-chat-fullscreen .app-content,
body.page-chat-fullscreen .content {
  padding-bottom: 0 !important;
}

body.page-chat-fullscreen .hub-fab {
  display: none !important;
}

/* Login dark auth shell */
body.page-login {
  background: var(--niizi-bg);
}

body.page-login .phone-frame {
  background: var(--niizi-bg);
}

body.page-login .content,
body.page-login .app-content {
  padding-bottom: 0;
  height: 100dvh;
  background: var(--niizi-bg);
}

body.page-login .auth-container {
  min-height: calc(100dvh - 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

body.page-login .auth-form {
  width: 100%;
  max-width: 400px;
  background: #12151c;
  border: 1px solid var(--niizi-divider);
  border-radius: 16px;
  padding: 24px 20px;
  color: var(--niizi-text);
}

body.page-login .auth-form h2 {
  color: var(--niizi-text);
  margin: 0 0 16px;
  text-align: center;
}

body.page-login .auth-form label {
  color: var(--niizi-text-secondary);
  font-size: 13px;
}

body.page-login .auth-form input {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--niizi-divider);
  background: #1f2c34;
  color: var(--niizi-text);
}

body.page-login .submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--niizi-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

body.page-login .auth-link {
  text-align: center;
  margin-top: 16px;
  color: var(--niizi-text-secondary);
  font-size: 14px;
}

body.page-login .auth-link a {
  color: var(--niizi-accent);
}

/* Status viewer fullscreen */
body.page-status-viewer .app-footer-nav,
body.page-status-viewer .app-bar {
  display: none !important;
}

/* ---- Calls parity (Flutter calls_screen) ---- */
.call-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  background: #222327;
  color: var(--niizi-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.social-page-flutter .call-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.call-recall-btn {
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calls-history-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 4px;
}

.calls-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #e53935;
  font-size: 13px;
  cursor: pointer;
}

.selection-action-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #1a1d24;
  border-bottom: 1px solid var(--niizi-divider);
}

.selection-bar-btn {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
}

.selection-bar-count {
  flex: 1;
  text-align: center;
  color: var(--niizi-text);
  font-size: 14px;
  font-weight: 600;
}

.selection-bar-accent { color: var(--niizi-accent); }
.selection-bar-danger { color: #e53935; font-weight: 600; }
.selection-bar-danger:disabled { opacity: 0.4; cursor: default; }

.calls-history-row.is-selection-mode .call-recall-btn { display: none; }
.calls-history-row.is-selected { background: rgba(87, 103, 119, 0.12); }
.calls-history-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--niizi-text-secondary);
  flex-shrink: 0;
  display: none;
}
.calls-history-row.is-selection-mode .calls-history-check { display: inline-block; }
.calls-history-row.is-selected .calls-history-check {
  border-color: var(--niizi-accent);
  background: var(--niizi-accent);
  box-shadow: inset 0 0 0 3px #1a1d24;
}

.call-history-meta {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.call-status-missed { color: #e53935; }
.call-status-completed { color: #43a047; }
.call-status-declined { color: #ff9800; }
.call-status-ongoing { color: var(--niizi-text-secondary); }

.call-history-status-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
.call-history-status-icon-missed {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.59 7.41L18.17 6 12 12.17 5.83 6 4.41 7.41 12 14.99l7.59-7.58z'/%3E%3C/svg%3E");
}
.call-history-status-icon-completed,
.call-history-status-icon-ongoing {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
}
.call-history-status-icon-declined {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a.996.996 0 0 1 0-1.42l1.47-1.47-1.47-1.47a.996.996 0 1 1 1.42-1.42l1.47 1.47 1.47-1.47a.996.996 0 1 1 1.42 1.42l-1.47 1.47 1.47 1.47c.39.39.39 1.03 0 1.42-.39.39-1.03.39-1.42 0l-1.47-1.47-1.47 1.47z'/%3E%3C/svg%3E");
}

.call-history-decline-x {
  font-weight: 700;
  line-height: 1;
}

.calls-history-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Incoming call banner (Flutter CallUiHost) */
.incoming-call-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  pointer-events: none;
  background: transparent;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 0;
}

.incoming-call-modal.is-visible {
  display: flex;
  pointer-events: auto;
}

.incoming-call-banner {
  pointer-events: auto;
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: #121820;
  border: 1px solid rgba(21, 101, 192, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.incoming-call-modal.is-visible .incoming-call-banner {
  transform: translateY(0);
  opacity: 1;
}

.incoming-call-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c0, #4fc3f7);
  flex-shrink: 0;
  position: relative;
}
.incoming-call-banner-icon::after {
  content: '';
  position: absolute;
  inset: 13px;
  background: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.incoming-call-banner-icon.is-video::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 10.5V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E");
}

.incoming-call-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.incoming-call-brand {
  color: #4fc3f7;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.incoming-call-banner-text strong {
  color: #fff;
  font-size: 16px;
}
.incoming-call-banner-text span:last-child {
  color: var(--niizi-text-secondary);
  font-size: 12px;
}

.incoming-call-round-actions {
  display: flex;
  gap: 10px;
}
.incoming-call-round {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
}
.incoming-call-decline { background: #ff5252; }
.incoming-call-accept { background: #1565c0; }

/* Global call minimize / share (call_room legacy header helpers) */
.call-room-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.call-room-header-main { flex: 1; text-align: center; }
.call-minimize-btn,
.call-share-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
}

/* Choose post type (Flutter choose_post_type_screen) */
body.page-choose-post .choose-post-type-page {
  padding: 24px;
}
body.page-choose-post .post-type-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.page-choose-post .post-type-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: #1a1d24;
  color: var(--niizi-text);
  text-decoration: none;
}
body.page-choose-post .post-type-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.page-choose-post .post-type-label {
  font-size: 16px;
  font-weight: 700;
}

/* Form app bar */
.form-app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.form-app-bar-back {
  border: none;
  background: transparent;
  color: var(--niizi-text);
  padding: 4px;
  cursor: pointer;
}
.form-app-bar-title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  color: var(--niizi-text);
}
.form-app-bar-submit {
  border: none;
  background: transparent;
  color: var(--niizi-text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.form-app-bar-submit:disabled { opacity: 0.4; cursor: default; }
.form-app-bar-submit.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.form-app-bar-submit.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--niizi-text);
  border-radius: 50%;
  animation: niizi-spin 1s linear infinite;
}

/* Create post Flutter layout */
body.page-create-post .create-post-flutter,
body.page-create-text-post .create-text-post-page {
  padding: 16px;
}
.create-post-preview-placeholder {
  min-height: 200px;
  border-radius: 8px;
  background: #1a1d24;
  display: flex;
  align-items: center;
  justify-content: center;
}
.create-post-empty-media { color: var(--niizi-text-secondary); }
.create-post-pick-row {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  margin: 12px 0 16px;
}
.create-post-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #2a2b2e;
  color: var(--niizi-text);
  cursor: pointer;
  font-size: 14px;
}
.create-post-pick-btn-wide { width: 100%; justify-content: center; }
.create-post-file-input { display: none; }
.create-post-emoji-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.create-post-emoji-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
.create-post-emoji-label {
  color: var(--niizi-text-secondary);
  font-size: 13px;
}
.create-post-emoji-picker {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.create-post-emoji-picker.visible { display: flex; }
.create-post-emoji-picker button {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.create-post-submit-hidden { display: none !important; }

.post-location-field { margin-top: 16px; }
.post-location-label {
  display: block;
  color: var(--niizi-text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
}
.post-location-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--niizi-divider);
  background: #1a1d24;
  color: var(--niizi-text);
}
.post-location-suggestions {
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--niizi-divider);
}
.post-location-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: #1a1d24;
  color: var(--niizi-text);
  cursor: pointer;
}
.post-location-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #2a2b2e;
  color: var(--niizi-text);
}
.post-location-clear {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  font-size: 18px;
  cursor: pointer;
}

body.page-create-text-post textarea#text-content-input {
  width: 100%;
  min-height: 220px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--niizi-text);
  font-size: 18px;
  resize: vertical;
}

/* Login Flutter parity */
.auth-form-flutter .auth-brand {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
}
.auth-form-flutter .auth-brand .brand-n { color: #1565c0; }
.auth-form-flutter .auth-lead {
  text-align: center;
  color: var(--niizi-text-secondary);
  font-size: 15px;
  margin: 0 0 24px;
}
.auth-form-flutter { position: relative; }
.auth-step-back {
  position: absolute;
  top: 8px;
  left: 4px;
  border: none;
  background: transparent;
  color: var(--niizi-text);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-step-back:disabled { opacity: 0.4; cursor: default; }
.auth-primary-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: #0095f6 !important;
}
.auth-btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: niizi-spin 1s linear infinite;
}
.auth-phone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.auth-phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px 0 14px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1a1d24;
  color: var(--niizi-text);
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
}
.auth-phone-prefix-chevron {
  color: var(--niizi-text-secondary);
  flex-shrink: 0;
}
.auth-phone-row input {
  flex: 1;
  margin: 0 !important;
}
.country-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.country-picker-overlay[hidden] {
  display: none !important;
}
body.country-picker-open {
  overflow: hidden;
}
.country-picker-sheet {
  width: min(480px, 100%);
  max-height: min(80vh, 640px);
  background: #1a1d24;
  border: 1px solid #333;
  border-radius: 16px 16px 12px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.country-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.country-picker-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--niizi-text);
}
.country-picker-close {
  border: none;
  background: transparent;
  color: var(--niizi-text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.country-picker-search {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #12141a;
  color: var(--niizi-text);
  font-size: 15px;
}
.country-picker-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 12px;
  overflow-y: auto;
  flex: 1;
}
.country-picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--niizi-text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.country-picker-item:hover,
.country-picker-item.is-selected {
  background: rgba(255, 255, 255, 0.06);
}
.country-picker-item-name {
  flex: 1;
  min-width: 0;
}
.country-picker-item-dial {
  color: var(--niizi-text-secondary);
  flex-shrink: 0;
}
.auth-code-input {
  text-align: center;
  font-size: 28px !important;
  letter-spacing: 12px;
}
.auth-phone-display {
  text-align: center;
  color: var(--niizi-text);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
.auth-text-btn {
  border: none;
  background: transparent;
  color: var(--niizi-accent);
  width: 100%;
  margin: 8px 0;
  cursor: pointer;
}
.auth-tabs-compact { margin-bottom: 16px; }

/* Video post flow (Flutter video_pick / video_post_options / video_trim) */
body.page-video-pick .video-pick-page,
body.page-video-options .video-options-page,
body.page-video-trim .video-trim-page {
  padding: 24px 16px;
}

.video-pick-lead,
.video-options-lead {
  color: var(--niizi-text-secondary);
  line-height: 1.4;
  margin: 0 0 32px;
}

.video-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 8px;
  background: #2a2b2e;
  color: var(--niizi-text);
  font-size: 15px;
  cursor: pointer;
}

.video-pick-btn.is-loading { opacity: 0.6; pointer-events: none; }
.video-pick-btn.is-loading #video-pick-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--niizi-text);
  border-radius: 50%;
  animation: niizi-spin 1s linear infinite;
}

.video-options-duration {
  color: var(--niizi-text);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.video-options-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.video-options-btn-primary {
  border: none;
  background: #2a2b2e;
  color: var(--niizi-text);
}

.video-options-btn-secondary {
  border: 1px solid var(--niizi-text-secondary);
  background: transparent;
  color: var(--niizi-text);
}

.video-trim-preview-wrap {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.video-trim-loading-inline {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.video-trim-preview-wrap video {
  width: 100%;
  max-height: 320px;
  display: block;
}

.video-trim-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.video-trim-actions .video-options-btn {
  flex: 1;
  margin-bottom: 0;
}

.video-trim-page .trim-info {
  color: var(--niizi-text-secondary);
  font-size: 13px;
  margin-top: 8px;
}

/* Global call fullscreen (Flutter CallUiHost) */
.global-call-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  pointer-events: none;
}

.global-call-modal.is-visible {
  display: block;
  pointer-events: auto;
}

.global-call-modal-inner {
  position: absolute;
  inset: 0;
  background: #070a0f;
  color: #fff;
  overflow: hidden;
}

.global-call-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0b1018, #070a0f 50%, #0d1520);
  pointer-events: none;
}

.global-call-audio-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.global-call-avatar-ring {
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c0, #4fc3f7);
  margin-bottom: 20px;
}

.global-call-avatar {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: #1a2330;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 300;
  color: #fff;
}

.global-call-peer-name,
.global-call-peer-video {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.global-call-audio-subtitle,
.global-call-status,
.global-call-share-meta {
  margin: 8px 0 0;
  color: #8b9aab;
  font-size: 14px;
}

.global-call-share-meta {
  color: rgba(79, 195, 247, 0.9);
  font-size: 11px;
}

.global-call-video-stage {
  position: absolute;
  inset: 0;
}

.global-call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.global-call-local-video {
  position: absolute;
  right: 16px;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  width: 108px;
  height: 152px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid #1565c0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.global-call-top-bar {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  z-index: 2;
}

.global-call-top-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.global-call-wordmark {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.global-call-wordmark .brand-n { color: #1565c0; }
.global-call-wordmark .brand-rest { color: #e0e0e0; }

.global-call-icon-btn {
  border: none;
  background: transparent;
  color: #fff;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.global-call-share-icon .share-active-icon { color: #4fc3f7; }

.global-call-dock {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 10px;
  border-radius: 28px;
  background: rgba(18, 24, 32, 0.95);
  border: 1px solid #333;
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.12);
  z-index: 2;
}

.global-call-dock-btn {
  border: none;
  background: transparent;
  color: #8b9aab;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 52px;
  padding: 0;
}

.global-call-dock-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #243040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.global-call-dock-btn.is-active .global-call-dock-circle {
  background: #1565c0;
}

.global-call-dock-accent .global-call-dock-circle {
  background: #1565c0;
}

.global-call-dock-danger .global-call-dock-circle {
  background: #ff5252;
}

.global-call-dock-label {
  font-size: 11px;
  color: #8b9aab;
}

.global-call-dock-start {
  flex: 1;
  padding: 12px;
  border-radius: 999px;
  background: #1565c0;
  color: #fff;
  font-weight: 600;
}

.global-call-minimized {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: 12px;
  z-index: 11001;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}

.global-call-minimized-bubble {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-call-minimized-pulse {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(21, 101, 192, 0.4);
  animation: global-call-pulse 1.6s ease-out infinite;
}

@keyframes global-call-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.7); opacity: 0; }
}

.global-call-minimized-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c0, #4fc3f7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(21, 101, 192, 0.45);
}

.global-call-minimized-label {
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(26, 35, 48, 0.95);
  border: 1px solid rgba(21, 101, 192, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.global-call-modal-open {
  overflow: hidden;
}

body.page-login .auth-link { display: none !important; }

/* Video trim Flutter parity */
.trim-controls-surface {
  background: #1a1d24;
  padding: 12px 16px 24px;
  border-radius: 12px 12px 0 0;
  margin-top: 8px;
}
.trim-range-label {
  color: var(--niizi-text);
  font-size: 14px;
  margin: 0 0 12px;
  text-align: center;
}
.trim-playback-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.trim-playback-btn {
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}
body.page-video-trim .video-trim-flutter { padding: 0; }
body.page-video-trim .video-trim-preview-wrap {
  border-radius: 0;
  margin-bottom: 0;
}

/* Video thumbnail / caption flow */
body.page-video-thumbnail .video-flow-page,
body.page-video-caption .video-flow-page { padding: 16px; }
.video-thumbnail-preview {
  min-height: 200px;
  border-radius: 8px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}
.video-thumbnail-preview video,
.video-thumbnail-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}
.video-flow-label,
.video-flow-hint {
  color: var(--niizi-text-secondary);
  font-size: 14px;
  margin: 0 0 8px;
}
.video-flow-slider { width: 100%; margin-bottom: 16px; }
.video-thumbnail-actions { display: flex; gap: 8px; }
.video-thumbnail-actions .video-options-btn { flex: 1; margin-bottom: 0; }
.video-caption-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--niizi-divider);
  background: #1a1d24;
  color: var(--niizi-text);
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
}
.video-caption-textarea::placeholder { color: var(--niizi-text-secondary); }
.create-post-flutter .preview-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Post location Flutter label */
.post-location-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.post-location-icon { color: var(--niizi-accent); flex-shrink: 0; }
.post-location-title {
  color: var(--niizi-text);
  font-weight: 600;
  font-size: 14px;
}
.post-location-hint {
  margin: 4px 0 0;
  color: var(--niizi-text-secondary);
  font-size: 11px;
}

/* Status create (Flutter AddStatusScreen) */
body.page-status-create { background: #000; }
body.page-status-create .app-bar,
body.page-status-trim .app-bar,
body.page-status-create .header,
body.page-status-trim .header {
  background: #000;
  border-bottom: none;
}
.status-create-app-bar .form-app-bar-title,
.status-create-app-bar .form-app-bar-back { color: #fff !important; }
.status-create-publish { color: #3897f0 !important; }
.status-create-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.status-create-cancel-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 0;
}
.status-create-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  background: #000;
}
.status-create-page #status-create-form {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}
.status-create-page.is-compose {
  min-height: calc(100vh - 56px);
}
.status-create-page.is-compose .status-create-preview {
  flex: 1;
  min-height: 0;
  padding: 8px 16px 12px;
}
.status-create-page.is-compose .status-create-caption-row {
  margin-top: 0;
  padding-bottom: 24px;
}
.status-create-page:not(.is-compose) .status-create-caption-row {
  display: none;
}
.status-create-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 240px;
}
.status-create-placeholder {
  color: var(--niizi-text-secondary);
  text-align: center;
  margin: 0;
}
.status-create-media {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
}
.status-create-page.is-compose .status-create-media {
  width: 100%;
  max-height: calc(100vh - 56px - 96px);
  object-fit: contain;
}
.status-create-caption-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 8px;
}
.status-create-caption-input {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
}
.status-create-caption-input::placeholder { color: rgba(255,255,255,0.5); }
.status-emoji-btn { color: #fff; }
.status-emoji-picker { padding: 0 16px; }
.status-create-actions {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  padding: 20px 16px 28px;
}
.status-create-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.status-create-error { padding: 8px 16px; margin: 0; }

/* Status viewer footer */
.status-reply-send {
  border: none;
  background: transparent;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.status-like-btn.is-liked .status-like-icon path { fill: #ff3b30; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-overlay[hidden] { display: none !important; }

/* [hidden] must win over display:flex in shell UI */
.hub-app-bar-close[hidden],
.hub-app-bar-delete[hidden],
.messages-search-clear[hidden],
.hub-search-empty[hidden],
.auth-step-back[hidden],
#phone-step-2[hidden],
#phone-auth-error[hidden],
.form-error[hidden],
.status-viewer-delete[hidden],
.status-viewer-footer--owner[hidden],
.status-viewer-footer--peer[hidden],
.status-viewer-verified[hidden],
.status-caption-bar[hidden],
.post-location-selected[hidden],
.notif-selection-bar[hidden],
.selection-action-bar[hidden],
.screen-search-chip[hidden],
#friends-search-chip[hidden],
.inline-video-controls[hidden],
.video-trim-loading-inline[hidden] {
  display: none !important;
}

/* [hidden] must always win over component display:flex/block rules */
[hidden] {
  display: none !important;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--niizi-accent);
  border-radius: 50%;
  animation: niizi-spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes niizi-spin { to { transform: rotate(360deg); } }
.loading-text { color: #fff; font-size: 16px; }
.loading-content { text-align: center; }

/* ——— Wide desktop shell (sidebar + lecteur + colonne téléphone) ——— */
body.app-wide-desktop-shell {
  background: var(--niizi-bg);
}

/* Mobile / tablette étroite : app native plein écran (pas iframe ni sidebar desktop) */
@media (max-width: 959px) {
  body.app-wide-desktop-shell .shell-desktop-only {
    display: none !important;
  }

  body.app-wide-desktop-shell .shell-phone-native {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
  }

  body.app-wide-desktop-shell .shell-phone-native.shell-phone-scripts {
    display: block !important;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  html:has(body.app-wide-desktop-shell),
  body.app-wide-desktop-shell {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
  }
}

@media (min-width: 960px) {
  body.app-wide-desktop-shell .shell-phone-native {
    display: none !important;
  }

  body.app-wide-desktop-shell .shell-desktop-only {
    display: block;
  }

  body.app-wide-desktop-shell .shell-desktop-only.feed-wide-layout {
    display: flex;
  }
}

@media (min-width: 960px) {
  html:has(body.app-wide-desktop-shell) {
    overflow: hidden;
    height: 100%;
  }

  body.app-wide-desktop-shell {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    position: fixed;
    inset: 0;
  }
}

body.app-wide-desktop-shell .feed-wide-layout {
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
}

body.app-wide-desktop-shell .feed-post-reader {
  display: none;
}

body.app-wide-desktop-shell .feed-app-column {
  width: 100%;
  height: 100%;
  min-height: 0;
}

@media (min-width: 960px) {
  body.app-wide-desktop-shell .feed-wide-layout {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: var(--niizi-bg);
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.app-wide-desktop-shell .feed-library-sidebar {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.app-wide-desktop-shell .feed-post-reader {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: var(--feed-reader-min);
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    background: #050608;
    border-right: 1px solid var(--niizi-divider);
    overflow: hidden;
  }

  body.app-wide-desktop-shell .feed-post-reader-toolbar {
    display: none;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 24px 24px;
    box-sizing: border-box;
  }

  body.app-wide-desktop-shell .feed-post-reader.is-open .feed-post-reader-inner {
    display: flex;
  }

  body.app-wide-desktop-shell .feed-post-reader-empty {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--niizi-text-secondary);
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
  }

  body.app-wide-desktop-shell .feed-post-reader.is-open .feed-post-reader-empty {
    display: none;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner > .post.feed-post-reader-clone {
    width: 100%;
    max-width: 100%;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0;
    --post-media-aspect-ratio: unset;
    --media-aspect-ratio: unset;
  }

  /* Chrome fixe : header / caption / footer pleine largeur, indépendants du média */
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-header-overlay,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-caption-overlay,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-container {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-header-overlay {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-header-overlay .post-user-info {
    position: static;
    margin-left: 8px;
    flex: 1;
    min-width: 0;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-caption-overlay,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-caption-overlay.is-expanded {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    box-shadow: none;
    max-height: none;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-container.has-video-feed-controls {
    min-height: auto;
    padding: 4px 12px 12px;
  }

  /* Une seule ligne : contrôles vidéo + actions (like, save, plein écran…) */
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-video-row,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-compact-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    min-height: 44px;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .feed-video-control-row {
    flex: none;
    width: fit-content;
    max-width: none;
    flex-shrink: 0;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-video-row--reader-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex-wrap: nowrap;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-reader-controls-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-bottom-video-row--reader-stack .post-location-label {
    width: 100%;
    flex: none;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .feed-video-toggle-sound {
    visibility: visible !important;
    pointer-events: auto !important;
    display: inline-flex !important;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    gap: 12px;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-save-reader,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-fullscreen-reader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 5px 10px;
    height: 34px;
    box-sizing: border-box;
    color: var(--niizi-text);
    cursor: pointer;
    font-size: 11px;
    line-height: 1.2;
    flex-shrink: 0;
    flex-direction: row;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-save-reader:hover,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-fullscreen-reader:hover {
    background: rgba(255, 255, 255, 0.14);
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-save-reader.is-saved {
    color: var(--niizi-accent);
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-save-reader .icon,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-fullscreen-reader .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-actions-bottom .action-label {
    white-space: nowrap;
  }

  /* Barre latérale bibliothèque (historique / enregistrés) */
  body.app-wide-desktop-shell .feed-library-sidebar {
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    background: #0a0c10;
    border-right: 1px solid var(--niizi-divider);
  }

  body.app-wide-desktop-shell .feed-library-sidebar-toggle {
    display: none;
    position: fixed;
    left: 8px;
    top: calc(50% - 22px);
    z-index: 120;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(30, 32, 36, 0.95);
    color: var(--niizi-text);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  body.app-wide-desktop-shell .feed-library-sidebar-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.app-wide-desktop-shell .feed-library-menu {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 10px 16px;
  }

  body.app-wide-desktop-shell .feed-library-section + .feed-library-section {
    margin-top: 8px;
  }

  body.app-wide-desktop-shell .feed-library-section-toggle {
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--niizi-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  body.app-wide-desktop-shell .feed-library-section-toggle.is-expanded {
    background: rgba(255, 255, 255, 0.1);
  }

  body.app-wide-desktop-shell .feed-library-section-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  body.app-wide-desktop-shell .feed-library-section-body {
    padding: 8px 0 4px;
    max-height: min(42vh, 420px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  }

  body.app-wide-desktop-shell .feed-library-section-body[hidden] {
    display: none !important;
  }

  body.app-wide-desktop-shell .feed-library-item {
    display: flex;
    gap: 10px;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  body.app-wide-desktop-shell .feed-library-item:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  body.app-wide-desktop-shell .feed-library-item-thumb-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1d22;
  }

  body.app-wide-desktop-shell .feed-library-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  body.app-wide-desktop-shell .feed-library-item-meta {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  body.app-wide-desktop-shell .feed-library-item-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--niizi-text);
  }

  body.app-wide-desktop-shell .feed-library-item-caption {
    font-size: 12px;
    color: var(--niizi-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.app-wide-desktop-shell .feed-library-item-stats {
    font-size: 11px;
    color: rgba(159, 160, 255, 0.75);
  }

  body.app-wide-desktop-shell .feed-library-item-viewed {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
  }

  body.app-wide-desktop-shell .feed-library-empty {
    margin: 8px 4px;
    font-size: 13px;
    color: var(--niizi-text-secondary);
  }

  /* Tablette large : barre cachée, bouton pour ouvrir */
  @media (min-width: 960px) and (max-width: 1279px) {
    body.app-wide-desktop-shell .feed-library-sidebar {
      display: block;
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: min(300px, 85vw);
      z-index: 200;
      transform: translateX(-100%);
      transition: transform 0.25s ease;
      box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    body.app-wide-desktop-shell .feed-library-sidebar.is-drawer-open {
      transform: translateX(0);
    }

    body.app-wide-desktop-shell .feed-library-sidebar-toggle {
      display: inline-flex;
    }
  }

  /* PC / TV : barre toujours visible */
  @media (min-width: 1280px) {
    body.app-wide-desktop-shell .feed-library-sidebar {
      display: flex;
      width: var(--feed-sidebar-width, 280px);
      min-width: var(--feed-sidebar-width, 280px);
      max-width: var(--feed-sidebar-width, 280px);
    }

    body.app-wide-desktop-shell .feed-library-sidebar-toggle {
      display: none;
    }
  }

  body.page-feed-home .post.feed-reader-source-active {
    outline: 2px solid var(--niizi-nav-selected);
    outline-offset: 1px;
    border-radius: 17px;
  }

  /* Media zone: flex middle — header/footer stay visible, media scales with contain */
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-media-container {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    max-height: none;
    aspect-ratio: unset !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-media-container.post-text-media {
    height: auto !important;
    max-height: 100%;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-media-carousel {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: unset !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-container {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: unset !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none !important;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-portrait,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-landscape,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-reader-fit {
    flex: 1 1 0 !important;
    min-height: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: unset !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-16-9-wrapper {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-image,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item img,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-portrait img,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-portrait video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-landscape img,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-landscape video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-reader-fit img,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-reader-fit video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-16-9-wrapper img,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-16-9-wrapper video {
    position: static !important;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-video-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    flex: 1 1 0;
    min-height: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-media-container .post-video-container,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-portrait .post-video-container,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-landscape .post-video-container,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-reader-fit .post-video-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
  }

  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-video-container video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .post-media-container .post-video-container video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-portrait .post-video-container video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-landscape .post-video-container video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-item.media-reader-fit .post-video-container video,
  body.app-wide-desktop-shell .feed-post-reader-inner .feed-post-reader-clone .media-16-9-wrapper .post-video-container video {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
  }

  body.app-wide-desktop-shell .feed-app-column {
    flex: 0 0 var(--phone-frame-max);
    width: var(--phone-frame-max);
    max-width: var(--phone-frame-max);
    height: 100dvh;
    max-height: 100dvh;
    flex-shrink: 0;
    overflow: hidden;
  }

  body.app-wide-desktop-shell .feed-app-column .niizi-phone-embed {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100dvh;
    border: none;
    margin: 0;
    padding: 0;
    background: var(--niizi-bg);
  }

  body.app-wide-desktop-shell .feed-app-column .phone-frame {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  body.page-feed-home .post.feed-reader-source-active {
    outline: 2px solid var(--niizi-nav-selected);
    outline-offset: 1px;
    border-radius: 17px;
  }

  body.app-wide-desktop-shell .feed-app-column {
    position: relative;
  }

  body.app-wide-desktop-shell .feed-app-column.is-partial-loading .phone-frame {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  body.app-wide-desktop-shell .feed-app-column.is-partial-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    background: radial-gradient(
      circle at 50% 45%,
      rgba(11, 14, 19, 0.08) 0%,
      rgba(11, 14, 19, 0.28) 100%
    );
  }

  body.app-wide-desktop-shell .feed-app-column.is-partial-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    z-index: 41;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--niizi-nav-selected, #6ea8fe);
    border-radius: 50%;
    animation: wide-shell-nav-spin 0.65s linear infinite;
    pointer-events: none;
  }

  @keyframes wide-shell-nav-spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* Accueil grand écran — overlays dans la colonne droite (zone iframe) */
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: var(--phone-frame-max);
    max-width: var(--phone-frame-max);
    height: 100dvh;
    max-height: 100dvh;
    z-index: 100010;
  }

  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays > .niizi-sheet-backdrop {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden;
  }

  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays > .comments-overlay,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays > .likes-overlay,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays > .share-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    animation: none;
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.08);
  }

  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .comments-sheet-body,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .likes-list,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .share-options-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
  }

  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .comments-header,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .likes-header,
  body.app-wide-desktop-shell.feed-reader-side-sheet-open #niizi-app-overlays .share-header {
    border-radius: 0;
  }
}

body.phone-embed-mode .feed-wide-layout {
  display: none !important;
}

body.phone-embed-mode .feed-library-sidebar,
body.phone-embed-mode .feed-post-reader {
  display: none !important;
}

body.phone-embed-mode .feed-app-column .niizi-phone-embed {
  display: none !important;
}

body.phone-embed-mode .phone-frame {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100dvh;
}

/* Grand écran : colonne iframe — preview vidéo au survol uniquement (sans contrôles locaux) */
body.phone-embed-mode.page-feed-home .feed-video-progress-line,
body.phone-embed-mode.page-feed-home .feed-video-control-row,
body.phone-embed-mode.page-feed-home .feed-video-overlay-controls {
  display: none !important;
}

body.phone-embed-mode.page-feed-home .post-bottom-video-row .post-bottom-main {
  margin-top: 0;
}

/* ——— Réactions emoji (parité Flutter) ——— */
.action-reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 42px;
}

.reaction-bouquet-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reaction-bouquet {
  position: relative;
  display: inline-block;
}

.reaction-bouquet--empty {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.reaction-bouquet--active {
  width: 42px;
  height: 32px;
}

.reaction-empty-emoji,
.reaction-front-emoji,
.reaction-back-emoji {
  position: absolute;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.reaction-back-circle {
  position: absolute;
  left: 6px;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.reaction-interaction-label {
  color: #fff !important;
  cursor: pointer;
  max-width: 120px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reaction-action--vertical .reaction-interaction-label {
  max-width: 72px;
  font-size: 11px;
}

.fullscreen-controls .action-reaction {
  align-items: center;
}

.fullscreen-slide .fs-bottom-meta-row .fullscreen-reaction-row .action-reaction {
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
  justify-content: flex-end;
}

.fullscreen-slide .fs-bottom-meta-row .fullscreen-reaction-row .reaction-interaction-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reaction-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.reaction-picker-overlay.is-visible .reaction-picker-disc {
  animation: reaction-picker-pop 0.22s ease-out both;
}

.reaction-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: default;
}

.reaction-picker-wheel {
  position: absolute;
  width: 144px;
  height: 144px;
  pointer-events: none;
}

.reaction-picker-disc {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
}

.reaction-picker-emoji {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.55);
  font-size: 20px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
}

.reaction-picker-emoji.is-selected {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.85);
}

@keyframes reaction-picker-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reaction-filter-bar-host {
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.reaction-filter-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--niizi-divider);
}

.reaction-filter-chip {
  flex-shrink: 0;
  border: none;
  border-radius: 18px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  background: #3a383c;
  cursor: pointer;
}

.reaction-filter-chip.is-active {
  background: #4b3f3a;
}

.reaction-filter-emoji {
  margin-right: 2px;
}

.reaction-reactor-row {
  position: relative;
}

.reaction-reactor-emoji {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
}

/* Commentaires — thème classique (#2A292D / #4B3F3A) */
.comments-overlay.niizi-sheet--classic {
  background: rgba(42, 41, 45, 0.86);
}

.comments-overlay.niizi-sheet--classic .comments-header {
  background: rgba(75, 63, 58, 0.89);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.comments-overlay.niizi-sheet--classic .chat-composer-stack {
  background: rgba(42, 41, 45, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comments-overlay.niizi-sheet--classic .chat-composer {
  background: rgba(58, 56, 60, 0.95);
}

.comments-overlay.niizi-sheet--classic .chat-composer input {
  background: rgba(42, 41, 45, 0.9);
  color: #fff;
}

/* Plein écran en overlay sur le fil (sans quitter l'accueil) */
body.niizi-fs-overlay-open {
  overflow: hidden;
}

body.niizi-fs-overlay-open #main-content {
  overflow: hidden !important;
}

body.niizi-fs-overlay-open .feed-app-column,
body.niizi-fs-overlay-open #niizi-app-overlays {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.niizi-fs-overlay-open .feed-wide-layout .feed-app-column .app-footer-nav {
  display: none !important;
}

.niizi-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: #000;
}

.niizi-fs-overlay-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
