/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 4px;
  margin-right: 20px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-mid);
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ── Page header ── */
.page-header {
  padding: 30px 0 18px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.page-header p {
  color: var(--text-mid);
  margin-top: 6px;
  font-size: 14.5px;
}

.category-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
}

.category-header .emoji-big {
  font-size: 38px;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.category-header p {
  color: var(--text-mid);
  margin-top: 4px;
  font-size: 14px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-mid);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--navy);
}

/* ── Category row (aprender.html tab) ── */
.category-row {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.15s var(--ease);
}

.category-row:hover {
  border-color: var(--border-strong);
}

.category-row .category-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.category-row .row-info {
  flex: 1;
  min-width: 0;
}

.category-row h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.category-row p {
  font-size: 13px;
  color: var(--text-mid);
  margin: 4px 0 12px;
  line-height: 1.45;
}

.category-row .progress-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 6px;
}

.category-row .btn-guide {
  display: inline-block;
  margin-top: 12px;
}

/* ── Learning path cards ── */
.path-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 720px) {
  .path-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.path-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
}

.path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--navy);
  opacity: 0.7;
}

.path-card.beginner_path::before {
  background: #4c9a5b;
}

.path-card.anti_scam_path::before {
  background: var(--warning);
}

.path-card.smart_buying_path::before {
  background: var(--navy);
}

.path-card.card_value_path::before {
  background: #8b5cf6;
}

.path-card.collecting_mastery_path::before {
  background: #e0575c;
}

.path-card .emoji {
  font-size: 24px;
}

.path-card h3 {
  font-size: 16px;
  font-weight: 800;
}

.path-card p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.45;
}

.path-card .path-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.path-card .btn-primary {
  align-self: flex-start;
  margin-top: 4px;
}

/* ── Guide card (categoria.html) ── */
#guidesList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 860px) {
  #guidesList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  #guidesList > h2 {
    grid-column: 1 / -1;
  }
}

.guide-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.guide-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.guide-card-icon {
  font-size: 26px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--ice);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 0 0 var(--ice-dark);
}

.guide-card-info {
  flex: 1;
  min-width: 0;
}

.guide-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guide-card-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

.guide-card-info p {
  font-size: 12.5px;
  color: var(--text-mid);
  margin-top: 4px;
  line-height: 1.4;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.guide-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.btn-course,
.btn-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-align: center;
  transition: background 0.15s var(--ease);
}

/* En el modal ampliado, Guía y Curso van en la misma fila que el botón
   "Guardar" (.btn-outline) — para que no se vean como una acción menor
   junto a un botón más grande, adoptan aquí el mismo tamaño y radio que
   el resto de botones del sitio; en la tarjeta pequeña se quedan
   compactos, que es lo que corresponde a ese espacio. */
.modal-actions .btn-guide,
.modal-actions .btn-course {
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1;
  gap: 8px;
}

/* La Guía es la acción principal (siempre existe); el Curso es
   opcional, así que lleva el estilo secundario. */
.btn-guide {
  background: var(--navy);
  color: var(--white);
}

.btn-guide:hover {
  background: var(--navy-light);
}

.btn-course {
  background: var(--ice);
  color: var(--navy);
}

.btn-course:hover {
  background: var(--ice-dark);
}

@media (max-width: 480px) {
  .guide-card {
    flex-wrap: wrap;
  }
  .guide-actions {
    flex-direction: row;
    width: 100%;
  }
  .guide-actions a {
    flex: 1;
  }
}

/* ── Fila de guía de la comunidad (usuarios.html) ──
   A propósito NO es la misma tarjeta que una guía oficial: puede haber
   cientos de guías con calidad muy variable, así que se listan finas y
   en horizontal (estilo resultado de foro) en vez de en tarjetas grandes
   en cuadrícula, para que quepan muchas de un vistazo. */
.community-guide-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.community-guide-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.community-guide-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.community-guide-row-icon {
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--ice);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.community-guide-row-info {
  flex: 1;
  min-width: 0;
}

.community-guide-row-info h3 {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-guide-row-info p {
  font-size: 11.5px;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.community-guide-row-badge {
  font-size: 9.5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.community-guide-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .community-guide-row-meta {
    display: none;
  }
}

.simple-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.simple-card textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.simple-card textarea:focus {
  border-color: var(--navy);
}

.wall-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-dim);
  font-size: 14px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
}

