/* ==========================================================================
   PersianNest Social — original premium UI
   Identity: deep navy #0e1f3d, gold #f59e0b, white cards, Vazirmatn, RTL-ready
   ========================================================================== */

.pn-social-app {
  --pn-navy: #262626;
  --pn-navy-700: #3a3a3a;
  --pn-gold: #0095f6;
  --pn-gold-dark: #1877f2;
  --pn-surface: #ffffff;
  --pn-bg: #ffffff;
  --pn-border: #dbdbdb;
  --pn-text: #262626;
  --pn-muted: #8e8e8e;
  --pn-radius: 8px;
  --pn-shadow: none;

  background: var(--pn-bg);
  color: var(--pn-text);
  min-height: 100dvh;
  font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.5;
}

/* Prevent horizontal overflow at the root without overflow-x: hidden */
body.pn-social-page .pn-social-app,
.pn-social-app *,
.pn-social-app *::before,
.pn-social-app *::after {
  box-sizing: border-box;
  max-width: 100%;
}

.pn-social-app img {
  height: auto;
}

.pn-social-app a {
  color: inherit;
  text-decoration: none;
}

.pn-social-app a:hover,
.pn-social-app a:focus {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   Topbar — deep navy, sticky
   ========================================================================== */
.pn-topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--pn-navy);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pn-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.pn-topbar__logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.pn-topbar__logo::first-letter {
  color: var(--pn-gold);
}

.pn-topbar__title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-inline-start: 0.5rem;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
}

.pn-topbar__actions {
  margin-inline-start: auto;
  display: flex;
  gap: 0.5rem;
}

.pn-topbar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #ffffff;
  transition: background 0.15s, color 0.15s;
}

.pn-topbar__action:hover,
.pn-topbar__action:focus {
  background: var(--pn-navy-700);
  color: var(--pn-gold);
}

/* ==========================================================================
   App shell — 3 columns
   ========================================================================== */
.pn-social-app__shell {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 5rem;
}

.pn-social-sidebar {
  flex: 0 0 220px;
  width: 220px;
  position: sticky;
  top: 5rem;
}

.pn-social-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
}

.pn-social-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--pn-text);
  transition: background 0.15s, color 0.15s;
}

.pn-social-sidebar__link svg {
  color: var(--pn-muted);
  flex: 0 0 auto;
}

.pn-social-sidebar__link:hover,
.pn-social-sidebar__link:focus {
  background: var(--pn-bg);
  color: var(--pn-navy);
}

.pn-social-sidebar__link.is-active {
  background: var(--pn-navy);
  color: #ffffff;
}

.pn-social-sidebar__link.is-active svg {
  color: var(--pn-gold);
}

.pn-social-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.pn-social-sidebar-right {
  flex: 0 0 320px;
  width: 320px;
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Right sidebar cards */
.pn-side-card {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 1rem;
  box-shadow: var(--pn-shadow);
}

.pn-side-card__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pn-navy);
}

.pn-side-card__me {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pn-side-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pn-gold);
}

.pn-side-card__me-meta strong {
  display: block;
  font-size: 1rem;
  color: var(--pn-navy);
}

.pn-side-card__me-meta small {
  color: var(--pn-muted);
}

.pn-side-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
}

.pn-side-person__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.pn-side-person__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.pn-side-person__link span {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pn-side-shortcuts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pn-side-shortcuts a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  color: var(--pn-navy-700);
  transition: background 0.15s;
}

.pn-side-shortcuts a:hover,
.pn-side-shortcuts a:focus {
  background: var(--pn-bg);
}

/* ==========================================================================
   Buttons & forms
   ========================================================================== */
.pn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.pn-btn:focus-visible {
  outline: 2px solid var(--pn-gold);
  outline-offset: 2px;
}

.pn-btn--primary {
  background: var(--pn-navy);
  color: #ffffff;
  border-color: var(--pn-navy);
}

.pn-btn--primary:hover,
.pn-btn--primary:focus {
  background: var(--pn-navy-700);
  color: var(--pn-gold);
}

.pn-btn--ghost {
  background: var(--pn-surface);
  color: var(--pn-navy);
  border-color: var(--pn-border);
}

.pn-btn--ghost:hover,
.pn-btn--ghost:focus {
  border-color: var(--pn-navy);
}

.pn-btn--ghost.is-following {
  background: var(--pn-bg);
  color: var(--pn-muted);
}

.pn-btn--link {
  background: transparent;
  color: var(--pn-gold-dark);
  padding: 0.4rem 0.5rem;
  font-weight: 700;
}

/* ==========================================================================
   Stories tray
   ========================================================================== */
.pn-stories {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.75rem 0.25rem 1rem;
  margin-bottom: 0.5rem;
  scrollbar-width: none;
  border-bottom: 1px solid var(--pn-border);
}

.pn-stories::-webkit-scrollbar {
  display: none;
}

.pn-story {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 76px;
}

.pn-story__ring {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: var(--pn-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pn-story.is-active .pn-story__ring,
.pn-story--add .pn-story__ring {
  background: linear-gradient(135deg, var(--pn-gold), var(--pn-gold-dark));
}

.pn-story__img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pn-surface);
  background: var(--pn-bg);
}

.pn-story__plus {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pn-navy);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--pn-surface);
  line-height: 1;
}

.pn-story__name {
  font-size: 0.72rem;
  color: var(--pn-text);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.pn-stories--empty {
  border-bottom: none;
}

/* Members row — story circles for finding friends */
.pn-members-row { margin-bottom: 0.5rem; border-bottom: 1px solid var(--pn-border); }
.pn-members-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
}
.pn-members-row__head h3 { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--pn-text); }
.pn-members-row__head a { font-size: 0.8rem; color: #2563eb; text-decoration: none; font-weight: 600; }
.pn-members-row .pn-stories { border-bottom: none; margin-bottom: 0; padding-top: 0.5rem; }
.pn-story--member .pn-story__ring {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* ==========================================================================
   Post card
   ========================================================================== */
.pn-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pn-post {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
  overflow: hidden;
}

.pn-post__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.pn-post__author {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.pn-post__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pn-bg);
  flex: 0 0 auto;
}

.pn-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pn-navy-700);
  color: #ffffff;
  font-weight: 700;
}

.pn-post__author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pn-post__author-meta strong {
  font-size: 0.95rem;
  color: var(--pn-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pn-post__meta {
  font-size: 0.75rem;
  color: var(--pn-muted);
}

.pn-post__privacy {
  color: var(--pn-gold-dark);
  font-weight: 600;
}

.pn-post__more {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--pn-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.pn-post__more:hover,
.pn-post__more:focus {
  background: var(--pn-bg);
  color: var(--pn-navy);
}

.pn-post__text {
  padding: 0 1rem 0.85rem;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.pn-post__media-link {
  display: block;
}

.pn-post__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--pn-bg);
}

.pn-post__gallery {
  display: grid;
  gap: 2px;
  background: var(--pn-bg);
}

.pn-post__gallery[data-count="2"],
.pn-post__gallery[data-count="4"] {
  grid-template-columns: repeat(2, 1fr);
}

.pn-post__gallery[data-count="3"] {
  grid-template-columns: repeat(2, 1fr);
}

.pn-post__gallery[data-count="3"] a:first-child {
  grid-column: 1 / -1;
}

.pn-post__gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.pn-post__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--pn-border);
  margin-top: 0.75rem;
}

.pn-post__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pn-navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pn-post__action:hover,
.pn-post__action:focus {
  background: var(--pn-bg);
}

.pn-post__action.is-active {
  color: var(--pn-gold-dark);
}

