/* MunicipalPost Perfil V1.1 - UX inspirado en el mockup aprobado */
:root{--mp-red:#e62f3a;--mp-ink:#121722;--mp-muted:#6b7280;--mp-line:#e7e9ee;--mp-soft:#f5f6f8;--mp-card:#fff}
body.mp-profile-v11-page{margin:0;background:#eef0f3;color:var(--mp-ink);font-family:"Montserrat",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.mp-profile-shell{width:min(100%,760px);margin:0 auto;background:#f5f6f8;min-height:100vh;box-shadow:0 0 40px rgba(15,23,42,.08)}
.mp-profile-topbar{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#fff;border-bottom:1px solid #eceef2;position:sticky;top:0;z-index:900}
.mp-profile-brand{font-size:27px;font-weight:800;letter-spacing:-1.1px;color:#101827;text-decoration:none}.mp-profile-brand span{color:var(--mp-red)}
.mp-profile-top-actions{display:flex;align-items:center;gap:6px}.mp-icon-action{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#303744;text-decoration:none;position:relative}.mp-icon-action:hover{background:#f2f4f7;color:#111}.mp-icon-action .copy-toast{top:46px;left:auto;right:0;transform:none}
.mp-v11-subuser,.mp-v11-private-notice{max-width:720px;margin:8px auto;padding:10px 14px;border-radius:10px;font-size:13px}.mp-v11-subuser{background:#fff;border:1px solid #ddd}.mp-v11-private-notice{background:#eef6ff;border:1px solid #b9dcff;color:#16436b}
.mp-profile-hero{position:relative;background:#fff;padding-bottom:14px}
.mp-profile-cover{height:245px;background-size:cover;background-position:center;position:relative}.mp-profile-cover:after{content:"";position:absolute;inset:auto 0 0;height:52px;background:linear-gradient(transparent,rgba(0,0,0,.2));pointer-events:none}
.mp-unclaimed-badge{position:absolute;z-index:2;left:18px;top:16px;background:var(--mp-red);color:#fff;font-size:11px;font-weight:900;letter-spacing:.02em;border-radius:999px;padding:8px 12px;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.mp-profile-avatar{position:absolute;left:26px;top:188px;width:112px;height:112px;border-radius:50%;border:5px solid #fff;background:#fff;overflow:hidden;z-index:3;box-shadow:0 4px 16px rgba(15,23,42,.12)}.mp-profile-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.mp-profile-identity{padding:55px 26px 6px}.mp-profile-name-row{display:flex;align-items:center;gap:8px;min-width:0}.mp-profile-name-row h1{margin:0!important;padding:0!important;font-size:30px!important;line-height:1.13;color:#111827;text-align:left!important;background:none!important;border:0!important;box-shadow:none!important;max-width:calc(100% - 40px)}.mp-v11-verified{color:#17834d;font-size:16px}.mp-fullscreen-inline{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#667085;text-decoration:none;flex:0 0 30px}.mp-fullscreen-inline:hover{background:#f1f3f6;color:#111827}.mp-fullscreen-inline svg{width:18px;height:18px;fill:currentColor}
.mp-profile-meta{margin-top:4px;color:#697386;font-size:14px}.mp-profile-meta i{font-size:12px;margin-right:4px}.mp-profile-intro{margin:5px 0 0;color:#555f6f;font-size:14px;line-height:1.4}
.mp-profile-actions{display:flex;gap:9px;overflow-x:auto;padding:8px 24px 6px;scrollbar-width:none}.mp-profile-actions::-webkit-scrollbar{display:none}.mp-profile-action{min-width:128px;min-height:50px;padding:0 14px;border:1px solid #e2e5ea;border-radius:12px;background:#fff;display:inline-flex;align-items:center;justify-content:center;gap:9px;color:#222b38;text-decoration:none;font-weight:700;font-size:13px;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.03)}.mp-profile-action i{font-size:21px}.mp-profile-action.action-phone i{color:#df2f3c}.mp-profile-action.action-whatsapp i{color:#21c468}.mp-profile-action.action-maps i{color:#df3340}.mp-profile-action.action-instagram i{color:#c42dcf}.mp-profile-action.action-shop{background:#111827;color:#fff;border-color:#111827}.mp-profile-action.action-shop i{color:#fff}.mp-profile-action:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(15,23,42,.08)}
.mp-profile-secondary-actions{display:flex;align-items:center;gap:7px;overflow-x:auto;padding:5px 24px 0;scrollbar-width:none}.mp-profile-secondary-actions::-webkit-scrollbar{display:none}.mp-profile-secondary-actions form{margin:0}.mp-profile-secondary-actions a,.mp-profile-secondary-actions button{appearance:none;border:0;background:#f4f5f7;color:#596273;border-radius:999px;padding:7px 11px;font:700 11px/1.2 inherit;text-decoration:none;white-space:nowrap;cursor:pointer}.mp-profile-secondary-actions i{margin-right:4px}
.mp-unclaimed-card{margin:14px 18px;background:linear-gradient(135deg,#fff1f2,#fff7f7);border:1px solid #f8d9dc;border-radius:16px;padding:16px 18px}.mp-unclaimed-copy{display:flex;gap:12px;align-items:flex-start}.mp-unclaimed-info{width:36px;height:36px;flex:0 0 36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--mp-red);color:#fff}.mp-unclaimed-copy strong{display:block;font-size:14px;margin-bottom:3px}.mp-unclaimed-copy p{margin:0;color:#6a6570;font-size:12.5px;line-height:1.4}.mp-unclaimed-claim{width:100%;margin-top:13px;border:0;border-radius:10px;background:var(--mp-red);color:#fff;padding:12px;font-weight:900;font-size:14px;cursor:pointer}.mp-unclaimed-claim.is-sent{background:#9ca3af}.mp-correction-link{display:block;margin:10px auto 0;border:0;background:transparent;color:#d62d38;text-decoration:underline;font:700 12px inherit;cursor:pointer}
.mp-create-profile-card{margin:12px 18px;min-height:78px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 16px;background:#fff;border:1px solid #e8eaee;border-radius:16px;color:#111827;text-decoration:none;box-shadow:0 4px 15px rgba(15,23,42,.035)}.mp-create-profile-icon{width:46px;height:46px;border-radius:50%;background:#fff1f2;display:flex;align-items:center;justify-content:center;font-size:24px}.mp-create-profile-card strong,.mp-create-profile-card small{display:block}.mp-create-profile-card strong{font-size:15px}.mp-create-profile-card small{margin-top:2px;color:#6b7280;font-size:12px}.mp-create-profile-btn{border:1.5px solid var(--mp-red);color:var(--mp-red);border-radius:10px;padding:10px 15px;font-size:12px;font-weight:800;white-space:nowrap}
.mp-profile-tabs{height:58px;display:flex;align-items:flex-end;justify-content:space-around;background:#fff;border-bottom:1px solid #e8eaee;padding:0 10px;position:sticky;top:66px;z-index:700}.mp-profile-tabs button{height:58px;border:0;background:transparent;color:#626b79;font:700 14px inherit;padding:0 12px;position:relative;cursor:pointer}.mp-profile-tabs button.is-active{color:var(--mp-red)}.mp-profile-tabs button.is-active:after{content:"";position:absolute;left:8px;right:8px;bottom:0;height:3px;border-radius:999px;background:var(--mp-red)}.mp-profile-tabs button span{margin-left:4px;font-size:10px;background:#eef0f3;color:#687181;border-radius:999px;padding:2px 5px}
.mp-profile-main{padding:14px 12px 80px;max-width:none!important;margin:0!important;background:#f5f6f8}.mp-profile-panel[hidden]{display:none!important}.mp-v11-card{background:#fff;border:1px solid #e9ebef;border-radius:16px;padding:16px;margin:0 0 12px;box-shadow:0 4px 18px rgba(15,23,42,.03)}.mp-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-weight:900;font-size:15px}.mp-section-title>span i{color:#374151;margin-right:7px}.mp-section-action,.mp-section-link{appearance:none;border:0;background:transparent;color:var(--mp-red);font:800 12px inherit;cursor:pointer;white-space:nowrap}.mp-section-action i{margin-right:5px}.mp-section-link{color:#687181}.mp-section-link i{font-size:10px;margin-left:5px}.mp-about-card p{margin:0;color:#313a49;font-size:14px;line-height:1.55}
.mp-featured-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.mp-featured-grid a,.mp-all-photos-grid a{position:relative;overflow:hidden;border-radius:10px;background:#eef0f3;display:block;aspect-ratio:1/1}.mp-featured-grid img,.mp-all-photos-grid img{width:100%;height:100%;object-fit:cover;display:block}.mp-featured-grid a span,.mp-all-photos-grid a span{position:absolute;left:7px;bottom:7px;background:rgba(17,24,39,.8);color:#fff;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:800}.mp-all-photos-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.mp-community-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mp-community-mini-card{border:1px solid #e8eaee;border-radius:12px;padding:11px;min-width:0}.mp-community-mini-card header{display:flex;gap:8px;align-items:center}.mp-community-mini-card header img{width:36px;height:36px;border-radius:50%;object-fit:cover}.mp-community-mini-card header span{display:flex;flex-direction:column;min-width:0}.mp-community-mini-card header strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mp-community-mini-card header small{font-size:9px;color:#89909b;margin-top:1px}.mp-community-mini-card p{font-size:11.5px;line-height:1.4;color:#3c4552;margin:9px 0 8px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.mp-community-mini-photos{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.mp-community-mini-photos a{aspect-ratio:1.25/1;border-radius:7px;overflow:hidden;background:#eef0f3}.mp-community-mini-photos img{width:100%;height:100%;object-fit:cover;display:block}.mp-empty-community p{color:#6b7280;font-size:13px}.mp-empty-community button{border:0;border-radius:999px;background:#111827;color:#fff;padding:9px 14px;font-weight:800;cursor:pointer}
.mp-feed-heading{padding:10px 5px 7px;color:#697386;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.mp-profile-feed>.post,.mp-profile-feed>.mp-community-card{max-width:none!important;margin:0 0 12px!important;border-radius:16px!important;border:1px solid #e9ebef!important;box-shadow:0 4px 18px rgba(15,23,42,.03)!important;background:#fff!important}.mp-feed-card{padding:16px!important}.mp-feed-card h3{margin:0 0 8px;font-size:18px}.mp-feed-card h3 a{color:#111827;text-decoration:none}.mp-feed-card .post-content{font-size:14px;line-height:1.55;color:#374151}.mp-feed-card img.bleed{width:100%;max-height:520px;object-fit:cover;border-radius:12px;margin-top:9px}.mp-feed-meta{display:flex;gap:9px;flex-wrap:wrap;color:#7a8492;font-size:11px;margin:9px 0}.mp-feed-actions{display:flex;align-items:center;gap:8px;margin-top:10px}.mp-feed-actions .upvote{border:0;background:#f1f3f5!important;color:#333!important;border-radius:999px!important;padding:8px 11px!important;font-weight:800}.mp-feed-more{display:inline-flex;margin-left:auto;color:#c92835;text-decoration:none;font-weight:800;font-size:12px}.mp-v11-empty{padding:24px;text-align:center;color:#7b8490;background:#fff;border:1px dashed #d8dce2;border-radius:14px;font-size:13px}
.mp-profile-panel[data-profile-panel="comunidad"] .mp-community-composer,.mp-profile-panel[data-profile-panel="comunidad"] .mp-community-card{max-width:none;margin:0 0 12px}.mp-community-full-list{margin-top:12px}.mp-profile-v11-page .mp-community-card{border-color:#e8eaee;box-shadow:0 4px 18px rgba(15,23,42,.03)}.mp-profile-v11-page .mp-community-source{font-size:9px}.mp-profile-v11-page .mp-community-grid img{height:260px}
.mp-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mp-info-grid>div{padding:12px;background:#f7f8fa;border-radius:10px;min-width:0}.mp-info-grid .wide{grid-column:1/-1}.mp-info-grid small,.mp-info-description small{display:block;color:#87909d;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px}.mp-info-grid strong,.mp-info-grid a{font-size:13px;color:#27303c;text-decoration:none;word-break:break-word}.mp-info-description{margin-top:12px;padding:12px;background:#f7f8fa;border-radius:10px}.mp-info-description p{margin:0;color:#374151;font-size:13px;line-height:1.5}.mp-owner-config{margin-top:12px}.mp-owner-config a{display:inline-flex;gap:7px;align-items:center;background:#111827;color:#fff;text-decoration:none;border-radius:999px;padding:9px 14px;font-size:12px;font-weight:800}
.mp-profile-v11-page .mp-claim-modal{z-index:20000}.mp-profile-v11-page .mp-claim-alert{margin:12px 18px}.mp-profile-v11-page .mp-claim-processing{z-index:21000}
.mp-profile-v11-page .reels-btn,.mp-profile-v11-page .button-chat,.mp-profile-v11-page .follow-button,.mp-profile-v11-page .friend-button,.mp-profile-v11-page .fullscreen-profile-wrap,.mp-profile-v11-page .mp-direct-links,.mp-profile-v11-page .profile-tagline,.mp-profile-v11-page .profile-user,.mp-profile-v11-page .join-footer{display:none!important}
@media(max-width:600px){.mp-profile-shell{width:100%;box-shadow:none}.mp-profile-topbar{height:58px;padding:0 15px}.mp-profile-brand{font-size:23px}.mp-profile-tabs{top:58px;height:54px}.mp-profile-tabs button{height:54px;font-size:13px;padding:0 7px}.mp-profile-cover{height:218px}.mp-profile-avatar{top:166px;left:20px;width:100px;height:100px}.mp-profile-identity{padding:55px 20px 6px}.mp-profile-name-row h1{font-size:26px!important}.mp-profile-actions{padding-left:15px;padding-right:15px}.mp-profile-action{min-width:120px;min-height:48px;padding:0 12px;font-size:12px}.mp-profile-secondary-actions{padding-left:15px;padding-right:15px}.mp-unclaimed-card,.mp-create-profile-card{margin-left:12px;margin-right:12px}.mp-profile-main{padding-left:8px;padding-right:8px}.mp-featured-grid{gap:5px}.mp-featured-grid a{border-radius:8px}.mp-community-mini-grid{grid-template-columns:repeat(2,minmax(220px,1fr));overflow-x:auto;padding-bottom:3px;scrollbar-width:none}.mp-community-mini-grid::-webkit-scrollbar{display:none}.mp-all-photos-grid{grid-template-columns:repeat(3,1fr);gap:4px}.mp-profile-v11-page .mp-community-grid img{height:190px}}
@media(max-width:390px){.mp-profile-name-row h1{font-size:23px!important}.mp-create-profile-card{grid-template-columns:auto 1fr}.mp-create-profile-btn{grid-column:1/-1;text-align:center}.mp-profile-action{min-width:112px}.mp-section-title{font-size:14px}.mp-profile-tabs button span{display:none}}

/* =========================================================
   MunicipalPost Perfil V1.2 — SMART PROFILE NAV
   Inspirado en el comportamiento del index.php 2026:
   - al bajar dentro del contenido: bottom nav
   - al subir: mini-header del perfil
   - nunca ambos visibles a la vez
   ========================================================= */

/* La navegación normal de pestañas vive en el flujo. */
.mp-profile-tabs{
  position:relative!important;
  top:auto!important;
  z-index:20!important;
}

.mp-profile-smart-sentinel{width:100%;height:0;position:relative;}

/* Mini-header: identidad del perfil, no branding de MunicipalPost. */
.mp-profile-smart-top{
  position:fixed;
  top:0;
  left:50%;
  width:min(100%,760px);
  z-index:10050;
  background:#fff;
  border-bottom:1px solid rgba(15,23,42,.10);
  box-shadow:0 7px 22px rgba(15,23,42,.12);
  transform:translate(-50%,-115%);
  opacity:0;
  pointer-events:none;
  transition:transform .20s ease,opacity .16s ease;
  will-change:transform,opacity;
}
.mp-profile-smart-top.is-smart-top-visible{
  transform:translate(-50%,0);
  opacity:1;
  pointer-events:auto;
}
.mp-profile-smart-identity{
  min-height:54px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 14px 6px;
  box-sizing:border-box;
}
.mp-profile-smart-identity img{
  width:38px;
  height:38px;
  flex:0 0 38px;
  object-fit:cover;
  border-radius:50%;
  border:1px solid #e5e7eb;
  background:#fff;
}
.mp-profile-smart-identity strong{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#111827;
  font-size:14px;
  font-weight:900;
}
.mp-smart-fullscreen{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  color:#64748b;
  text-decoration:none;
}
.mp-smart-fullscreen:hover{background:#f1f5f9;color:#111827;}
.mp-smart-fullscreen svg{width:18px;height:18px;fill:currentColor;}
.mp-profile-smart-tabs{
  height:43px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
  border-top:1px solid #f1f2f4;
}
.mp-profile-smart-tabs button{
  position:relative;
  border:0;
  background:#fff;
  color:#667085;
  font:700 12px/1.1 "Montserrat",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  padding:0 5px;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mp-profile-smart-tabs button.is-active{color:var(--mp-red);}
.mp-profile-smart-tabs button.is-active:after{
  content:"";
  position:absolute;
  left:22%;right:22%;bottom:0;
  height:3px;
  border-radius:999px;
  background:var(--mp-red);
}

/* Bottom nav contextual. El número de elementos se adapta si no hay Shop. */
.mp-profile-bottom-nav{
  position:fixed;
  left:50%;
  bottom:max(10px,env(safe-area-inset-bottom,0px));
  width:min(calc(100% - 20px),740px);
  min-height:62px;
  z-index:10040;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(0,1fr);
  align-items:stretch;
  background:rgba(255,255,255,.97);
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  box-shadow:0 14px 38px rgba(15,23,42,.20);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  overflow:hidden;
  transform:translateX(-50%) translateY(calc(125% + env(safe-area-inset-bottom,0px)));
  opacity:0;
  pointer-events:none;
  transition:transform .20s ease,opacity .16s ease;
  will-change:transform,opacity;
}
.mp-profile-bottom-nav.mp-smart-bottom-visible{
  transform:translateX(-50%) translateY(0);
  opacity:1;
  pointer-events:auto;
}
.mp-profile-bottom-nav.mp-smart-bottom-hidden{
  transform:translateX(-50%) translateY(calc(125% + env(safe-area-inset-bottom,0px)));
  opacity:0;
  pointer-events:none;
}
.mp-profile-bottom-item{
  appearance:none;
  border:0;
  border-right:1px solid #eef0f3;
  background:transparent;
  color:#485260;
  min-width:0;
  padding:7px 4px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-decoration:none;
  font:800 10.5px/1.05 "Montserrat",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  cursor:pointer;
}
.mp-profile-bottom-item:last-child{border-right:0;}
.mp-profile-bottom-item:hover{background:#f8fafc;color:#111827;}
.mp-profile-bottom-item i{font-size:19px;line-height:1;color:#667085;}
.mp-profile-bottom-item span{
  display:block;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
}
.mp-profile-bottom-shop{color:#111827;background:#f8fafc;}
.mp-profile-bottom-shop i{color:#111827;font-size:21px;}
.mp-profile-bottom-login{font-weight:900;}

/* Reels + WhatsApp siempre fuera de la bottom nav para no perderlos. */
.mp-profile-floating-stack{
  position:fixed;
  right:max(16px,calc((100vw - 760px)/2 + 16px));
  bottom:22px;
  z-index:10030;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  transition:bottom .20s ease;
}
body.mp-profile-bottom-active .mp-profile-floating-stack{
  bottom:92px;
}
.mp-profile-floating{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  box-shadow:0 7px 20px rgba(15,23,42,.22);
}
.mp-profile-floating--reels{
  min-height:48px;
  padding:0 15px;
  gap:7px;
  border-radius:999px;
  background:#1170ae;
  color:#fff;
  font-weight:900;
  font-size:12px;
}
.mp-profile-floating--reels i{font-size:19px;}
.mp-profile-floating--whatsapp{
  width:52px;
  height:52px;
  border-radius:50%;
  background:#20c463;
  color:#fff;
  font-size:29px;
}
.mp-profile-floating:hover{transform:translateY(-1px);filter:brightness(.98);}

.mp-profile-nav-toast{
  position:fixed;
  left:50%;
  bottom:94px;
  z-index:10100;
  transform:translate(-50%,12px);
  opacity:0;
  pointer-events:none;
  background:#111827;
  color:#fff;
  border-radius:999px;
  padding:9px 14px;
  font:800 11px/1.2 "Montserrat",system-ui,sans-serif;
  box-shadow:0 8px 24px rgba(15,23,42,.24);
  transition:opacity .16s ease,transform .16s ease;
}
.mp-profile-nav-toast.is-visible{opacity:1;transform:translate(-50%,0);}

/* La V1.1 ocultaba los botones viejos. En V1.2 usamos las nuevas clases de arriba. */
.mp-profile-v11-page .mp-profile-floating-stack{display:flex;}
.mp-profile-v11-page .mp-profile-bottom-nav{display:grid;}
.mp-profile-v11-page .mp-profile-smart-top{display:block;}

/* Da espacio al final para que la navegación no tape la última tarjeta. */
.mp-profile-main{padding-bottom:118px!important;}

@media(max-width:600px){
  .mp-profile-smart-top{width:100%;}
  .mp-profile-smart-identity{padding-left:12px;padding-right:12px;}
  .mp-profile-bottom-nav{
    width:calc(100% - 12px);
    bottom:max(6px,env(safe-area-inset-bottom,0px));
    border-radius:16px;
    min-height:60px;
  }
  .mp-profile-bottom-item{font-size:9.7px;padding-left:2px;padding-right:2px;}
  .mp-profile-bottom-item i{font-size:18px;}
  .mp-profile-floating-stack{right:12px;bottom:18px;}
  body.mp-profile-bottom-active .mp-profile-floating-stack{bottom:84px;}
  .mp-profile-floating--reels{min-height:44px;padding:0 13px;}
  .mp-profile-floating--whatsapp{width:49px;height:49px;font-size:27px;}
}

@media(max-width:380px){
  .mp-profile-smart-tabs button{font-size:11px;}
  .mp-profile-bottom-item{font-size:9px;}
  .mp-profile-bottom-item i{font-size:17px;}
}

@media(prefers-reduced-motion:reduce){
  .mp-profile-smart-top,
  .mp-profile-bottom-nav,
  .mp-profile-floating-stack,
  .mp-profile-nav-toast{transition:none!important;}
}

/* =========================================================
   MunicipalPost Perfil V1.3.1 — HOTFIX CENTRADO DESKTOP
   Evita que reglas heredadas de style.css / iphone.css
   dejen el main o el feed pegados al borde izquierdo.
   ========================================================= */
html{
  width:100%;
  min-width:0;
}
body.mp-profile-v11-page{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body.mp-profile-v11-page *,
body.mp-profile-v11-page *::before,
body.mp-profile-v11-page *::after{
  box-sizing:border-box;
}
.mp-profile-shell{
  display:block!important;
  position:relative!important;
  float:none!important;
  clear:both!important;
  width:100%!important;
  max-width:760px!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.mp-profile-hero,
.mp-profile-tabs,
.mp-profile-smart-sentinel,
.mp-profile-main,
.mp-profile-panel,
.mp-profile-feed{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  float:none!important;
}
.mp-profile-main{
  display:block!important;
}
.mp-profile-panel{
  display:block;
}
.mp-profile-panel[hidden]{
  display:none!important;
}
.mp-profile-feed>.post,
.mp-profile-feed>.mp-community-card,
.mp-profile-main .mp-v11-card,
.mp-profile-main .mp-feed-card{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}
@media(min-width:761px){
  body.mp-profile-v11-page{
    background:#eef0f3!important;
  }
  .mp-profile-shell{
    margin-left:auto!important;
    margin-right:auto!important;
  }
}

/* =========================================================
   MunicipalPost Perfil V1.3.2 — iPhone / Safari hardening
   iphone.css se conserva global. Estos overrides aplican
   únicamente dentro del perfil y se cargan después.
   ========================================================= */

/* Safari/iOS: evita desbordes horizontales por controles y tarjetas. */
body.mp-profile-v11-page{
  overflow-x:hidden!important;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* Altura dinámica moderna en iOS, manteniendo fallback. */
.mp-profile-shell{
  min-height:100vh;
  min-height:100dvh;
}

/*
 * iphone.css da min-height:44px + padding a TODOS los button.
 * Aquí normalizamos sólo controles compactos del perfil para que
 * las tabs y la navegación inteligente mantengan su geometría.
 */
@supports (-webkit-touch-callout: none){
  .mp-profile-tabs button{
    -webkit-appearance:none;
    appearance:none;
    min-height:0!important;
    height:58px;
    padding:0 12px!important;
    border-radius:0!important;
    line-height:1.2!important;
  }

  .mp-profile-smart-tabs button{
    -webkit-appearance:none;
    appearance:none;
    min-height:43px!important;
    height:43px!important;
    padding:0 5px!important;
    border-radius:0!important;
    line-height:1.1!important;
  }

  .mp-profile-bottom-item{
    -webkit-appearance:none;
    appearance:none;
    min-height:0!important;
    padding:7px 4px 6px!important;
    border-radius:0!important;
    line-height:1.05!important;
  }

  .mp-profile-secondary-actions button,
  .mp-correction-link,
  .mp-section-action,
  .mp-section-link{
    -webkit-appearance:none;
    appearance:none;
  }

  /* PWA / Safari con notch: el mini header nunca queda debajo del sensor. */
  .mp-profile-smart-top{
    padding-top:env(safe-area-inset-top,0px);
  }

  /* Bottom nav y floating actions respetan el Home Indicator. */
  .mp-profile-bottom-nav{
    bottom:max(6px,env(safe-area-inset-bottom,0px));
  }

  .mp-profile-floating-stack{
    bottom:calc(18px + env(safe-area-inset-bottom,0px));
  }

  body.mp-profile-bottom-active .mp-profile-floating-stack{
    bottom:calc(84px + env(safe-area-inset-bottom,0px));
  }

  .mp-profile-main{
    padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important;
  }

  .mp-profile-nav-toast{
    bottom:calc(94px + env(safe-area-inset-bottom,0px));
  }
}

@supports (-webkit-touch-callout: none) and (max-width:600px){
  .mp-profile-tabs button{
    height:54px!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }

  .mp-profile-bottom-item{
    padding-left:2px!important;
    padding-right:2px!important;
  }
}
