.profile-page {
  padding-top: 6px;
}

.profile-head {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 15px;
  box-shadow: var(--shadow);
}

.profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.profile-avatar,
.edit-avatar-preview {
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), #4da69d);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border: 4px solid var(--primary-soft);
  font-size: 1.25rem;
}

.profile-avatar img,
.edit-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-profile {
  border: 1px solid var(--primary);
  background: white;
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .72rem;
  font-weight: 800;
}

.profile-head h2 {
  font-size: 1.16rem;
  margin: 10px 0 1px;
}

.profile-head h2 span {
  color: var(--primary);
}

.handle,
.meta {
  font-size: .7rem;
  color: var(--muted);
}

.profile-head p {
  font-size: .76rem;
  line-height: 1.42;
  margin: 8px 0;
}

.profile-bio-empty {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
}

.stats div {
  text-align: center;
  display: grid;
}

.stats strong {
  font-size: .9rem;
}

.stats small {
  font-size: .6rem;
  color: var(--muted);
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 9px;
  border-bottom: 1px solid var(--border);
}

.profile-tabs button {
  border: 0;
  background: transparent;
  padding: 9px 3px;
  font-size: .67rem;
  color: var(--muted);
}

.profile-tabs .active {
  color: var(--primary);
  font-weight: 850;
  border-bottom: 2px solid var(--primary);
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 4px;
}

@media (min-width: 1024px) {
  .wall-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
}

.wall-item {
  border: 0;
  padding: 0;
  aspect-ratio: 1;
  background: #e8eeec;
  overflow: hidden;
  border-radius: 4px;
}

.wall-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-empty-wall {
  min-height: 155px;
  margin-top: 6px;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

.profile-empty-wall > span {
  color: var(--primary);
}

.profile-empty-wall strong {
  color: var(--text);
  font-size: 0.78rem;
}

.profile-empty-wall p {
  max-width: 250px;
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.4;
}

.wall-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Menú de opciones del perfil */
.profile-menu {
  position: fixed;
  top: 55px;
  right: max(14px, calc((100vw - var(--max)) / 2 + 14px));
  z-index: 90;
  width: 176px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 12px 30px rgba(28, 62, 57, 0.16);
  transform-origin: top right;
}

.profile-menu.is-hidden {
  display: none;
}

@media (min-width: 1024px) {
  /* En desktop #app ya no está centrado con espacio simétrico a los
     lados (hay un sidebar a la izquierda), así que el menú se ancla
     directo al borde derecho real de la ventana. */
  .profile-menu {
    right: 14px;
  }
}

.profile-menu-item {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 750;
}

.profile-menu-item > span:first-child {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-menu-item.logout {
  color: #a94d42;
}

.profile-menu-item.logout:hover,
.profile-menu-item.logout:focus-visible {
  background: #fff2ef;
  outline: none;
}

/* Editor de perfil */
body.profile-editor-open {
  overflow: hidden;
}

.edit-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.edit-profile-overlay.is-hidden {
  display: none;
}

.edit-profile-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.edit-profile-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(19, 38, 35, 0.34);
}

.edit-profile-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 9px 14px 26px;
  border-radius: 26px 26px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 42px rgba(18, 50, 46, 0.22);
  transform: translateY(22px);
  transition: transform 0.18s ease;
}

.edit-profile-overlay.is-visible .edit-profile-sheet {
  transform: translateY(0);
}

.edit-profile-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: #d9e1df;
}

.edit-profile-header {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.edit-profile-header strong {
  font-size: 0.82rem;
}

.edit-profile-cancel,
.edit-profile-save {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
}

.edit-profile-cancel {
  justify-self: start;
  color: var(--muted);
}

.edit-profile-save {
  justify-self: end;
  color: var(--primary);
}

.edit-profile-save:disabled {
  opacity: 0.55;
}

.edit-profile-content {
  padding-top: 17px;
}

.edit-avatar-block {
  display: grid;
  justify-items: center;
  text-align: center;
}

.edit-avatar-preview {
  width: 96px;
  height: 96px;
  border: 4px solid var(--primary-soft);
  font-size: 1.45rem;
}

.change-photo-button,
.remove-photo-button {
  border: 0;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 850;
}

.change-photo-button {
  margin-top: 9px;
  color: var(--primary);
}

.remove-photo-button {
  margin-top: 3px;
  color: #a94d42;
}

.edit-avatar-block small {
  max-width: 260px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.57rem;
  line-height: 1.35;
}

.edit-profile-field {
  margin-top: 22px;
  display: grid;
  gap: 7px;
}

.edit-profile-field > span:first-child {
  font-size: 0.68rem;
  font-weight: 850;
}

.edit-profile-field textarea {
  width: 100%;
  min-height: 102px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfc;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.45;
  outline: none;
}

.edit-profile-field textarea:focus {
  border-color: rgba(13, 127, 118, 0.55);
  box-shadow: 0 0 0 3px rgba(13, 127, 118, 0.08);
}

.profile-bio-counter {
  justify-self: end;
  color: var(--muted);
  font-size: 0.57rem;
}

.profile-bio-counter b {
  color: inherit;
  font-weight: 600;
}

.profile-edit-error {
  min-height: 18px;
  margin-top: 8px;
  color: #a5483c;
  font-size: 0.62rem;
  line-height: 1.35;
  text-align: center;
}

.profile-edit-storage-note {
  margin: 6px auto 0;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.57rem;
  line-height: 1.4;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* Rendimiento V14: estados no bloqueantes */
.fast-auth-loading-page {
  min-height: 64vh;
  display: grid;
  place-items: center;
}

.fast-loading-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .67rem;
}

.fast-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ssv-fast-spin .65s linear infinite;
}

@keyframes ssv-fast-spin {
  to { transform: rotate(360deg); }
}

.ssv-app-toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: calc(var(--nav-h, 68px) + 16px);
  max-width: min(88vw, 330px);
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(20,55,51,.18);
  font-size: .64rem;
  font-weight: 750;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease;
  text-align: center;
}

.ssv-app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ssv-app-toast.saving {
  color: var(--primary);
}

.ssv-app-toast.success {
  color: var(--primary-dark);
}

.ssv-app-toast.error {
  color: #a5483c;
  border-color: rgba(165,72,60,.2);
}


.profile-photo-upload {
  width: min(100%, 280px);
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fbfa;
}

.profile-photo-upload.is-hidden {
  display: none;
}

.profile-photo-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: .58rem;
}

.profile-photo-upload-row strong {
  color: var(--primary);
  font-size: .6rem;
}

.profile-photo-upload-track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeae8;
}

.profile-photo-upload-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .15s linear;
}


.profile-photo-status {
  margin: 9px 0 0;
  font-size: .59rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.profile-photo-status.is-hidden {
  display: none;
}

.profile-photo-status.uploading {
  color: var(--primary);
}

.profile-photo-status.ready {
  color: var(--primary-dark);
}

.profile-photo-status.error {
  color: #a5483c;
}


/* ==========================================================
   V34 — Selector de tema dentro del menú de Perfil
   ========================================================== */

.profile-menu{
  width:194px;
}

.profile-theme-section{
  padding:5px;
}

.profile-theme-title{
  min-height:32px;
  padding:0 6px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text);
  font-size:.7rem;
  font-weight:850;
}

.profile-theme-symbol{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  color:var(--primary);
  font-size:1rem;
}

.profile-theme-options{
  display:grid;
  gap:4px;
}

.profile-theme-choice{
  width:100%;
  min-height:34px;
  padding:0 8px 0 10px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:.65rem;
  text-align:left;
}

.profile-theme-choice.selected{
  border-color:var(--border);
  background:var(--primary-soft);
  color:var(--primary-dark);
  font-weight:850;
}

.theme-choice-check{
  color:var(--primary);
  font-weight:900;
}

.profile-menu-separator{
  height:1px;
  margin:4px 6px;
  background:var(--border);
}

html[data-theme="dark"] .profile-theme-symbol,
html[data-theme="dark"] .theme-choice-check{
  color:var(--theme-accent);
}

html[data-theme="dark"] .profile-theme-choice{
  color:var(--muted);
}

html[data-theme="dark"] .profile-theme-choice.selected{
  background:#19322f;
  border-color:#2d4541;
  color:#a7e4dd;
}


/* ==========================================================
   V37 — interruptor directo de Modo noche
   ========================================================== */

.profile-theme-section{
  padding:7px;
}

.profile-night-row{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:4px 5px;
}

.profile-night-copy{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}

.profile-night-copy > span:last-child{
  min-width:0;
  display:grid;
  gap:2px;
}

.profile-night-copy strong{
  color:var(--text);
  font-size:.69rem;
}

.profile-night-copy small{
  color:var(--muted);
  font-size:.56rem;
}

.theme-switch{
  position:relative;
  width:43px;
  height:25px;
  flex:0 0 43px;
  cursor:pointer;
}

.theme-switch input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.theme-switch-track{
  position:absolute;
  inset:0;
  border:1px solid var(--border);
  border-radius:999px;
  background:#cbd5d2;
  transition:background .18s ease,border-color .18s ease;
}

.theme-switch-thumb{
  position:absolute;
  left:3px;
  top:3px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 5px rgba(20,45,42,.2);
  transition:transform .18s ease;
}

.theme-switch input:checked + .theme-switch-track{
  background:#2e8f86;
  border-color:#2e8f86;
}

.theme-switch input:checked + .theme-switch-track .theme-switch-thumb{
  transform:translateX(18px);
}