.pn-post__action.is-active svg {
  fill: var(--pn-gold);
  stroke: var(--pn-gold-dark);
}

.pn-post__save {
  margin-inline-start: auto;
}

.pn-post__counts {
  display: flex;
  gap: 1rem;
  padding: 0 1rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pn-navy);
}

.pn-post__comment-count {
  color: var(--pn-muted);
  font-weight: 500;
}

.pn-post__comments {
  padding: 0 1rem 0.5rem;
  font-size: 0.88rem;
}

.pn-comment {
  margin: 0 0 0.2rem;
}

.pn-comment strong {
  color: var(--pn-navy);
}

.pn-comment-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--pn-border);
}

.pn-comment-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--pn-border);
  border-radius: 999px;
  background: var(--pn-bg);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.pn-comment-form input:focus {
  outline: none;
  border-color: var(--pn-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  background: var(--pn-surface);
}

.pn-feed__more {
  text-align: center;
}

/* ==========================================================================
   Bottom nav (mobile)
   ========================================================================== */
.pn-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: none;
  justify-content: space-around;
  align-items: stretch;
  background: var(--pn-navy);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
}

.pn-bottomnav__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.1rem;
  padding: 0.35rem 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}

.pn-bottomnav__tab.is-active,
.pn-bottomnav__tab:hover,
.pn-bottomnav__tab:focus {
  color: var(--pn-gold);
}

/* ==========================================================================
   Lists (following / activity / notifications)
   ========================================================================== */
.pn-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pn-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--pn-shadow);
}

.pn-list-item__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pn-list-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pn-bg);
}

.pn-list-item__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pn-list-item__meta strong {
  color: var(--pn-navy);
  font-size: 0.95rem;
}

.pn-list-item__meta small {
  color: var(--pn-muted);
  font-size: 0.78rem;
}

.pn-activity-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pn-gold);
  flex: 0 0 auto;
}

/* ==========================================================================
   Grids (explore / profile / saved)
   ========================================================================== */
.pn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pn-grid-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  display: block;
}

.pn-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.pn-grid-item:hover img {
  transform: scale(1.03);
}

.pn-grid-item--text {
  align-items: center;
  background: linear-gradient(135deg, var(--pn-navy), var(--pn-navy-700));
  color: #fff;
  display: flex;
  font-size: 0.85rem;
  font-weight: 700;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
}

.pn-grid-item--text span {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  display: -webkit-box;
  overflow: hidden;
}

.pn-feed-grid {
  background: #fff;
  gap: 2px;
  margin: 0;
}

.pn-feed-grid .pn-grid-item {
  border: 0;
  border-radius: 0;
}

@media (max-width: 640px) {
  .pn-feed { margin: 0; }
  .pn-feed-grid { gap: 2px; }
}

/* ==========================================================================
   Explore people
   ========================================================================== */
.pn-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pn-navy);
}

.pn-explore-people {
  margin-bottom: 1.25rem;
}

.pn-explore-people__row {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.pn-explore-people__row::-webkit-scrollbar {
  display: none;
}

.pn-person-card {
  flex: 0 0 140px;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: var(--pn-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pn-person-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pn-gold);
  background: var(--pn-bg);
}

.pn-person-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--pn-navy);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pn-person-card small {
  display: block;
  color: var(--pn-muted);
  font-size: 0.72rem;
}

/* ==========================================================================
   Profile
   ========================================================================== */
.pn-profile {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.pn-profile__cover {
  height: 120px;
  background: linear-gradient(135deg, var(--pn-navy), var(--pn-navy-700));
}

.pn-profile__row {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 0 1.25rem;
  margin-top: -40px;
}

.pn-profile__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--pn-surface);
  background: var(--pn-bg);
  box-shadow: var(--pn-shadow);
}

.pn-profile__stats {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
}

.pn-profile__stat {
  text-align: center;
}

.pn-profile__stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--pn-navy);
}

.pn-profile__stat span {
  font-size: 0.75rem;
  color: var(--pn-muted);
}

.pn-profile__info {
  padding: 0.75rem 1.25rem 1.25rem;
}

.pn-profile__info h2 {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
  color: var(--pn-navy);
}

.pn-profile__city {
  margin: 0;
  color: var(--pn-gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.pn-profile__bio {
  margin: 0.5rem 0 0;
  color: var(--pn-muted);
  font-size: 0.9rem;
}

.pn-profile__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.pn-profile__tabs {
  display: flex;
  border-top: 1px solid var(--pn-border);
}

.pn-profile__tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pn-muted);
  border-bottom: 2px solid transparent;
}

.pn-profile__tab.is-active {
  color: var(--pn-navy);
  border-bottom-color: var(--pn-gold);
}

/* ==========================================================================
   Create form
   ========================================================================== */
.pn-create {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 1.25rem;
  box-shadow: var(--pn-shadow);
}

.pn-notice--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
}

.pn-create__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--pn-bg);
  border: 2px dashed var(--pn-border);
  border-radius: var(--pn-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  margin-bottom: 1rem;
  overflow: hidden;
  color: var(--pn-muted);
  transition: border-color 0.15s;
}

.pn-create__media:hover {
  border-color: var(--pn-gold);
}

.pn-create__media input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pn-create__media-label {
  font-weight: 600;
  color: var(--pn-navy);
}

.pn-create__media-hint {
  font-size: 0.78rem;
}

.pn-create__preview {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
}

.pn-create__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-create__caption {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.pn-create__caption:focus {
  outline: none;
  border-color: var(--pn-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.pn-create__privacy {
  margin-bottom: 1.25rem;
}

.pn-create__privacy label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  color: var(--pn-navy);
}

.pn-create__privacy select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--pn-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--pn-surface);
}

.pn-create__privacy select:focus {
  outline: none;
  border-color: var(--pn-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.pn-create__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ==========================================================================
   Comments full (post detail)
   ========================================================================== */
.pn-post-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pn-post-detail__more {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
  padding-top: 1rem;
}

.pn-post-detail__more .pn-section-title {
  padding: 0 1rem;
}

.pn-post-detail__more .pn-feed-grid {
  margin-top: .25rem;
}

@media (max-width: 640px) {
  .pn-post-detail__more {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0 -0px;
  }
}

.pn-comments-full {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  border-radius: var(--pn-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--pn-shadow);
}

.pn-comment-full {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--pn-border);
}

.pn-comment-full:last-child {
  border-bottom: none;
}

.pn-comment-full strong {
  color: var(--pn-navy);
  font-size: 0.9rem;
}

.pn-comment-full p {
  margin: 0.15rem 0;
  font-size: 0.92rem;
}

.pn-comment-full small {
  color: var(--pn-muted);
  font-size: 0.72rem;
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.pn-social-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--pn-surface);
  border: 1px dashed var(--pn-border);
  border-radius: var(--pn-radius);
  color: var(--pn-muted);
}

.pn-social-empty__icon {
  font-size: 2rem;
  color: var(--pn-gold);
  margin-bottom: 0.5rem;
}

.pn-social-empty h3 {
  margin: 0 0 0.5rem;
  color: var(--pn-navy);
  font-size: 1.15rem;
}

.pn-social-empty p {
  margin: 0 0 1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .pn-social-sidebar-right {
    display: none;
  }
}

