/* Fuentes alojadas en el propio servidor (licencia SIL OFL): sin peticiones a Google Fonts */
@font-face {
    font-family: 'Cinzel Decorative';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/cinzel-decorative-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cinzel (no decorativa) para los H1/H2 de sección */
@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/cinzel-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cifras claras para los títulos: en Cinzel el 1 parece una I ("11:11" se lee "II:II").
   Esta familia solo cubre los dígitos 0-9; el resto de caracteres cae en Cinzel. */
@font-face {
    font-family: 'Cifras';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0030-0039;
}

/* Fuente variable: un solo archivo para los pesos 400, 600 y 700 */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Tokens de diseño (Fase 10). El dorado solo para el logo, la cifra principal de cada
       tarjeta, los enlaces, el botón principal y los detalles; el dorado suave para los
       títulos de sección. Texto: --tx principal, --tx2 secundario, --mut metadatos. */
    --bg: #0b0d1f;
    --card: #1c234c;  /* Fase 20: 1.28:1 sobre --bg; --mut sobre tarjeta 4.9:1 */
    --line: rgba(255, 255, 255, 0.16);
    --line-hover: rgba(230, 195, 106, 0.45);
    --tx: #ece8ff;
    --tx2: #b9b3da;
    --mut: #948eb8;
    --gold: #e6c36a;
    --gold-soft: #d4b877;
    --gold-rgb: 230, 195, 106;

    /* Nombres anteriores, ahora alias de los tokens */
    --bg-primary: var(--bg);
    --bg-surface: var(--card);
    --bg-card: var(--card);
    --bg-input: #070919;
    --text-primary: var(--tx);
    --text-secondary: var(--tx2);
    --accent-gold: var(--gold);
    --accent-gold-bright: var(--gold-soft);
    --danger: #f19a9a;
    --success: #9fd8b0;
    --border-line: var(--line);
    --border-line-hover: var(--line-hover);
    --font-logo: 'Cinzel Decorative', Georgia, serif;
    --font-heading: 'Cifras', 'Cinzel', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --max-width: 960px;
    --max-width-header: 1180px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: 5rem;
}

/* Red de seguridad: la causa del desbordamiento se corrige en cada componente (min-width: 0).
   clip, a diferencia de hidden, no crea contenedor de scroll y no rompe el header sticky. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 50% 15%, rgba(40, 25, 75, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(20, 30, 60, 0.3) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    hyphens: none;
}

a {
    color: var(--accent-gold);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-gold-bright);
}

:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}

img, svg {
    max-width: 100%;
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    z-index: 2000;
}

.skip-link:focus {
    top: 1rem;
}

.text-muted {
    color: var(--text-secondary);
}

.small {
    font-size: 0.85rem;
}

.icon-sprite {
    display: none;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
    background: rgba(6, 8, 20, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-line);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: var(--max-width-header);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.site-title {
    font-family: var(--font-logo);
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-gold);
}

.input-compact {
    padding: 0.45rem 0.9rem;
    font-size: 1rem;
    width: 11rem;
    text-align: left;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #0d1126;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 250px;
    width: max-content;
    display: none !important;
    flex-direction: column !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9);
    z-index: 1100;
}

/* Puente invisible para que el menú no se cierre al bajar el ratón */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 0.75rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: flex !important;
}

.dropdown > .dropdown-menu {
    margin-top: 0.5rem;
}

.dropdown-menu li {
    width: 100%;
    display: block;
}

.dropdown-menu a {
    padding: 0.75rem 1.25rem;
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--accent-gold);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--accent-gold);
}

/* ==========================================================================
   ESTRUCTURA PRINCIPAL
   ========================================================================== */
.main-container {
    flex: 1;
    width: 100%;
    min-width: 0;
    max-width: var(--max-width);
    margin: 2rem auto 2.5rem;
    padding: 0 1.25rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.breadcrumbs li + li::before {
    content: '›';
    margin-right: 0.4rem;
    color: var(--border-line-hover);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-gold);
}

h1, h2, h3 {
    line-height: 1.3;
    overflow-wrap: break-word;
    hyphens: none;
    text-wrap: balance;
}

.search-card,
.page-header {
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.page-header {
    margin-bottom: 2rem;
}

.search-card h1,
.search-card h2,
.page-header h1 {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    font-size: clamp(1.35rem, 3.5vw, 1.8rem);
    margin-top: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.lead {
    color: var(--text-secondary);
    margin: 0.75rem auto 0;
    max-width: 640px;
}

.mystic-symbol-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 1rem auto;
}

.mystic-symbol-container svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 10px rgba(var(--gold-rgb), 0.3));
}

