/* =====================================================================
   platohubdesign — estilos de los componentes funcionales del subproyecto
   (toast, banner sandbox, panel de comentarios, modal de valoración).
   Usa las custom properties de css/home-preview.css / ph-skin.
   ===================================================================== */

:root {
  --ph-z-toast: 4000;
  --ph-z-panel: 3500;
  --ph-z-modal: 3800;
}

/* ---- PEGAMENTO de layout: el <main> ocupa la columna "feed" del grid .shell.
   Anula el margen/anchura heredados del diseño Stitch (lg:ml-64, w-full, flex-1)
   que dejaban un margen izquierdo indebido en el contenido central. ---- */
html.light .shell > main,
html.light main.feed {
  grid-area: feed;
  min-width: 0;
  margin-left: 0 !important;
  width: auto !important;
  flex: initial;
}

/* ---- .shell-2col: grid AUTÓNOMO de 2 columnas (nav + contenido), idéntico al
   .pf-shell del perfil. NO depende del grid base de 3 columnas de .shell, y lleva
   width:100% para llenar el ancho aunque esté dentro de un wrapper flex. Esto evita
   el "shrink-to-fit" de un flex item y el conflicto de áreas (feed/rail) heredadas. */
html.light .shell.shell-2col {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  grid-template-areas: "nav main";
  align-items: start;
  max-width: var(--maxw, 1600px);
  width: 100%;
  margin-inline: auto;
}
html.light .shell.shell-2col > .rail-left { grid-area: nav; }
html.light .shell.shell-2col > main {
  grid-area: main;
  min-width: 0;
  margin-left: 0 !important;
  width: auto !important;
  flex: initial;
}
@media (max-width: 1023px) {
  html.light .shell.shell-2col {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }
  html.light .shell.shell-2col > .rail-left { display: none; }
}

/* ---- micro-animaciones (espejo de home-preview) ---- */
@keyframes ph-pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes ph-tick { 0% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(-3px); opacity: 1; } 100% { transform: translateY(0); } }
.is-popping { animation: ph-pop .34s ease; }
.is-ticking { animation: ph-tick .34s ease; }

/* ---- Toast ---- */
.ph-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: #16150f; color: #fff; padding: 11px 18px; border-radius: 999px;
  font: 600 13px/1 "Work Sans", sans-serif; letter-spacing: .01em;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.45); z-index: var(--ph-z-toast);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; max-width: 90vw;
}
.ph-toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---- Banner modo demo ---- */
.ph-sandbox-banner {
  position: fixed; left: 18px; bottom: 18px; z-index: var(--ph-z-toast);
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft, #fbede6); color: var(--accent-press, #9a3412);
  border: 1px solid var(--accent, #c2410c); border-radius: 12px;
  padding: 9px 12px; font: 600 12px/1.2 "Work Sans", sans-serif;
  box-shadow: 0 8px 24px -10px rgba(22,21,15,.3);
  transform: translateY(140%); transition: transform .4s cubic-bezier(.2,.8,.2,1); max-width: min(360px, 90vw);
}
.ph-sandbox-banner.show { transform: translateY(0); }
.ph-sandbox-banner [data-lucide] { width: 16px; height: 16px; flex: 0 0 auto; }
.ph-sandbox-banner button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .7; }
.ph-sandbox-banner button:hover { opacity: 1; }
@media (max-width: 600px) { .ph-sandbox-banner { left: 12px; right: 12px; bottom: 76px; } }

/* ---- Estado activo botones simulados ----
   Las piezas de la app (.y-*, yumi-app.css) pintan su propio estado —blanco
   sobre coral en el voto, relleno sobre cristal en guardar— y se quedan fuera. */
