/* ═══════════════════════════════════════════════════════════════════════════
   HIGHER OR LOWER — compara el BST (Base Stat Total) de dos Pokémon.
   Mecánica calcada del juego equivalente de OP (bounty → BST), tema visual
   propio de Pokemon (paleta navy/oro de common.css, Press Start 2P + Roboto).

   Todo lo específico va prefijado .hl-* / --hl-*. El modal de vida reutiliza
   .modal-static-* de common.css en vez de definir el suyo propio (mismo
   patrón que el modal de rendición de grid.css).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --hl-screen-bg:     #f0f0e8;
    --hl-card-bg:       #ffffff;
    --hl-card-border:   rgba(0, 58, 112, 0.35);
    --hl-card-shadow:   0 4px 14px rgba(0, 58, 112, 0.12);
    --hl-text:          #1a2a4a;
    --hl-correct:       var(--state-correct);
    --hl-wrong:         var(--state-incorrect);
}

.pokedex-screen {
    background: var(--hl-screen-bg) !important;
}

.hl-game-container.game-container {
    background: transparent !important;
    border-color: transparent !important;
    width: 100%;
    margin: 0 auto;
    padding: 22px 16px 30px;
    text-align: center;
}

/* ── Cabecera: timer + vida + progreso ───────────────────────────────────── */
.hl-top-header {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    max-width: 520px;
    margin: 0 auto 12px;
}

.hl-timer-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hl-timer-bar-wrap {
    height: 8px;
    border-radius: var(--radius-pill);
    background: rgba(0, 58, 112, 0.12);
    overflow: hidden;
}

.hl-timer-bar {
    height: 100%;
    width: 100%;
    background: var(--poke-blue);
    border-radius: var(--radius-pill);
    transition: width 0.3s linear, background-color 0.3s;
}

.hl-timer-bar.hl-timer-bar-warning { background: var(--poke-yellow); }
.hl-timer-bar.hl-timer-bar-ended   { background: var(--hl-wrong); }

.hl-timer-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    color: var(--hl-text);
}

.hl-timer-display.hl-timer-warning { color: var(--hl-wrong); animation: hl-pulse 0.8s infinite; }
.hl-timer-display.hl-timer-ended   { color: var(--hl-wrong); }

.hl-life-container { flex: 0 0 auto; }

.hl-life-icon {
    font-size: 1.6rem;
    display: inline-block;
}

.hl-life-icon.hl-life-burst { animation: hl-life-burst 0.7s ease; }

.hl-progress-container {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--hl-text);
}

.hl-progress-label { font-size: 0.6rem; margin-right: 6px; opacity: 0.75; }
.hl-progress-sep    { opacity: 0.5; }
.hl-progress-total  { opacity: 0.6; }

/* ── Pista ────────────────────────────────────────────────────────────────── */
.hl-pick-hint {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--hl-text);
    opacity: 0.8;
    margin: 0 0 16px;
}

/* ── Cartas ───────────────────────────────────────────────────────────────── */
.hl-cards-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    max-width: 520px;
    margin: 0 auto;
}

.hl-card {
    flex: 1 1 0;
    min-width: 0;
    cursor: pointer;
    transition: transform 0.15s;
    position: relative;
}

.hl-card:hover:not(.hl-card-disabled) { transform: translateY(-3px); }

.hl-card.hl-card-disabled { cursor: default; pointer-events: none; opacity: 0.85; }

.hl-card-inner {
    background: var(--hl-card-bg);
    border: 2px solid var(--hl-card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--hl-card-shadow);
    padding: 10px 8px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hl-photo-area {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 58, 112, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.hl-photo-area.hl-photo-loading { opacity: 0.4; }

.hl-char-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hl-name-area {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--hl-text);
    text-align: center;
    min-height: 1.2em;
}

.hl-bst-area {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.hl-bst-tag {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    color: var(--poke-blue);
    opacity: 0.8;
}

.hl-bst-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--hl-text);
}

.hl-bst-hidden {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--poke-blue);
    opacity: 0.6;
}

.hl-vs-divider {
    flex: 0 0 auto;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--poke-red);
}

/* ── Feedback de acierto/fallo al estilo WhatPiece ─────────────────────────── */
.hl-card.hl-flash-correct .hl-card-inner {
    border-color: var(--hl-correct);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-correct) 35%, transparent);
}