/* ==========================================================================
   FORMULARIOS Y BOTONES
   ========================================================================== */
.form-group {
    display: flex;
    gap: 0.75rem;
    margin: 2rem auto 0 auto;
    max-width: 600px;
    width: 100%;
}

.input-field {
    flex: 1;
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-line);
    color: var(--text-primary);
    padding: 0.9rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    color-scheme: dark;
}

/* Texto de ayuda: --mut sobre --bg-input da 6.4:1 (el gris del navegador quedaba en 4.3:1) */
.input-field::placeholder {
    color: var(--mut);
    opacity: 1;
}

.form-group .input-field {
    text-align: center;
}

.input-field:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(var(--gold-rgb), 0.2);
}

.btn-submit,
.btn-ghost,
.btn-danger {
    display: inline-block;
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 0.9rem 1.75rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* 44 px también mientras carga la fuente web (con la fuente de reserva la línea es más baja) */
    min-height: 44px;
}

.btn-submit:hover {
    background: var(--accent-gold);
    color: #060814;
    box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-ghost {
    border-color: var(--border-line-hover);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.btn-ghost:hover {
    border-color: var(--line-hover);
    color: var(--tx);
}

.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
    font-family: var(--font-body);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-error {
    color: var(--danger);
    margin-top: 1rem;
}

/* Autocompletado */
.autocomplete {
    position: relative;
    flex: 1;
    display: flex;
}

.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 260px;
    list-style: none;
    background: #0d1126;
    border: 1px solid var(--border-line-hover);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    z-index: 1200;
    overflow: hidden;
    text-align: left;
}

.autocomplete-list[hidden] {
    display: none;
}

.autocomplete-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.autocomplete-list a:hover,
.autocomplete-list a.is-active {
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--accent-gold);
}

.autocomplete-type {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ==========================================================================
   SECCIONES, GRIDS Y TARJETAS
   ========================================================================== */
.home-section {
    margin-top: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    text-align: center;
    margin: 2.5rem 0 1.5rem 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.home-section > .section-title:first-child {
    margin-top: 0;
}

.section-title-left {
    text-align: left;
    margin: 0 0 0.75rem;
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    margin: -0.75rem 0 1.5rem;
}

.section-more {
    text-align: center;
    margin-top: 1rem;
}

.mistic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.mistic-grid-item {
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 22px 18px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.mistic-grid-item:hover {
    border-color: var(--line-hover);
}

.grid-number {
    font-size: 1.75rem;
    color: var(--accent-gold);
    font-weight: 700;
    font-family: var(--font-body);
    line-height: 1.1;
}

.mistic-grid-item h3,
.grid-item-title {
    font-family: var(--font-body);
    color: var(--tx);
    margin-top: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.45;
    text-wrap: balance;
    hyphens: none;
}

.grid-item-text {
    font-size: 0.85rem;
    color: var(--tx2);
    margin-top: 0.4rem;
}

.result-card {
    margin-top: 2rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: left;
}

.result-card h2,
.result-card h3 {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-line);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.result-card p + p {
    margin-top: 0.75rem;
}

.result-label {
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    text-align: center;
}

.result-card .big-number {
    text-align: center;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-line);
    margin-top: 0.75rem;
}

/* Artículos de contenido */
.article-hero {
    margin-bottom: 1.5rem;
}

.big-number {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2.8rem, 9vw, 4.5rem);
    color: var(--gold);
    line-height: 1.1;
}

.vibration-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.35rem 1rem;
    border: 1px solid var(--border-line-hover);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vibration-badge strong {
    color: var(--tx);
}

.prose-card {
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    line-height: 1.7;
}

.prose-card h1 {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    font-size: clamp(1.35rem, 3.5vw, 1.8rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose-card h2 {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    font-size: 1.2rem;
    /* auto a los lados: el título comparte borde con el texto en la columna de 38rem */
    margin: 2rem auto 0.75rem;
    font-weight: 600;
}

.prose-card h3 {
    color: var(--gold-soft);
    font-size: 1.05rem;
    margin: 1.5rem auto 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.prose-card > h2:first-child,
.prose-card > h1:first-child {
    margin-top: 0;
}

.prose-card p,
.prose-card ul,
.prose-card ol,
.prose-card blockquote {
    margin-bottom: 1rem;
}

.prose-card ul,
.prose-card ol {
    padding-left: 1.4rem;
}

.prose-card li {
    margin-bottom: 0.4rem;
}

/* Lectura larga: columna centrada de unos 68 caracteres, 17 px e interlineado 1.7.
   En rem y no en ch: el «0» de Plus Jakarta es más ancho que la letra media (68ch ≈ 100 letras). */
.prose-card > * {
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

.prose-card p,
.prose-card li {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--tx);
}

.prose-card h2 {
    margin-top: 2.5rem;
}

.prose-card li::marker {
    color: var(--mut);
}

/* Preguntas frecuentes plegables */
.faq-item {
    border-top: 1px solid var(--line);
}

.faq-item:last-of-type {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px;
    padding: 0.85rem 0;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    color: var(--gold);
    font-size: 1.35rem;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: '−';
}

.prose-card .faq-item summary h3 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--tx);
}

.faq-item summary:hover h3 {
    color: var(--gold-soft);
}

.faq-item > p {
    padding-bottom: 0.75rem;
    color: var(--tx2);
}

.prose-card blockquote {
    border-left: 3px solid rgba(var(--gold-rgb), 0.4);
    padding: 0.5rem 1.25rem;
    color: var(--tx2);
    font-style: italic;
    background: rgba(var(--gold-rgb), 0.05);
}

.prose-card hr {
    border: none;
    border-top: 1px solid var(--border-line);
    margin: 2rem auto;
}

.advice-box {
    border: 1px solid var(--line);
    background: rgba(var(--gold-rgb), 0.05);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
}

.prose-card .advice-box h2 {
    margin-top: 0;
}

.advice-box p:last-child {
    margin-bottom: 0;
}

.related-callout {
    margin-top: 1.5rem;
    text-align: center;
}

.digit-list {
    list-style: none;
    padding-left: 0 !important;
}

.cta-card {
    margin-top: 2rem;
    padding: 1.75rem;
    border: 1px dashed var(--border-line-hover);
    border-radius: 12px;
    text-align: center;
}

.cta-card p {
    margin-bottom: 1rem;
    font-family: var(--font-body);
    color: var(--tx);
    font-weight: 600;
}

.prev-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.prev-next a {
    text-decoration: none;
}

.keyword-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.keyword-list li {
    font-size: 0.75rem;
    border: 1px solid var(--border-line);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    color: var(--text-secondary);
}

.card-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Bloques de la home */
.feature-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.feature-panel {
    container-type: inline-size;
    min-width: 0;
    max-width: 100%;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 1.75rem;
}

/* Fila de cartas sin scroll: 3 columnas (2 filas de 3) o 2 si el panel es muy estrecho.
   La letra escala con el ancho del panel (contenedor .feature-panel, unidades cqi) para que el nombre quepa siempre entero. */
.tarot-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 6.5rem));
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    margin-top: 1.25rem;
}