@media (max-width: 900px) {
  .pn-social-app__shell {
    gap: 1rem;
    padding: 1rem 0.75rem 5.5rem;
  }

  /* Collapse left sidebar into a horizontal top nav */
  .pn-social-sidebar {
    position: static;
    flex: 0 0 auto;
    width: 100%;
  }

  .pn-social-app__shell {
    flex-wrap: wrap;
  }

  .pn-social-sidebar__list {
    display: flex;
    overflow-x: auto;
    gap: 0.25rem;
    padding: 0.4rem;
    scrollbar-width: none;
  }

  .pn-social-sidebar__list::-webkit-scrollbar {
    display: none;
  }

  .pn-social-sidebar__link {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
  }

  .pn-social-main {
    flex: 1 1 100%;
    max-width: 600px;
  }
}

@media (max-width: 640px) {
  .pn-bottomnav {
    display: flex;
  }

  .pn-social-app__shell {
    padding-bottom: 6rem;
  }

  .pn-social-sidebar {
    display: none; /* bottom nav takes over */
  }

  .pn-topbar__title {
    display: none;
  }

  .pn-grid {
    gap: 0.3rem;
  }

  .pn-profile__stats {
    gap: 1rem;
  }
}

/* ==========================================================================
   RTL
   ========================================================================== */
html[dir="rtl"] .pn-social-app,
html[dir="rtl"] .pn-bottomnav {
  direction: rtl;
}

html[dir="rtl"] .pn-story__name,
html[dir="rtl"] .pn-post__meta {
  unicode-bidi: plaintext;
}

/* ==========================================================================
   Design refinement: header search, story rings, post actions, bottom nav
   ========================================================================== */

/* Topbar: search field centered + badges + profile avatar */
.pn-topbar__inner { gap: 0.75rem; }

.pn-topbar__logo { display: inline-flex; align-items: center; gap: 0.4rem; }

.pn-topbar__search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.pn-topbar__search input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 2.6rem 0.5rem 1rem;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
}

html[dir="rtl"] .pn-topbar__search input {
  padding: 0.5rem 1rem 0.5rem 2.6rem;
}

.pn-topbar__search input::placeholder { color: rgba(255,255,255,0.55); }
.pn-topbar__search input:focus {
  outline: none;
  background: rgba(255,255,255,0.22);
}

.pn-topbar__search button {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
}

.pn-topbar__action { position: relative; }

.pn-topbar__badge {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--pn-navy);
}

.pn-topbar__action--create {
  background: var(--pn-gold);
  color: var(--pn-navy);
  border-radius: 10px;
}

.pn-topbar__action--create:hover,
.pn-topbar__action--create:focus {
  background: #fbbf24;
  color: var(--pn-navy);
}

.pn-topbar__me {
  display: inline-flex;
  align-items: center;
}

.pn-topbar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
}

/* Stories: blue ring for others, gold for active/add */
.pn-story__ring {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.pn-story.is-active .pn-story__ring,
.pn-story--add .pn-story__ring {
  background: linear-gradient(135deg, var(--pn-gold), var(--pn-gold-dark));
}

.pn-stories::after {
  content: '+';
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pn-navy-700);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  align-self: center;
  margin-inline-start: 0.25rem;
}

/* Post actions: icon + label stacked */
.pn-post__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
}

.pn-post__action {
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.72rem;
  color: var(--pn-text);
}

.pn-post__action svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.pn-post__like.is-active { color: #e11d48; }
.pn-post__like.is-active svg { fill: #e11d48; stroke: #e11d48; }

.pn-post__save.is-active { color: var(--pn-navy); }
.pn-post__save.is-active svg { fill: var(--pn-navy); stroke: var(--pn-navy); }

.pn-post__share.is-active { color: var(--pn-gold-dark); }

/* Bottom nav: center create button */
.pn-bottomnav__tab--create {
  position: relative;
  top: -12px;
  background: var(--pn-gold);
  color: var(--pn-navy) !important;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(245,158,11,0.45);
  padding: 0;
}

.pn-bottomnav__tab--create svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.2;
}

.pn-bottomnav__tab--create span { display: none; }

/* Left sidebar active accent */
.pn-social-sidebar__link.is-active {
  background: var(--pn-navy);
  color: #fff;
  border-inline-start: 3px solid var(--pn-gold);
}

.pn-social-sidebar__link.is-active svg {
  color: var(--pn-gold);
}

@media (max-width: 640px) {
  .pn-topbar__search { display: none; }
  .pn-topbar__title { display: none; }
}

/* ==========================================================================
   Social mockup final polish
   ========================================================================== */

/* Topbar search: white pill with dark text */
.pn-topbar__search input {
  background: #ffffff;
  color: var(--pn-text);
  padding: 0.55rem 2.4rem 0.55rem 1rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--pn-border);
}

html[dir="rtl"] .pn-topbar__search input {
  padding: 0.55rem 1rem 0.55rem 2.4rem;
}

.pn-topbar__search input::placeholder { color: var(--pn-muted); }
.pn-topbar__search input:focus { background: #ffffff; box-shadow: inset 0 0 0 2px var(--pn-gold); }

.pn-topbar__search button { color: var(--pn-navy-700); }

/* Create button: gold rounded square */
.pn-topbar__action--create {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--pn-gold);
  color: var(--pn-navy);
}

.pn-topbar__action--create:hover,
.pn-topbar__action--create:focus {
  background: #fbbf24;
  color: var(--pn-navy);
}

/* Notification dot */
.pn-topbar__badge {
  width: 10px;
  height: 10px;
  top: 4px;
  inset-inline-end: 4px;
  background: #ef4444;
  border: 2px solid var(--pn-navy);
}

/* Story rings: blue for real stories, gold for add/more/active */
.pn-story__ring {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.pn-story--add .pn-story__ring,
.pn-story--more .pn-story__ring,
.pn-story.is-active .pn-story__ring {
  background: linear-gradient(135deg, var(--pn-gold), #d97706);
}

.pn-story--more .pn-story__plus {
  position: static;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
}

/* Post card */
.pn-post { border-radius: 18px; }

.pn-post__name-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pn-post__verified {
  width: 16px;
  height: 16px;
  color: #fff;
  background: #10b981;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.pn-post__verified svg { width: 10px; height: 10px; stroke-width: 3; }

.pn-post__meta .pn-post__privacy { font-weight: 600; }

/* Post actions: icon + Persian label, 4 columns */
.pn-post__actions {
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--pn-border);
  margin-top: 0;
}

.pn-post__action {
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pn-text);
  border-radius: 10px;
  white-space: nowrap;
}

.pn-post__action svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
  color: var(--pn-navy);
  flex: 0 0 auto;
}

.pn-post__like.is-active { color: #e11d48; }
.pn-post__like.is-active svg { fill: #e11d48; stroke: #e11d48; }

.pn-post__save.is-active { color: var(--pn-navy); }
.pn-post__save.is-active svg { fill: var(--pn-navy); stroke: var(--pn-navy); }

.pn-post__share.is-active { color: var(--pn-gold-dark); }

/* Caption under counts */
.pn-post__counts {
  padding: 0.35rem 1rem 0.1rem;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--pn-border);
}

.pn-post__counts a { color: var(--pn-navy); font-weight: 700; }

.pn-post__text {
  padding: 0.6rem 1rem 1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--pn-text);
}