.star-picker {
  display: flex;
  gap: 4px;
  font-size: 24px;
  margin-bottom: 10px;
}

.star-pick {
  color: var(--border);
  cursor: pointer;
  transition: color 0.1s var(--ease);
}

.star-pick.selected {
  color: var(--warning);
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.section-header-row .section-title {
  margin-bottom: 0;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.48);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-box-wide {
  max-width: 620px;
  text-align: left;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-box-wide h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.block-editor-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg);
  cursor: grab;
}

.block-editor-item.dragging {
  opacity: 0.4;
}

.block-editor-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.block-editor-item-header select {
  font-weight: 700;
  font-size: 13px;
  flex: 1;
}

.block-type-icon {
  font-size: 18px;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--ice);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.block-editor-item-header .remove-block {
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
}

/* ── Campos de texto del editor de bloques ── */
.be-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.be-field:focus {
  border-color: var(--navy);
}

textarea.be-field {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.be-image-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.be-image-row .be-field {
  flex: 1;
  margin-bottom: 0;
  color: var(--text-mid);
  background: var(--bg);
}

.be-image-row .btn-outline {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.bbcode-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.bbcode-toolbar button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 800;
}

.bbcode-toolbar button:hover {
  background: var(--ice);
  color: var(--navy);
}

.bbcode-toolbar button[data-tag="i"] {
  font-style: italic;
}

.bbcode-toolbar button[data-tag="u"] {
  text-decoration: underline;
}

.bbcode-toolbar + textarea.be-field {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 260px;
  font-size: 15px;
  line-height: 1.7;
  padding: 16px;
}

/* ── Editor WYSIWYG de Documentación (tipo Word) ── */
.rte-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  /* Ojo: nada de overflow:hidden aquí — convertiría a este contenedor en
     el "scrollport" de la toolbar sticky de abajo (al no poder desplazarse
     él mismo) y rompería el sticky respecto a la página. Las esquinas se
     redondean en toolbar/surface por separado en su lugar. */
}

.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky;
  /* Debajo de la navbar (también sticky, top:0): sin este offset, ambas
     compiten por el mismo punto de anclaje y la toolbar queda tapada un
     instante al hacer scroll. */
  top: 60px;
  z-index: 1;
}

.rte-toolbar button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 800;
}

.rte-toolbar button:hover {
  background: var(--ice);
  color: var(--navy);
}

.rte-surface {
  min-height: 60vh;
  max-height: 75vh;
  overflow-y: auto;
  padding: 32px;
  background: var(--white);
  outline: none;
  font-size: 15px;
  line-height: 1.75;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.rte-surface img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

/* ── Imagen de portada subida (en vez de URL) ── */
.cover-image-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cover-image-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}

/* ── Editor de guías a página completa ── */
.editor-header {
  padding: 24px 0 16px;
}

.editor-back {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
}

.editor-back:hover {
  color: var(--navy);
}

.editor-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 20px;
}

.editor-general-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 16px;
}

.editor-block-list {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
}

.editor-block-list .block-editor-item {
  padding: 20px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.editor-block-list .block-editor-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.editor-block-list .block-editor-item-header select {
  font-size: 13px;
}

.editor-ref-preview {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-mid);
  white-space: pre-wrap;
}

.editor-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-bottom: 40px;
}

@media (max-width: 600px) {
  .editor-actions {
    flex-direction: column;
  }
}

.modal-box .modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-close {
  align-self: flex-end;
  font-size: 20px;
  color: var(--text-dim);
  line-height: 1;
  padding: 0;
}

/* ── Achievement modal ── */
.achievement-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
}

.achievement-modal.hidden {
  display: none;
}

.achievement-card {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 34px 24px 30px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: slideUpModal 0.35s var(--ease);
  box-shadow: var(--shadow-md);
}