@container (min-width: 280px) {
    .tarot-row {
        grid-template-columns: repeat(3, minmax(0, 6.5rem));
    }

    .tarot-row .tarot-card {
        font-size: min(0.72rem, 3.9cqi);
    }
}

.tarot-row a {
    min-width: 0;
    text-decoration: none;
}

.tarot-row .tarot-card {
    font-size: min(0.72rem, 5.5cqi);
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    text-align: left;
}

.calc-form label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-form-wide {
    max-width: 420px;
    margin: 0 auto;
}

/* ==========================================================================
   TAROT
   ========================================================================== */
.tarot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    aspect-ratio: 7 / 12;
    width: 100%;
    padding: 0.6em 0.4em;
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 45%, rgba(var(--gold-rgb), 0.14) 0%, transparent 65%),
        linear-gradient(160deg, #141a3a 0%, #090c1d 100%);
    box-shadow: inset 0 0 0 3px rgba(6, 8, 20, 0.9), inset 0 0 0 4px rgba(var(--gold-rgb), 0.35), 0 8px 18px rgba(0, 0, 0, 0.5);
    color: var(--accent-gold);
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    transition: transform 0.4s ease;
}

.tarot-card-numeral {
    font-family: var(--font-body);
    font-size: 1.1em;
    font-weight: 600;
    color: var(--tx2);
}

.tarot-card-icon {
    width: 48%;
    height: auto;
    aspect-ratio: 1;
    color: var(--accent-gold-bright);
    filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), 0.45));
}

.tarot-card-name {
    font-family: var(--font-body);
    font-size: 0.95em;
    line-height: 1.2;
    color: var(--tx);
    font-weight: 600;
    hyphens: none;
}

.tarot-card.is-reversed {
    transform: rotate(180deg);
}

.tarot-card-large {
    width: 170px;
    font-size: 1rem;
    flex-shrink: 0;
}