.pn-post__text a { color: #0f766e; font-weight: 600; }

/* Bottom nav: navy, create raised square */
.pn-bottomnav {
  background: var(--pn-navy);
  padding: 0.25rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
}

.pn-bottomnav__tab {
  color: rgba(255,255,255,0.65);
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 12px;
}

.pn-bottomnav__tab.is-active,
.pn-bottomnav__tab:hover,
.pn-bottomnav__tab:focus { color: #fff; }

.pn-bottomnav__tab--create {
  position: relative;
  top: -14px;
  width: 54px;
  height: 44px;
  border-radius: 14px;
  background: var(--pn-navy);
  border: 2px solid var(--pn-gold);
  color: var(--pn-gold) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  padding: 0;
}

.pn-bottomnav__tab--create svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.4;
}

.pn-bottomnav__tab--create span { display: none; }

/* Bottom nav: icon-only on mobile */
@media (max-width: 640px) {
  .pn-bottomnav__tab span { display: none; }
  .pn-topbar__action--create { display: none; }
}

/* Sidebar right suggestions */
.pn-side-person {
  gap: 0.6rem;
}

.pn-side-person .pn-btn--ghost {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.pn-side-card__me-meta small {
  color: var(--pn-muted);
}

html[dir="rtl"] .pn-post__header,
html[dir="rtl"] .pn-post__actions,
html[dir="rtl"] .pn-post__counts {
  direction: rtl;
}

/* Mobile stories strip inside navy header */
@media (max-width: 640px) {
  .pn-stories {
    background: var(--pn-navy);
    margin: -1rem -1rem 0;
    padding: 0.75rem 1rem;
    border-bottom: 0;
    border-radius: 0;
  }
  .pn-story__name {
    color: rgba(255,255,255,0.85);
    font-size: 0.65rem;
  }
  .pn-story__ring {
    width: 62px;
    height: 62px;
  }
}

/* Social mobile UI corrections */
.pn-stories::after { display: none !important; content: none !important; }

.pn-profile__cover {
  height: 76px;
  background: linear-gradient(135deg, #f8fafc, #e8eef7);
  border-bottom: 1px solid var(--pn-border);
}

@media (max-width: 640px) {
  .pn-social-app__shell {
    gap: 0;
    padding: 0 0 calc(76px + env(safe-area-inset-bottom));
  }
  .pn-social-main {
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
  }
  .pn-bottomnav {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 18px rgba(8, 38, 83, .08);
    display: flex !important;
    min-height: 62px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .pn-bottomnav__tab {
    color: #64748b;
    min-height: 48px;
    padding: 6px 0;
  }
  .pn-bottomnav__tab svg {
    height: 25px;
    width: 25px;
  }
  .pn-bottomnav__avatar {
    border: 2px solid transparent;
    border-radius: 50%;
    height: 27px;
    object-fit: cover;
    width: 27px;
  }
  .pn-bottomnav__tab.is-active .pn-bottomnav__avatar {
    border-color: var(--pn-navy);
  }
  .pn-bottomnav__tab.is-active {
    color: var(--pn-navy);
  }
  .pn-bottomnav__tab--create {
    background: var(--pn-navy);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(8, 38, 83, .3);
    color: #fff !important;
    height: 54px;
    min-height: 54px;
    top: -13px;
    width: 54px;
  }
  .pn-profile {
    border: 0;
    border-bottom: 1px solid var(--pn-border);
    border-radius: 0;
    box-shadow: none;
  }
  .pn-profile__cover { display: none; }
  .pn-profile__row {
    align-items: center;
    gap: .75rem;
    margin-top: 0;
    padding: 1rem;
  }
  .pn-profile__avatar {
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--pn-gold), 0 2px 10px rgba(8, 38, 83, .15);
    flex: 0 0 72px;
    height: 72px;
    width: 72px;
  }
  .pn-profile__stats {
    display: grid;
    flex: 1;
    gap: .25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
  }
  .pn-profile__stat strong { font-size: 1rem; }
  .pn-profile__stat span { font-size: .68rem; }
  .pn-profile__info { padding: 0 1rem 1rem; }
  .pn-profile__info h2 { font-size: 1rem; }
  .pn-profile__bio { font-size: .84rem; }
}

.pn-btn--danger { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }
.pn-profile__blocked { border-top: 1px solid var(--pn-border); margin-top: 1rem; padding-top: .8rem; }
.pn-profile__blocked summary { color: var(--pn-navy); cursor: pointer; font-weight: 700; }
.pn-profile__blocked-row { align-items: center; display: flex; justify-content: space-between; padding: .65rem 0; }
.pn-story-create { align-items: end; background: #fff; border: 1px solid var(--pn-border); border-radius: 16px; display: grid; gap: .75rem; grid-template-columns: 1fr 160px auto; margin-bottom: 1rem; padding: 1rem; }
.pn-story-create label { display: grid; gap: .5rem; }
.pn-story-create input, .pn-story-create select { border: 1px solid var(--pn-border); border-radius: 10px; min-height: 44px; padding: .55rem; }
.pn-story-gallery { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; }
.pn-story-card { aspect-ratio: 9 / 16; background: #0e1f3d; border-radius: 16px; overflow: hidden; position: relative; }
.pn-story-card img { height: 100%; object-fit: cover; width: 100%; }
.pn-story-card__delete { background: rgba(190, 18, 60, .9); border: 0; border-radius: 8px; color: #fff; cursor: pointer; padding: .45rem .7rem; }
@media (max-width: 640px) {
  .pn-story-create { grid-template-columns: 1fr; margin: .75rem; }
  .pn-story-gallery { gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .75rem; }
  .pn-profile__actions { flex-wrap: wrap; }
  .pn-profile__actions .pn-btn { flex: 1 1 calc(50% - .5rem); }
}

/* Final mobile corrections based on real-device screenshots */
.pn-profile__actions .pn-btn--primary,
.pn-profile__actions .pn-btn--primary:visited,
.pn-profile__actions .pn-btn--primary:hover,
.pn-profile__actions .pn-btn--primary:focus {
  background: #123a70 !important;
  border-color: #123a70 !important;
  color: #fff !important;
  text-shadow: none !important;
}

@media (max-width: 640px) {
  html, body, .pn-social-page, .pn-social-app { overflow-x: hidden !important; }
  .pn-stories {
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: 100% !important;
    padding: .75rem 1rem !important;
    width: 100% !important;
  }
  .pn-bottomnav__tab--create {
    align-self: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--pn-navy) !important;
    flex: 1 1 0 !important;
    height: 48px !important;
    max-width: none !important;
    min-height: 48px !important;
    min-width: 0 !important;
    padding: 6px 0 !important;
    top: 0 !important;
    width: auto !important;
  }
  .pn-bottomnav__tab--create svg {
    height: 31px !important;
    stroke-width: 2.4 !important;
    width: 31px !important;
  }
}

/* Mobile share sheet */
.pn-share-sheet { direction: rtl; inset: 0; position: fixed; z-index: 99999; }
.pn-share-sheet__backdrop { background: rgba(2, 10, 25, .55); inset: 0; position: absolute; }
.pn-share-sheet__panel { background: #fff; border-radius: 22px 22px 0 0; bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); display: grid; gap: .45rem; left: 0; margin: 0; padding: .65rem 1rem calc(1rem + env(safe-area-inset-bottom)); position: absolute; right: 0; }
.pn-share-sheet__handle { background: #cbd5e1; border-radius: 99px; height: 4px; margin: 0 auto .35rem; width: 44px; }
.pn-share-sheet__panel h3 { color: var(--pn-navy); font-size: 1.05rem; margin: .2rem 0 .5rem; text-align: center; }
.pn-share-sheet__panel button { align-items: center; background: #fff; border: 0; border-radius: 12px; color: #10213d; cursor: pointer; display: flex; font: inherit; font-weight: 650; gap: .8rem; min-height: 52px; padding: .7rem .8rem; text-align: right; width: 100%; }
.pn-share-sheet__panel button:active { background: #f1f5f9; }
.pn-share-sheet__panel button span { align-items: center; background: #eef3f9; border-radius: 50%; color: var(--pn-navy); display: flex; font-size: 1.25rem; height: 38px; justify-content: center; width: 38px; }
.pn-share-sheet__panel .pn-share-sheet__cancel { border-top: 1px solid #e5e7eb; color: #64748b; justify-content: center; margin-top: .25rem; }
@media (min-width: 641px) {
  .pn-share-sheet__panel { border-radius: 18px; bottom: 50%; left: 50%; max-width: 430px; right: auto; transform: translate(-50%, 50%); width: calc(100% - 2rem); }
}

/* Story viewer and post options menu */
.pn-story-viewer { align-items: center; background: #050914; display: flex; inset: 0; justify-content: center; position: fixed; z-index: 100000; }
.pn-story-viewer img, .pn-story-viewer video { max-height: 100%; max-width: 100%; object-fit: contain; }
.pn-story-viewer__head { align-items: center; color: #fff; display: flex; inset: calc(.75rem + env(safe-area-inset-top)) 1rem auto; justify-content: space-between; position: absolute; z-index: 2; }
.pn-story-viewer__head button { background: rgba(0,0,0,.45); border: 0; border-radius: 50%; color: #fff; font-size: 1.8rem; height: 42px; line-height: 1; width: 42px; }
.pn-story-viewer__actions { bottom: calc(1rem + env(safe-area-inset-bottom)); display: flex; gap: .5rem; justify-content: center; left: 1rem; position: absolute; right: 1rem; z-index: 3; }
.pn-story-viewer__like { align-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #fff; cursor: pointer; display: flex; flex: 0 0 auto; font: inherit; font-size: 1.3rem; font-weight: 800; gap: .45rem; min-height: 48px; padding: .45rem 1.15rem; }
.pn-story-viewer__like.is-active { background: rgba(225,29,72,.9); border-color: rgba(255,255,255,.35); }
.pn-story-viewer__reply { background: rgba(255,255,255,.12); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; display: flex; flex: 1; max-width: 380px; overflow: hidden; }
.pn-story-viewer__reply input { background: transparent; border: 0; color: #fff; flex: 1; font: inherit; min-width: 0; outline: 0; padding: 0 1rem; }
.pn-story-viewer__reply input::placeholder { color: rgba(255,255,255,.72); }
.pn-story-viewer__reply button { background: var(--pn-gold); border: 0; color: var(--pn-navy); cursor: pointer; font-size: 1.15rem; font-weight: 900; padding: 0 .9rem; }
.pn-story-viewer__reply.is-sent { border-color: #34d399; box-shadow: 0 0 0 2px rgba(52,211,153,.25); }
.pn-story-viewer__post { background: rgba(255,255,255,.92); border-radius: 999px; bottom: calc(5.2rem + env(safe-area-inset-bottom)); color: var(--pn-navy); font-size: .82rem; font-weight: 800; left: 50%; padding: .55rem 1rem; position: absolute; text-decoration: none; transform: translateX(-50%); z-index: 3; }
.pn-story-viewer__ownerbar { align-items: center; background: rgba(12,18,32,.72); backdrop-filter: blur(12px); bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); left: 0; padding: .55rem .6rem calc(.65rem + env(safe-area-inset-bottom)); position: absolute; right: 0; z-index: 4; }
.pn-story-viewer__ownerbar button { align-items: center; background: transparent; border: 0; color: #fff; cursor: pointer; display: flex; flex-direction: column; font: inherit; font-size: .68rem; font-weight: 700; gap: .25rem; padding: .3rem 0; }
.pn-story-viewer__ownerbar button span { font-size: 1.15rem; line-height: 1; }
.pn-story-viewer__ownerbar button small { font-size: .65rem; }
.pn-story-viewer__ownerbar button.is-active { color: var(--pn-gold); }
.pn-story-insights { direction: rtl; inset: 0; position: fixed; z-index: 100001; }
.pn-story-insights__backdrop { background: rgba(2,10,25,.65); inset: 0; position: absolute; }
.pn-story-insights__panel { background: #fff; border-radius: 22px 22px 0 0; bottom: 0; left: 0; max-height: 72vh; overflow-y: auto; padding: .7rem 1rem calc(1rem + env(safe-area-inset-bottom)); position: absolute; right: 0; }
.pn-story-insights__panel h3 { color: var(--pn-navy); margin: .35rem 0 1rem; text-align: right; }
.pn-story-insights__viewer { align-items: center; border-bottom: 1px solid #eef2f7; display: flex; gap: .75rem; padding: .65rem 0; }
.pn-story-insights__avatar { align-items: center; background: var(--pn-navy); border-radius: 50%; color: #fff; display: flex; height: 42px; justify-content: center; overflow: hidden; width: 42px; }
.pn-story-insights__avatar img { height: 100%; object-fit: cover; width: 100%; }
.pn-story-insights__meta { display: grid; flex: 1; }
.pn-story-insights__meta strong { color: var(--pn-navy); }
.pn-story-insights__meta small { color: var(--pn-muted); }
.pn-story-insights__message { background: #eef3f9; border-radius: 9px; color: var(--pn-navy); font-size: .8rem; font-weight: 800; padding: .45rem .8rem; text-decoration: none; }
.pn-story-insights__empty { color: var(--pn-muted); padding: 1.5rem 0; text-align: center; }
.pn-story-card__actions { align-items: center; bottom: .6rem; display: flex; gap: .5rem; justify-content: space-between; left: .6rem; position: absolute; right: .6rem; z-index: 2; }
.pn-story-card__like { background: rgba(255,255,255,.88); border: 0; border-radius: 999px; color: #be123c; cursor: pointer; font: inherit; font-weight: 800; padding: .4rem .7rem; }
.pn-story-card__like.is-active { background: #be123c; color: #fff; }
.pn-post-menu { direction: rtl; inset: 0; position: fixed; z-index: 99999; }
.pn-post-menu__backdrop { background: rgba(2, 10, 25, .55); inset: 0; position: absolute; }
.pn-post-menu__panel { background: #fff; border-radius: 22px 22px 0 0; bottom: 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2); display: grid; gap: .35rem; left: 0; padding: .65rem 1rem calc(1rem + env(safe-area-inset-bottom)); position: absolute; right: 0; }
.pn-post-menu__panel h3 { color: var(--pn-navy); margin: .3rem 0; text-align: center; }
.pn-post-menu__panel p { color: #64748b; margin: .2rem 0 .45rem; text-align: center; }
.pn-post-menu__panel button { background: #fff; border: 0; border-bottom: 1px solid #eef2f7; color: #10213d; font: inherit; min-height: 50px; padding: .65rem; text-align: right; width: 100%; }
.pn-post-menu__panel button.is-danger { color: #be123c; font-weight: 700; }
.pn-post-menu__panel button.is-primary { background: var(--pn-navy); border-radius: 10px; color: #fff; font-weight: 700; text-align: center; }
.pn-post-menu__panel textarea, .pn-post-menu__panel select { border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; padding: .7rem; width: 100%; }
.pn-post-menu__panel textarea { resize: vertical; }
.pn-post-menu__privacy { color: #334155; display: grid; gap: .4rem; }
.pn-post__pinned { color: var(--pn-gold-dark); font-size: 1.2rem; margin-inline-start: auto; }
.pn-post.is-pinned { box-shadow: inset 0 3px 0 var(--pn-gold), var(--pn-shadow); }
.pn-post-menu__panel .pn-post-menu__cancel { border: 0; color: #64748b; text-align: center; }
@media (min-width: 641px) {
  .pn-post-menu__panel { border-radius: 18px; bottom: 50%; left: 50%; max-width: 430px; right: auto; transform: translate(-50%, 50%); width: calc(100% - 2rem); }
}

.pn-post[data-hide-likes="true"] .pn-post__likes { display: none; }
.pn-post[data-comments-off="true"] .pn-post__comment-toggle,
.pn-post[data-comments-off="true"] .pn-post__comment-count,
.pn-post[data-comments-off="true"] .pn-post__comments,
.pn-post[data-comments-off="true"] .pn-comment-form { display: none; }
.pn-post.downloads-off .pn-post__media,
.pn-post.downloads-off .pn-post__gallery { -webkit-touch-callout: none; user-select: none; }
.pn-post-menu__qr { align-self: center; background: #fff; border: 10px solid #fff; height: 240px; max-width: 100%; width: 240px; }
.pn-profile__bio--empty { color: var(--pn-gold-dark); display: inline-block; font-weight: 700; text-decoration: none; }

@media (max-width: 640px) {
  .pn-profile .pn-grid { gap: 2px; margin-top: 2px; }
  .pn-profile .pn-grid-item { border: 0; border-radius: 0; }
  html[dir="rtl"] .pn-post__more { order: -2; }
}

/* Logged-in member summary above the main social feed */
.pn-feed-profile { background: #fff; border: 1px solid var(--pn-border); border-radius: 16px; margin-bottom: .75rem; padding: 1rem; }
.pn-feed-profile__main { align-items: center; display: flex; gap: 1rem; }
.pn-feed-profile__avatar-link { flex: 0 0 auto; }
.pn-feed-profile__avatar { align-items: center; background: var(--pn-navy); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--pn-gold); color: #fff; display: flex; height: 76px; justify-content: center; object-fit: cover; width: 76px; }
.pn-feed-profile__body { flex: 1; min-width: 0; }
.pn-feed-profile__head { align-items: center; display: flex; gap: .75rem; justify-content: space-between; }
.pn-feed-profile__head a { color: var(--pn-navy); text-decoration: none; }
.pn-feed-profile__edit { border: 1px solid var(--pn-border); border-radius: 9px; font-size: .78rem; font-weight: 700; padding: .35rem .65rem; }
.pn-feed-profile__bio { border-top: 1px solid #eef2f7; color: #334155; display: block; font-size: .88rem; line-height: 1.7; margin: .75rem 0 0; padding-top: .65rem; }
.pn-feed-profile__bio--empty { color: var(--pn-gold-dark); font-weight: 700; text-decoration: none; }
.pn-feed-profile__stats { display: flex; gap: 1.5rem; margin-top: .45rem; }
.pn-feed-profile__stats a { color: #475569; display: flex; font-size: .75rem; gap: .3rem; text-decoration: none; }
.pn-feed-profile__stats strong { color: var(--pn-navy); font-size: .9rem; }
@media (max-width: 640px) {
  .pn-feed-profile { border: 0; border-bottom: 1px solid var(--pn-border); border-radius: 0; margin: 0; padding: .75rem .9rem .85rem; }
  .pn-feed-profile__main { align-items: center; gap: .7rem; }
  .pn-feed-profile__avatar { flex: 0 0 64px; height: 64px; width: 64px; }
  .pn-feed-profile__body { min-width: 0; width: 100%; }
  .pn-feed-profile__head { gap: .45rem; }
  .pn-feed-profile__head strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pn-feed-profile__bio { font-size: .8rem; line-height: 1.65; margin-top: .55rem; padding-top: .55rem; text-align: right; }
  .pn-feed-profile__stats { display: grid; gap: .35rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: .3rem; }
  .pn-feed-profile__stats a { display: grid; gap: 0; text-align: center; }
  .pn-feed-profile__stats span { font-size: .66rem; }
  .pn-feed-profile__edit { flex: 0 0 auto; font-size: .68rem; padding: .3rem .5rem; }
}

/* Video posts */
.pn-media-image,
.pn-media-video {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.pn-post__media-link .pn-media-video,
.pn-post__media-link .pn-media-image,
.pn-post__gallery a .pn-media-image,
.pn-post__gallery a .pn-media-video {
  aspect-ratio: 4 / 3;
}

.pn-post__gallery a .pn-media-image,
.pn-post__gallery a .pn-media-video {
  aspect-ratio: 1 / 1;
}

.pn-grid-item .pn-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pn-grid-item__video {
  align-items: center;
  background: rgba(8, 38, 83, .72);
  border-radius: 50%;
  color: #fff;
  display: flex;
  height: 34px;
  inset: 50% auto auto 50%;
  justify-content: center;
  padding-inline-start: 2px;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
}

.pn-create__preview-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
}

.pn-create__preview-item img,
.pn-create__preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   Discover people cards (Instagram-style)
   ============================================================ */
.pn-discover-people { margin: 1rem 0 1.5rem; padding: 0 0.75rem; }
.pn-discover-people__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.pn-discover-people__title { font-size: 1rem; font-weight: 700; margin: 0; color: #1f2937; }
.pn-discover-people__see-all { font-size: 0.9rem; color: #2563eb; text-decoration: none; font-weight: 600; }
.pn-discover-people__row { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: none; }
.pn-discover-people__row::-webkit-scrollbar { display: none; }
.pn-discover-card {
  position: relative;
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  scroll-snap-align: start;
  transition: opacity 0.2s ease;
}
.pn-discover-card__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  background: #f1f5f9;
  border-radius: 50%;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.pn-discover-card__profile { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #1f2937; gap: 0.35rem; width: 100%; }
.pn-discover-card__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pn-discover-card__name { font-size: 0.9rem; font-weight: 700; line-height: 1.2; word-break: break-word; }
.pn-discover-card__mutuals { font-size: 0.75rem; color: #6b7280; }
.pn-discover-card .pn-btn { width: calc(100% - 1rem); padding: 0.4rem 0; font-size: 0.8rem; }

/* Discover people — Instagram story circles */
.pn-story-circles { gap: 1rem; padding-top: 0.25rem; }
.pn-story-circle {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
}
.pn-story-circle__ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  margin-bottom: 0.35rem;
  display: block;
}
.pn-story-circle__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: #94a3b8;
  overflow: hidden;
}
img.pn-story-circle__avatar { display: block; }
.pn-story-circle__name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.pn-profile__stat { text-decoration: none; color: inherit; }

.pn-people-list { padding: 1rem; }
.pn-people-list__title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; }
.pn-people-list__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.pn-people-list__card { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: #1f2937; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem 0.5rem; }
.pn-people-list__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 0.5rem; }
.pn-people-list__name { font-size: 0.85rem; font-weight: 600; }

/* ==========================================================================
   Instagram-style restyle (mobile-first, RTL)
   ========================================================================== */

/* --- Topbar: white, minimal --- */
.pn-topbar {
  background: #fff;
  color: var(--pn-text);
  box-shadow: none;
  border-bottom: 1px solid var(--pn-border);
}

.pn-topbar__inner {
  padding: 0.5rem 1rem;
}

.pn-topbar__logo {
  color: var(--pn-text);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pn-topbar__logo::first-letter {
  color: inherit;
}

.pn-topbar__title {
  color: var(--pn-muted);
  border-color: var(--pn-border);
}

.pn-topbar__search input {
  background: #efefef;
  color: var(--pn-text);
  box-shadow: none;
  border-radius: 10px;
}

.pn-topbar__search input::placeholder { color: var(--pn-muted); }
.pn-topbar__search input:focus { background: #efefef; box-shadow: none; }
.pn-topbar__search button { color: var(--pn-muted); }

.pn-topbar__action {
  color: var(--pn-text);
  width: 38px;
  height: 38px;
}

.pn-topbar__action:hover,
.pn-topbar__action:focus {
  background: #efefef;
  color: #000;
}

.pn-topbar__action--create,
.pn-topbar__action--create:hover,
.pn-topbar__action--create:focus {
  background: transparent;
  color: var(--pn-text);
}

.pn-topbar__badge { border-color: #fff; }
.pn-topbar__avatar { border: 1px solid var(--pn-border); }

/* --- Buttons --- */
.pn-btn--primary {
  background: #0095f6;
  border-color: #0095f6;
  color: #fff;
  border-radius: 8px;
}

.pn-btn--primary:hover,
.pn-btn--primary:focus {
  background: #1877f2;
  color: #fff;
}

.pn-btn--grey {
  background: #efefef;
  border: 0;
  color: var(--pn-text);
  border-radius: 8px;
}

.pn-btn--grey:hover,
.pn-btn--grey:focus {
  background: #e0e0e0;
  border-color: transparent;
}

.pn-btn--ghost {
  border-radius: 8px;
}

.pn-btn--link {
  color: #0095f6;
}

.pn-avatar--fallback {
  background: #efefef;
  color: var(--pn-muted);
}

/* --- Sidebar (desktop) --- */
.pn-social-sidebar__list {
  border-color: var(--pn-border);
  box-shadow: none;
}

.pn-social-sidebar__link.is-active {
  background: #fff;
  color: #000;
  font-weight: 700;
  border-inline-start: none;
}

.pn-social-sidebar__link.is-active svg {
  color: #000;
}

.pn-social-sidebar__link svg {
  color: var(--pn-text);
}

.pn-side-card {
  border-color: var(--pn-border);
  box-shadow: none;
}

.pn-side-card__title,
.pn-side-card__me-meta strong {
  color: var(--pn-text);
}

.pn-side-card__avatar,
.pn-person-card__avatar {
  border-color: var(--pn-border);
}

.pn-side-shortcuts a { color: var(--pn-text); }

/* --- Stories: IG gradient rings --- */
.pn-stories {
  background: #fff;
  border-bottom: 1px solid var(--pn-border);
  padding: 0.75rem 1rem;
}

.pn-story__ring {
  background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

.pn-story__img {
  border-color: #fff;
}

.pn-story--add .pn-story__ring,
.pn-story--more .pn-story__ring {
  background: transparent;
}

.pn-story--add .pn-story__img,
.pn-story--more .pn-story__img {
  border: 1px solid var(--pn-border);
}

.pn-story--more .pn-story__ring {
  border: 1px solid var(--pn-border);
  background: #efefef;
}

.pn-story--more .pn-story__plus {
  color: var(--pn-text);
  background: transparent;
}

.pn-story__plus {
  background: #0095f6;
  border-color: #fff;
}

.pn-story__name {
  color: var(--pn-text);
}

@media (max-width: 640px) {
  .pn-stories {
    background: #fff;
    margin: 0;
    border-bottom: 1px solid var(--pn-border);
  }
  .pn-story__name { color: var(--pn-text); }
}

/* --- Post card: borderless, edge-to-edge media --- */
.pn-feed {
  gap: 0;
}

.pn-post {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.pn-post.is-pinned {
  box-shadow: none;
}

.pn-post__header {
  padding: 0.55rem 0.75rem;
}

.pn-post__avatar {
  width: 32px;
  height: 32px;
}

.pn-post__author-meta strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pn-text);
}

.pn-post__meta {
  font-size: 0.72rem;
}

.pn-post__privacy {
  color: var(--pn-muted);
  font-weight: 400;
}

.pn-post__more {
  color: var(--pn-text);
  padding: 0.25rem;
  display: inline-flex;
}

.pn-post__more svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.pn-post__more:hover,
.pn-post__more:focus {
  background: transparent;
  color: #000;
}

.pn-post__pinned {
  color: var(--pn-muted);
}

.pn-post__media,
.pn-post__media-link .pn-media-image,
.pn-post__media-link .pn-media-video {
  aspect-ratio: 4 / 5;
}

/* Actions: icon-only row */
.pn-post__actions {
  border-top: 0;
  padding: 0.45rem 0.75rem;
  gap: 0.9rem;
  justify-content: flex-start;
}

.pn-post__action {
  flex: 0 0 auto;
  padding: 0.2rem;
  color: var(--pn-text);
}

.pn-post__action svg {
  width: 24px;
  height: 24px;
  color: var(--pn-text);
  stroke-width: 1.6;
}

.pn-post__action-label {
  display: none;
}

.pn-post__action:hover,
.pn-post__action:focus {
  background: transparent;
}

.pn-post__like.is-active { color: #ff3040; }
.pn-post__like.is-active svg { fill: #ff3040; stroke: #ff3040; }

.pn-post__save { margin-inline-start: auto; }
.pn-post__save.is-active { color: var(--pn-text); }
.pn-post__save.is-active svg { fill: var(--pn-text); stroke: var(--pn-text); }

.pn-post__share.is-active { color: var(--pn-text); }

/* Likes count + caption + comments */
.pn-post__counts {
  padding: 0 0.75rem;
  border-bottom: 0;
  font-size: 0.88rem;
  gap: 0;
}

.pn-post__likes {
  color: var(--pn-text);
  font-weight: 600;
}

.pn-post__likes b {
  font-weight: 700;
}

.pn-post__text {
  padding: 0.15rem 0.75rem 0;
  font-size: 0.88rem;
}

.pn-post__text strong {
  font-weight: 600;
}

.pn-post__text a {
  color: #00376b;
  font-weight: 400;
}

.pn-post__all-comments {
  display: block;
  padding: 0.15rem 0.75rem 0;
  color: var(--pn-muted);
  font-size: 0.85rem;
}

.pn-post__comments {
  padding: 0.1rem 0.75rem 0;
  font-size: 0.85rem;
}

.pn-comment strong {
  color: var(--pn-text);
  font-weight: 600;
}

.pn-post__time {
  display: block;
  padding: 0.2rem 0.75rem 0;
  color: var(--pn-muted);
  font-size: 0.7rem;
}

.pn-comment-form {
  border-top: 0;
  padding: 0.45rem 0.75rem;
  gap: 0.5rem;
}

.pn-comment-form input {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  border-radius: 0;
}

.pn-comment-form input:focus {
  box-shadow: none;
  background: transparent;
}

.pn-comment-form .pn-btn--link {
  color: #0095f6;
  font-weight: 600;
  padding: 0.2rem 0.3rem;
}

/* --- Bottom nav: white IG bar --- */
.pn-bottomnav {
  background: #fff;
  border-top: 1px solid var(--pn-border);
  box-shadow: none;
  padding: 0.3rem 0 calc(0.3rem + env(safe-area-inset-bottom));
}

.pn-bottomnav__tab {
  color: var(--pn-text);
  min-height: 46px;
}

.pn-bottomnav__tab svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.pn-bottomnav__tab.is-active,
.pn-bottomnav__tab:hover,
.pn-bottomnav__tab:focus {
  color: #000;
}

.pn-bottomnav__tab.is-active svg {
  fill: var(--pn-text);
}

.pn-bottomnav__avatar {
  border-radius: 50%;
  width: 27px;
  height: 27px;
  object-fit: cover;
  border: 1px solid transparent;
}

.pn-bottomnav__tab.is-active .pn-bottomnav__avatar {
  border-color: var(--pn-text);
}

@media (max-width: 640px) {
  .pn-bottomnav {
    background: #fff;
    border-top: 1px solid var(--pn-border);
    box-shadow: none;
  }
  .pn-bottomnav__tab {
    color: var(--pn-text);
  }
  .pn-bottomnav__tab.is-active {
    color: #000;
  }
  .pn-topbar__action--create { display: inline-flex; }
  .pn-topbar__me { display: none; }
  .pn-topbar__actions { gap: 0.9rem; }
  .pn-topbar__action { width: auto; height: auto; }
}

/* --- Explore: search + chips + tight grid --- */
.pn-explore-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #efefef;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.75rem;
}

.pn-explore-search svg {
  width: 18px;
  height: 18px;
  color: var(--pn-muted);
  flex: 0 0 auto;
}

.pn-explore-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--pn-text);
}

.pn-explore-search input:focus { outline: none; }

.pn-explore-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  margin-bottom: 0.4rem;
  scrollbar-width: none;
}

.pn-explore-chips::-webkit-scrollbar { display: none; }

.pn-explore-chip {
  flex: 0 0 auto;
  background: #efefef;
  color: var(--pn-text);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.pn-explore-chip.is-active {
  background: var(--pn-text);
  color: #fff;
}

.pn-grid {
  gap: 2px;
  margin-top: 0;
}

.pn-grid-item {
  position: relative;
  border: 0;
  border-radius: 0;
}

.pn-grid-item__video {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  inset-inline-start: auto;
  bottom: auto;
  transform: none;
  background: transparent;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}

.pn-grid-item__video svg {
  fill: #fff;
  stroke: #fff;
  width: 20px;
  height: 20px;
}

.pn-grid-item__multi {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}

.pn-grid-item__multi svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  stroke: #fff;
}

.pn-grid-item__likes {
  position: absolute;
  bottom: 6px;
  inset-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.7));
}

.pn-grid-item__likes svg {
  width: 15px;
  height: 15px;
  fill: #fff;
  stroke: #fff;
}

/* --- Profile: IG layout --- */
.pn-profile {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.pn-profile__header {
  padding-top: 0.5rem;
}

.pn-profile__row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1rem;
  margin-top: 0;
}

.pn-profile__avatar {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border: 1px solid var(--pn-border);
  box-shadow: none;
  padding: 0;
}

.pn-profile__stats {
  flex: 1;
  display: flex;
  justify-content: space-around;
  gap: 0;
  padding: 0;
}

.pn-profile__stat strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pn-text);
}

.pn-profile__stat span {
  font-size: 0.78rem;
  color: var(--pn-text);
  font-weight: 400;
}

.pn-profile__info {
  padding: 0.5rem 1rem 0;
}

.pn-profile__info h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pn-text);
  margin: 0;
}

.pn-profile__city {
  color: var(--pn-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.pn-profile__bio {
  font-size: 0.85rem;
  color: var(--pn-text);
  margin-top: 0.2rem;
}

.pn-profile__bio--empty {
  color: #0095f6;
  font-weight: 400;
  font-size: 0.85rem;
}

.pn-profile__actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1rem 0;
  margin-top: 0;
  flex-wrap: nowrap;
}

.pn-profile__actions .pn-btn {
  flex: 1;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  min-height: 34px;
}

.pn-profile__actions .pn-btn--primary {
  background: #0095f6;
  border-color: #0095f6;
}

.pn-profile__new-post,
.pn-profile__block {
  flex: 0 0 42px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pn-profile__new-post svg,
.pn-profile__block svg {
  width: 18px;
  height: 18px;
}

/* Highlights row */
.pn-highlights {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.9rem 1rem 0.5rem;
  scrollbar-width: none;
}

.pn-highlights::-webkit-scrollbar { display: none; }

.pn-highlight {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 64px;
}

.pn-highlight__ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--pn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.pn-highlight__ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-highlight__plus {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--pn-text);
  line-height: 1;
}

.pn-highlight__name {
  font-size: 0.72rem;
  color: var(--pn-text);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Icon tabs */
.pn-profile__tabs {
  border-top: 1px solid var(--pn-border);
  margin-top: 0.5rem;
}

.pn-profile__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0;
  color: var(--pn-muted);
  border-bottom: 0;
  border-top: 1px solid transparent;
  margin-top: -1px;
}

.pn-profile__tab svg {
  width: 24px;
  height: 24px;
}

.pn-profile__tab.is-active {
  color: var(--pn-text);
  border-top-color: var(--pn-text);
}

/* Follow requests / blocked management */
.pn-profile__requests,
.pn-profile__blocked {
  margin: 0.5rem 1rem 0;
  border-top: 0;
  padding-top: 0;
}

.pn-profile__requests summary,
.pn-profile__blocked summary {
  color: var(--pn-text);
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- Lists / activity / notifications --- */
.pn-list-item {
  border: 0;
  border-bottom: 1px solid #efefef;
  border-radius: 0;
  box-shadow: none;
  padding: 0.6rem 1rem;
}

.pn-list-item__meta strong { color: var(--pn-text); }
.pn-activity-item__dot { background: #0095f6; }

/* --- Comments full (post detail) --- */
.pn-comments-full {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.5rem 1rem;
}

.pn-comments-full .pn-section-title {
  color: var(--pn-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pn-comment-full {
  display: flex;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 0;
  align-items: flex-start;
}

.pn-comment-full__avatar {
  flex: 0 0 auto;
}

.pn-comment-full__img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.pn-comment-full__body {
  flex: 1;
  min-width: 0;
}

.pn-comment-full__body p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.pn-comment-full__body strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pn-text);
}

.pn-comment-full__body small {
  color: var(--pn-muted);
  font-size: 0.72rem;
}

/* --- Create / forms --- */
.pn-create {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem;
}

.pn-create__caption,
.pn-create__privacy select {
  border-color: var(--pn-border);
  border-radius: 8px;
}

.pn-create__caption:focus,
.pn-create__privacy select:focus {
  border-color: #a8a8a8;
  box-shadow: none;
}

.pn-create__media {
  border-color: var(--pn-border);
  border-radius: 8px;
}

.pn-create__media:hover { border-color: #a8a8a8; }

/* --- Empty state --- */
.pn-social-empty {
  border: 0;
  background: transparent;
}

.pn-social-empty h3 { color: var(--pn-text); }

/* --- Discover people row --- */
.pn-discover-card {
  border-radius: 8px;
  box-shadow: none;
}

.pn-discover-card .pn-btn--primary {
  background: #0095f6;
  border-color: #0095f6;
}

/* --- People cards --- */
.pn-person-card,
.pn-people-list__card {
  border-color: var(--pn-border);
  box-shadow: none;
  border-radius: 8px;
}

.pn-person-card strong { color: var(--pn-text); }

/* --- Story cards --- */
.pn-story-create {
  border-color: var(--pn-border);
  border-radius: 8px;
  box-shadow: none;
}

/* --- Feed column width like IG --- */
.pn-social-main {
  max-width: 470px;
}

@media (max-width: 640px) {
  .pn-social-app__shell {
    padding: 0 0 calc(70px + env(safe-area-inset-bottom));
  }
}

/* Feed profile mini card (if rendered) */
.pn-feed-profile {
  border: 0;
  border-bottom: 1px solid var(--pn-border);
  border-radius: 0;
}

.pn-feed-profile__head a { color: var(--pn-text); }
.pn-feed-profile__stats strong { color: var(--pn-text); }

.pn-post__comments-off { margin: 8px 16px 0; font-size: 13px; color: var(--pn-text-muted, #8e8e8e); }