.hl-card.hl-flash-wrong .hl-card-inner {
    border-color: var(--hl-wrong);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-wrong) 35%, transparent);
    animation: hl-shake 0.4s;
}

.hl-card.hl-flash-correct,
.hl-card.hl-flash-wrong {
    opacity: 1;
}

.hl-card::before,
.hl-card::after {
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.hl-card::before {
    content: '';
    inset: 0;
    z-index: 5;
    border-radius: var(--radius-md);
}

.hl-card::after {
    top: 50%;
    left: 50%;
    z-index: 6;
    display: grid;
    width: 90%;
    height: 90%;
    place-items: center;
    color: #fff;
    font: 600 clamp(4rem, 9vw, 6.5rem)/1 Arial, sans-serif;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .62);
    transform: translate(-50%, -50%);
    transform-origin: center;
    scale: .84;
}

.hl-card.hl-flash-correct::before {
    background: color-mix(in srgb, var(--state-correct) 55%, transparent);
    opacity: 1;
}

.hl-card.hl-flash-wrong::before {
    background: color-mix(in srgb, var(--state-incorrect) 55%, transparent);
    opacity: 1;
}

.hl-card.hl-flash-correct::after,
.hl-card.hl-flash-wrong::after {
    opacity: .62;
    animation: hl-result-symbol-in .24s cubic-bezier(.2, .8, .25, 1) both;
}

.hl-card.hl-flash-correct::after {
    content: "\2713\FE0E";
}

.hl-card.hl-flash-wrong::after {
    content: "\00D7\FE0E";
}

@keyframes hl-result-symbol-in {
    from { opacity: .24; scale: .84; }
    to { opacity: .62; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hl-card.hl-flash-correct::after,
    .hl-card.hl-flash-wrong::after {
        animation: none;
        scale: 1;
    }
}

/* ── Transición entre rondas ──────────────────────────────────────────────── */
.hl-card.hl-slide-out-left { animation: hl-slide-out 0.4s forwards; }
.hl-card.hl-slide-in-right { animation: hl-slide-in 0.4s forwards; }

@keyframes hl-slide-out {
    to { transform: translateX(-24px); opacity: 0; }
}
@keyframes hl-slide-in {
    from { transform: translateX(24px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes hl-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}
@keyframes hl-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
@keyframes hl-life-burst {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* ── Modal de vida: botón "usar vida" en verde (el resto viene de
   .modal-static-*/.btn-modal-confirm en common.css) ─────────────────────────── */
.hl-btn-use-life {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success-dark);
}
.hl-btn-use-life:hover { background: var(--color-success-dark); }

/* .modal-static-title está pensado para títulos de 1-2 palabras (el de
   rendición de Grid es "¿Rendirse?"): a 2rem/1.6rem Press Start 2P se sale
   del modal con una frase completa como "¡Respuesta incorrecta!"/"Falsche
   Antwort!". Se acota solo aquí, sin tocar la clase compartida. */
#hlLifeModal .modal-static-title {
    font-size: clamp(1.05rem, 4.2vw, 1.6rem);
    line-height: 1.25;
}
#hlLifeModal .modal-static-desc {
    font-size: 1rem;
}

/* ── Cajas de resultado (mismo patrón que .grid-lose-score-box) ─────────────── */
.hl-win-time-box,
.hl-lose-score-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 6px auto 14px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
}

.hl-win-time-box {
    background: color-mix(in srgb, var(--state-correct) 12%, transparent);
    border: 2px solid color-mix(in srgb, var(--state-correct) 45%, transparent);
}

.hl-lose-score-box {
    background: color-mix(in srgb, var(--state-incorrect) 12%, transparent);
    border: 2px solid color-mix(in srgb, var(--state-incorrect) 45%, transparent);
}

.hl-win-time-label,
.hl-lose-score-label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hl-win-time-label  { color: color-mix(in srgb, var(--state-correct) 40%, white); }
.hl-lose-score-label { color: color-mix(in srgb, var(--state-incorrect) 38%, white); }

.hl-win-time-num,
.hl-lose-score-num {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.15rem;
    color: var(--hl-text);
}

/* ── Tutorial ─────────────────────────────────────────────────────────────── */
.hl-tutorial-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

/* Caja oscura propia (mismo patrón que .bingo-tutorial-demo/
   .grid-tutorial-anim-box): el tutorial modal ahora tiene fondo blanco, y el
   texto "VS" en --poke-yellow + las mini-cards translúcidas de abajo están
   pensados para un fondo oscuro detrás -- sin esta caja quedarían invisibles. */