@media (min-width: 480px) {
  .achievement-card {
    border-radius: 20px;
    margin-bottom: 40px;
  }
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.achievement-icon {
  font-size: 42px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(13, 27, 42, 0.08);
}

.achievement-card h3 {
  font-size: 19px;
  font-weight: 800;
}

.achievement-card p {
  color: var(--text-mid);
  font-size: 13.5px;
}

.achievement-xp {
  font-weight: 800;
  color: var(--navy);
  font-size: 14.5px;
}

/* ── Search ── */
.search-input-wrap {
  margin: 18px 0;
}

.search-input {
  width: 100%;
  padding: 15px 18px;
  font-size: 17px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.search-input:focus {
  border-color: var(--navy);
  box-shadow: var(--shadow-ring);
}

.search-result {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.search-result h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.search-result .snippet {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 4px;
  line-height: 1.45;
}

.search-result mark {
  background: var(--ice);
  color: var(--navy);
  border-radius: 3px;
}

/* ── Article (guia.html) ── */
.article-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.article-main {
  max-width: 700px;
  margin: 0 auto;
  flex: 1;
  min-width: 0;
}

@media (min-width: 1024px) {
  .article-main {
    margin: 0;
  }
}

.article-header {
  padding: 8px 0 22px;
}

.article-header .emoji-big {
  font-size: 36px;
}

.article-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 12px 0 8px;
  letter-spacing: -0.6px;
}

.article-header .lead {
  font-size: 15.5px;
  color: var(--text-mid);
  line-height: 1.5;
}

.article-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.article-body h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 32px 0 12px;
  letter-spacing: -0.3px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body img {
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 20px;
  list-style: revert;
}

.block-highlight {
  background: rgba(30, 81, 117, 0.07);
  border-left: 3px solid var(--navy);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
}

.article-sidebar {
  width: 210px;
  flex-shrink: 0;
  display: none;
  position: sticky;
  top: 92px;
}

@media (min-width: 1024px) {
  .article-sidebar {
    display: block;
  }
}

.article-sidebar h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.4px;
}

.article-sidebar a {
  display: block;
  font-size: 13px;
  color: var(--text-mid);
  padding: 6px 0;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.article-sidebar a:hover {
  color: var(--navy);
  border-left-color: var(--navy);
}

/* ── Auth ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.auth-box {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
}

.auth-logo::before {
  content: 'P';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  transform: rotate(-6deg);
}

.auth-logo span {
  color: var(--navy);
}

.auth-box h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.subtext {
  color: var(--text-mid);
  font-size: 13.5px;
  line-height: 1.5;
}

.auth-box .subtext {
  margin-top: -8px;
}

.auth-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.auth-input:focus {
  border-color: var(--navy);
  box-shadow: var(--shadow-ring);
}

.auth-error {
  color: #dc2626;
  font-size: 13px;
  min-height: 18px;
}

.auth-switch {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 4px;
}

.auth-switch button {
  color: var(--navy);
  font-weight: 700;
}

.auth-success {
  color: var(--success);
  font-size: 13px;
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-google-btn::before {
  content: 'G';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
}

/* ── Profile ── */
.profile-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 20px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.profile-banner {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  z-index: 0;
}

.profile-avatar {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-info {
  position: relative;
  z-index: 1;
}

.profile-bio {
  font-size: 13.5px;
  color: var(--text-mid);
  margin-top: 8px;
  max-width: 480px;
}

.profile-header h2 {
  font-size: 19px;
  font-weight: 800;
}

.profile-level {
  font-size: 13px;
  color: var(--navy);
  font-weight: 700;
  margin: 4px 0 8px;
}

.profile-xp-bar {
  width: 100%;
  max-width: 280px;
}

/* ── Profile hero (perfil.html propio) ── */
.profile-hero {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  background: var(--white);
}

.profile-hero-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-hero-edit-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(13, 27, 42, 0.55);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  backdrop-filter: blur(2px);
}

.profile-hero-banner .profile-hero-edit-btn {
  top: 12px;
  right: 12px;
}

.profile-hero-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 24px 20px;
  position: relative;
}

.profile-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: -48px;
}

.profile-hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid var(--white);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--white);
  background-color: var(--navy);
}

.profile-hero-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  border: 2px solid var(--white);
}

.profile-hero-info {
  padding-top: 22px;
  flex: 1;
  min-width: 0;
}

.profile-hero-info h2 {
  font-size: 20px;
  font-weight: 800;
  word-break: break-word;
}

.profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.profile-hero-social {
  display: flex;
  gap: 22px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}

.hero-social-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
}

.hero-social-item strong {
  color: var(--navy);
  font-size: 15px;
  margin-right: 4px;
}

