/**
 * Reloj de clase — HUD compacto arriba + pausa.
 * Alineado al tema immersive (#000). No tapa flechas/dedo abajo.
 */

#classClockRoot[hidden] {
    display: none !important;
}

/* Pill pequeño arriba a la derecha (junto a meta/stats; deja hueco al menú ☰) */
.class-clock-hud {
    position: fixed;
    top: max(1.05rem, env(safe-area-inset-top));
    right: max(3.6rem, calc(env(safe-area-inset-right) + 3.1rem));
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    min-width: 0;
    max-width: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Segoe UI", "Noto Sans", "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
}

.class-clock-hud .cc-label {
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.58rem;
}

.class-clock-hud .cc-label:empty {
    display: none;
}

.class-clock-hud .cc-value {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.72rem;
}

.class-clock-hud.is-break {
    border-color: rgba(255, 160, 180, 0.45);
    background: rgba(255, 120, 150, 0.14);
}

.class-clock-hud.is-break .cc-label,
.class-clock-hud.is-break .cc-value {
    color: #ffc0d0;
}

/* En pantallas anchas, un poco más a la derecha (menos menú) */
@media (min-width: 720px) {
    .class-clock-hud {
        right: max(1rem, env(safe-area-inset-right));
        font-size: 0.72rem;
    }
    .class-clock-hud .cc-value {
        font-size: 0.78rem;
    }
}

/* Pausa: pantalla completa, rosa suave */
.class-clock-break {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background: #e8a0b5;
    color: #1a0a10;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    cursor: default;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.class-clock-break.hidden {
    display: none !important;
}

.class-clock-break .cc-break-inner {
    max-width: 22rem;
}

.class-clock-break .cc-break-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.class-clock-break .cc-break-sub {
    margin: 0;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
}

body.cc-paused {
    overflow: hidden;
}

body.cc-paused .app,
body.cc-paused .stage,
body.cc-paused .wrap,
body.cc-paused main {
    pointer-events: none !important;
}

body.cc-paused .exit,
body.cc-paused #exit-link,
body.cc-paused .top-exit {
    pointer-events: auto !important;
}

body.cc-paused .class-clock-break {
    pointer-events: auto;
}

/* Salir de la pausa al mapa (por encima del overlay rosa / matkot) */
.cc-break-leave {
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top));
    left: max(0.85rem, env(safe-area-inset-left));
    z-index: 230;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-decoration: none;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    pointer-events: auto;
}

.cc-break-leave.hidden {
    display: none !important;
}

/* Luces: una transición rápida a amarillo; se apagan al responder */
.cc-fatigue-flash {
    position: fixed;
    inset: 0;
    z-index: 209;
    pointer-events: none;
    opacity: 0;
    background: #ffeb3b;
    transition: opacity 0.2s ease-out;
}

.cc-fatigue-flash.is-on {
    opacity: 1;
}

/* Oferta por cansancio: canción o continuar */
.cc-fatigue-offer {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: transparent;
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
}

.cc-fatigue-offer.hidden {
    display: none !important;
}

.cc-class-end {
    z-index: 240;
    background: rgba(0, 0, 0, 0.45);
}

.cc-fatigue-card {
    width: 100%;
    max-width: 22rem;
    padding: 1.4rem 1.25rem 1.2rem;
    text-align: center;
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.1rem;
    color: #fff;
}

.cc-fatigue-card p {
    margin: 0 0 1.15rem;
    font-size: 1.05rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.cc-fatigue-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cc-fatigue-actions button {
    font: inherit;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    cursor: pointer;
}

.cc-fatigue-move {
    background: #fff;
    color: #111;
    font-weight: 700;
}

.cc-fatigue-continue {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.cc-fatigue-stop {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid transparent !important;
    font-weight: 500;
    margin-top: 0.15rem;
}

.cc-fatigue-stop:hover {
    color: #fecaca;
}

body.cc-fatigue-choosing,
body.cc-fatigue-song-playing {
    overflow: hidden;
}

.cc-fatigue-song {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.86);
    font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
}

.cc-fatigue-song.hidden {
    display: none !important;
}

.cc-fatigue-song-card {
    width: 100%;
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: stretch;
}

.cc-fatigue-song-frame-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #111;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.cc-fatigue-song-frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cc-fatigue-song-card > .cc-fatigue-continue {
    font: inherit;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    cursor: pointer;
}