.tarot-card-back {
    justify-content: center;
    background:
        repeating-linear-gradient(45deg, rgba(var(--gold-rgb), 0.06) 0 6px, transparent 6px 12px),
        linear-gradient(160deg, #141a3a 0%, #090c1d 100%);
}

/* Carta con ilustración (assets/img/tarot): la imagen ya trae su marco; el nombre en español va debajo */
.tarot-card.tarot-card-photo {
    display: block;
    padding: 0;
    border: 0;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.tarot-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarot-grid-item:hover .tarot-card-photo {
    box-shadow: 0 0 0 1px var(--line-hover), 0 12px 24px rgba(0, 0, 0, 0.6);
}

.tarot-card-photo + .tarot-card-name {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: var(--tx);
    text-wrap: balance;
}

.tarot-row .tarot-card-photo + .tarot-card-name {
    font-size: max(10.5px, min(0.8rem, 3.7cqi));
}

.tarot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 1rem;
}

.tarot-grid-item {
    text-decoration: none;
    transition: transform 0.3s ease;
}

.tarot-grid-item:hover {
    transform: translateY(-4px);
}

.tarot-grid-item:hover .tarot-card {
    box-shadow: inset 0 0 0 3px rgba(6, 8, 20, 0.9), inset 0 0 0 4px var(--accent-gold), 0 12px 24px rgba(0, 0, 0, 0.6);
}

.tarot-group + .tarot-group {
    margin-top: 1rem;
}

.tarot-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    text-align: left;
}

.tarot-hero .lead {
    margin-left: 0;
}

.spread-links,
.calc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.spread-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.spread-link:hover {
    border-color: var(--line-hover);
    color: var(--text-primary);
}

.spread-link strong {
    font-family: var(--font-body);
    color: var(--tx);
    font-weight: 600;
}

.spread-link-count {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
}

.spread-link .text-muted {
    font-size: 0.85rem;
}

.spread-steps {
    list-style-position: inside;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.spread-slots {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.spread-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 140px;
}

.spread-slot .tarot-card {
    font-size: 0.85rem;
}

.spread-slot.is-revealed .tarot-card {
    animation: card-reveal 0.6s ease both;
}

.spread-slot.is-revealed .tarot-card.is-reversed {
    animation-name: card-reveal-reversed;
}

.spread-position {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.is-shuffling .spread-slot .tarot-card {
    animation: card-shuffle 0.45s ease-in-out infinite alternate;
}

.is-shuffling .spread-slot:nth-child(2) .tarot-card {
    animation-delay: 0.15s;
}

.is-shuffling .spread-slot:nth-child(3) .tarot-card {
    animation-delay: 0.3s;
}

@keyframes card-shuffle {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-10px) rotate(2deg); }
}

@keyframes card-reveal {
    from { transform: rotateY(90deg); opacity: 0.3; }
    to { transform: rotateY(0); opacity: 1; }
}

@keyframes card-reveal-reversed {
    from { transform: rotateY(90deg) rotate(180deg); opacity: 0.3; }
    to { transform: rotateY(0) rotate(180deg); opacity: 1; }
}

.spread-result {
    text-align: left;
}

.yes-no-answer {
    font-family: var(--font-body);
    font-size: 2.2rem;
    color: var(--accent-gold);
    text-align: center;
    font-weight: 700;
}

.advice-inline {
    color: var(--tx);
}

.spread-reading a {
    display: inline-block;
    margin-top: 1rem;
}

/* ==========================================================================
   NUMEROLOGÍA
   ========================================================================== */
.number-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.number-strip a {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-line);
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
}

.number-strip a:hover,
.number-strip a[aria-current] {
    border-color: var(--line-hover);
    background: rgba(var(--gold-rgb), 0.12);
}

/* ==========================================================================
   BLOG Y BÚSQUEDA
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: border-color 0.3s ease;
}

.post-card:hover {
    border-color: var(--border-line-hover);
}

.post-card h2,
.post-card h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
}

.post-card h2 a,
.post-card h3 a {
    color: var(--tx);
    text-decoration: none;
}

.post-card .text-muted {
    font-size: 0.9rem;
    flex: 1;
}

.post-card time,
.post-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.page-header .post-meta {
    margin-top: 0.75rem;
}

.post-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.post-body {
    font-size: 1.05rem;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.category-nav a,
.pagination a,
.pagination span {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-line);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
}

.category-nav a[aria-current],
.pagination span {
    border-color: var(--line-hover);
    background: rgba(var(--gold-rgb), 0.12);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 1rem;
}

.empty-state p + p {
    margin-top: 0.75rem;
}

.search-results {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.search-results li {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.search-results a {
    font-family: var(--font-body);
    font-size: 1.05rem;
    text-decoration: none;
    display: block;
    margin: 0.2rem 0 0.4rem;
    font-weight: 600;
}

.result-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.legal {
    margin-top: 0;
}

.contact-email {
    overflow-wrap: anywhere;
    background: var(--bg-input);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-line);
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-gold);
}

/* ==========================================================================
   PUBLICIDAD, FRASES Y FOOTER
   ========================================================================== */