.theme-switch input:focus-visible + .theme-switch-track{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.theme-system-button{
  width:100%;
  min-height:34px;
  margin-top:3px;
  padding:0 8px 0 34px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:.6rem;
  text-align:left;
}

.theme-system-button.active{
  background:var(--primary-soft);
  color:var(--primary-dark);
  font-weight:800;
}

.theme-system-check{
  color:var(--primary);
  font-weight:900;
}

html[data-theme="dark"] .theme-switch-track{
  background:#42514e;
  border-color:#52635f;
}

html[data-theme="dark"] .theme-switch input:checked + .theme-switch-track{
  background:#2e8f86;
  border-color:#3aafa4;
}

html[data-theme="dark"] .theme-system-button.active{
  background:#19322f;
  color:#a7e4dd;
}

html[data-theme="dark"] .theme-system-check{
  color:#65c8bd;
}


/* ==========================================================
   V41 — pestañas funcionales del perfil
   ========================================================== */

.profile-tab-panel{
  min-height:155px;
}

.profile-empty-panel{
  min-height:155px;
  margin-top:6px;
  padding:22px 18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#ffffff;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
}

.profile-empty-panel .profile-empty-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  color:var(--primary);
  font-size:1.4rem;
  font-weight:900;
}

.profile-empty-panel .profile-empty-icon.bookmark{
  font-size:1.55rem;
}

.profile-empty-panel .profile-empty-icon.activity{
  font-size:1.35rem;
}

.profile-empty-panel strong{
  color:var(--text);
  font-size:.78rem;
}

.profile-empty-panel p{
  max-width:275px;
  margin:0;
  font-size:.65rem;
  line-height:1.45;
}

.profile-saved-list,
.profile-activity-list{
  margin-top:6px;
  border:1px solid var(--border);
  border-radius:17px;
  background:#fff;
  overflow:hidden;
}

.profile-saved-item,
.profile-activity-item{
  width:100%;
  min-height:58px;
  padding:8px 10px;
  border:0;
  border-bottom:1px solid var(--border);
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
}

.profile-saved-item:last-child,
.profile-activity-item:last-child{
  border-bottom:0;
}

.profile-saved-item:active,
.profile-activity-item:active{
  background:var(--primary-soft);
}

.profile-saved-thumb,
.profile-activity-thumb{
  width:43px;
  height:43px;
  flex:0 0 43px;
  border-radius:10px;
  background:var(--primary-soft);
  overflow:hidden;
  display:grid;
  place-items:center;
  color:var(--primary);
}

.profile-saved-thumb img,
.profile-activity-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-saved-copy,
.profile-activity-copy{
  min-width:0;
  flex:1;
  display:grid;
  gap:2px;
}

.profile-saved-copy small{
  color:var(--primary);
  font-size:.55rem;
  font-weight:800;
}

