/**
 * Minijuego pausa: vista desde la raqueta hacia el cielo.
 * Cerca (raqueta) = pelota grande; cenit = pelota chica.
 */

.br-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.br-sky {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 68%;
    background: linear-gradient(180deg, #5ba3d9 0%, #a8d4f0 55%, #c8e6c0 100%);
}

.br-grass {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12), transparent 55%),
        linear-gradient(180deg, #7bc87b 0%, #5aaa5a 45%, #4a9a4a 100%);
    border-top: 2px solid rgba(255,255,255,0.2);
}

.br-paddle {
    position: absolute;
    left: 50%;
    bottom: 6%;
    width: min(72vw, 280px);
    height: min(28vw, 110px);
    transform: translateX(-50%);
    border-radius: 50% 50% 42% 42%;
    background:
        radial-gradient(ellipse at 50% 35%, #f5d0c8 0%, #e8a090 40%, #c45c4a 75%, #8b3a2e 100%);
    border: 3px solid rgba(80, 40, 30, 0.55);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 4;
    cursor: pointer;
}

.br-paddle::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -18%;
    width: 14%;
    height: 42%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #c4a574, #8b6914);
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.2);
}

.br-shadow {
    position: absolute;
    left: 50%;
    bottom: 14%;
    width: min(28vw, 110px);
    height: min(10vw, 40px);
    transform: translateX(-50%) scale(1);
    transform-origin: center center;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.05s linear;
}

.br-ball {
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: min(42vw, 160px);
    height: min(42vw, 160px);
    margin-left: calc(min(42vw, 160px) / -2);
    border-radius: 50%;
    background: #c9f364;
    box-shadow: inset -8px -6px 0 rgba(255,255,255,0.35);
    z-index: 5;
    transform: scale(1);
    transform-origin: center bottom;
    pointer-events: none;
    will-change: transform, bottom;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.br-word {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 88%;
    max-height: none;
    padding: 0.15em;
    color: #1a2a0a;
    line-height: 1.15;
    pointer-events: none;
    overflow: visible;
}

.br-ball.has-word .br-word {
    display: flex;
}

.br-he {
    font-family: "Noto Sans Hebrew", "Arial Hebrew", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.26rem, 9.9vw, 2.43rem);
    font-weight: 700;
    direction: rtl;
    max-width: 100%;
    white-space: nowrap;
}

.br-tr {
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    font-size: clamp(0.81rem, 4.32vw, 1.12rem);
    font-weight: 500;
    opacity: 0.75;
    max-width: 100%;
    white-space: nowrap;
    margin-top: 0.12em;
}

.br-es {
    display: none;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    font-size: clamp(1.17rem, 8.64vw, 2.07rem);
    font-weight: 700;
    max-width: 100%;
    white-space: nowrap;
}

/* Subiendo: hebreo + translit; bajando: español */
.br-ball.phase-up .br-he,
.br-ball.phase-up .br-tr {
    display: block;
}

.br-ball.phase-up .br-es {
    display: none;
}

.br-ball.phase-down .br-he,
.br-ball.phase-down .br-tr {
    display: none;
}

.br-ball.phase-down .br-es {
    display: block;
}

.br-hud {
    position: absolute;
    top: max(0.75rem, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

.br-hud strong {
    font-weight: 700;
}

.br-continue {
    position: absolute;
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    z-index: 12;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.2rem;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.br-hint {
    position: absolute;
    left: 50%;
    bottom: 42%;
    transform: translateX(-50%);
    z-index: 6;
    margin: 0;
    padding: 0.4rem 0.9rem;
    background: rgba(0,0,0,0.4);
    border-radius: 999px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0.9;
}

.br-hint.is-hidden {
    display: none;
}

.br-intro {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    background: rgba(8, 24, 48, 0.72);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.br-intro.is-gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.br-intro-line {
    margin: 0 0 0.65rem;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    font-size: clamp(1.15rem, 5.5vw, 1.75rem);
    font-weight: 600;
    line-height: 1.3;
    max-width: 18em;
}

.br-intro-em {
    font-size: clamp(1.35rem, 6.5vw, 2.1rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.br-intro-tap {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.75;
}

/* Cuando el juego está montado, el overlay deja de ser rosa */
.class-clock-break.br-active {
    background: #000;
    padding: 0;
    display: block;
}

.class-clock-break.br-active .cc-break-inner {
    display: none;
}