.ad-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    min-height: 250px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px dashed var(--border-line);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.mystic-quote-banner {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px 40px;
    margin: 2.5rem auto 1rem auto;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(var(--gold-rgb), 0.02);
}

.quote-icon {
    color: var(--accent-gold);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.quote-text {
    font-family: var(--font-body);
    color: var(--tx2);
    font-size: 1.1875rem;
    font-style: italic;
    line-height: 1.55;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
    font-weight: 400;
}

.quote-author {
    color: var(--mut);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
    transition: opacity 0.5s ease-in-out;
}

.quote-fade-out {
    opacity: 0;
}

.site-footer {
    background: rgba(6, 8, 20, 0.95);
    border-top: 1px solid var(--border-line);
    padding: 2.5rem 1.25rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: auto;
}

.footer-grid {
    max-width: var(--max-width-header);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    font-family: var(--font-logo);
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer-heading {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer li + li {
    margin-top: 0.35rem;
}

.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-gold);
}

.footer-disclaimer,
.footer-copy {
    max-width: var(--max-width-header);
    margin: 2rem auto 0;
    text-align: center;
    font-size: 0.8rem;
}

.footer-copy {
    margin-top: 0.5rem;
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================== */
.admin-main {
    max-width: 1100px;
}

.admin-header {
    flex-wrap: wrap;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
}

.admin-nav a {
    color: var(--text-primary);
    text-decoration: none;
}

.inline-form {
    display: inline;
}

.link-button {
    background: none;
    border: none;
    color: var(--accent-gold);
    font: inherit;
    cursor: pointer;
}

.admin-title {
    font-family: var(--font-heading);
    color: var(--accent-gold-bright);
    font-size: 1.5rem;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-auth {
    max-width: 440px;
    margin: 2rem auto;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
    margin-top: 1.5rem;
}

.admin-form-wide {
    gap: 1.25rem;
}

.admin-form label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field textarea {
    resize: vertical;
    line-height: 1.6;
}

.field-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.field-error {
    font-size: 0.85rem;
    color: var(--danger);
}

.has-error .input-field {
    border-color: var(--danger);
}

.checkbox-label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 0.75rem;
}

/* Fase 27: qué cambiaría «Actualizar base de datos» */
.pending-status {
    margin: 0 0 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-line);
    overflow-wrap: anywhere;
}

.pending-status.is-pending {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.pending-status.is-clean {
    color: var(--success);
}

.admin-filter {
    margin: 0 0 1.5rem;
    max-width: 480px;
}

.danger-zone {
    margin-top: 3rem;
    padding: 1.25rem;
    border: 1px solid rgba(241, 154, 154, 0.35);
    border-radius: 10px;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.flash {
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--success);
    color: var(--success);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-tile {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

/* Bloque «También te puede interesar» y aviso de reflexión */
.related-block {
    margin-top: 2rem;
}

/* «Guardar en Pinterest» (Fase 25): enlace normal, sin script externo */
.pin-share {
    margin: 1.5rem 0 0;
    text-align: center;
}

.pin-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pin-icon {
    flex-shrink: 0;
}

/* Carta y número del día (Fase 23) */
.daily-block {
    margin-top: 2rem;
}

.daily-date {
    margin: -0.5rem 0 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

.daily-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: 0;
    padding: 1.25rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
}

.daily-item > div {
    min-width: 0;
}

.daily-item .grid-number {
    flex-shrink: 0;
    min-width: 4.5rem;
    margin: 0;
    text-align: center;
}

.daily-card-img {
    flex-shrink: 0;
    width: 72px;
    height: auto;
    border-radius: 6px;
}

.daily-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.daily-item h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    hyphens: none;
}

.daily-item h3 a {
    color: var(--accent-gold);
    text-decoration: none;
}

.daily-item h3 a:hover {
    text-decoration: underline;
}

/* Fase 22: las secciones que suelen quedar fuera de la primera pantalla no se maquetan hasta
   acercarse a ella (el primer pintado en móvil se adelanta unos 200 ms). «auto» recuerda la altura
   real una vez pintadas, así que al volver a subir no hay saltos. */
.home-section,
.prose-card.faq,
.products-block,
.related-block,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* content-visibility recorta lo que sobresale de la sección: el anillo de foco va por dentro */
:is(.home-section, .prose-card.faq, .products-block, .related-block, .site-footer) :focus-visible {
    outline-offset: -2px;
}

.related-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.related-list a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.6rem 1rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.related-list a:hover {
    border-color: var(--line-hover);
}

.related-list strong {
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--accent-gold);
}

/* «También te puede interesar» (Fase 21): la nota baja de línea si no cabe junto al nombre */
.related-block .related-list a {
    flex-wrap: wrap;
    row-gap: 0.1rem;
}

.related-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.disclaimer-note {
    margin: 1.5rem 0 0;
    text-align: center;
}

/* Generador de informes */
.report-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
}

.section-picker {
    border: 1px solid var(--border-line);
    border-radius: 10px;
    padding: 0.5rem 1rem 1rem;
}

.section-picker.has-error {
    border-color: var(--danger);
}

.section-picker summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--accent-gold);
    font-weight: 600;
}