[data-ph-action="like"].is-liked:not(.y-voto):not(.y-capsula):not(.y-aporte-meta),
[data-ph-action="save"].is-saved:not(.y-voto):not(.y-capsula):not(.y-aporte-meta),
[data-ph-action="vote"].is-active:not(.y-voto):not(.y-capsula):not(.y-aporte-meta) { color: var(--accent, #c2410c) !important; }
[data-ph-action] { transition: color .15s ease, transform .15s ease; }

/* ---- Búsqueda en vivo del feed: estado mientras llega el resultado ---- */
#feed-list { transition: opacity .15s ease; }
#feed-list.is-searching { opacity: .5; pointer-events: none; }

/* El plugin Tailwind "forms" pinta un anillo de foco AZUL en input/select/textarea al
   hacer clic (+ el outline global de :where). Lo quitamos: el indicador de foco lo da el
   contenedor (pill .filter-control / inputs con su propio anillo clay via box-shadow). */
html.light input:focus, html.light input:focus-visible,
html.light textarea:focus, html.light textarea:focus-visible,
html.light select:focus, html.light select:focus-visible {
  outline: none; --tw-ring-color: transparent; --tw-ring-shadow: 0 0 #0000;
}

/* ============================================================
   Dropdown custom (.ph-select) — reemplaza el <select> nativo.
   Progressive enhancement: el <select> queda oculto pero en el
   form (fallback sin-JS); el JS construye este UI sincronizado.
   ============================================================ */
.ph-select { position: relative; display: block; width: 100%; }
.ph-select-native { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ph-select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 40px; width: 100%; padding: 0 14px; box-sizing: border-box;
  border: 1px solid var(--line, #e4e0d6); border-radius: 999px;
  background: var(--surface, #fff); color: var(--ink, #16150f); cursor: pointer;
  font: 600 14px "Work Sans", sans-serif; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ph-select-trigger:hover { border-color: var(--accent, #b05f44); }
.ph-select-trigger:focus-visible,
.ph-select.open .ph-select-trigger { outline: none; border-color: var(--accent, #b05f44); box-shadow: 0 0 0 3px var(--accent-soft, #f4e7df); }
.ph-select-value { white-space: nowrap; }
.ph-select-chevron { width: 16px; height: 16px; color: var(--ink-soft, #6f6b60); flex: 0 0 auto; transition: transform .2s ease; }
.ph-select.open .ph-select-chevron { transform: rotate(180deg); }
.ph-select-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: max(190px, 100%);
  background: var(--surface, #fff); border: 1px solid var(--line, #e4e0d6); border-radius: 14px;
  box-shadow: 0 20px 44px -18px rgba(22,21,15,.34); padding: 6px; z-index: 60;
  max-height: 320px; overflow-y: auto; animation: ph-sel-in .16s ease;
  /* Nunca más ancho que la ventana: en móvil el panel de un filtro estrecho
     se salía por la derecha. */
  max-width: calc(100vw - 24px);
}
.ph-select-panel[hidden] { display: none; }
@keyframes ph-sel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ph-select-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  font: 500 14px "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60);
  transition: background .12s ease, color .12s ease;
}
.ph-select-option:hover, .ph-select-option.is-active { background: var(--bg, #f6f4ef); color: var(--ink, #16150f); }
.ph-select-option.is-selected { color: var(--accent-press, #974c33); font-weight: 700; background: var(--accent-soft, #f4e7df); }
.ph-select-check { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0; }
.ph-select-option.is-selected .ph-select-check { opacity: 1; }

/* ---- Barra de filtros del feed: que la ciudad combine con el dropdown (pills) ---- */
.filters .filter-control {
  border: 1px solid var(--line, #e4e0d6); border-radius: 999px; background: var(--surface, #fff);
  height: 40px; padding: 0 14px; box-sizing: border-box; transition: border-color .15s ease, box-shadow .15s ease;
}
/* Mismo tamaño para los dos filtros (categoría + ciudad): columnas de igual ancho
   y controles que rellenan → par visual limpio, ninguno más grande que el otro. */
.filters .filter { width: 180px; }
.filters label.filter-control { width: 100%; }
.filters label.filter-control:focus-within { border-color: var(--accent, #b05f44); box-shadow: 0 0 0 3px var(--accent-soft, #f4e7df); }
.filters .filter-control [data-lucide] { color: var(--ink-soft, #6f6b60); }

/* En móvil la barra de filtros deja de ser tira con scroll (que recortaba el panel
   del dropdown) y pasa a envolver; el valor del trigger se trunca con elipsis. */
@media (max-width: 768px) {
  /* Categoría + Ciudad + Aplicar en UNA sola fila. Antes cada .filter medía
     180px fijos y, con el botón, no cabían en 390px → saltaban de línea. Ahora
     los dos filtros se REPARTEN el ancho disponible (flex:1 1 0 + min-width:0)
     y el botón ocupa solo lo suyo. */
  .filters {
    overflow: visible; flex-wrap: nowrap; scroll-snap-type: none;
    align-items: flex-end; gap: 8px;
  }
  .filters .filter { width: auto; flex: 1 1 0; min-width: 0; }
  /* Etiquetas algo más compactas para que "CIUDAD O ZONA" quepa sin partirse */
  .filters .filter .eyebrow { font-size: 10px; letter-spacing: .05em; white-space: nowrap; }
  .filters .filter-control,
  .filters .ph-select-trigger { padding-inline: 10px; gap: 6px; }
  .filters .filter-btn { flex: 0 0 auto; white-space: nowrap; align-self: flex-end; padding-bottom: 10px; }
  /* El valor del desplegable y el placeholder de ciudad se truncan, no empujan */
  .ph-select-value { max-width: none; overflow: hidden; text-overflow: ellipsis; }
  .filters #filter-city { text-overflow: ellipsis; }
}

/* ---- Panel de comentarios ---- */
.ph-cpanel-scrim {
  position: fixed; inset: 0; background: rgba(22,21,15,.38); z-index: var(--ph-z-panel);
  opacity: 0; transition: opacity .3s ease;
}
.ph-cpanel-scrim.open { opacity: 1; }
.ph-cpanel {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: var(--surface, #fff); border-left: 1px solid var(--line, #e4e0d6);
  z-index: calc(var(--ph-z-panel) + 1); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
  box-shadow: -18px 0 50px -24px rgba(22,21,15,.4);
}
.ph-cpanel.open { transform: translateX(0); }
.ph-cpanel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line, #e4e0d6);
  font: 700 16px "Outfit", sans-serif; color: var(--ink, #16150f);
}
.ph-cpanel-close { background: none; border: 0; cursor: pointer; color: var(--ink-soft, #6f6b60); display: flex; }
.ph-cpanel-close [data-lucide] { width: 20px; height: 20px; }
.ph-cpanel-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.ph-cpanel-empty { color: var(--ink-soft, #6f6b60); font-size: 14px; text-align: center; padding: 32px 0; }
.ph-c { display: flex; gap: 12px; }
.ph-c-mine { opacity: .96; }
.ph-c-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.ph-c-avatar-f { display: flex; align-items: center; justify-content: center; background: var(--accent-soft, #fbede6); color: var(--accent-press, #9a3412); font-weight: 700; }
.ph-c-main { flex: 1; min-width: 0; }
.ph-c-head { display: flex; align-items: baseline; gap: 8px; }
.ph-c-head strong { font: 700 13px "Outfit", sans-serif; color: var(--ink, #16150f); }
.ph-c-time { font-size: 11px; color: var(--ink-mute, #9a968b); }
.ph-c-text { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink, #16150f); word-wrap: break-word; }
.ph-cpanel-form { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line, #e4e0d6); }
.ph-cpanel-form input {
  flex: 1; border: 1px solid var(--line, #e4e0d6); border-radius: 999px;
  padding: 11px 16px; font: 400 14px "Work Sans", sans-serif; color: var(--ink, #16150f); background: var(--bg, #f6f4ef);
}
.ph-cpanel-form input:focus { outline: none; border-color: var(--accent, #c2410c); }
.ph-cpanel-send { background: var(--accent, #c2410c); color: #fff; border: 0; border-radius: 50%; width: 42px; height: 42px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ph-cpanel-send [data-lucide] { width: 18px; height: 18px; }

/* ---- Modal de valoración ---- */
.ph-modal-overlay {
  position: fixed; inset: 0; background: rgba(22,21,15,.45); z-index: var(--ph-z-modal);
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: ph-fade .2s ease;
}
@keyframes ph-fade { from { opacity: 0; } to { opacity: 1; } }
.ph-modal {
  background: var(--surface, #fff); border-radius: 18px; width: min(440px, 100%);
  max-height: 90dvh; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 70px -20px rgba(22,21,15,.5);
}
.ph-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line, #e4e0d6); }
.ph-modal-head strong { font: 700 17px "Outfit", sans-serif; color: var(--ink, #16150f); }
.ph-modal-x { background: none; border: 0; cursor: pointer; color: var(--ink-soft, #6f6b60); display: flex; }
.ph-modal-x [data-lucide] { width: 20px; height: 20px; }
.ph-modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.ph-metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-metric > span { font: 600 14px "Work Sans", sans-serif; color: var(--ink, #16150f); }
.ph-stars { display: flex; gap: 4px; }
.ph-star { background: none; border: 0; cursor: pointer; color: var(--line-strong, #d6d1c4); display: flex; padding: 2px; }
.ph-star [data-lucide] { width: 22px; height: 22px; }
.ph-star.on { color: var(--gold, #f4b740); }
.ph-modal-label { font: 700 11px "Work Sans", sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft, #6f6b60); }
.ph-modal-textarea { width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line, #e4e0d6); border-radius: 12px; padding: 12px 14px; font: 400 14px "Work Sans", sans-serif; color: var(--ink, #16150f); }
.ph-modal-textarea:focus { outline: none; border-color: var(--accent, #c2410c); }
.ph-modal-upload { border: 1px dashed var(--line-strong, #d6d1c4); border-radius: 12px; padding: 16px; text-align: center; color: var(--ink-soft, #6f6b60); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.ph-modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line, #e4e0d6); }
.ph-modal-cancel { background: none; border: 1px solid var(--line, #e4e0d6); border-radius: 999px; padding: 10px 18px; cursor: pointer; font: 600 13px "Work Sans", sans-serif; color: var(--ink, #16150f); }
.ph-modal-submit { background: var(--accent, #c2410c); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; font: 700 13px "Work Sans", sans-serif; }
.ph-modal-submit:hover { background: var(--accent-press, #9a3412); }
.ph-modal-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Reportar un aporte: la lista de motivos del modal (la bandera va en platohub-dish.css) ---- */
.ph-report-intro { margin: 0; font: 400 14px "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60); line-height: 1.5; }
.ph-report-opts { display: flex; flex-direction: column; gap: 6px; }
.ph-report-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e4e0d6); border-radius: 12px; cursor: pointer; font: 500 14px "Work Sans", sans-serif; color: var(--ink, #16150f); transition: border-color .15s, background .15s; }
.ph-report-opt:hover { border-color: var(--line-strong, #d6d1c4); }
.ph-report-opt:has(input:checked) { border-color: var(--accent, #C45031); background: var(--accent-soft, #F8E6DC); }
.ph-report-opt input { accent-color: var(--accent, #C45031); margin: 0; }

body.no-scroll { overflow: hidden; }

/* ---- Hilo de comentarios (acciones, respuestas, cargar más) ---- */
.ph-cpanel-replyto { padding: 8px 16px; font-size: 13px; color: var(--ink-soft, #6f6b60); background: var(--bg, #f6f4ef); border-top: 1px solid var(--line, #e4e0d6); display: flex; align-items: center; gap: 8px; }
.ph-cpanel-replyto strong { color: var(--accent, #c2410c); }
.ph-cpanel-replyto button { margin-left: auto; background: none; border: 0; color: var(--ink-soft, #6f6b60); font-size: 12px; cursor: pointer; text-decoration: underline; }
.ph-c-actions { display: flex; gap: 14px; margin-top: 6px; }
.ph-c-act { background: none; border: 0; padding: 0; cursor: pointer; font: 600 12px "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60); }
.ph-c-act:hover { color: var(--accent, #c2410c); }
.ph-c-report { margin-left: auto; display: inline-flex; align-items: center; color: var(--ink-mute, #9a968b); }
.ph-c-report [data-lucide] { width: 14px; height: 14px; }
.ph-c-report:hover, .ph-c-report.is-reported { color: var(--danger, #b91c1c); }
.ph-c-report.is-reported { cursor: default; }
.ph-c-report.is-reported [data-lucide] { fill: currentColor; }
.ph-c-replies { display: none; margin-top: 10px; padding-left: 8px; border-left: 2px solid var(--line, #e4e0d6); display: flex; flex-direction: column; gap: 12px; }
.ph-c-replies:empty { display: none; }
.ph-c-reply .ph-c-avatar-sm, .ph-c-avatar-sm { width: 30px; height: 30px; }
.ph-c-loading { color: var(--ink-mute, #9a968b); font-size: 13px; margin: 0; }
.ph-c-more-wrap { display: flex; justify-content: center; padding: 6px 0; }
.ph-c-more-btn { background: none; border: 1px solid var(--line, #e4e0d6); border-radius: 999px; padding: 7px 16px; font: 600 13px "Work Sans", sans-serif; color: var(--ink, #16150f); cursor: pointer; }
.ph-c-more-btn:hover { border-color: var(--accent, #c2410c); color: var(--accent, #c2410c); }

/* ---- Lista seguidores/siguiendo (modal) ---- */
.ph-list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, #e4e0d6); }
.ph-list-row:last-child { border-bottom: 0; }
.ph-list-rowmain { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.ph-list-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.ph-list-meta { display: flex; flex-direction: column; min-width: 0; }
.ph-list-meta strong { font: 700 14px "Outfit", sans-serif; color: var(--ink, #16150f); }
.ph-list-meta span { font-size: 12px; color: var(--ink-soft, #6f6b60); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-list-self { font-size: 12px; color: var(--ink-mute, #9a968b); font-weight: 600; }

/* Buscador de la lista de seguidores. Va entre la cabecera y el cuerpo, que
   es el que tiene el overflow: así el campo se queda fijo mientras la lista
   rueda por debajo. */
.ph-list-buscar { padding: 12px 22px 0; flex: 0 0 auto; }
.ph-list-q {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line, #e4e0d6); border-radius: 10px;
  background: var(--surface-dim, #efece4);
  font: 400 14px "Work Sans", sans-serif; color: var(--ink, #16150f);
  -webkit-appearance: none; appearance: none;
}
.ph-list-q::placeholder { color: var(--ink-mute, #9a968b); }
.ph-list-q:focus {
  outline: none;
  border-color: var(--primary, #b05f44);
  background: var(--surface, #fff);
}
.ph-list-q::-webkit-search-cancel-button { cursor: pointer; }
.follow-btn { border: 1px solid var(--accent, #c2410c); background: var(--accent, #c2410c); color: #fff; border-radius: 999px; padding: 7px 16px; font: 700 12px "Work Sans", sans-serif; cursor: pointer; flex: 0 0 auto; }
.follow-btn.is-following { background: #fff; color: var(--ink, #16150f); border-color: var(--line, #e4e0d6); }

/* ---- Lightbox ---- */
.ph-lightbox { position: fixed; inset: 0; z-index: 4200; background: rgba(22,21,15,.86); display: flex; align-items: center; justify-content: center; padding: 32px; }
.ph-lightbox[hidden] { display: none; }
.ph-lightbox-fig { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ph-lightbox-fig img { max-width: 92vw; max-height: 80vh; border-radius: 14px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ph-lightbox-fig figcaption { color: #fff; font-size: 14px; opacity: .9; text-align: center; max-width: 60ch; }
.ph-lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,.14); border: 0; color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ph-lightbox-close [data-lucide] { width: 22px; height: 22px; }

/* ---- Galería de aportaciones (detalle) ---- */
.ph-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph-gallery-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid var(--line, #e4e0d6); }
/* Absoluta a propósito: un <img height:100%> en flujo dentro de una caja cuyo
   alto sale de `aspect-ratio` es una dependencia circular, y el navegador la
   rompe usando el alto NATURAL de la imagen. Las verticales estiraban su caja. */
.ph-gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s;}
.ph-gallery-item:hover img { transform: scale(1.06); }
.ph-gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* clickable stats */
.ph-stat-click { cursor: pointer; }
.ph-stat-click:hover .stat-number, .ph-stat-click:hover p { color: var(--accent, #c2410c); }

/* NOTA: el layout y la rejilla del perfil se controlan en css/profile.css
   (.pf-shell, .pf-grid). Aquí NO debe haber reglas del perfil ni con #id
   (ganarían por especificidad sobre profile.css). */

/* ══════════════════════════════════════════════════════════════
   TARJETA DE PERFIL AL PASAR EL RATÓN
   Se abre sobre cualquier cosa que represente a una persona (enlaces a
   /perfil/… y elementos con data-ph-user). Vive suelta en <body> y se
   coloca por JS, así que ningún contenedor con overflow la recorta.
   ══════════════════════════════════════════════════════════════ */
.ph-uhover {
  position: fixed; z-index: 4200; width: min(300px, calc(100vw - 24px));
  padding: 14px; border-radius: 18px;
  background: var(--surface, #fff); border: 1px solid var(--line, #e4e0d6);
  box-shadow: 0 24px 50px -22px rgba(22,21,15,.55);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: auto;
}
.ph-uhover.is-ready { opacity: 1; transform: none; }
.ph-uhover[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ph-uhover { transition: none; } }

.ph-uhover-head { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.ph-uhover-av {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--line, #e4e0d6);
}
.ph-uhover-av-f {
  display: grid; place-items: center; background: var(--accent-soft, #f4e7df);
  color: var(--accent-press, #974c33); font: 700 18px "Work Sans", sans-serif;
}
.ph-uhover-who { min-width: 0; display: flex; flex-direction: column; }
.ph-uhover-who strong {
  font: 700 15px "Outfit", sans-serif; color: var(--ink, #16150f);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ph-uhover-who span {
  font: 500 12.5px "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ph-uhover-head:hover strong { color: var(--accent, #b05f44); }
/* Dos líneas como mucho: la biografía puede ser larga y la tarjeta es un
   vistazo, no el perfil entero. */
.ph-uhover-bio {
  margin: 10px 0 0; font: 400 12.5px/1.45 "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ph-uhover-stats {
  display: flex; gap: 16px; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line, #e4e0d6);
}
.ph-uhover-stats span {
  display: flex; flex-direction: column; font: 500 11px "Work Sans", sans-serif;
  color: var(--ink-mute, #9a968b);
}
.ph-uhover-stats b {
  font: 800 15px "Outfit", sans-serif; color: var(--ink, #16150f);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.ph-uhover-foot { margin-top: 12px; }
.ph-uhover-follow {
  width: 100%; min-height: 38px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent, #b05f44); background: var(--accent, #b05f44); color: #fff;
  font: 700 13px "Work Sans", sans-serif; transition: background .15s ease, color .15s ease;
}
.ph-uhover-follow:hover { background: var(--accent-press, #974c33); border-color: var(--accent-press, #974c33); }
.ph-uhover-follow.is-following {
  background: var(--surface, #fff); color: var(--ink, #16150f); border-color: var(--line, #e4e0d6);
}
.ph-uhover-self {
  display: block; text-align: center; font: 600 12.5px "Work Sans", sans-serif;
  color: var(--ink-mute, #9a968b);
}
.ph-uhover-error { margin: 0; font: 500 13px "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60); }

/* Esqueleto mientras llega la respuesta */
.ph-uhover-load { display: flex; flex-direction: column; gap: 9px; }
.ph-uhover-load span {
  display: block; height: 12px; border-radius: 6px; background: var(--skeleton, #eeebe5);
  animation: ph-uhover-pulse 1.1s ease-in-out infinite;
}
.ph-uhover-load span:first-child { height: 46px; width: 60%; border-radius: 12px; }
.ph-uhover-load span:last-child { width: 40%; }
@keyframes ph-uhover-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* El disparador avisa de que hay algo que mirar. */
[data-ph-user] { cursor: pointer; }

/* Rango e insignia dentro de la tarjeta: las mismas pastillas que salen junto
   al nombre en un perfil ajeno, a menor tamaño. */
.ph-uhover-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ph-uhover-chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 4px 9px; border-radius: 999px;
  font: 700 10.5px "Work Sans", sans-serif; letter-spacing: .02em;
}
.ph-uhover-chip [data-lucide], .ph-uhover-chip svg { width: 12px; height: 12px; flex: 0 0 auto; }
.ph-uhover-chip.is-rank { background: var(--ink, #16150f); color: var(--gold, #f4b740); }
.ph-uhover-chip.is-rank.has-img { padding-left: 4px; }
/* La chapa es coral sobre transparente: sobre la pastilla tinta necesita su
   disco blanco, igual que junto al nombre en el perfil. */
.ph-uhover-rankimg { width: 18px; height: 18px; object-fit: contain; background: #fff; border-radius: 50%; }

/* ---- Selector de colecciones (#ph-collect) --------------------------
   Diálogo centrado y no hoja lateral: es una decisión corta —marcar dos o tres
   casillas— y un panel de pantalla completa promete más de lo que hay dentro.
   -------------------------------------------------------------------- */
.cq { position: fixed; inset: 0; z-index: 3600; display: none; place-items: center; padding: 20px; background: rgba(22,21,15,.45); animation: ph-fade .18s ease; }
.cq.open { display: grid; }

.cq-caja-modal { width: min(420px, 100%); max-height: min(76vh, 620px); display: flex; flex-direction: column; background: var(--surface, #fff); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(22,21,15,.5); }

.cq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line, #e4e0d6); }
.cq-head strong { font: 700 16px "Outfit", sans-serif; color: var(--ink, #16150f); }
.cq-close { border: 0; background: none; color: var(--ink-soft, #6f6b60); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 8px; }
.cq-close:hover { color: var(--ink, #16150f); }
.cq-close [data-lucide] { width: 19px; height: 19px; }

.cq-list { flex: 1; overflow-y: auto; }
.cq-cargando { padding: 26px 18px; text-align: center; font: 400 14px/1.5 "Work Sans", sans-serif; color: var(--ink-soft, #6f6b60); }

.cq-fila { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--line, #e4e0d6); background: none; cursor: pointer; text-align: left; }
.cq-fila:hover { background: var(--bg, #f6f4ef); }
.cq-fila:focus-visible { outline: 2px solid var(--accent, #b05f44); outline-offset: -2px; }

.cq-caja { flex: 0 0 auto; width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid var(--line-strong, #d6d1c4); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.cq-caja [data-lucide] { width: 13px; height: 13px; }
.cq-fila.is-on .cq-caja { background: var(--accent, #b05f44); border-color: var(--accent, #b05f44); color: #fff; }

.cq-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cq-nombre { font: 700 14px "Work Sans", sans-serif; color: var(--ink, #16150f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-n { font: 400 11.5px "Work Sans", sans-serif; color: var(--ink-mute, #9a968b); }
.cq-lock { width: 13px; height: 13px; color: var(--ink-mute, #9a968b); flex: 0 0 auto; }

.cq-crear { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line, #e4e0d6); }
.cq-crear input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line, #e4e0d6); border-radius: 10px; font: 400 14px "Work Sans", sans-serif; color: var(--ink, #16150f); background: var(--surface, #fff); }
.cq-crear input:focus { outline: none; border-color: var(--accent, #b05f44); box-shadow: 0 0 0 3px var(--accent-soft, #f4e7df); }
.cq-crear-btn { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent, #b05f44); color: #fff; font: 700 13px "Work Sans", sans-serif; cursor: pointer; }
.cq-crear-btn:hover { background: var(--accent-press, #974c33); }

/* Guardados dentro del selector: primera fila, separada por una raya mas
   marcada. Son cosas distintas que comparten hoja, no la misma categoria. */
.cq-fila-guardados { border-bottom-width: 2px; }
.cq-marca { width: 15px; height: 15px; color: var(--ink-soft, #6f6b60); flex: 0 0 auto; }
.cq-fila-guardados.is-on .cq-marca { color: var(--accent, #b05f44); }