.hl-tutorial-demo {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--poke-yellow);
    padding: 14px;
    border: 2px solid rgba(61, 125, 202, 0.55);
    border-radius: 10px;
    background: rgba(4, 13, 35, 0.55);
}

.hl-tutorial-mini-card {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
}

.hl-tutorial-mini-card.is-known  { background: color-mix(in srgb, var(--state-correct) 25%, transparent); }
.hl-tutorial-mini-card.is-hidden { background: rgba(255, 255, 255, 0.08); opacity: 0.7; }

/* Fuera de .hl-tutorial-demo (que sí es oscura) -- vive directamente sobre
   el fondo blanco del tutorial, color propio oscuro en vez de #fff8e1. */
.hl-tutorial-text p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--poke-navy);
    margin: 0;
}

/* ── Móvil ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hl-top-header { gap: var(--space-3); }
    .hl-cards-area { gap: var(--space-3); }
    .hl-name-area { font-size: 0.75rem; }
    .hl-bst-text, .hl-bst-hidden { font-size: 0.75rem; }
    .hl-timer-display { font-size: 0.7rem; }
    .hl-progress-container { font-size: 0.65rem; }
}

@media (max-width: 380px) {
    .hl-photo-area { aspect-ratio: 1 / 1; }
    .hl-vs-divider { font-size: 0.65rem; }
}

/* ── FAQ (SEO) — misma caja exacta que el resto de juegos (.faq-section /
   .faq-item de common.css, que a su vez replica .info-game de OP), copiada
   en vez de importada/compartida para no arrastrar el resto del layout de
   info-pages.css (.info-page-shell, etc.) a una página de juego. ── */
.hl-faq-section {
    background: linear-gradient(135deg, var(--poke-navy), var(--poke-navy-dark));
    border: 3px solid var(--poke-yellow);
    border-radius: 12px;
    padding: 30px;
    margin: 40px clamp(18px, 4vw, 44px);
    color: #dbe9f9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    position: relative;
    overflow: hidden;
}

.hl-faq-section-title {
    font: .9rem/1.5 'Press Start 2P', cursive;
    color: var(--poke-yellow);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 203, 5, .3);
}

.hl-faq-item {
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 203, 5, .34);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: inset 3px 0 0 rgba(255, 203, 5, .72);
}

.hl-faq-item:last-child { margin-bottom: 0; }

.hl-faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    color: #ffe9a8;
    transition: color .15s;
}

.hl-faq-item summary::-webkit-details-marker { display: none; }

.hl-faq-item summary::after {
    content: '+';
    color: var(--poke-yellow);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.hl-faq-item[open] summary::after { content: '\2212'; }

.hl-faq-item summary:hover { color: var(--poke-yellow); }

.hl-faq-answer { padding: 0 20px 18px; line-height: 1.6; color: #dbe9f9; opacity: .9; }

@media (max-width: 600px) {
    .hl-faq-section { padding: 20px; margin: 30px 12px; }
    .hl-faq-section-title { font-size: .68rem; }
}

/* ── Tutorial Higher–Lower: composición OP, colorimetría Pokémon ─────────── */
#tutorialModal {
    padding: 12px;
    background: rgba(3, 12, 27, .84);
    backdrop-filter: blur(7px);
}

/* Caja exterior: receta compartida en common.css (sección "TUTORIAL
   MODAL — RECETA COMPARTIDA"). Aquí solo lo que varía: dimensiones y
   animación de entrada propias. */
#tutorialModal .hl-op-tutorial-content {
    width: min(760px, 100%);
    max-width: 760px;
    max-height: calc(100dvh - 24px);
    padding: 22px 24px 21px;
    overflow: hidden auto;
    animation: hlOpTutorialEnter .32s cubic-bezier(.2, .8, .2, 1) both;
}

#tutorialModal .hl-op-tutorial-content::before,
#tutorialModal .hl-op-tutorial-content::after {
    display: none;
}

.hl-op-tutorial-heading {
    text-align: center;
}