.section-picker-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 0.75rem;
}

.section-picker-tools .btn-ghost {
    padding: 0.5rem 1rem;
}

.section-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0 1rem;
}

.section-list .checkbox-label {
    min-height: 44px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.section-list input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--accent-gold);
}

.report-preview,
.report-log {
    margin-top: 2rem;
}

.preview-list {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 0.5rem 1rem;
    margin: 1rem 0;
}

.preview-list dt {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.preview-list dd {
    overflow-wrap: anywhere;
}

.preview-warning {
    color: var(--danger);
}

@media (max-width: 640px) {
    .preview-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.15rem;
    }

    .preview-list dd {
        margin-bottom: 0.6rem;
    }
}

/* position: relative para que los textos .visually-hidden (absolutos) de la tabla queden dentro
   del contenedor con scroll y no ensanchen la página */
.table-wrap {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-line-hover) transparent;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-line);
    /* Los términos buscados por los visitantes pueden ser una sola palabra muy larga */
    overflow-wrap: anywhere;
}

.admin-table th {
    color: var(--text-secondary);
    font-weight: 600;
}

.status-pill {
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-line-hover);
}

.status-published {
    color: var(--success);
    border-color: var(--success);
}

code {
    background: var(--bg-input);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #060814;
        border-bottom: 1px solid var(--border-line);
        display: none;
        padding: 1.25rem;
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.9);
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    /* Objetivos táctiles de al menos 44x44 px */
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .main-nav a,
    .admin-nav a,
    .link-button,
    .site-footer li a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        min-width: 44px;
    }

    .site-footer li + li {
        margin-top: 0;
    }

    .admin-nav {
        row-gap: 0;
    }

    .dropdown-menu a {
        white-space: normal;
    }

    .dropdown,
    .nav-search-item,
    .input-compact {
        width: 100%;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        display: none !important;
    }

    .dropdown.active .dropdown-menu {
        display: flex !important;
    }

    .dropdown-menu {
        position: static;
        width: auto;
        min-width: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        padding-left: 1rem;
    }

    .feature-split,
    .admin-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    /* Gutters laterales de 16 px */
    .main-container,
    .header-container,
    .site-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-title {
        font-size: 1.25rem;
        white-space: normal;
    }

    .search-card,
    .page-header {
        padding: 2rem 1.25rem;
    }

    .prose-card {
        padding: 1.5rem 1.25rem;
    }

    .form-group {
        flex-direction: column;
    }

    .btn-submit {
        width: 100%;
    }

    .tarot-hero {
        flex-direction: column;
        text-align: center;
    }

    .tarot-hero .keyword-list {
        justify-content: center;
    }

    .tarot-card-large {
        width: 140px;
    }

    .spread-slot {
        width: 96px;
    }

    .spread-slot .tarot-card {
        font-size: 0.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   ZODIACO
   ========================================================================== */
.element-fuego { --element-color: #f0a97f; }
.element-tierra { --element-color: #c3d29a; }
.element-aire { --element-color: #b3cdee; }
.element-agua { --element-color: #93d0d2; }

.zodiac-symbol {
    font-size: 2.2rem;
    line-height: 1;
    color: var(--element-color, var(--accent-gold));
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.zodiac-grid-small {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.zodiac-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.zodiac-item:hover {
    border-color: var(--line-hover);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
}

.zodiac-item .grid-item-title {
    margin-top: 0.25rem;
}

.zodiac-dates {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.zodiac-element {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--element-color);
}

.zodiac-hero-symbol {
    font-size: clamp(3.5rem, 12vw, 5.5rem);
    line-height: 1;
    color: var(--element-color);
}

.zodiac-hero-dates {
    color: var(--tx2);
    font-weight: 600;
    margin-top: 0.25rem;
}

.keyword-list-center {
    justify-content: center;
}

.zodiac-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.fact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    text-decoration: none;
}

.fact-link:hover {
    border-color: var(--line-hover);
}

.fact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.fact-value {
    font-family: var(--font-body);
    color: var(--tx);
    font-weight: 600;
}

.zodiac-finder {
    margin: 1.75rem auto 0;
    max-width: 520px;
}

.zodiac-finder-title {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.cta-card .zodiac-finder {
    margin-top: 0;
}

.zodiac-finder-fields {
    display: flex;
    gap: 0.75rem;
}

.zodiac-finder-fields .input-field {
    padding: 0.8rem 1rem;
}

/* «¿Qué signo soy?»: resultado bajo el formulario */
.sign-result {
    max-width: 520px;
    margin: 1.25rem auto 0;
}

.sign-result-main {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--tx);
}

.sign-result-note {
    margin-top: 0.5rem;
    color: var(--tx2);
}

/* Signos de cada mes: leyenda y calendario de un día por celda (sin día de la semana: no hay año) */
.month-calendar-card {
    background: transparent;
}

.prose-card .sign-legend {
    list-style: none;
    padding: 0;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--tx2);
}

.sign-legend-symbol {
    color: var(--gold-soft);
    font-size: 1.2rem;
}

.sign-legend-dates,
.sign-legend-cusp {
    font-size: 0.9rem;
}

.sign-legend-cusp {
    flex-basis: 100%;
}

.prose-card .sign-calendar {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr));
    gap: 0.5rem;
}

.prose-card .sign-calendar li,
.prose-card .sign-legend li {
    margin: 0;
    min-width: 0;
    font-size: inherit;
    color: inherit;
}

.sign-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    text-decoration: none;
    line-height: 1.2;
}

.sign-day.is-cusp {
    border-style: dotted;
}

/* Después de la cúspide: el primer día de un signo conserva el borde izquierdo continuo */
.sign-day.is-change {
    border-left: 3px solid var(--line);
}

.sign-day:hover,
.sign-day:focus-visible {
    border-color: var(--border-line-hover);
}

.sign-day-num {
    color: var(--tx);
    font-size: 1.25rem;
    font-weight: 600;
}

.sign-day-dot {
    font-size: 0.6rem;
    margin-left: 0.15rem;
    vertical-align: super;
}

.sign-day-symbol {
    color: var(--gold-soft);
    font-size: 1.1rem;
}

.sign-day-name {
    color: var(--tx2);
    font-size: 0.75rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* En móvil, 4 columnas: celdas más estrechas y nombre más pequeño («Capricornio» cabe entero) */
@media (max-width: 480px) {
    .prose-card .sign-calendar {
        grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
        gap: 0.4rem;
    }

    .sign-day {
        padding: 0.45rem 0.1rem;
    }

    .sign-day-name {
        font-size: 0.66rem;
    }
}

.prose-card .sign-cusp-days {
    margin-top: 1rem;
    color: var(--tx2);
}

.month-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.25rem 1rem;
}

.zodiac-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.zodiac-strip a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    background: var(--bg-surface);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.zodiac-strip a:hover {
    border-color: var(--element-color);
    transform: translateY(-3px);
    color: var(--text-primary);
}

.zodiac-strip .zodiac-symbol {
    font-size: 1.8rem;
}

@media (max-width: 640px) {
    .zodiac-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .zodiac-finder-fields {
        flex-direction: column;
    }
}

/* ==========================================================================
   COMPATIBILIDAD
   ========================================================================== */
.compat-finder {
    margin: 1.75rem auto 0;
    max-width: 640px;
}

.cta-card .compat-finder {
    margin-top: 0;
}

.compat-heart {
    color: #e88a9a;
    align-self: center;
    font-size: 1.2rem;
}

.compat-hero-symbols {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: clamp(3rem, 10vw, 4.5rem);
    line-height: 1;
}

.compat-hero-symbols > span:not(.compat-heart) {
    color: var(--element-color);
}

.compat-hero-symbols .compat-heart {
    font-size: 0.5em;
}

.compat-average {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.score-bars {
    max-width: 460px;
    margin: 1.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.score-row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    font-size: 0.9rem;
}

.score-row dt {
    color: var(--text-secondary);
}

.score-row dd {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.score-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(var(--gold-rgb), 0.12);
    overflow: hidden;
}

.score-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.6), var(--gold));
}