.hero-social-item:hover {
  color: var(--navy);
}

/* ── Acordeón (Logros, Reseñas...) ── */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--white);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.accordion-header .chevron {
  transition: transform 0.2s var(--ease);
  font-size: 13px;
}

.accordion.open .accordion-header .chevron {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0 18px 18px;
}

.accordion.open .accordion-body {
  display: block;
}

.profile-xp-bar .xp-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .achievements-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.achievement-tile {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.achievement-tile:not(.locked):hover {
  transform: translateY(-2px);
}

.achievement-tile.locked {
  filter: grayscale(1);
  opacity: 0.5;
}

.achievement-tile .icon {
  font-size: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(13, 27, 42, 0.08);
}

.achievement-tile.locked .icon {
  background: var(--bg);
}

.achievement-tile .name {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

.completed-course-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.completed-course-row .date {
  color: var(--text-dim);
  font-size: 12px;
}

.my-guide-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 14px;
}

.my-guide-actions {
  display: flex;
  gap: 8px;
}

.my-guide-actions button {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--ice);
  color: var(--navy);
}

.my-guide-actions button.danger {
  background: #fee2e2;
  color: #dc2626;
}

.my-guide-reason {
  width: 100%;
  font-size: 12.5px;
  color: #dc2626;
  margin: 0;
}

.color-swatch-row {
  display: flex;
  gap: 10px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.color-swatch:hover {
  transform: scale(1.08);
}

.color-swatch.selected {
  border-color: var(--navy);
}

/* ── Seguidores / seguidos ── */
.follow-summary-row {
  display: flex;
  gap: 28px;
  margin-bottom: 16px;
}

.follow-summary-item {
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
}

.follow-summary-item strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.follow-summary-item span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.follow-avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.follow-avatar-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.about-block {
  margin-bottom: 32px;
}

/* ── Directorio de usuarios ── */
.user-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.user-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.user-card-top {
  border-color: #f2b705;
  background: linear-gradient(180deg, rgba(242, 183, 5, 0.08), transparent 60%);
}

.user-card-rank {
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dim);
}

.user-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-card-info {
  min-width: 0;
}

.user-card-info h3 {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card-info p {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 2px;
}

/* ── Modal ampliado de guía ── */
.guide-modal-banner {
  height: 130px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.guide-modal-banner-emoji {
  font-size: 46px;
}

.guide-modal-desc {
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 12px;
}

.guide-modal-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.guide-modal-rating {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.guide-modal-rating-summary {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.is-saved {
  background: var(--ice) !important;
  color: var(--navy) !important;
  border-color: var(--navy) !important;
}

/* ── Guardar y valoración en la tarjeta pequeña ── */
.guide-card-social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.card-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--ice);
  color: var(--navy);
}

.card-rating {
  font-size: 12px;
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── Forms (generic, admin) ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-mid);
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  text-transform: none;
  cursor: pointer;
}

.checkbox-row input {
  width: auto;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--navy);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Saved / guardados ── */
.saved-guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: border-color 0.15s var(--ease);
}

.saved-guide-row:hover {
  border-color: var(--border-strong);
}

.saved-guide-row .info {
  flex: 1;
  min-width: 0;
}

.saved-guide-row h3 {
  font-size: 14.5px;
  font-weight: 700;
}

.saved-guide-row .unsave-btn {
  color: var(--text-dim);
  font-size: 19px;
}

/* ── Toasts ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 40px));
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  background: #dc2626;
}

.toast-success {
  background: var(--success, #16a34a);
}

/* ── Reportar contenido ── */
.report-btn {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
}

.report-btn:hover {
  color: #dc2626;
}

/* ── Guía Pro (paywall) ── */
.pro-paywall {
  border: 1.5px dashed #f2b705;
  background: linear-gradient(180deg, rgba(242, 183, 5, 0.08), transparent 60%);
  border-radius: var(--radius-lg);
}

/* ── Comentarios de guía estilo foro ── */
.guide-forum {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.forum-post {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.forum-post-body {
  flex: 1;
  min-width: 0;
}

.forum-post-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.forum-post-author {
  font-weight: 700;
  color: var(--navy);
}

.forum-post-date {
  font-size: 12px;
  color: var(--text-dim);
}

.forum-post-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.forum-quote {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--bg);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-mid);
}