.hl-op-tutorial-kicker {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    overflow: hidden;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 999px;
    background: var(--poke-yellow, #ffcb05);
    color: var(--poke-navy, #12355b);
    font: .49rem/1 'Press Start 2P', cursive;
    letter-spacing: .04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.hl-op-tutorial-kicker > span {
    color: var(--poke-red, #e3350d);
    font-size: .72rem;
}

#tutorialModal .hl-op-tutorial-heading .tutorial-title {
    margin: 8px 0 7px;
    padding: 0;
    border: 0;
    color: var(--poke-navy, #12355b);
    font: .96rem/1.3 'Press Start 2P', cursive;
    text-shadow: 2px 2px 0 var(--poke-yellow, #ffcb05);
}

#tutorialModal .hl-op-tutorial-heading .tutorial-title::before,
#tutorialModal .hl-op-tutorial-heading .tutorial-title::after {
    display: none;
}

.hl-op-tutorial-lead {
    width: min(620px, 100%);
    margin: 0 auto 12px;
    color: #284969;
    font: 500 .82rem/1.4 Roboto, Arial, sans-serif;
}

.hl-op-tutorial-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hl-op-step-card {
    position: relative;
    min-width: 0;
    padding: 10px 9px 11px;
    display: grid;
    grid-template-rows: 70px min-content 1fr;
    justify-items: center;
    gap: 6px;
    overflow: hidden;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 9px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 3px 3px 0 rgba(18, 53, 91, .23);
    text-align: center;
}

.hl-op-step-card::before {
    content: attr(data-step);
    position: absolute;
    z-index: 4;
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 2px solid var(--poke-yellow, #ffcb05);
    border-radius: 50%;
    background: var(--poke-navy, #12355b);
    color: #fff;
    box-shadow: 1px 1px 0 #111;
    font: .4rem/1 'Press Start 2P', cursive;
}

/* Pantalla-demo gris: receta compartida en common.css (pieza C). width:100%
   es propio de Higher-or-Lower -- su tarjeta usa justify-items:center, así
   que sin esto la pantalla no ocuparía todo el ancho de la tarjeta. */
.hl-op-anim-box {
    width: 100%;
}

.hl-op-step-card > h3 {
    margin: 0;
    color: var(--poke-navy, #12355b);
    font: .55rem/1.35 'Press Start 2P', cursive;
    text-shadow: 1px 1px 0 var(--poke-yellow, #ffcb05);
}

.hl-op-step-card > p {
    margin: 0;
    color: #334e68;
    font: 500 .71rem/1.28 Roboto, Arial, sans-serif;
}

/* 01 · Comparación de dos Pokémon reales de la secuencia diaria. */
.hl-op-duel {
    position: relative;
    width: min(230px, 82%);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    perspective: 480px;
}

.hl-op-vs {
    z-index: 2;
    width: 27px;
    height: 27px;
    display: grid;
    flex: 0 0 27px;
    place-items: center;
    border: 2px solid var(--poke-yellow, #ffcb05);
    border-radius: 50%;
    background: var(--poke-navy, #12355b);
    color: #fff;
    font: .45rem/1 'Press Start 2P', cursive;
}

.hl-op-pokemon-card {
    position: relative;
    box-sizing: border-box;
    width: 72px;
    height: 62px;
    padding: 2px 3px;
    display: grid;
    grid-template-rows: 32px 10px 12px;
    justify-items: center;
    overflow: visible;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 5px;
    background: #f7f7f7;
    box-shadow: 2px 2px 0 rgba(18, 53, 91, .3);
    transform-style: preserve-3d;
}

.hl-op-pokemon-card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    opacity: 1;
    transition: opacity .15s ease;
}

.hl-op-pokemon-card.is-loading img { opacity: 0; }

.hl-op-pokemon-card.is-loading::before {
    content: '';
    position: absolute;
    top: 9px;
    left: calc(50% - 10px);
    width: 20px;
    height: 20px;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 50%;
    background: linear-gradient(to bottom, var(--poke-red, #e3350d) 0 45%, var(--poke-navy, #12355b) 45% 55%, #fff 55% 100%);
    animation: hlOpSkeleton 1s steps(4) infinite;
}

.hl-op-pokemon-card > span {
    max-width: 64px;
    overflow: hidden;
    color: var(--poke-navy, #12355b);
    font: 700 .37rem/1 Roboto, Arial, sans-serif;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.hl-op-pokemon-card > strong {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--poke-navy, #12355b);
    font: 800 .45rem/1 Roboto, Arial, sans-serif;
}

.hl-op-pokemon-card > strong small {
    color: #57718a;
    font-size: .34rem;
}

.hl-op-pokemon-card > strong b { font: inherit; }
.hl-op-pokemon-card .hl-op-reveal { display: block; color: var(--state-correct-dark); opacity: 0; }

.hl-op-pokemon-card.is-hidden {
    animation: hlOpCardReveal 4.2s ease-in-out infinite;
}

.hl-op-pokemon-card.is-hidden .hl-op-secret { animation: hlOpSecretHide 4.2s ease-in-out infinite; }
.hl-op-pokemon-card.is-hidden .hl-op-reveal { animation: hlOpValueReveal 4.2s ease-in-out infinite; }

.hl-op-check {
    position: absolute;
    z-index: 5;
    top: -4px;
    right: -5px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--state-correct);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(73, 173, 99, .2);
    font: 900 .62rem/1 Roboto, Arial, sans-serif;
    opacity: 0;
    animation: hlOpCheck 4.2s ease-in-out infinite;
}

/* 02 · Vida consumida y ronda bonus. */
.hl-op-life {
    position: relative;
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl-op-life > span {
    color: var(--poke-red, #e3350d);
    font-size: 3.2rem;
    line-height: 1;
    filter: drop-shadow(0 3px 0 #8d2018);
    animation: hlOpHeart 3.4s ease-in-out infinite;
}

.hl-op-life > i {
    position: absolute;
    top: 6px;
    right: 18px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 50%;
    background: var(--poke-yellow, #ffcb05);
    color: var(--poke-navy, #12355b);
    font: 800 .5rem/1 'Press Start 2P', cursive;
    animation: hlOpLife 3.4s ease-in-out infinite;
}

.hl-op-life > b {
    position: absolute;
    right: 3px;
    bottom: 1px;
    padding: 4px 7px;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 4px;
    background: var(--poke-yellow, #ffcb05);
    color: var(--poke-navy, #12355b);
    font: .42rem/1 'Press Start 2P', cursive;
    letter-spacing: .04em;
    opacity: 0;
    animation: hlOpBonus 3.4s ease-in-out infinite;
}

/* 03 · Cronómetro y barra de alarma. */
.hl-op-timer {
    width: min(155px, 72%);
    display: grid;
    gap: 8px;
}

.hl-op-timer > b {
    color: var(--poke-navy, #12355b);
    font: .82rem/1 'Press Start 2P', cursive;
    font-variant-numeric: tabular-nums;
    animation: hlOpClock 3.2s ease-in-out infinite;
}

.hl-op-timer > span {
    height: 8px;
    overflow: hidden;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 999px;
    background: #fff;
}

.hl-op-timer > span > i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--poke-yellow, #ffcb05);
    transform-origin: left center;
    animation: hlOpTimer 3.2s ease-in-out infinite;
}

/* 04 · Compartir el resultado con identidad Pokémon. */
.hl-op-share {
    position: relative;
    width: 108px;
    height: 60px;
}

.hl-op-share-ball {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 35px;
    width: 38px;
    height: 38px;
    border: 3px solid var(--poke-navy, #12355b);
    border-radius: 50%;
    background: linear-gradient(to bottom, var(--poke-red, #e3350d) 0 45%, var(--poke-navy, #12355b) 45% 55%, #fff 55% 100%);
    box-shadow: 0 2px 0 rgba(18, 53, 91, .35);
    animation: hlOpShare 2.8s ease-in-out infinite;
}

.hl-op-share-ball::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border: 2px solid var(--poke-navy, #12355b);
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.hl-op-share > i {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--poke-yellow, #ffcb05);
    box-shadow: 0 0 8px rgba(255, 203, 5, .8);
    animation: hlOpSignal 2.8s ease-in-out infinite;
}

.hl-op-share > i:nth-of-type(1) { top: 5px; left: 8px; }
.hl-op-share > i:nth-of-type(2) { top: 7px; right: 8px; animation-delay: .18s; }
.hl-op-share > i:nth-of-type(3) { right: 10px; bottom: 4px; animation-delay: .36s; }

.hl-tutorial-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 0;
}

.hl-toggle-label {
    color: var(--poke-navy, #12355b);
    font: 700 .85rem/1.25 'Roboto', sans-serif;
}

.hl-timer-container.hl-timer-free .hl-timer-bar {
    background: var(--state-unknown);
}

#tutorialModal .hl-op-tutorial-content > .btn-play {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 10px 0 0;
    padding: 11px 24px;
    border: 3px solid var(--poke-navy, #12355b);
    border-radius: 8px;
    background: var(--poke-red, #e3350d);
    color: #fff;
    box-shadow: 0 5px 0 var(--poke-navy, #12355b), 2px 7px 0 var(--poke-yellow, #ffcb05);
    font: .7rem/1.2 'Press Start 2P', cursive;
}

#tutorialModal .hl-op-tutorial-content > .btn-play:hover,
#tutorialModal .hl-op-tutorial-content > .btn-play:focus-visible {
    transform: translate(-1px, -1px);
    background: #bd1010;
    color: #fff;
}

@keyframes hlOpTutorialEnter {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes hlOpSkeleton {
    to { transform: rotate(1turn); }
}

@keyframes hlOpCardReveal {
    0%, 35%, 88%, 100% { border-color: var(--poke-navy, #12355b); transform: rotateY(0); box-shadow: 2px 2px 0 rgba(18, 53, 91, .3); }
    47% { transform: rotateY(90deg); }
    58%, 78% { border-color: var(--state-correct-dark); transform: rotateY(0) scale(1.06); box-shadow: 0 0 0 4px color-mix(in srgb, var(--state-correct) 18%, transparent); }
}

@keyframes hlOpSecretHide {
    0%, 45%, 100% { display: block; opacity: 1; }
    50%, 88% { display: none; opacity: 0; }
}

@keyframes hlOpValueReveal {
    0%, 45%, 100% { display: none; opacity: 0; }
    50%, 88% { display: block; opacity: 1; }
}

@keyframes hlOpCheck {
    0%, 53%, 100% { opacity: 0; transform: scale(.3); }
    62%, 80% { opacity: 1; transform: scale(1); }
}

@keyframes hlOpHeart {
    0%, 20%, 100% { opacity: 1; transform: scale(.9); }
    8%, 30% { transform: scale(1.08); }
    48%, 72% { opacity: .28; transform: scale(.72); }
}

@keyframes hlOpLife {
    0%, 30%, 100% { opacity: 1; transform: scale(1); }
    48%, 72% { opacity: 0; transform: scale(.25); }
}

@keyframes hlOpBonus {
    0%, 45%, 100% { opacity: 0; transform: translateX(14px) rotate(-5deg); }
    60%, 82% { opacity: 1; transform: translateX(0) rotate(-5deg); }
}

@keyframes hlOpTimer {
    0%, 8% { width: 84%; background: var(--poke-yellow, #ffcb05); }
    72% { width: 24%; background: var(--state-incorrect); }
    86%, 100% { width: 10%; background: var(--state-incorrect); }
}

@keyframes hlOpClock {
    0%, 62%, 100% { color: var(--poke-navy, #12355b); transform: scale(1); }
    72%, 82% { color: var(--state-incorrect); transform: scale(1.08); }
}

@keyframes hlOpShare {
    0%, 100% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(227, 53, 13, .35); }
    42% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(227, 53, 13, 0); }
}

@keyframes hlOpSignal {
    0%, 100% { opacity: .18; transform: translate(8px, 8px) scale(.55); }
    52% { opacity: 1; transform: none; }
}

@media (max-width: 575px) {
    #tutorialModal { padding: 7px; }

    #tutorialModal .hl-op-tutorial-content {
        max-height: calc(100dvh - 14px);
        padding: 15px 10px 13px;
        border-width: 3px;
        box-shadow: 0 0 0 3px var(--poke-yellow, #ffcb05), 0 0 0 5px #151515, 0 14px 35px rgba(0, 0, 0, .42);
    }

    .hl-op-tutorial-kicker { padding: 4px 8px; font-size: .4rem; }
    #tutorialModal .hl-op-tutorial-heading .tutorial-title { margin: 6px 0 5px; font-size: .68rem; }
    .hl-op-tutorial-lead { margin-bottom: 9px; font-size: .68rem; line-height: 1.27; }
    .hl-op-tutorial-steps { gap: 7px; }

    .hl-op-step-card {
        padding: 7px 5px 8px;
        grid-template-rows: 57px min-content 1fr;
        gap: 4px;
        border-radius: 7px;
        box-shadow: 2px 2px 0 rgba(18, 53, 91, .23);
    }

    .hl-op-step-card::before { top: 3px; left: 3px; width: 20px; height: 20px; font-size: .32rem; }
    .hl-op-anim-box { height: 57px; }
    .hl-op-step-card > h3 { font-size: .43rem; line-height: 1.3; }
    .hl-op-step-card > p { font-size: .6rem; line-height: 1.17; }
    .hl-op-duel { width: 124%; transform: scale(.72); }
    .hl-op-life, .hl-op-timer, .hl-op-share { transform: scale(.8); }
    .hl-tutorial-options { margin-top: 9px; gap: 8px; }
    .hl-toggle-label { font-size: .72rem; }
    #tutorialModal .hl-op-tutorial-content > .btn-play { margin-top: 7px; padding: 8px 15px; font-size: .53rem; }
}

@media (max-height: 680px) and (max-width: 575px) {
    #tutorialModal .hl-op-tutorial-content { padding: 9px 8px 10px; }
    .hl-op-tutorial-kicker { display: none; }
    #tutorialModal .hl-op-tutorial-heading .tutorial-title { margin-top: 0; font-size: .62rem; }
    .hl-op-tutorial-lead { display: none; }
    .hl-op-tutorial-steps { gap: 6px; }
    .hl-op-step-card { padding: 5px 4px 6px; grid-template-rows: 48px min-content 1fr; gap: 3px; }
    .hl-op-anim-box { height: 48px; }
    .hl-op-step-card > h3 { font-size: .39rem; }
    .hl-op-step-card > p { font-size: .55rem; line-height: 1.12; }
    .hl-op-duel { transform: scale(.62); }
    .hl-op-life, .hl-op-timer, .hl-op-share { transform: scale(.68); }
    .hl-tutorial-options { margin-top: 6px; }
    .hl-toggle-label { font-size: .65rem; }
    #tutorialModal .hl-op-tutorial-content > .btn-play { margin-top: 5px; padding: 6px 12px; font-size: .47rem; }
}

html:lang(ja) #tutorialModal .hl-op-tutorial-heading .tutorial-title,
html:lang(ko) #tutorialModal .hl-op-tutorial-heading .tutorial-title,
html:lang(zh-Hans) #tutorialModal .hl-op-tutorial-heading .tutorial-title,
html:lang(zh-Hant) #tutorialModal .hl-op-tutorial-heading .tutorial-title,
html:lang(ja) .hl-op-step-card > h3,
html:lang(ko) .hl-op-step-card > h3,
html:lang(zh-Hans) .hl-op-step-card > h3,
html:lang(zh-Hant) .hl-op-step-card > h3,
html:lang(ja) #tutorialModal .hl-op-tutorial-content > .btn-play,
html:lang(ko) #tutorialModal .hl-op-tutorial-content > .btn-play,
html:lang(zh-Hans) #tutorialModal .hl-op-tutorial-content > .btn-play,
html:lang(zh-Hant) #tutorialModal .hl-op-tutorial-content > .btn-play {
    font-family: Roboto, Arial, sans-serif;
    font-weight: 900;
    letter-spacing: .04em;
}

@media (prefers-reduced-motion: reduce) {
    #tutorialModal .hl-op-tutorial-content,
    .hl-op-pokemon-card.is-loading::before,
    .hl-op-pokemon-card.is-hidden,
    .hl-op-pokemon-card.is-hidden .hl-op-secret,
    .hl-op-pokemon-card.is-hidden .hl-op-reveal,
    .hl-op-check,
    .hl-op-life > span,
    .hl-op-life > i,
    .hl-op-life > b,
    .hl-op-timer > b,
    .hl-op-timer > span > i,
    .hl-op-share-ball,
    .hl-op-share > i {
        animation: none !important;
        transition: none !important;
    }

    .hl-op-pokemon-card.is-hidden { border-color: var(--state-correct-dark); transform: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--state-correct) 18%, transparent); }
    .hl-op-pokemon-card.is-hidden .hl-op-secret { display: none; opacity: 0; }
    .hl-op-pokemon-card.is-hidden .hl-op-reveal { display: block; opacity: 1; }
    .hl-op-check { opacity: 1; transform: none; }
    .hl-op-life > span { opacity: .28; transform: scale(.72); }
    .hl-op-life > i { opacity: 0; }
    .hl-op-life > b { opacity: 1; transform: rotate(-5deg); }
    .hl-op-timer > b { color: var(--state-incorrect); }
    .hl-op-timer > span > i { width: 10%; background: var(--state-incorrect); }
    .hl-op-share-ball { transform: none; box-shadow: 0 0 0 10px rgba(227, 53, 13, 0); }
    .hl-op-share > i { opacity: 1; transform: none; }
}