.score-value {
    width: 2.75rem;
    text-align: right;
    font-weight: 600;
    color: var(--accent-gold);
}

.compat-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    font-size: 0.85rem;
}

.compat-matrix th {
    font-weight: 600;
    padding: 0.35rem;
}

.compat-matrix thead .zodiac-symbol {
    font-size: 1.3rem;
}

.compat-matrix tbody th {
    text-align: left;
    white-space: nowrap;
}

.compat-matrix tbody th a {
    color: var(--text-primary);
    text-decoration: none;
}

.score-cell {
    display: block;
    min-width: 2.4rem;
    padding: 0.45rem 0.25rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-primary);
    transition: transform 0.2s ease;
}

.score-cell:hover {
    transform: scale(1.12);
    color: var(--bg-primary);
    background: var(--accent-gold);
}

.score-muy-alta { background: rgba(var(--gold-rgb), 0.62); color: #060814; }
.score-alta { background: rgba(var(--gold-rgb), 0.32); }
.score-media { background: rgba(var(--gold-rgb), 0.15); }
.score-baja { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary); }

.compat-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.compat-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.compat-list a:hover {
    border-color: var(--line-hover);
    color: var(--text-primary);
}

.compat-list .zodiac-symbol {
    font-size: 1.4rem;
    width: 1.75rem;
    text-align: center;
}