.forum-post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.forum-reply-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.forum-reply-btn:hover {
  color: var(--navy);
}

.forum-delete-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.forum-delete-btn:hover {
  color: #dc2626;
}

.forum-reply-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 8px 12px;
  background: var(--ice);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.forum-reply-banner button {
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
}

.forum-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-mid);
}

/* ── Campanita de notificaciones ── */
.nav-bell-wrap {
  position: relative;
}

.nav-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-bell-btn:hover {
  color: var(--navy);
  background: var(--ice);
}

.nav-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #dc2626;
  color: var(--white);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.nav-bell-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: 90vw;
  max-height: 420px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.15));
  z-index: 50;
}

.nav-bell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.nav-bell-header button {
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
}

.nav-bell-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

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

.nav-bell-item.unread {
  background: var(--ice);
}

.nav-bell-item-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.nav-bell-item-body {
  font-size: 12.5px;
  color: var(--text-mid);
}

.nav-bell-item-date {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Lupa de búsqueda en la navbar ── */
.nav-search-wrap {
  position: relative;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-search-btn:hover {
  color: var(--navy);
  background: var(--ice);
}

.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  max-width: 90vw;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.15));
  padding: 14px;
  z-index: 50;
}

.nav-search-dropdown form {
  display: flex;
  gap: 6px;
}

.nav-search-dropdown .search-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
}

.nav-search-dropdown form button {
  padding: 8px 12px;
  font-size: 13px;
}

.nav-search-dropdown a#navSearchAdvanced {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

/* ── Menú de cuenta (avatar) en la navbar ── */
.nav-user-wrap {
  position: relative;
}

.nav-user-avatar {
  cursor: pointer;
  background-position: center;
  background-size: cover;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  max-width: 90vw;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.15));
  z-index: 50;
  overflow: hidden;
}

.nav-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.nav-user-header strong {
  display: block;
  font-size: 14px;
}

.nav-user-header .subtext {
  font-size: 12px;
}

.nav-user-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--navy);
  background-position: center;
  background-size: cover;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-user-stats {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.nav-user-stats > div {
  flex: 1;
  text-align: center;
}

.nav-user-stats strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
}

.nav-user-stats span {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-user-links {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.nav-user-links a,
.nav-user-links button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.nav-user-links a:hover,
.nav-user-links button:hover {
  background: var(--ice);
}

/* ── Desplegables de la navbar en móvil ──
   Con varios iconos apretados a la derecha (lupa, mensajes, campanita,
   avatar), `right: 0` relativo a cada icono individual saca el
   desplegable (320px/280px de ancho) fuera de la pantalla por la
   izquierda en cualquier icono que no sea el último de la fila. Por
   debajo del punto en el que la barra pasa a hamburguesa, se ancla el
   desplegable al viewport en vez de al icono que lo abre. */
@media (max-width: 899px) {
  .nav-bell-dropdown,
  .nav-search-dropdown,
  .nav-user-dropdown {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

/* ── Páginas legales (Términos, Privacidad) ── */
.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 18px;
}

.legal-page h2:first-of-type {
  margin-top: 8px;
}

.legal-page p,
.legal-page li {
  color: var(--text-mid);
  line-height: 1.65;
  font-size: 14.5px;
}

.legal-page ul {
  margin: 8px 0 8px 4px;
}

.legal-page li {
  margin: 4px 0;
  padding-left: 18px;
  position: relative;
}

.legal-page li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--navy);
}

.legal-page .subtext {
  margin-bottom: 24px;
}

/* ── Footer con enlaces legales ── */
.footer-links {
  margin-top: 8px;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a:hover {
  color: var(--navy);
}

/* ── Selector de emoji (portada de guías) ── */
.emoji-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.emoji-picker-wrap input {
  flex: 1;
}

.emoji-picker-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s var(--ease);
}

.emoji-picker-btn:hover {
  border-color: var(--navy);
}

.emoji-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.15));
  padding: 10px;
  z-index: 50;
}

.emoji-picker-option {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-picker-option:hover {
  background: var(--ice);
}

/* ── Icono de categoría personalizado (dibujo en vez de emoji) ── */
.category-icon-img {
  object-fit: contain;
  vertical-align: middle;
  display: block;
}
