/* Buscador de Prompts (/prompts/).
   Estilos propios de esta sección: reutiliza los tokens y componentes de styles.css
   y usa el prefijo pl- para no afectar al resto del sitio. */

html {
  scrollbar-gutter: stable;
}

html:has(.pl-dialog[open]) {
  overflow: hidden;
}

.pl-page [hidden],
.pl-dialog [hidden] {
  display: none !important;
}

.pl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pl-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pl-star {
  stroke-width: 1.8;
}

[aria-pressed="true"] > .pl-star {
  color: var(--pink);
  fill: currentColor;
}

/* .button del sitio está pensado para enlaces; en un <button> hay que heredar la tipografía. */
.pl-page button.button,
.pl-dialog button.button {
  font-family: inherit;
}

.pl-count {
  min-width: 24px;
  padding: 2px 7px;
  color: var(--muted);
  background: rgba(54, 32, 72, 0.06);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

/* Encabezado y buscador */

.pl-page {
  width: var(--wide);
  margin-inline: auto;
  padding-bottom: clamp(72px, 10vw, 120px);
}

.pl-hero {
  padding-top: clamp(44px, 7vw, 88px);
}

.pl-hero h1 {
  margin-bottom: 18px;
}

.pl-hero .seo-lead {
  margin-bottom: clamp(24px, 3vw, 32px);
}

/* Fila superior: etiqueta a la izquierda y selector de idioma a la derecha. */
.pl-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.pl-hero-top > p {
  margin: 0;
}

.pl-langs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pl-langs a {
  padding: 5px 11px;
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.pl-langs a[aria-current="page"] {
  color: #5c2592;
  background: rgba(213, 45, 145, 0.1);
}

.pl-create {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.pl-create-link {
  color: #5c2592;
  font-weight: 750;
  text-underline-offset: 3px;
}

.pl-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 860px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(48, 25, 65, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pl-search:focus-within {
  border-color: rgba(114, 38, 215, 0.6);
  box-shadow: 0 0 0 3px var(--focus-ring), 0 14px 38px rgba(48, 25, 65, 0.08);
}

.pl-search-icon {
  position: absolute;
  left: 20px;
  width: 22px;
  height: 22px;
  color: var(--muted);
  pointer-events: none;
}

.pl-search input {
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0 58px 0 56px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: inherit;
  font: inherit;
  font-size: clamp(17px, 1.6vw, 19px);
}

.pl-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* El foco se marca en todo el buscador (:focus-within). */
.pl-search input:focus-visible {
  outline: none;
}

.pl-search-shortcut {
  position: absolute;
  right: 18px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(54, 32, 72, 0.05);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: 700 13px/1 Inter, Aptos, "Segoe UI", Arial, sans-serif;
  pointer-events: none;
}

.pl-search input:focus ~ .pl-search-shortcut,
.pl-search input:not(:placeholder-shown) ~ .pl-search-shortcut {
  display: none;
}

/* Filtros de categoría: radios nativos con forma de chip (una sola parada de Tab, flechas para moverse). */

.pl-filters {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.pl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pl-chip {
  position: relative;
  display: inline-flex;
}

.pl-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pl-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 7px 6px 14px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.pl-chip.is-empty .pl-chip-label {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

.pl-chip input:checked + .pl-chip-label {
  color: #5c2592;
  background: rgba(213, 45, 145, 0.1);
  border-color: rgba(114, 38, 215, 0.3);
}

.pl-chip input:checked + .pl-chip-label .pl-count {
  color: #5c2592;
  background: rgba(114, 38, 215, 0.12);
}

.pl-chip input:focus-visible + .pl-chip-label {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Barra de resultados */

.pl-results {
  margin-top: clamp(26px, 4vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 18px;
}

.pl-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 650;
}

.pl-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.pl-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.pl-toggle[aria-pressed="true"] {
  color: #5c2592;
  background: rgba(213, 45, 145, 0.1);
  border-color: rgba(114, 38, 215, 0.3);
}

.pl-text-button {
  padding: 8px 2px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* Tarjetas */

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(16, 17, 22, 0.05);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.pl-card-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

/* El título es el enlace a la página del prompt (lo que siguen los buscadores). */
.pl-card-link {
  text-decoration: none;
}

.pl-card-link:focus-visible {
  border-radius: 4px;
  outline-offset: 2px;
}

.pl-card-description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.pl-favorite {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  margin: -8px -9px -8px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.pl-favorite .pl-icon {
  width: 21px;
  height: 21px;
}

.pl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-tags li {
  padding: 3px 9px;
  color: var(--ink-soft);
  background: rgba(54, 32, 72, 0.05);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.pl-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.pl-card-actions .button {
  gap: 7px;
  min-height: 40px;
  padding-inline: 15px;
  font-size: 14px;
}

.pl-button-tonal {
  color: #5c2592;
  background: rgba(114, 38, 215, 0.09);
}

.pl-icon-check {
  display: none;
}

.is-copied .pl-icon-copy {
  display: none;
}

.is-copied .pl-icon-check {
  display: block;
}

.pl-button-tonal.is-copied {
  color: #0f6b3a;
  background: rgba(22, 163, 74, 0.13);
}

.button-primary.is-copied {
  background: #15803d;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.22);
}

/* Estado vacío */

.pl-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 640px;
  margin: 0;
  padding: clamp(24px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.pl-empty h3 {
  margin: 0;
  font-size: 22px;
}

.pl-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.pl-empty .button {
  min-height: 42px;
  margin-top: 8px;
  font-size: 14px;
}

/* Detalle del prompt */

.pl-dialog {
  width: min(760px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: min(88vh, 860px);
  max-height: min(88dvh, 860px);
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 90px rgba(25, 21, 29, 0.3);
  overflow: hidden;
}

.pl-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: pl-dialog-in 180ms ease-out;
}

.pl-dialog::backdrop {
  background: rgba(25, 21, 29, 0.48);
  backdrop-filter: blur(3px);
}

.pl-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px 16px 26px;
  border-bottom: 1px solid var(--line);
}

.pl-dialog-header h2 {
  max-width: none;
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pl-icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  margin-top: -4px;
  color: var(--ink-soft);
  background: rgba(54, 32, 72, 0.05);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.pl-icon-button .pl-icon {
  width: 20px;
  height: 20px;
}

.pl-dialog-body {
  display: grid;
  align-content: start;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 26px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pl-dialog-body:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.pl-dialog-description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.pl-variables {
  padding: 14px 16px;
  background: rgba(213, 45, 145, 0.05);
  border: 1px solid rgba(213, 45, 145, 0.18);
  border-radius: 8px;
}

.pl-variables p {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 750;
}

.pl-variables ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-variables li,
.pl-variable {
  color: #8a1d5e;
  background: rgba(213, 45, 145, 0.12);
  border-radius: 5px;
  font-weight: 700;
}

.pl-variables li {
  padding: 3px 8px;
  font-size: 14px;
}

/* Generador: un campo por cada variable del prompt. */

.pl-variables .pl-generator-title {
  margin: 0;
  font-size: 15px;
}

.pl-variables .pl-generator-hint {
  margin: 2px 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}

/* Lista de datos que se ve sin JavaScript, antes de que el generador arme los campos. */
.pl-variables .pl-variable-list {
  margin-top: 10px;
}

.pl-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px 14px;
}

.pl-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.pl-field.is-wide {
  grid-column: 1 / -1;
}

.pl-field label {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.pl-field input,
.pl-field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pl-field textarea {
  min-height: 96px;
  resize: vertical;
}

.pl-field input::placeholder,
.pl-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.pl-field input:focus-visible,
.pl-field textarea:focus-visible {
  border-color: rgba(114, 38, 215, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.pl-generator-reset {
  margin-top: 8px;
  padding-bottom: 0;
}

.pl-prompt-text {
  margin: 0;
  padding: 18px 20px;
  color: var(--ink);
  background: #fbfaff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pl-variable {
  padding: 1px 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Variable ya completada por el usuario: violeta en lugar del rosa de "pendiente". */
.pl-variable.is-filled {
  color: #3f1a75;
  background: rgba(114, 38, 215, 0.12);
}

.pl-dialog-footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: rgba(247, 245, 250, 0.92);
  border-top: 1px solid var(--line);
}

.pl-dialog-footer .button {
  gap: 8px;
  min-height: 46px;
  font-size: 15px;
}

.pl-dialog-permalink {
  margin-left: auto;
}

/* Cómo funciona y preguntas frecuentes (debajo de la grilla del buscador) */

.pl-guide {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.pl-guide h2,
.pl-generator h2,
.pl-howto h2,
.pl-related h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}

.pl-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 0 0 clamp(20px, 3vw, 30px);
  padding: 0;
  list-style: none;
  counter-reset: pl-step;
}

.pl-steps li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  counter-increment: pl-step;
}

.pl-steps li::before {
  content: counter(pl-step, decimal-leading-zero);
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

.pl-steps strong {
  font-size: 18px;
  line-height: 1.25;
}

.pl-steps span {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.pl-faq {
  border-top: 1px solid var(--line);
}

.pl-faq details {
  border-bottom: 1px solid var(--line);
}

.pl-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.pl-faq summary::-webkit-details-marker {
  display: none;
}

.pl-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.pl-faq details[open] summary::after {
  content: "−";
}

.pl-faq summary:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.pl-faq p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 16px;
}

.pl-faq a,
.pl-about a,
.pl-howto-note a {
  color: #5c2592;
  font-weight: 700;
  text-underline-offset: 3px;
}

.pl-about {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Página de cada prompt (/prompts/<slug>/) */

.pl-breadcrumb {
  padding-top: clamp(24px, 4vw, 40px);
}

.pl-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  list-style: none;
}

/* Separador dibujado (sin texto, para que los lectores de pantalla no lo lean). */
.pl-breadcrumb li + li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 1px 0;
  border: solid var(--muted);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

.pl-breadcrumb a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

.pl-article {
  max-width: 920px;
}

.pl-article-header {
  padding-top: clamp(18px, 3vw, 30px);
}

.pl-article-header h1 {
  margin-bottom: 18px;
  font-size: clamp(36px, 4.4vw, 56px);
}

.pl-article-header .seo-lead {
  margin-bottom: 12px;
}

.pl-article-intro {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 16px;
}

.pl-generator,
.pl-howto,
.pl-related {
  margin-top: clamp(36px, 5vw, 56px);
}

.pl-generator {
  display: grid;
  gap: 14px;
}

.pl-generator .pl-prompt-text {
  background: #ffffff;
}

.pl-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pl-page-actions .button {
  gap: 8px;
  min-height: 46px;
  font-size: 15px;
}

.pl-howto-steps {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.pl-howto-steps li::marker {
  color: var(--pink);
  font-weight: 800;
}

.pl-howto-note {
  max-width: 760px;
  margin: 18px 0 0;
  padding: 14px 16px;
  color: var(--ink-soft);
  background: rgba(114, 38, 215, 0.06);
  border-radius: 8px;
  font-size: 15.5px;
}

/* Cuatro relacionados: 2 x 2 en pantallas anchas (3 columnas dejarían una tarjeta sola). */
.pl-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.pl-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(16, 17, 22, 0.05);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pl-related-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.pl-related-card span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Aviso breve ("Prompt copiado") */

.pl-toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 18px;
  color: #ffffff;
  background: #2b1838;
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(25, 21, 29, 0.3);
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.pl-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pl-toast::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 11px;
  margin: -3px 3px 0 2px;
  border: solid #86efac;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pl-toast.is-error {
  border-radius: 14px;
}

.pl-toast.is-error::before {
  display: none;
}

/* Dentro del detalle, el aviso aparece justo arriba de los botones. */
.pl-dialog-footer .pl-toast {
  position: absolute;
  bottom: calc(100% + 12px);
}

.pl-copy-buffer {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
}

@keyframes pl-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

@media (hover: hover) {
  .pl-chip:hover .pl-chip-label,
  .pl-toggle:hover {
    color: var(--ink);
    border-color: var(--line-strong);
  }

  .pl-chip:hover input:checked + .pl-chip-label,
  .pl-toggle[aria-pressed="true"]:hover {
    color: #4a1d78;
  }

  .pl-text-button:hover {
    color: var(--ink);
  }

  .pl-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 16px 38px rgba(16, 17, 22, 0.08);
    transform: translateY(-2px);
  }

  .pl-favorite:hover {
    color: var(--pink);
    background: rgba(213, 45, 145, 0.08);
  }

  .pl-button-tonal:hover {
    background: rgba(114, 38, 215, 0.15);
  }

  .pl-icon-button:hover {
    color: var(--ink);
    background: rgba(54, 32, 72, 0.1);
  }

  .pl-langs a:not([aria-current]):hover {
    color: var(--ink);
    background: rgba(54, 32, 72, 0.06);
  }

  .pl-create-link:hover,
  .pl-faq a:hover,
  .pl-about a:hover,
  .pl-howto-note a:hover {
    color: #4a1d78;
  }

  .pl-card-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .pl-faq summary:hover {
    color: #5c2592;
  }

  .pl-breadcrumb a:hover {
    color: var(--ink);
  }

  .pl-related-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 16px 38px rgba(16, 17, 22, 0.08);
    transform: translateY(-2px);
  }
}

@media (hover: none) {
  .pl-search-shortcut {
    display: none;
  }
}

@media (max-width: 640px) {
  .pl-hero {
    padding-top: 32px;
  }

  .pl-search {
    border-radius: 12px;
  }

  .pl-search-icon {
    left: 16px;
    width: 20px;
    height: 20px;
  }

  /* 16px evita que iOS haga zoom al enfocar el campo. */
  .pl-search input {
    height: 56px;
    padding: 0 14px 0 46px;
    font-size: 16px;
  }

  .pl-search-shortcut {
    display: none;
  }

  /* En celulares las categorías se desplazan en una sola fila. */
  .pl-chips {
    flex-wrap: nowrap;
    margin-inline: -18px;
    padding: 2px 18px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pl-chips::-webkit-scrollbar {
    display: none;
  }

  .pl-chip {
    flex: 0 0 auto;
  }

  .pl-results {
    margin-top: 16px;
  }

  .pl-card {
    padding: 20px;
  }

  .pl-card-actions .button {
    flex: 1 1 auto;
  }

  .pl-dialog {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .pl-dialog-header {
    padding: 18px 14px 14px 18px;
  }

  .pl-dialog-body {
    padding: 18px;
  }

  .pl-dialog-footer {
    padding: 12px 18px;
  }

  .pl-dialog-footer > .button,
  .pl-dialog-footer > .pl-toggle {
    flex: 1 1 auto;
    justify-content: center;
  }

  .pl-dialog-footer > .pl-dialog-permalink {
    width: 100%;
    margin-left: 0;
    padding-block: 2px;
    text-align: center;
  }

  /* 16px evita el zoom de iOS al escribir en los campos del generador. */
  .pl-field input,
  .pl-field textarea {
    font-size: 16px;
  }

  .pl-steps li {
    padding: 18px;
  }

  .pl-page-actions .button {
    flex: 1 1 auto;
  }

  .pl-toast {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}
