
    .al, .al * { box-sizing: border-box; }
    .al [hidden] { display: none !important; }
    .al {
        max-width: 560px;
        margin: 0 auto;
        padding: 12px 12px 10px;
        border-radius: 22px;
        color: #2a2340;
        font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
        background: linear-gradient(180deg, #fff6ea, #fffdf8 35%, #f7f2ff);
        box-shadow: 0 14px 40px rgba(60, 30, 90, .18), inset 0 0 0 1px rgba(123, 63, 228, .14);
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
    }
    .al:fullscreen { max-width: none; width: 100%; height: 100%; border-radius: 0; overflow: auto; }
    .al:-webkit-full-screen { max-width: none; width: 100%; height: 100%; border-radius: 0; overflow: auto; }
    .al-cabecera { display: flex; align-items: center; gap: 10px; }
    .al-logo { width: 34px; height: 40px; object-fit: contain; }
    .al-titulo { display: flex; flex-direction: column; line-height: 1.1; margin-right: auto; }
    .al-titulo strong {
        font-size: 1.35rem;
        background: linear-gradient(90deg, #7b3fe4, #e64c8c);
        -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .al-titulo span { font-size: .78rem; color: #7d7296; }
    .al-zona { margin-top: 10px; min-height: 470px; display: flex; flex-direction: column; gap: 12px; }

    .al-btn {
        appearance: none; -webkit-appearance: none; border: 0; cursor: pointer;
        font: inherit; color: inherit; line-height: 1.05;
        min-width: 56px; min-height: 56px; padding: 8px 12px;
        font-size: 1.6rem; border-radius: 18px;
        background: #fff;
        box-shadow: 0 3px 0 #ddd0f0, inset 0 0 0 2px #ebe2f8;
        transition: transform .08s, background .15s;
        touch-action: manipulation;
    }
    .al-btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 #ddd0f0, inset 0 0 0 2px #ebe2f8; }
    .al-btn:focus-visible { outline: 3px solid #7b3fe4; outline-offset: 2px; }
    .al-btn:disabled { opacity: .4; cursor: default; }
    .al-principal {
        min-height: 72px; padding: 10px 34px; font-size: 2rem; color: #fff; border-radius: 999px;
        background: linear-gradient(90deg, #7b3fe4, #e64c8c);
        box-shadow: 0 4px 0 #5a2bb0;
    }
    .al-principal:active { box-shadow: 0 1px 0 #5a2bb0; }
    .al-latido { animation: al-latido 1.6s ease-in-out infinite; }

    .al-barra { display: flex; align-items: center; gap: 8px; }
    .al-hueco-barra { flex: 1; }
    .al-progreso { flex: 1; height: 14px; border-radius: 99px; background: #ece3f8; overflow: hidden; }
    .al-progreso i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #7b3fe4, #e64c8c); transition: width .3s; }
    .al-paso, .al-centro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; flex: 1; text-align: center; }
    .al-fila { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .al-pantalla-titulo { margin: 4px 0 0; font-size: 1.5rem; }
    .al-aviso { margin: 0; font-size: .9rem; color: #6b5f86; text-align: center; }

    .al-muestra { font-size: 6.2rem; font-weight: 700; color: #5a2bb0; padding: 6px 26px; min-height: 0; }
    .al-muestra-larga { font-size: 3.2rem; }
    .al-dibujo { font-size: 5rem; line-height: 1.1; }
    .al-dibujo-pie { font-size: 1.4rem; font-weight: 600; color: #5a2bb0; margin-top: -8px; }
    .al-opciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
    .al-op { min-height: 96px; font-size: 2.8rem; font-weight: 600; padding: 6px; }
    .al-op-palabra { font-size: 1.55rem; letter-spacing: .02em; word-break: break-word; }
    .al-op-dibujo { font-size: 2.6rem; }
    .al-op-escena { font-size: 2.1rem; white-space: nowrap; letter-spacing: -.05em; }
    .al-bien { background: #e2f7e9 !important; box-shadow: 0 3px 0 #9edcb4, inset 0 0 0 3px #2fb36a !important; animation: al-salto .45s; }
    .al-mal { background: #ffe6e6 !important; animation: al-tiembla .4s; }

    .al-palabra, .al-frase { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
    .al-trozo { font-size: 2.5rem; font-weight: 600; padding: 10px 14px; min-width: 64px; }
    .al-frase .al-trozo { font-size: 1.7rem; padding: 10px 12px; }
    .al-huecos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 72px; }
    .al-hueco {
        min-width: 76px; min-height: 68px; padding: 6px 10px; border-radius: 16px;
        border: 3px dashed #d4c3ef; display: flex; align-items: center; justify-content: center;
        font-size: 2.2rem; font-weight: 600; color: #2a2340;
    }
    .al-hueco-lleno { border-style: solid; border-color: #2fb36a; background: #e2f7e9; }

    .al-junta { display: flex; justify-content: center; gap: 28px; min-height: 0; padding: 14px 20px; transition: gap .35s; background: transparent; box-shadow: none; }
    .al-junta:active { box-shadow: none; }
    .al-ficha { display: inline-block; font-size: 4.2rem; font-weight: 700; padding: 12px 18px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 #ddd0f0, inset 0 0 0 2px #ebe2f8; }
    .al-ficha-v { color: #e64c8c; }
    .al-junto { gap: 0; }
    .al-junto .al-ficha { background: #e2f7e9; box-shadow: inset 0 0 0 3px #2fb36a; }

    .al-lienzo { display: block; width: 100%; background: #fff; border-radius: 20px; box-shadow: inset 0 0 0 2px #ebe2f8; touch-action: none; }
    .al-lienzo-caja { width: 100%; max-width: 340px; }

    .al-grupo { width: 100%; padding: 10px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #efe7fa; text-align: left; }
    .al-grupo h3 { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
    .al-grupo h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--al-c, #7b3fe4); }
    .al-niveles { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
    .al-nivel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 78px; padding: 6px 4px; font-size: 1.7rem; font-weight: 700; box-shadow: 0 3px 0 #ddd0f0, inset 0 4px 0 var(--al-c, #7b3fe4), inset 0 0 0 2px #ebe2f8; }
    .al-nivel-largo { font-size: 1.15rem; }
    .al-nivel small { font-size: .8rem; letter-spacing: 1px; color: #f0a800; min-height: 1em; }
    .al-aqui { box-shadow: 0 3px 0 #ddd0f0, inset 0 0 0 4px #e64c8c; animation: al-latido 1.6s ease-in-out infinite; }
    .al-g0 { --al-c: #ff8a3d; } .al-g1 { --al-c: #f2b200; } .al-g2 { --al-c: #2fb36a; } .al-g3 { --al-c: #1fa2c6; }
    .al-g4 { --al-c: #5b6cff; } .al-g5 { --al-c: #9b4be0; } .al-g6 { --al-c: #e64c8c; }

    .al-avatares { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
    .al-avatar { flex: 0 0 calc(25% - 8px); min-height: 86px; font-size: 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
    .al-avatar small { font-size: .8rem; color: #f0a800; font-weight: 700; }
    .al-borrando .al-avatar { box-shadow: 0 3px 0 #f2b8b8, inset 0 0 0 3px #e5484d; animation: al-tiembla 1.2s infinite; }
    .al-codigo { display: flex; justify-content: center; gap: 8px; }
    .al-codigo span {
        display: flex; align-items: center; justify-content: center; width: 72px; height: 72px;
        font-size: 2.8rem; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px #ebe2f8;
    }
    .al-teclado { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 360px; }
    .al-teclado .al-btn { font-size: 2.2rem; min-height: 64px; }
    .al-estrellas { font-size: 3.6rem; letter-spacing: 6px; color: #f0a800; }
    .al-fiesta { font-size: 5rem; animation: al-salto .8s; }
    .al-pie { margin: 10px 0 0; font-size: .74rem; color: #8a7fa3; text-align: center; }

    @keyframes al-tiembla { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
    @keyframes al-salto { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
    @keyframes al-latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
    @media (max-width: 420px) {
        .al { padding: 10px 8px 8px; border-radius: 16px; }
        .al-op { min-height: 84px; font-size: 2.3rem; }
        .al-op-palabra { font-size: 1.25rem; }
        .al-op-dibujo { font-size: 2.2rem; }
        .al-op-escena { font-size: 1.6rem; }
        .al-muestra { font-size: 5rem; }
        .al-muestra-larga { font-size: 2.4rem; }
        .al-trozo { font-size: 2rem; padding: 8px 10px; min-width: 54px; }
        .al-frase .al-trozo { font-size: 1.35rem; }
        .al-ficha { font-size: 3.4rem; }
        .al-codigo span { width: 60px; height: 60px; font-size: 2.3rem; }
        .al-avatar { font-size: 2.5rem; min-height: 74px; }
    }
    @media (prefers-reduced-motion: reduce) {
        .al *, .al { animation: none !important; transition: none !important; }
    }