.profile-saved-copy strong{
  overflow:hidden;
  color:var(--text);
  font-size:.68rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.profile-activity-marker{
  width:31px;
  height:31px;
  flex:0 0 31px;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  font-size:1rem;
  font-weight:900;
}

.profile-activity-copy strong{
  color:var(--text);
  font-size:.67rem;
  line-height:1.3;
}

.profile-activity-copy > span{
  overflow:hidden;
  color:var(--muted);
  font-size:.6rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.profile-activity-copy small{
  color:var(--muted);
  font-size:.54rem;
}

.profile-row-arrow{
  margin-left:auto;
  color:var(--muted);
  font-size:1.25rem;
  line-height:1;
}

html[data-theme="dark"] .profile-empty-panel,
html[data-theme="dark"] .profile-saved-list,
html[data-theme="dark"] .profile-activity-list{
  background:#14201e;
}

html[data-theme="dark"] .profile-saved-item:active,
html[data-theme="dark"] .profile-activity-item:active{
  background:#19322f;
}


/* ==========================================================
   V42 — contenido real de Guardados
   ========================================================== */

.profile-saved-copy > span{
  overflow:hidden;
  color:var(--muted);
  font-size:.57rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.profile-saved-item.is-unavailable{
  opacity:.55;
}


/* ==========================================================
   V43 — quitar elementos directamente desde Guardados
   ========================================================== */

.profile-saved-item{
  padding:0;
  gap:0;
}

.profile-saved-main{
  min-width:0;
  min-height:58px;
  flex:1;
  padding:8px 4px 8px 10px;
  border:0;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
}

.profile-saved-main:active{
  background:var(--primary-soft);
}

.profile-saved-main:disabled{
  opacity:1;
  cursor:default;
}

.profile-saved-remove{
  width:45px;
  min-height:58px;
  flex:0 0 45px;
  border:0;
  background:transparent;
  color:var(--primary);
  display:grid;
  place-items:center;
  transition:opacity .16s ease, transform .16s ease, background .16s ease;
}

.profile-saved-remove:active{
  background:var(--primary-soft);
  transform:scale(.94);
}

.profile-saved-remove.is-removing,
.profile-saved-remove:disabled{
  opacity:.45;
}

.profile-saved-remove svg{
  display:block;
}

.profile-saved-item.is-unavailable .profile-saved-main{
  opacity:.55;
}

.profile-saved-item.is-unavailable .profile-saved-remove{
  opacity:1;
}

html[data-theme="dark"] .profile-saved-main:active,
html[data-theme="dark"] .profile-saved-remove:active{
  background:#19322f;
}


/* ==========================================================
   V44 — Nueva publicación en el muro
   ========================================================== */

.profile-new-post-bar{
  width:100%;
  min-height:55px;
  margin-top:8px;
  padding:7px 9px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:9px;
  text-align:left;
  box-shadow:0 3px 12px rgba(32,72,65,.055);
}

.profile-new-post-bar:active{
  background:var(--primary-soft);
}

.profile-composer-avatar{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  overflow:hidden;
  font-size:.63rem;
  font-weight:900;
}

.profile-composer-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-new-post-prompt{
  flex:1;
  min-width:0;
  color:var(--muted);
  font-size:.69rem;
  font-weight:650;
}

.profile-new-post-photo{
  width:31px;
  height:31px;
  flex:0 0 31px;
  border-radius:10px;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
}

.profile-publications-empty{
  margin-top:8px;
}

.wall-grid{
  margin-top:8px;
}

.wall-item{
  position:relative;
}

.wall-multiple-badge{
  position:absolute;
  top:5px;
  right:5px;
  min-width:27px;
  height:23px;
  padding:0 5px;
  border-radius:8px;
  background:rgba(9,24,22,.72);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  font-size:.52rem;
  font-weight:850;
  backdrop-filter:blur(5px);
}

body.new-post-open{
  overflow:hidden;
}

.new-post-overlay{
  position:fixed;
  inset:0;
  z-index:145;
  display:flex;
  justify-content:center;
  align-items:flex-end;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.new-post-overlay.is-hidden{
  display:none;
}

.new-post-overlay.is-visible{
  opacity:1;
  pointer-events:auto;
}

.new-post-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(7,19,17,.48);
  backdrop-filter:blur(2px);
}

.new-post-sheet{
  position:relative;
  z-index:1;
  width:min(100%, var(--max));
  max-height:min(86dvh, 700px);
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:23px 23px 0 0;
  background:#fff;
  color:var(--text);
  box-shadow:0 -18px 48px rgba(13,38,34,.2);
  overflow:hidden;
  transform:translateY(22px);
  transition:transform .18s ease;
}

.new-post-overlay.is-visible .new-post-sheet{
  transform:translateY(0);
}

.new-post-handle{
  width:38px;
  height:4px;
  margin:7px auto 3px;
  border-radius:999px;
  background:var(--border);
}

.new-post-header{
  min-height:46px;
  padding:0 12px;
  border-bottom:1px solid var(--border);
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
}

.new-post-header strong{
  font-size:.76rem;
}

.new-post-cancel,
.new-post-publish{
  border:0;
  background:transparent;
  font-size:.66rem;
}

.new-post-cancel{
  justify-self:start;
  color:var(--muted);
}

.new-post-publish{
  justify-self:end;
  color:var(--primary);
  font-weight:850;
}

.new-post-publish:disabled,
.new-post-cancel:disabled,
.new-post-backdrop:disabled{
  opacity:.48;
}

.new-post-content{
  max-height:calc(min(86dvh, 700px) - 60px);
  padding:12px 13px max(18px, env(safe-area-inset-bottom));
  overflow-y:auto;
}

.new-post-author{
  display:flex;
  align-items:center;
  gap:9px;
}

.new-post-avatar{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  overflow:hidden;
  font-size:.65rem;
  font-weight:900;
}

.new-post-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.new-post-author > span{
  min-width:0;
  display:grid;
  gap:1px;
}

.new-post-author strong{
  color:var(--text);
  font-size:.7rem;
}

.new-post-author small{
  color:var(--muted);
  font-size:.56rem;
}

.new-post-text-field{
  display:block;
  margin-top:10px;
}

.new-post-text-field textarea{
  width:100%;
  min-height:88px;
  padding:8px 2px;
  border:0;
  outline:0;
  resize:none;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:.75rem;
  line-height:1.45;
}

.new-post-text-field textarea::placeholder{
  color:var(--muted);
}

.new-post-preview-list{
  display:none;
  grid-template-columns:repeat(3, 1fr);
  gap:5px;
  margin-top:5px;
}

.new-post-preview-list.has-photos{
  display:grid;
}

.new-post-preview-item{
  position:relative;
  aspect-ratio:1;
  border-radius:11px;
  background:var(--primary-soft);
  overflow:hidden;
}

.new-post-preview-item img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.new-post-preview-item button{
  position:absolute;
  top:5px;
  right:5px;
  width:24px;
  height:24px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:50%;
  background:rgba(9,24,22,.72);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1rem;
  line-height:1;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
}

.new-post-add-photos{
  width:100%;
  min-height:43px;
  margin-top:10px;
  padding:0 12px;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--primary-soft);
  color:var(--primary-dark);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:.67rem;
  font-weight:800;
}

.new-post-quality-note{
  margin:7px 3px 0;
  color:var(--muted);
  font-size:.55rem;
  line-height:1.4;
  text-align:center;
}

.new-post-status,
.new-post-error{
  min-height:0;
  margin-top:7px;
  font-size:.59rem;
  line-height:1.4;
  text-align:center;
}

.new-post-status.loading{
  color:var(--primary);
}

.new-post-error{
  display:none;
  color:#b55247;
}

.new-post-error.has-error{
  display:block;
}

html[data-theme="dark"] .profile-new-post-bar,
html[data-theme="dark"] .new-post-sheet{
  background:#14201e;
}

html[data-theme="dark"] .profile-new-post-bar:active,
html[data-theme="dark"] .new-post-add-photos{
  background:#19322f;
}

html[data-theme="dark"] .new-post-backdrop{
  background:rgba(0,0,0,.62);
}


/* ==========================================================
   V45 — visor de publicaciones del muro
   ========================================================== */

body.post-viewer-open{
  overflow:hidden;
}

.post-viewer-overlay{
  position:fixed;
  inset:0;
  z-index:155;
  display:flex;
  justify-content:center;
  align-items:flex-end;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.post-viewer-overlay.is-hidden{
  display:none;
}

.post-viewer-overlay.is-visible{
  opacity:1;
  pointer-events:auto;
}

.post-viewer-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(7,19,17,.58);
  backdrop-filter:blur(3px);
}

.post-viewer-sheet{
  position:relative;
  z-index:1;
  width:min(100%, var(--max));
  max-height:92dvh;
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:22px 22px 0 0;
  background:#fff;
  color:var(--text);
  box-shadow:0 -18px 52px rgba(7,19,17,.25);
  overflow:hidden;
  transform:translateY(18px);
  transition:transform .18s ease;
}

.post-viewer-overlay.is-visible .post-viewer-sheet{
  transform:translateY(0);
}

.post-viewer-header{
  min-height:48px;
  padding:0 12px 0 15px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.post-viewer-header strong{
  font-size:.75rem;
}

.post-viewer-close{
  width:31px;
  height:31px;
  border:0;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--text);
  display:grid;
  place-items:center;
  font-size:1.25rem;
  line-height:1;
}

.post-viewer-content{
  max-height:calc(92dvh - 49px);
  overflow-y:auto;
  overscroll-behavior:contain;
}

.post-viewer-card{
  padding-bottom:max(16px, env(safe-area-inset-bottom));
}

.post-viewer-author{
  min-height:58px;
  padding:9px 12px;
  display:flex;
  align-items:center;
  gap:9px;
}

.post-viewer-avatar{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  overflow:hidden;
  font-size:.62rem;
  font-weight:900;
}

.post-viewer-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.post-viewer-author > span{
  min-width:0;
  display:grid;
  gap:2px;
}

.post-viewer-author strong{
  color:var(--text);
  font-size:.7rem;
}

.post-viewer-author small{
  color:var(--muted);
  font-size:.56rem;
}

.post-viewer-media{
  position:relative;
  width:100%;
  min-height:260px;
  max-height:64dvh;
  background:#0d1211;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.post-viewer-media img{
  display:block;
  width:100%;
  height:auto;
  max-height:64dvh;
  object-fit:contain;
}

.post-viewer-nav{
  position:absolute;
  top:50%;
  width:34px;
  height:34px;
  margin-top:-17px;
  border:1px solid rgba(255,255,255,.36);
  border-radius:50%;
  background:rgba(12,20,19,.58);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  line-height:1;
  backdrop-filter:blur(5px);
}

.post-viewer-nav.previous{
  left:9px;
}

.post-viewer-nav.next{
  right:9px;
}

.post-viewer-nav:disabled{
  opacity:.28;
}

.post-viewer-counter{
  position:absolute;
  top:9px;
  right:10px;
  min-width:35px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(12,20,19,.64);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:.55rem;
  font-weight:800;
  backdrop-filter:blur(5px);
}

.post-viewer-caption{
  padding:12px 13px 3px;
  color:var(--text);
  font-size:.67rem;
  line-height:1.5;
}

.post-viewer-caption strong{
  margin-right:5px;
  font-size:.67rem;
}

.post-viewer-caption span{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.post-viewer-missing{
  min-height:230px;
  padding:30px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  text-align:center;
}

.post-viewer-missing strong{
  color:var(--text);
  font-size:.75rem;
}

.post-viewer-missing p{
  margin:0;
  color:var(--muted);
  font-size:.63rem;
}

html[data-theme="dark"] .post-viewer-sheet{
  background:#101917;
  border-color:#2a3c39;
}

html[data-theme="dark"] .post-viewer-close{
  background:#19322f;
  color:#d8e5e2;
}

html[data-theme="dark"] .post-viewer-media{
  background:#070b0a;
}


/* ==========================================================
   V46 — Me encanta, comentarios y Guardar publicación
   ========================================================== */

.post-social-summary{
  min-height:34px;
  padding:7px 13px;
  border-top:1px solid var(--border);
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:.58rem;
}

.post-social-paw-count{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--primary);
}

.post-social-paw-count b{
  color:var(--muted);
  font-size:.58rem;
}

.post-social-actions{
  min-height:43px;
  padding:4px 8px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  display:grid;
  grid-template-columns:1fr 1fr 42px;
  align-items:center;
  gap:3px;
}

.post-social-action{
  min-width:0;
  height:34px;
  padding:0 8px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:.61rem;
  font-weight:750;
}

.post-social-action:active{
  background:var(--primary-soft);
}

.post-social-action.love.is-active,
.post-social-action.save.is-active{
  color:var(--primary);
}

.post-social-action.save{
  padding:0;
}

.post-social-action:disabled{
  opacity:.48;
}

.paw-love-icon{
  display:block;
  overflow:visible;
}

.post-comments-section{
  padding:10px 12px 14px;
}

.post-comment-composer{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.post-comment-avatar{
  width:31px;
  height:31px;
  flex:0 0 31px;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  overflow:hidden;
  font-size:.5rem;
  font-weight:900;
}

.post-comment-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.post-comment-compose-box{
  min-width:0;
  min-height:37px;
  flex:1;
  padding:4px 4px 4px 11px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#f7faf9;
  display:flex;
  align-items:flex-end;
  gap:5px;
}

.post-comment-compose-box textarea{
  min-width:0;
  min-height:27px;
  max-height:95px;
  flex:1;
  padding:5px 0 4px;
  border:0;
  outline:0;
  resize:none;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:.63rem;
  line-height:1.35;
}

.post-comment-compose-box textarea::placeholder{
  color:var(--muted);
}

.post-comment-send{
  width:29px;
  height:29px;
  flex:0 0 29px;
  border:0;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  display:grid;
  place-items:center;
}

.post-comment-send:disabled{
  opacity:.45;
}

.post-comments-list{
  margin-top:13px;
  display:grid;
  gap:11px;
}

.post-comment-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.post-comment-main{
  min-width:0;
  flex:1;
}

.post-comment-bubble{
  width:fit-content;
  max-width:100%;
  padding:8px 10px;
  border-radius:4px 15px 15px 15px;
  background:#f2f6f5;
}

.post-comment-bubble strong{
  display:inline;
  color:var(--text);
  font-size:.61rem;
}

.post-comment-bubble small{
  margin-left:4px;
  color:var(--muted);
  font-size:.52rem;
}

.post-comment-bubble p{
  margin:3px 0 0;
  color:var(--text);
  font-size:.62rem;
  line-height:1.4;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.post-comment-meta{
  min-height:22px;
  padding:3px 5px 0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:.5rem;
}

.post-comment-love{
  min-height:22px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:.51rem;
  font-weight:750;
}

.post-comment-love.is-active{
  color:var(--primary);
}

.post-comment-love b{
  min-width:10px;
  font-size:.51rem;
}

.post-comment-love:disabled{
  opacity:.48;
}

.post-comments-empty,
.post-comments-loading{
  margin:13px 0 0;
  color:var(--muted);
  font-size:.57rem;
  text-align:center;
}

html[data-theme="dark"] .post-comment-compose-box{
  background:#14201e;
  border-color:#2a3c39;
}

html[data-theme="dark"] .post-comment-bubble{
  background:#172522;
}

html[data-theme="dark"] .post-social-action:active{
  background:#19322f;
}


/* ==========================================================
   V47 — acciones sociales más limpias
   ========================================================== */

/* La fila resumen de V46 ya no se usa. */
.post-social-summary{
  display:none !important;
}

/* Una sola fila: Me encanta + contador / Guardar. */
.post-social-actions{
  min-height:45px;
  padding:6px 10px 6px 12px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Acción principal, ligera y sin bloque grande. */
.post-social-love{
  min-width:0;
  min-height:32px;
  padding:0 5px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.61rem;
  font-weight:750;
}

.post-social-love span{
  white-space:nowrap;
}

.post-social-love b{
  min-width:10px;
  color:var(--muted);
  font-size:.6rem;
  font-weight:700;
}

.post-social-love.is-active{
  color:var(--primary);
}

.post-social-love.is-active b{
  color:var(--primary);
}

.post-social-love:active{
  background:var(--primary-soft);
}

.post-social-love:disabled{
  opacity:.48;
}

/*
  Guardar usa el mismo lenguaje visual del botón de guardado
  de las fichas de reportes: pequeño, contenido y con borde suave.
*/
.post-social-save{
  width:30px;
  height:30px;
  flex:0 0 30px;
  padding:0;
  border:1px solid rgba(214,224,221,.92);
  border-radius:10px;
  background:rgba(255,255,255,.96);
  color:#687775;
  display:grid;
  place-items:center;
  box-shadow:0 2px 8px rgba(27,58,53,.08);
  transition:
    color .16s ease,
    background .16s ease,
    border-color .16s ease,
    transform .12s ease;
}

.post-social-save:active{
  transform:scale(.94);
}

.post-social-save.is-active{
  color:var(--primary);
  border-color:rgba(46,143,134,.28);
  background:var(--primary-soft);
}

.post-social-save:disabled{
  opacity:.48;
}

html[data-theme="dark"] .post-social-love:active{
  background:#19322f;
}

html[data-theme="dark"] .post-social-save{
  border-color:#30433f;
  background:rgba(20,32,30,.94);
  color:#a7b5b2;
}

html[data-theme="dark"] .post-social-save.is-active{
  border-color:#356b64;
  background:#19322f;
  color:#65c8bd;
}


/* ==========================================================
   V48 — reacciones frambuesa, sin texto redundante
   ========================================================== */

:root{
  --reaction-raspberry:#D64F73;
  --reaction-raspberry-soft:rgba(214,79,115,.11);
}

/* Publicación: patita + conteo */
.post-social-love{
  gap:5px;
  color:var(--reaction-raspberry);
}

.post-social-love b{
  color:var(--reaction-raspberry);
  font-weight:800;
}

.post-social-love.is-active{
  color:var(--reaction-raspberry);
}

.post-social-love.is-active b{
  color:var(--reaction-raspberry);
}

.post-social-love:active{
  background:var(--reaction-raspberry-soft);
}

/* Comentario: misma identidad visual, más pequeña */
.post-comment-love{
  gap:4px;
  color:var(--reaction-raspberry);
}

.post-comment-love b{
  color:var(--reaction-raspberry);
  font-weight:800;
}

.post-comment-love.is-active{
  color:var(--reaction-raspberry);
}

.post-comment-love:active{
  background:var(--reaction-raspberry-soft);
  border-radius:7px;
}

/* La patita rellena mantiene el mismo frambuesa */
.paw-love-icon,
.paw-love-icon.is-active{
  color:var(--reaction-raspberry);
}

/* En modo oscuro no volvemos al verde */
html[data-theme="dark"] .post-social-love,
html[data-theme="dark"] .post-social-love b,
html[data-theme="dark"] .post-social-love.is-active,
html[data-theme="dark"] .post-social-love.is-active b,
html[data-theme="dark"] .post-comment-love,
html[data-theme="dark"] .post-comment-love b,
html[data-theme="dark"] .post-comment-love.is-active,
html[data-theme="dark"] .paw-love-icon,
html[data-theme="dark"] .paw-love-icon.is-active{
  color:var(--reaction-raspberry);
}

html[data-theme="dark"] .post-social-love:active,
html[data-theme="dark"] .post-comment-love:active{
  background:rgba(214,79,115,.14);
}


/* ==========================================================
   V49 — menú del dueño, editar y eliminar publicación
   ========================================================== */

.post-viewer-author{
  position:relative;
}

.post-owner-tools{
  position:relative;
  margin-left:auto;
  align-self:flex-start;
  flex:0 0 auto;
}

.post-owner-menu-button{
  width:31px;
  height:31px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2.5px;
}

.post-owner-menu-button span{
  width:3px;
  height:3px;
  border-radius:50%;
  background:currentColor;
}

.post-owner-menu-button:active,
.post-owner-menu-button.is-open{
  background:var(--primary-soft);
  color:var(--text);
}

.post-owner-menu{
  position:absolute;
  top:35px;
  right:0;
  z-index:8;
  width:174px;
  padding:5px;
  border:1px solid var(--border);
  border-radius:13px;
  background:#fff;
  box-shadow:0 12px 30px rgba(12,35,31,.16);
}

.post-owner-menu button{
  width:100%;
  min-height:38px;
  padding:0 9px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:9px;
  text-align:left;
  font-size:.62rem;
  font-weight:750;
}

.post-owner-menu button:active{
  background:var(--primary-soft);
}

.post-owner-menu button.danger{
  color:#c74355;
}

.post-edit-layer,
.post-delete-layer{
  position:absolute;
  inset:0;
  z-index:18;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.post-edit-backdrop,
.post-delete-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(7,19,17,.52);
  backdrop-filter:blur(2px);
}

.post-edit-sheet{
  position:relative;
  z-index:1;
  width:100%;
  max-height:86dvh;
  border-radius:20px 20px 0 0;
  background:#fff;
  color:var(--text);
  overflow:hidden;
  box-shadow:0 -18px 44px rgba(10,31,27,.24);
}

.post-edit-header{
  min-height:49px;
  padding:0 11px;
  border-bottom:1px solid var(--border);
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
}

.post-edit-header strong{
  font-size:.7rem;
  text-align:center;
}

.post-edit-cancel,
.post-edit-save{
  min-height:32px;
  padding:0 6px;
  border:0;
  background:transparent;
  font-size:.61rem;
}

.post-edit-cancel{
  justify-self:start;
  color:var(--muted);
}

.post-edit-save{
  justify-self:end;
  color:var(--primary);
  font-weight:850;
}

.post-edit-header button:disabled{
  opacity:.48;
}

.post-edit-body{
  max-height:calc(86dvh - 49px);
  padding:13px 13px max(17px, env(safe-area-inset-bottom));
  overflow-y:auto;
}

.post-edit-caption{
  display:grid;
  gap:6px;
}

.post-edit-caption > span,
.post-edit-photos-title strong{
  color:var(--text);
  font-size:.62rem;
  font-weight:850;
}

.post-edit-caption textarea{
  width:100%;
  min-height:92px;
  padding:10px 11px;
  border:1px solid var(--border);
  border-radius:13px;
  outline:0;
  resize:vertical;
  background:#f8faf9;
  color:var(--text);
  font:inherit;
  font-size:.64rem;
  line-height:1.45;
}

.post-edit-caption textarea:focus{
  border-color:rgba(46,143,134,.48);
  box-shadow:0 0 0 3px rgba(46,143,134,.08);
}

.post-edit-photos-title{
  margin-top:15px;
  display:grid;
  gap:2px;
}

.post-edit-photos-title small{
  color:var(--muted);
  font-size:.53rem;
}

.post-edit-photos{
  margin-top:9px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}

.post-edit-photo{
  position:relative;
  aspect-ratio:1/1;
  border-radius:11px;
  background:#eef3f1;
  overflow:hidden;
}

.post-edit-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.post-edit-photo button{
  position:absolute;
  top:5px;
  right:5px;
  width:23px;
  height:23px;
  padding:0;
  border:1px solid rgba(255,255,255,.45);
  border-radius:50%;
  background:rgba(15,25,23,.72);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1rem;
  line-height:1;
  backdrop-filter:blur(4px);
}

.post-edit-photo button:disabled{
  opacity:.35;
}

.post-edit-error{
  margin:10px 0 0;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(199,67,85,.08);
  color:#b93a4d;
  font-size:.57rem;
}

.post-delete-layer{
  align-items:center;
  padding:20px;
}

.post-delete-dialog{
  position:relative;
  z-index:1;
  width:min(100%,310px);
  padding:19px 17px 14px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  color:var(--text);
  box-shadow:0 18px 55px rgba(7,19,17,.3);
  text-align:center;
}

.post-delete-icon{
  width:42px;
  height:42px;
  margin:0 auto 9px;
  border-radius:50%;
  background:rgba(199,67,85,.09);
  color:#c74355;
  display:grid;
  place-items:center;
}

.post-delete-dialog > strong{
  display:block;
  font-size:.75rem;
}

.post-delete-dialog > p{
  margin:6px auto 15px;
  max-width:250px;
  color:var(--muted);
  font-size:.58rem;
  line-height:1.4;
}

.post-delete-dialog > div{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.post-delete-dialog button{
  min-height:36px;
  border-radius:10px;
  font-size:.61rem;
  font-weight:800;
}

.post-delete-cancel{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
}

.post-delete-confirm{
  border:1px solid #c74355;
  background:#c74355;
  color:#fff;
}

.post-delete-dialog button:disabled{
  opacity:.5;
}

html[data-theme="dark"] .post-owner-menu,
html[data-theme="dark"] .post-edit-sheet,
html[data-theme="dark"] .post-delete-dialog{
  background:#111b19;
  border-color:#2a3c39;
}

html[data-theme="dark"] .post-owner-menu button:active{
  background:#19322f;
}

html[data-theme="dark"] .post-edit-caption textarea{
  background:#14201e;
  border-color:#2a3c39;
}

html[data-theme="dark"] .post-edit-photo{
  background:#172522;
}

html[data-theme="dark"] .post-delete-cancel{
  background:#14201e;
  border-color:#2a3c39;
  color:#dce6e3;
}


/* ==========================================================
   V50 — texto arriba y @usuario debajo
   ========================================================== */

.post-viewer-caption{
  padding:11px 13px 10px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}

.post-viewer-caption .post-viewer-caption-text{
  display:block;
  width:100%;
  color:var(--text);
  font-size:.67rem;
  line-height:1.5;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.post-viewer-caption .post-viewer-caption-user{
  display:block;
  margin:0;
  color:var(--muted);
  font-size:.57rem;
  font-weight:800;
  line-height:1.25;
}


/* ==========================================================
   V57 — secciones administrativas del perfil
   ========================================================== */

.profile-admin-tabs-wrap{
  margin:7px 0 1px;
  padding:7px 8px 8px;
  border:1px solid rgba(214,79,115,.16);
  border-radius:14px;
  background:rgba(214,79,115,.035);
}

.profile-admin-tabs-label{
  min-height:20px;
  padding:0 3px 5px;
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
}

.profile-admin-tabs-label strong{
  font-size:.51rem;
  font-weight:850;
  letter-spacing:.025em;
}

.profile-admin-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#D64F73;
  box-shadow:0 0 0 3px rgba(214,79,115,.09);
}

.profile-admin-tabs{
  min-height:35px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:5px;
}

.profile-admin-tabs button{
  min-width:0;
  min-height:34px;
  padding:0 6px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  font-size:.57rem;
  font-weight:760;
}

.profile-admin-tabs button:active{
  background:rgba(214,79,115,.07);
}

.profile-admin-tabs button.active{
  border-color:rgba(214,79,115,.19);
  background:rgba(214,79,115,.09);
  color:#C43F64;
  font-weight:900;
}

.profile-admin-placeholder{
  min-height:155px;
  margin-top:7px;
  padding:24px 18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
}

.profile-admin-placeholder-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:rgba(214,79,115,.09);
  color:#D64F73;
  display:grid;
  place-items:center;
}

.profile-admin-placeholder strong{
  color:var(--text);
  font-size:.75rem;
}

.profile-admin-placeholder p{
  margin:0;
  color:var(--muted);
  font-size:.59rem;
}

html[data-theme="dark"] .profile-admin-tabs-wrap{
  border-color:rgba(214,79,115,.18);
  background:rgba(214,79,115,.045);
}

html[data-theme="dark"] .profile-admin-tabs button.active{
  border-color:rgba(214,79,115,.24);
  background:rgba(214,79,115,.12);
  color:#EF83A0;
}

html[data-theme="dark"] .profile-admin-placeholder{
  background:#14201e;
}

html[data-theme="dark"] .profile-admin-placeholder-icon{
  background:rgba(214,79,115,.12);
}


/* ==========================================================
   V58 — cuadrícula administrativa de Reportes
   ========================================================== */

.admin-report-categories{
  margin-top:7px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
}

.admin-report-categories-head{
  margin-bottom:11px;
}

.admin-report-categories-head strong{
  display:block;
  color:var(--text);
  font-size:.76rem;
}

.admin-report-categories-head p{
  margin:2px 0 0;
  color:var(--muted);
  font-size:.56rem;
}

.admin-report-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.admin-report-category{
  min-height:78px;
  padding:10px 9px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fbfcfc;
  color:var(--text);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  text-align:left;
  box-shadow:0 2px 8px rgba(18,51,46,.035);
}

.admin-report-category:last-child{
  grid-column:1 / -1;
  min-height:68px;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
}

.admin-report-category:active{
  transform:scale(.985);
}

.admin-report-category-icon{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:.86rem;
  font-weight:950;
}

.admin-report-category strong{
  font-size:.63rem;
  font-weight:880;
}

.admin-report-category.lost .admin-report-category-icon{
  background:rgba(239,105,92,.12);
  color:#EF695C;
}

.admin-report-category.abandoned .admin-report-category-icon{
  background:rgba(226,166,52,.13);
  color:#C88D1F;
}

.admin-report-category.sighting .admin-report-category-icon{
  background:rgba(76,134,214,.12);
  color:#4C86D6;
}

.admin-report-category.found .admin-report-category-icon{
  background:rgba(64,166,111,.12);
  color:#3E9D69;
}

.admin-report-category.adoption .admin-report-category-icon{
  background:rgba(126,87,194,.12);
  color:#7E57C2;
}

.admin-report-note{
  margin:10px 2px 0;
  color:var(--muted);
  font-size:.52rem;
  line-height:1.4;
}

html[data-theme="dark"] .admin-report-categories{
  background:#14201e;
}

html[data-theme="dark"] .admin-report-category{
  border-color:#2a3c39;
  background:#111b19;
}


/* ==========================================================
   V59 — moderación Se busca + Bitácora
   ========================================================== */
body.admin-report-open{overflow:hidden}
.admin-report-overlay{position:fixed;inset:0;z-index:7200;display:flex;align-items:flex-end;justify-content:center}
.admin-report-backdrop{position:absolute;inset:0;border:0;background:rgba(7,19,17,.6);backdrop-filter:blur(3px)}
.admin-report-sheet{position:relative;z-index:1;width:min(100%,var(--max));height:min(92dvh,780px);border:1px solid var(--border);border-bottom:0;border-radius:22px 22px 0 0;background:#fff;color:var(--text);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 -20px 58px rgba(7,19,17,.28)}
.admin-report-sheet-header{min-height:50px;flex:0 0 50px;padding:0 11px;border-bottom:1px solid var(--border);display:grid;grid-template-columns:34px 1fr 34px;align-items:center;gap:6px}
.admin-report-sheet-header>div{text-align:center;display:grid;gap:1px}.admin-report-sheet-header strong{font-size:.7rem}.admin-report-sheet-header small{color:var(--muted);font-size:.5rem}
.admin-report-sheet-back,.admin-report-sheet-close{width:32px;height:32px;padding:0;border:0;border-radius:50%;background:var(--primary-soft);color:var(--text);display:grid;place-items:center;line-height:1}.admin-report-sheet-back{font-size:1.45rem}.admin-report-sheet-close{font-size:1.15rem}
.admin-report-sheet-content{min-height:0;flex:1;padding:10px 11px max(18px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.admin-review-list{display:grid;gap:8px}.admin-review-card{width:100%;min-height:78px;padding:7px;border:1px solid var(--border);border-radius:15px;background:#fff;color:var(--text);display:flex;align-items:center;gap:9px;text-align:left}.admin-review-card:active{background:var(--primary-soft)}
.admin-review-card-image{width:65px;height:65px;flex:0 0 65px;border-radius:11px;background:#eef3f1;display:grid;place-items:center;overflow:hidden}.admin-review-card-image img{width:100%;height:100%;object-fit:cover}
.admin-review-card-copy{min-width:0;flex:1;display:grid;gap:2px}.admin-review-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.admin-review-card-top strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.66rem}.admin-review-card-copy small{color:var(--primary);font-size:.52rem;font-weight:800}.admin-review-card-copy>span:not(.admin-review-card-top){color:var(--muted);font-size:.54rem}.admin-review-card-copy time{color:var(--muted);font-size:.49rem}
.admin-status{display:inline-flex;align-items:center;min-height:21px;padding:0 7px;border-radius:999px;background:#eef3f1;color:var(--muted);font-size:.46rem;font-style:normal;font-weight:850;white-space:nowrap}.admin-status.pending_review{background:rgba(226,166,52,.12);color:#ad7717}.admin-status.verifying{background:rgba(76,134,214,.12);color:#3973c0}.admin-status.decision_ready{background:rgba(126,87,194,.12);color:#6e49b2}.admin-status.approved{background:rgba(64,166,111,.12);color:#33865a}.admin-status.rejected{background:rgba(214,79,115,.11);color:#c43f64}
.admin-review-detail{display:grid;gap:10px}.admin-review-detail-status{display:flex;align-items:center;justify-content:space-between;gap:10px}.admin-review-detail-status time{color:var(--muted);font-size:.52rem}
.admin-review-gallery{display:flex;gap:7px;overflow-x:auto;scroll-snap-type:x mandatory}.admin-review-gallery img{width:76%;max-height:310px;flex:0 0 76%;border-radius:14px;background:#0b1210;object-fit:contain;scroll-snap-align:start}
.admin-review-user-card{padding:9px;border:1px solid var(--border);border-radius:14px;display:flex;align-items:center;gap:9px}.admin-review-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:50%;overflow:hidden;background:var(--primary-soft);display:grid;place-items:center}.admin-review-avatar img{width:100%;height:100%;object-fit:cover}.admin-review-user-card>div{display:grid;gap:1px}.admin-review-user-card strong{font-size:.65rem}.admin-review-user-card small{color:var(--primary);font-size:.52rem}
.admin-review-data{border:1px solid var(--border);border-radius:15px;overflow:hidden}.admin-review-data>div{min-height:43px;padding:7px 10px;border-bottom:1px solid var(--border);display:grid;grid-template-columns:40% 1fr;gap:9px;align-items:start}.admin-review-data>div:last-child{border-bottom:0}.admin-review-data span{color:var(--muted);font-size:.53rem}.admin-review-data strong{font-size:.58rem;line-height:1.4;overflow-wrap:anywhere}
.admin-private-location{padding:10px;border:1px solid rgba(214,79,115,.2);border-radius:14px;background:rgba(214,79,115,.045);display:flex;align-items:center;gap:9px}.admin-private-location>span{width:32px;height:32px;flex:0 0 32px;border-radius:10px;background:rgba(214,79,115,.1);color:#d64f73;display:grid;place-items:center;font-weight:900}.admin-private-location>div{display:grid;gap:2px}.admin-private-location strong{font-size:.59rem}.admin-private-location small{color:var(--muted);font-size:.51rem}
.admin-review-actions{display:grid;gap:7px}.admin-review-actions button{min-height:38px;border-radius:11px;font-size:.59rem;font-weight:850}.admin-verification-start{border:1px solid #4c86d6;background:#4c86d6;color:#fff}.admin-verification-start.done{border-color:var(--border);background:#eef3f1;color:var(--muted)}.admin-message-user{border:1px solid var(--primary);background:var(--primary);color:#fff}.admin-decision-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.admin-reject-report{border:1px solid rgba(214,79,115,.45);background:rgba(214,79,115,.08);color:#c43f64}.admin-approve-report{border:1px solid #3e9d69;background:#3e9d69;color:#fff}.admin-review-actions button:disabled{opacity:.42;filter:saturate(.55)}.admin-action-help{margin:0;color:var(--muted);font-size:.52rem;line-height:1.4;text-align:center}.admin-action-help.ready{color:#6e49b2;font-weight:750}
.admin-report-loading,.admin-report-empty{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;color:var(--muted)}.admin-report-loading span{width:25px;height:25px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:adminSpin .75s linear infinite}.admin-report-empty>span{font-size:1.35rem;color:var(--primary)}.admin-report-empty strong{color:var(--text);font-size:.68rem}.admin-report-empty p{max-width:260px;margin:0;font-size:.55rem;line-height:1.4}@keyframes adminSpin{to{transform:rotate(360deg)}}
.admin-log-home{margin-top:7px;padding:12px;border:1px solid var(--border);border-radius:18px;background:#fff}.admin-log-head strong{font-size:.75rem}.admin-log-head p{margin:3px 0 11px;color:var(--muted);font-size:.55rem;line-height:1.4}.admin-log-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.admin-log-card{min-height:88px;padding:11px;border:1px solid var(--border);border-radius:14px;background:#fbfcfc;color:var(--text);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;text-align:left}.admin-log-card>span{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;font-weight:950}.admin-log-card div{display:grid;gap:2px}.admin-log-card strong{font-size:.63rem}.admin-log-card small{color:var(--muted);font-size:.5rem}.admin-log-card.accepted>span{background:rgba(64,166,111,.12);color:#3e9d69}.admin-log-card.rejected>span{background:rgba(214,79,115,.11);color:#d64f73}.admin-log-note,.admin-history-date{margin:10px 2px 0;color:var(--muted);font-size:.51rem;line-height:1.4}
html[data-theme="dark"] .admin-report-sheet,html[data-theme="dark"] .admin-review-card,html[data-theme="dark"] .admin-log-home{background:#101917;border-color:#2a3c39}html[data-theme="dark"] .admin-review-user-card,html[data-theme="dark"] .admin-review-data,html[data-theme="dark"] .admin-review-data>div{border-color:#2a3c39}html[data-theme="dark"] .admin-review-card:active{background:#19322f}html[data-theme="dark"] .admin-verification-start.done{background:#172522;border-color:#30433f}html[data-theme="dark"] .admin-log-card{background:#111b19;border-color:#2a3c39}


/* ==========================================================
   V63 — Bitácora agrupada por tipo de reporte
   ========================================================== */

.admin-history-groups{
  display:grid;
  gap:14px;
}

.admin-history-group{
  display:grid;
  gap:7px;
}

.admin-history-group > header{
  min-height:30px;
  padding:0 4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.admin-history-group > header strong{
  color:var(--text);
  font-size:.65rem;
  font-weight:900;
}

.admin-history-group > header span{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  font-size:.5rem;
  font-weight:900;
}

html[data-theme="dark"] .admin-history-group > header span{
  background:#19322f;
}


/* ==========================================================
   V66 — evidencia privada de resguardo
   ========================================================== */

.admin-private-evidence{
  margin-top:9px;
  padding:11px;
  border:1px solid rgba(214,79,115,.18);
  border-radius:15px;
  background:rgba(214,79,115,.035);
}

.admin-private-evidence-head{
  margin-bottom:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.admin-private-evidence-head strong{
  color:var(--text);
  font-size:.61rem;
}

.admin-private-evidence-head small{
  color:var(--muted);
  font-size:.51rem;
}

.admin-private-evidence-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
}

.admin-private-evidence-grid a{
  aspect-ratio:1/1;
  border-radius:9px;
  background:var(--surface);
  overflow:hidden;
}

.admin-private-evidence-grid img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

html[data-theme="dark"] .admin-private-evidence{
  background:rgba(214,79,115,.045);
  border-color:rgba(214,79,115,.20);
}

/* ==========================================================
   V73 — estados visuales inequívocos en Verificación
   ========================================================== */

/*
  Un botón bloqueado pierde por completo el color semántico de su acción.
  No usamos opacity sobre el botón coloreado porque seguía pareciendo activo.
*/
.admin-review-actions button:disabled,
.admin-review-actions button[disabled]{
  opacity:1;
  filter:none;
  border-color:#dce4e2 !important;
  background:#f3f6f5 !important;
  color:#a4afac !important;
  box-shadow:none !important;
  cursor:not-allowed;
}

.admin-review-actions button:disabled svg,
.admin-review-actions button[disabled] svg{
  opacity:.62;
}

/* Los estados activos conservan sus colores originales. */
.admin-verification-start:not(:disabled):not(.done){
  border-color:#4c86d6;
  background:#4c86d6;
  color:#fff;
}

.admin-message-user:not(:disabled){
  border-color:var(--primary);
  background:var(--primary);
  color:#fff;
}

.admin-reject-report:not(:disabled){
  border-color:rgba(214,79,115,.45);
  background:rgba(214,79,115,.08);
  color:#c43f64;
}

.admin-approve-report:not(:disabled){
  border-color:#3e9d69;
  background:#3e9d69;
  color:#fff;
}

html[data-theme="dark"] .admin-review-actions button:disabled,
html[data-theme="dark"] .admin-review-actions button[disabled]{
  border-color:#2c3c39 !important;
  background:#182320 !important;
  color:#697875 !important;
}


/* ==========================================================
   V74 — Bitácora · eliminados por administrador
   ========================================================== */

.admin-moderation-log-section{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.admin-moderation-log-section .admin-log-card{
  width:100%;
  min-height:78px;
}

.admin-log-card.admin-removed>span{
  background:rgba(199,67,85,.11);
  color:#c74355;
}

.admin-status.admin_removed{
  background:rgba(199,67,85,.11);
  color:#b93a4d;
}

.admin-removal-audit{
  padding:11px;
  border:1px solid rgba(199,67,85,.18);
  border-radius:15px;
  background:rgba(199,67,85,.035);
}

.admin-removal-audit-head{
  margin-bottom:9px;
  display:flex;
  align-items:center;
  gap:9px;
}

.admin-removal-audit-head>span{
  width:32px;
  height:32px;
  flex:0 0 32px;
  border-radius:10px;
  background:rgba(199,67,85,.1);
  color:#c74355;
  display:grid;
  place-items:center;
  font-weight:950;
}

.admin-removal-audit-head>div{
  display:grid;
  gap:2px;
}

.admin-removal-audit-head strong{
  font-size:.63rem;
}

.admin-removal-audit-head small{
  color:var(--muted);
  font-size:.5rem;
}

.admin-removal-audit-row{
  min-height:35px;
  padding:6px 0;
  border-top:1px solid var(--border);
  display:grid;
  grid-template-columns:40% 1fr;
  gap:8px;
}

.admin-removal-audit-row span,
.admin-removal-audit-reason>span{
  color:var(--muted);
  font-size:.51rem;
}

.admin-removal-audit-row strong{
  font-size:.56rem;
}

.admin-removal-audit-reason{
  padding-top:8px;
  border-top:1px solid var(--border);
  display:grid;
  gap:4px;
}

.admin-removal-audit-reason p{
  margin:0;
  color:var(--text);
  font-size:.56rem;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

html[data-theme="dark"] .admin-removal-audit{
  background:rgba(199,67,85,.045);
  border-color:rgba(199,67,85,.2);
}

/* ==========================================================
   V82 — Seguridad y Moderación
   ========================================================== */
.safety-report-open{overflow:hidden}
.safety-report-overlay,.moderation-case-overlay{position:fixed;inset:0;z-index:9300;display:flex;align-items:flex-end;justify-content:center}
.safety-report-backdrop,.moderation-case-backdrop{position:absolute;inset:0;border:0;background:rgba(7,19,17,.62);backdrop-filter:blur(3px)}
.safety-report-sheet,.moderation-case-sheet{position:relative;z-index:1;width:min(100%,var(--max));max-height:91dvh;border:1px solid var(--border);border-bottom:0;border-radius:22px 22px 0 0;background:var(--surface);color:var(--text);overflow:hidden;box-shadow:0 -20px 58px rgba(7,19,17,.3)}
.safety-report-sheet>header,.moderation-case-sheet>header{min-height:51px;padding:0 12px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:10px}
.safety-report-sheet>header>div,.moderation-case-sheet>header>div{min-width:0;display:grid;gap:2px}.safety-report-sheet>header strong,.moderation-case-sheet>header strong{font-size:.72rem}.safety-report-sheet>header small,.moderation-case-sheet>header small{color:var(--muted);font-size:.5rem}
.safety-report-sheet>header>button,.moderation-case-sheet>header>button{width:31px;height:31px;padding:0;border:0;border-radius:50%;background:var(--primary-soft);color:var(--text);display:grid;place-items:center;font-size:1rem}
.safety-report-body,.moderation-case-body{max-height:calc(91dvh - 51px);padding:13px 13px max(18px,env(safe-area-inset-bottom));overflow-y:auto}
.safety-evidence-note{padding:10px;border:1px solid rgba(214,79,115,.18);border-radius:14px;background:rgba(214,79,115,.045)}.safety-evidence-note strong{font-size:.61rem}.safety-evidence-note p{margin:3px 0 0;color:var(--muted);font-size:.52rem;line-height:1.4}
.safety-report-body label,.moderation-resolution-note{margin-top:12px;display:grid;gap:6px}.safety-report-body label>span,.moderation-resolution-note>span{font-size:.58rem;font-weight:850}
.safety-report-body select,.safety-report-body textarea,.moderation-resolution-note textarea{width:100%;padding:10px;border:1px solid var(--border);border-radius:12px;outline:0;background:var(--surface);color:var(--text);font:inherit;font-size:.59rem}
.safety-report-submit{width:100%;min-height:40px;margin-top:14px;border:0;border-radius:12px;background:#D64F73;color:#fff;font-size:.61rem;font-weight:900}.safety-report-error{margin:10px 0 0;color:#c74355;font-size:.54rem}.post-comment-report{width:25px;height:25px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-weight:900}
.moderation-admin-card{margin-top:7px;padding:12px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}.moderation-admin-head{margin-bottom:12px}.moderation-admin-head strong{display:block;font-size:.76rem}.moderation-admin-head p{margin:2px 0 0;color:var(--muted);font-size:.53rem}.moderation-group{margin-top:10px}.moderation-group>header{min-height:31px;display:flex;align-items:center;justify-content:space-between}.moderation-group>header strong{font-size:.62rem}.moderation-group>header span{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:rgba(214,79,115,.1);color:#D64F73;display:grid;place-items:center;font-size:.5rem;font-weight:900}.moderation-case-list{display:grid;gap:6px}.moderation-case-row{min-height:58px;padding:7px 9px;border:1px solid var(--border);border-radius:13px;background:transparent;color:var(--text);display:grid;grid-template-columns:34px 1fr 16px;align-items:center;gap:8px;text-align:left}.moderation-case-icon{width:32px;height:32px;border-radius:10px;background:var(--primary-soft);display:grid;place-items:center}.moderation-case-row>span:nth-child(2){min-width:0;display:grid;gap:2px}.moderation-case-row strong{overflow:hidden;font-size:.57rem;text-overflow:ellipsis;white-space:nowrap}.moderation-case-row small,.moderation-empty{color:var(--muted);font-size:.49rem}
.moderation-evidence,.moderation-complaints{padding:10px;border:1px solid var(--border);border-radius:14px}.moderation-evidence>strong,.moderation-complaints>strong{display:block;margin-bottom:7px;font-size:.62rem}.moderation-evidence p,.moderation-complaints article p{margin:4px 0;font-size:.54rem;line-height:1.4}.moderation-evidence-images{margin-top:8px;display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.moderation-evidence-images img{width:100%;aspect-ratio:1/1;border-radius:8px;object-fit:cover}.moderation-complaints{margin-top:9px}.moderation-complaints article{padding:7px 0;border-top:1px solid var(--border)}.moderation-complaints article:first-of-type{border-top:0}.moderation-complaints article b{font-size:.54rem}.moderation-complaints article small{color:var(--muted);font-size:.46rem}.moderation-decisions{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.moderation-decisions button{min-height:36px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-size:.52rem;font-weight:820}.moderation-decisions button.warning{border-color:rgba(214,79,115,.28);color:#c74366}.moderation-decisions button.danger{border-color:rgba(199,67,85,.35);color:#c74355}.moderation-decisions button.danger.solid{background:#c74355;color:#fff}.moderation-loading{min-height:100px;display:grid;place-items:center}.moderation-loading span{width:24px;height:24px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:moderationSpin .8s linear infinite}@keyframes moderationSpin{to{transform:rotate(360deg)}}
.profile-admin-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.profile-admin-tabs button{padding:0 3px;font-size:.51rem}
.safety-hide-after{margin-top:10px!important;padding:9px 10px;border:1px solid var(--border);border-radius:11px;display:flex!important;align-items:center;gap:8px}.safety-hide-after input{width:16px;height:16px;accent-color:#D64F73}.safety-hide-after span{font-size:.54rem!important;font-weight:700!important}
.profile-admin-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.profile-admin-tabs button{padding:0 3px;font-size:.51rem}
.post-evidence-lock{margin:8px 10px 0;padding:9px 10px;border:1px solid rgba(214,79,115,.18);border-radius:12px;background:rgba(214,79,115,.045)}.post-evidence-lock strong{display:block;font-size:.58rem}.post-evidence-lock p{margin:3px 0 0;color:var(--muted);font-size:.5rem;line-height:1.4}
.moderation-message-context{margin-top:10px;padding-top:9px;border-top:1px solid var(--border)}.moderation-message-context>strong{display:block;margin-bottom:5px;font-size:.56rem}.moderation-message-context>div{margin-top:5px;padding:7px 8px;border-radius:9px;background:var(--primary-soft)}.moderation-message-context>div.reported{background:rgba(214,79,115,.07)}.moderation-message-context span{font-size:.46rem;font-weight:850}.moderation-message-context p{margin:2px 0!important;font-size:.52rem!important}.moderation-message-context small{color:var(--muted);font-size:.43rem}


/* ==========================================================
   V89 — Seguidores / Siguiendo
   ========================================================== */

.stats .profile-stat-static,
.stats .profile-stat-button{
  min-width:0;
  text-align:center;
  display:grid;
  align-content:center;
}

.stats .profile-stat-button{
  padding:0;
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  cursor:pointer;
  border-radius:10px;
}

.stats .profile-stat-button:active{
  background:var(--primary-soft);
}

.stats .profile-stat-button strong{
  font-size:.9rem;
}

.stats .profile-stat-button small{
  font-size:.6rem;
  color:var(--muted);
}

.message-public-stats .message-public-stat-static,
.message-public-stats .message-public-stat-button{
  min-width:0;
  display:grid;
  text-align:center;
  align-content:center;
}

.message-public-stats .message-public-stat-button{
  padding:0;
  border:0;
  border-radius:9px;
  background:transparent;
  color:inherit;
  font:inherit;
}

.message-public-stats .message-public-stat-button:active{
  background:var(--primary-soft);
}

.message-public-stats .message-public-stat-button strong{
  font-size:inherit;
}

.follow-list-open{
  overflow:hidden;
}

.follow-list-overlay{
  position:fixed;
  inset:0;
  z-index:9250;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  pointer-events:none;
  opacity:0;
  transition:opacity .16s ease;
}

.follow-list-overlay.is-visible{
  pointer-events:auto;
  opacity:1;
}

.follow-list-backdrop{
  position:absolute;
  inset:0;
  padding:0;
  border:0;
  background:rgba(7,19,17,.56);
  backdrop-filter:blur(2px);
}

.follow-list-sheet{
  position:relative;
  z-index:1;
  width:min(100%,var(--max));
  height:min(78dvh,620px);
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:21px 21px 0 0;
  background:var(--surface);
  color:var(--text);
  overflow:hidden;
  box-shadow:0 -18px 50px rgba(7,19,17,.25);
  transform:translateY(16px);
  transition:transform .18s ease;
}

.follow-list-overlay.is-visible .follow-list-sheet{
  transform:translateY(0);
}

.follow-list-header{
  height:54px;
  padding:0 12px;
  border-bottom:1px solid var(--border);
  display:grid;
  grid-template-columns:34px 1fr 34px;
  align-items:center;
}

.follow-list-header>div{
  min-width:0;
  display:grid;
  justify-items:center;
  gap:1px;
}

.follow-list-header strong{
  font-size:.69rem;
}

.follow-list-header small{
  max-width:100%;
  overflow:hidden;
  color:var(--muted);
  font-size:.48rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.follow-list-back{
  width:32px;
  height:32px;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--text);
  display:grid;
  place-items:center;
  font-size:1.05rem;
}

.follow-list-content{
  height:calc(100% - 54px);
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:8px 10px max(14px,env(safe-area-inset-bottom));
}

.follow-list-rows{
  display:grid;
  gap:3px;
}

.follow-list-row{
  min-height:58px;
  padding:6px 3px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  border-bottom:1px solid color-mix(in srgb,var(--border) 70%,transparent);
}

.follow-list-row:last-child{
  border-bottom:0;
}

.follow-list-user{
  min-width:0;
  padding:2px;
  border:0;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:9px;
  text-align:left;
}

.follow-list-avatar{
  width:42px;
  height:42px;
  flex:0 0 42px;
  border-radius:50%;
  overflow:hidden;
  background:var(--primary-soft);
  color:var(--primary);
  display:grid;
  place-items:center;
  font-size:.62rem;
  font-weight:900;
}

.follow-list-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.follow-list-copy{
  min-width:0;
  display:grid;
  gap:2px;
}

.follow-list-copy strong{
  overflow:hidden;
  color:var(--text);
  font-size:.59rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.follow-list-copy small{
  overflow:hidden;
  color:var(--muted);
  font-size:.49rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.follow-list-action{
  min-width:75px;
  height:31px;
  padding:0 10px;
  border:0;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-size:.5rem;
  font-weight:850;
}

.follow-list-action.is-following{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
}

.follow-list-action:disabled{
  opacity:.58;
}

.follow-list-empty{
  min-height:210px;
  padding:24px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:5px;
  text-align:center;
}

.follow-list-empty>span{
  font-size:1.35rem;
}

.follow-list-empty strong{
  font-size:.67rem;
}

.follow-list-empty p{
  max-width:260px;
  margin:0;
  color:var(--muted);
  font-size:.52rem;
  line-height:1.42;
}

.follow-list-loading{
  min-height:180px;
  display:grid;
  place-items:center;
}

.follow-list-loading span{
  width:25px;
  height:25px;
  border:2px solid var(--border);
  border-top-color:var(--primary);
  border-radius:50%;
  animation:followListSpin .72s linear infinite;
}

@keyframes followListSpin{
  to{transform:rotate(360deg)}
}

html[data-theme="dark"] .follow-list-sheet{
  background:#101917;
  border-color:#2a3c39;
}

html[data-theme="dark"] .follow-list-action.is-following{
  background:#101917;
  border-color:#2a3c39;
}


/* ==========================================================
   V90 — la lista permanece debajo del perfil público
   ========================================================== */

/*
  La lista no se cierra al tocar el fondo. El backdrop queda únicamente
  como superficie visual y no intercepta el cierre accidental.
*/
.follow-list-backdrop{
  pointer-events:none;
}

/*
  Cuando un perfil público se abre desde Seguidores/Siguiendo,
  debe quedar visualmente por encima de la lista.
*/
.message-public-profile-overlay{
  z-index:9350;
}

.follow-list-overlay{
  z-index:9250;
}


/* ==========================================================
   V91 — pila de capas Seguidores/Siguiendo
   ========================================================== */

/* Lista base debajo de un perfil público */
.follow-list-overlay{
  z-index:9250;
}

/* Perfil público sobre la lista base */
.message-public-profile-overlay{
  z-index:9350;
}

/* Seguidores/Siguiendo abiertos DESDE ese perfil */
.follow-list-overlay.is-over-public-profile{
  z-index:9450;
}


/* ==========================================================
   V92 — Comentarios completos / respuestas
   ========================================================== */

.post-comment-thread{
  display:grid;
  gap:4px;
}

.post-comment-replies{
  margin-left:31px;
  padding-left:8px;
  border-left:1px solid var(--border);
  display:grid;
  gap:4px;
}

.post-comment-item.is-reply{
  margin-top:1px;
}

.post-comment-author-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.post-comment-author-row>span{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:5px;
  flex-wrap:wrap;
}

.post-comment-menu-tools{
  position:relative;
  flex:0 0 auto;
}

.post-comment-menu-trigger{
  width:26px;
  height:24px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  display:grid;
  place-items:center;
  font-size:.74rem;
  font-weight:900;
}

.post-comment-menu-trigger:active{
  background:var(--primary-soft);
}

.post-comment-menu{
  position:absolute;
  z-index:30;
  top:26px;
  right:0;
  min-width:155px;
  padding:5px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  box-shadow:0 12px 28px rgba(0,0,0,.16);
  display:grid;
  gap:2px;
}

.post-comment-menu button{
  width:100%;
  padding:8px 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  text-align:left;
  font-size:.5rem;
  font-weight:750;
}

.post-comment-menu button:active:not(:disabled){
  background:var(--primary-soft);
}

.post-comment-menu button.danger{
  color:#b83e55;
}

.post-comment-menu button:disabled{
  opacity:.45;
}

.post-comment-menu small{
  padding:5px 8px 3px;
  color:var(--muted);
  font-size:.43rem;
  line-height:1.35;
}

.post-comment-replying-to{
  display:block;
  margin:0 0 3px;
  color:var(--primary);
  font-size:.45rem;
  font-weight:760;
}

.post-comment-reply-action{
  padding:0;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:.46rem;
  font-weight:800;
}

.post-comment-reply-action:disabled{
  opacity:.42;
}

.post-comment-edited{
  color:var(--muted);
  font-size:.43rem;
}

.post-comment-review-lock{
  color:#9d6a1d;
  font-size:.42rem;
  font-weight:750;
}

.post-comment-item.is-locked .post-comment-bubble{
  outline:1px solid color-mix(in srgb,#c58b32 42%,transparent);
}

.post-comment-placeholder{
  margin:2px 0 !important;
  color:var(--muted) !important;
  font-style:italic;
  font-size:.49rem !important;
}

.post-comment-orphan{
  margin:4px 0 1px 38px;
  padding:7px 9px;
  border-radius:10px;
  background:var(--surface-2);
}

.post-comment-reply-banner{
  margin:0 0 7px 51px;
  padding:6px 8px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--primary-soft);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:var(--text);
  font-size:.48rem;
}

.post-comment-reply-banner strong{
  color:var(--primary);
}

.post-comment-reply-banner button{
  width:24px;
  height:24px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  font-size:.8rem;
}

.post-comment-inline-editor{
  display:grid;
  gap:6px;
  margin-top:5px;
}

.post-comment-inline-editor textarea{
  width:100%;
  min-height:64px;
  resize:vertical;
  padding:8px 9px;
  border:1px solid var(--border);
  border-radius:9px;
  outline:none;
  background:var(--surface);
  color:var(--text);
  font:inherit;
  font-size:.51rem;
  line-height:1.4;
}

.post-comment-inline-editor textarea:focus{
  border-color:var(--primary);
}

.post-comment-inline-editor>div,
.post-comment-delete-confirm>div{
  display:flex;
  justify-content:flex-end;
  gap:6px;
}

.post-comment-inline-editor button,
.post-comment-delete-confirm button{
  min-height:29px;
  padding:0 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  color:var(--text);
  font-size:.46rem;
  font-weight:800;
}

.post-comment-inline-editor button.primary{
  border-color:var(--primary);
  background:var(--primary);
  color:#fff;
}

.post-comment-delete-confirm{
  margin-top:6px;
  padding:9px;
  border:1px solid color-mix(in srgb,#bd4b5e 40%,var(--border));
  border-radius:10px;
  background:color-mix(in srgb,#bd4b5e 7%,var(--surface));
  display:grid;
  gap:4px;
}

.post-comment-delete-confirm strong{
  font-size:.51rem;
}

.post-comment-delete-confirm p{
  margin:0;
  color:var(--muted);
  font-size:.45rem;
  line-height:1.4;
}

.post-comment-delete-confirm button.danger{
  border-color:#b83e55;
  background:#b83e55;
  color:#fff;
}

.post-comment-item.is-notification-focus{
  animation:commentNotificationFocus 2.2s ease;
}

@keyframes commentNotificationFocus{
  0%,20%{
    background:color-mix(in srgb,var(--primary) 18%,transparent);
    box-shadow:0 0 0 5px color-mix(in srgb,var(--primary) 12%,transparent);
  }
  100%{
    background:transparent;
    box-shadow:none;
  }
}

html[data-theme="dark"] .post-comment-menu,
html[data-theme="dark"] .post-comment-inline-editor textarea,
html[data-theme="dark"] .post-comment-inline-editor button{
  background:#101917;
  border-color:#2a3c39;
}

@media (max-width:420px){
  .post-comment-replies{
    margin-left:22px;
    padding-left:6px;
  }

  .post-comment-reply-banner{
    margin-left:43px;
  }
}


/* ==========================================================
   V94 — comportamiento de comentarios tipo red social
   ========================================================== */

.post-viewer-sheet{
  display:flex;
  flex-direction:column;
}

.post-viewer-header{
  flex:0 0 auto;
}

.post-viewer-content{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow-y:auto;
}

.post-comments-section{
  padding-bottom:14px;
}

.post-comment-dock-host{
  position:relative;
  z-index:45;
  flex:0 0 auto;
  border-top:1px solid var(--border);
  background:var(--surface);
}

.post-comment-dock-host[hidden]{
  display:none;
}

.post-comment-dock{
  padding:7px 9px max(8px,env(safe-area-inset-bottom));
  background:var(--surface);
}

.post-comment-dock .post-comment-composer{
  margin:0;
  display:flex;
  align-items:center;
  gap:8px;
}

.post-comment-dock .post-comment-avatar{
  width:31px;
  height:31px;
  flex:0 0 31px;
}

.post-comment-dock .post-comment-compose-box{
  background:var(--surface-2,#f7faf9);
}

.post-comment-dock .post-comment-reply-banner{
  margin:0 39px 6px;
  padding:4px 8px;
  border:0;
  border-radius:7px;
  background:var(--primary-soft);
}

.post-comment-dock-lock{
  display:block;
  margin:5px 39px 0;
  color:var(--muted);
  font-size:.42rem;
  line-height:1.35;
}

.post-comment-replies.is-rootless{
  margin-left:0;
  padding-left:0;
  border-left:0;
}

.post-comment-thread.is-root-removed{
  margin-top:2px;
}

/*
  El documento eliminado permanece internamente, pero nunca debe ocupar
  un bloque visual en el hilo.
*/
.post-comment-item[data-comment-deleted="true"]{
  display:none !important;
}

html[data-theme="dark"] .post-comment-dock-host,
html[data-theme="dark"] .post-comment-dock{
  background:#101917;
  border-color:#2a3c39;
}

@media (max-width:420px){
  .post-comment-dock .post-comment-reply-banner{
    margin-left:39px;
    margin-right:0;
  }

  .post-comment-dock-lock{
    margin-left:39px;
    margin-right:0;
  }
}


/* ==========================================================
   V95 — hilos tipo TikTok: una sola sangría visual
   ========================================================== */

.post-comment-replies{
  margin-left:31px;
  padding-left:0;
  border-left:0;
  display:grid;
  gap:4px;
}

/*
  Cada respuesta, sin importar cuántas respuestas lógicas tenga encima,
  ocupa exactamente el mismo nivel visual.
*/
.post-comment-replies .post-comment-item.is-reply{
  margin-left:0;
}

.post-comment-reply-target{
  display:inline-flex;
  align-items:center;
  gap:3px;
  color:var(--primary);
  font-size:.45rem;
  font-weight:780;
  white-space:nowrap;
}

.post-comment-reply-target span{
  color:var(--muted);
  font-size:.48rem;
  line-height:1;
}

/* La etiqueta antigua de V92 ya no se utiliza. */
.post-comment-replying-to{
  display:none !important;
}

@media (max-width:420px){
  .post-comment-replies{
    margin-left:22px;
    padding-left:0;
  }
}


/* ==========================================================
   V96 — comentarios como entrada social al perfil
   ========================================================== */

.post-comment-author-avatar-button{
  width:auto;
  height:auto;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  align-self:flex-start;
  cursor:pointer;
}

.post-comment-author-avatar-button:active{
  transform:scale(.96);
}

.post-comment-author-link{
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  display:inline-flex;
  align-items:baseline;
  gap:5px;
  text-align:left;
  cursor:pointer;
}

.post-comment-author-link strong{
  color:var(--text);
}

.post-comment-author-link small{
  color:var(--muted);
}

.post-comment-author-link:active strong,
.post-comment-author-link:active small{
  opacity:.72;
}

/*
  El cuerpo del comentario puede tocarse para abrir sus acciones.
  Los botones internos siguen teniendo sus propias acciones.
*/
.post-comment-bubble[data-open-comment-options]{
  cursor:pointer;
}

.post-comment-bubble[data-open-comment-options]:active{
  background:
    color-mix(
      in srgb,
      var(--primary) 5%,
      var(--surface-2,#f7faf9)
    );
}


/* ==========================================================
   V97 — niveles visuales de navegación social
   ========================================================== */

/*
  Base:
  lista de seguidores < perfil público < publicación abierta desde perfil
*/
.follow-list-overlay{
  z-index:9250;
}

.message-public-profile-overlay{
  z-index:9350;
}

/*
  Una lista abierta DESDE un perfil público sigue por encima de ese perfil.
*/
.follow-list-overlay.is-over-public-profile{
  z-index:9450;
}

/*
  Una publicación abierta desde un perfil público/lista debe quedar por
  encima de ambas capas.
*/
.post-viewer-overlay.is-over-public-profile{
  z-index:9550;
}

/*
  Si desde esa publicación se toca un avatar/nombre de comentario,
  el nuevo perfil vuelve a subir una capa sobre la publicación.
*/
.message-public-profile-overlay.is-over-post-viewer{
  z-index:9650;
}


/* ==========================================================
   V98.4 — contadores del perfil público perfectamente iguales
   ========================================================== */

.message-public-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
}

.message-public-stats .message-public-stat-static,
.message-public-stats .message-public-stat-button{
  width:100%;
  min-width:0;
  min-height:42px;
  margin:0;
  padding:0;
  box-sizing:border-box;
  display:grid;
  grid-template-rows:auto auto;
  place-items:center;
  align-content:center;
  gap:2px;
  font-family:inherit;
  font-style:normal;
  line-height:1;
}

.message-public-stats .message-public-stat-static strong,
.message-public-stats .message-public-stat-button strong{
  margin:0;
  padding:0;
  font-family:inherit;
  font-size:.9rem;
  font-weight:700;
  line-height:1.05;
}

.message-public-stats .message-public-stat-static small,
.message-public-stats .message-public-stat-button small{
  margin:0;
  padding:0;
  color:var(--muted);
  font-family:inherit;
  font-size:.6rem;
  font-weight:400;
  line-height:1.1;
}
