/* Página del glosario: estilos propios (copiados de design-ejemplos/glosario-boceto.html). Lo común está en subpagina.css. */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--fondo); color: var(--blanco); font-family: var(--fuente-texto); font-size: 1rem; line-height: 1.5; }
a { color: var(--oro-claro); }
.envoltorio { width: min(1040px, 100% - 32px); margin-inline: auto; }
header.cab { padding: 18px 0 4px; }
h1 { display: inline-block; margin: 22px 0 8px; padding: .25em .7em; background: var(--morado); color: var(--blanco); transform: rotate(-1.2deg); box-shadow: 5px 5px 0 var(--blanco);
  font-family: var(--fuente-titulos); font-weight: 700; font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.25; }
.sub { max-width: 62ch; color: #e6e0f0; margin: 6px 0 0; }
main { padding: 20px 0 28px; }

/* ---------- Buscador ---------- */
.buscar label { display: block; margin: 0 0 6px; font-family: var(--fuente-nombres); font-weight: 700; color: var(--oro-claro); }
.buscar .campo { display: flex; gap: 8px; max-width: 560px; }
.buscar input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: inherit; color: var(--blanco); background: var(--panel); border: 2px solid var(--linea); border-radius: 12px; }
.buscar input:focus-visible { border-color: var(--oro); box-shadow: 0 0 12px 3px rgba(232, 206, 134, .55); }
.buscar input::placeholder { color: var(--suave); }
.btn-sec { min-height: 48px; padding: 0 16px; font: inherit; font-weight: 700; color: var(--blanco); background: transparent; border: 2px solid var(--linea); border-radius: 12px; cursor: pointer; }
.btn-sec:hover { border-color: var(--oro); }
.btn-sec[hidden] { display: none; }

/* ---------- Abecedario con las letras de Mireia ---------- */
.abc { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 18px 0 6px; padding: 8px 4px; }   /* el relleno deja sitio al brillo */
.abc button { display: grid; place-items: center; width: 56px; height: 66px; padding: 0; background: none; border: 0; cursor: pointer; border-radius: 12px; transition: transform .15s; }
.abc button img { display: block; max-width: 52px; max-height: 62px; width: auto; height: auto; opacity: .75; transition: opacity .15s, filter .15s; }
.abc button:hover img { opacity: 1; }
.abc button:hover { transform: translateY(-2px); }
.abc button[aria-pressed="true"] img, .abc button:focus-visible img { opacity: 1; filter: drop-shadow(0 0 7px rgba(232, 206, 134, .95)) drop-shadow(0 0 16px rgba(201, 162, 75, .7)); }
.abc button.todas { width: auto; min-width: 84px; padding: 0 14px; height: 48px; align-self: center; margin-right: 6px; font: inherit; font-family: var(--fuente-nombres); font-weight: 700; color: var(--blanco); border: 2px solid var(--linea); }
.abc button.todas[aria-pressed="true"], .abc button.todas:focus-visible { border-color: var(--oro); color: var(--oro-claro); box-shadow: 0 0 12px 3px rgba(232, 206, 134, .55); }
@media (min-width: 700px) { .abc button { width: 64px; height: 76px; } .abc button img { max-width: 60px; max-height: 72px; } }

.estado { min-height: 1.5em; margin: 4px 0 14px; color: var(--suave); }

/* ---------- Lista de términos ---------- */
.cab-letra { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.cab-letra img { display: block; height: 120px; width: auto; max-width: 40vw; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.cab-letra.peque img { height: 72px; }
.cab-letra h2 { margin: 0; font-family: var(--fuente-nombres); font-size: clamp(1.1rem, 4vw, 1.4rem); color: var(--oro-claro); }
.grupo + .grupo { margin-top: 26px; }
.terminos { display: grid; gap: 10px; margin: 0; padding: 4px; list-style: none; }   /* relleno para el brillo */
@media (min-width: 820px) { .terminos { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.termino { border: 2px solid var(--linea); border-radius: 14px; background: var(--panel); transition: border-color .15s; }
.termino[open] { border-color: var(--oro); }
.termino summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; cursor: pointer; border-radius: 12px;
  font-family: var(--fuente-nombres); font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.termino summary::-webkit-details-marker { display: none; }
.termino summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--linea); border-radius: 50%; font-family: var(--fuente-texto); color: var(--oro-claro); }
.termino[open] summary::after { content: "–"; }
.termino summary:focus-visible { box-shadow: 0 0 12px 3px rgba(232, 206, 134, .6); }
.termino .def { padding: 0 16px 16px; }
.termino .def p { margin: 0; color: #ece7f4; }
.termino.destacado { animation: destello 1.6s ease-out 1; }
@keyframes destello { 0% { box-shadow: 0 0 0 0 rgba(232, 206, 134, 0); } 25% { box-shadow: 0 0 18px 5px rgba(232, 206, 134, .8); } 100% { box-shadow: 0 0 0 0 rgba(232, 206, 134, 0); } }
.letra-chip { margin-left: 8px; padding: 0 8px; font-family: var(--fuente-texto); font-size: .75rem; font-weight: 700; color: var(--oro-claro); border: 1px solid var(--linea); border-radius: 99px; white-space: nowrap; }
.vacio { padding: 18px; border-left: 4px solid var(--oro); background: rgba(201, 162, 75, .08); border-radius: 0 12px 12px 0; }
.error { color: #e0524b; }

footer { margin-top: auto; background: #000; border-top: 2px solid rgba(185, 177, 201, .35); }
footer .envoltorio { padding: 20px 0 26px; }
.fuente-pie { margin: 10px 0 0; font-size: .85rem; color: var(--suave); }
.fuente-pie a { color: var(--oro-claro); }
@media (prefers-reduced-motion: reduce) { .abc button, .abc button img, .termino { transition: none; } .termino.destacado { animation: none; } .abc button:hover { transform: none; } }

/* Aviso de traducción pendiente de permiso (gallego, euskera y aranés) */
.aviso-permiso { max-width: 62ch; margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--oro); background: rgba(201, 162, 75, .08); border-radius: 0 12px 12px 0; }