.compat-list-name {
    flex: 1;
    font-size: 0.9rem;
}

.compat-list-score {
    font-weight: 600;
    color: var(--accent-gold);
}

@media (max-width: 640px) {
    .compat-finder .compat-heart {
        display: none;
    }
}

/* ==========================================================================
   INFORME PERSONAL (VENTA EN ETSY) Y LEYENDA
   ========================================================================== */
.plans {
    display: grid;
    /* min(100%, …): en pantallas estrechas la columna nunca supera el ancho disponible */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.plan {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
}

.plan-featured {
    border-color: var(--line-hover);
    box-shadow: 0 0 25px rgba(var(--gold-rgb), 0.15);
}

.plan-title {
    font-family: var(--font-body);
    color: var(--tx);
    font-size: 1.1rem;
    overflow-wrap: anywhere;
    font-weight: 600;
    line-height: 1.45;
}

.plan-price {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.6rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.plan-price strong {
    color: var(--accent-gold);
    font-size: 1.15rem;
}

.plan-label {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

.plan-list {
    list-style: none;
    margin: 0.5rem 0 1.25rem;
    flex: 1;
}

.plan-list li {
    padding: 0.3rem 0 0.3rem 1.3rem;
    position: relative;
    font-size: 0.92rem;
}

.plan-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
}

.plan-cta .btn-submit {
    width: 100%;
    white-space: normal;
}

.plan-soon {
    display: block;
    text-align: center;
    padding: 0.9rem;
    border: 1px dashed var(--border-line-hover);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.steps {
    padding-left: 1.4rem;
}

/* Botón de la página 410: puede partirse en dos líneas en pantallas muy estrechas */
.gone-cta .btn-submit {
    white-space: normal;
    max-width: 100%;
}

.report-cta {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.result-disclaimer {
    margin-top: 1.25rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-line);
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: left;
}

/* ==========================================================================
   APOYO AL PROYECTO (DONACIONES)
   ========================================================================== */
/* Discreto: texto secundario, sin dorado ni iconos; solo se subraya al pasar el ratón */
.support-note {
    max-width: 38rem;
    margin: 2rem auto 0;
    font-size: 0.95rem;
    color: var(--tx2);
    text-align: center;
}

.support-note a,
.site-footer a.support-link {
    color: var(--tx2);
    text-decoration: none;
}

.support-note a:hover,
.support-note a:focus-visible,
.site-footer a.support-link:hover,
.site-footer a.support-link:focus-visible {
    color: var(--tx2);
    text-decoration: underline;
}

.support-cta {
    text-align: center;
    margin: 2rem 0 1rem;
}

/* ==========================================================================
   PRODUCTOS RECOMENDADOS (AFILIADOS)
   ========================================================================== */
.products-block {
    margin-top: 2.5rem;
}

.products-heading {
    font-family: var(--font-heading);
    color: var(--gold-soft);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    border-color: var(--line-hover);
    color: var(--text-primary);
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-title {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.35;
}

.product-description {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.product-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.affiliate-note {
    margin-top: 0.9rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.affiliate-note-top {
    text-align: center;
    margin: 0 0 1rem;
}

/* Fase 26: en los bloques de las fichas, entre el título y los productos */
.affiliate-note-before {
    margin: -0.25rem 0 1rem;
}
