/* EM FEEDBACK 4.3.0.15.5 - Controles compactos de Identificar notas. */
.em-identify-runtime {
    display: contents;
}

.em-identify-runtime[hidden],
.em-identify-method[hidden],
.em-identify-completion[hidden] {
    display: none !important;
}

.em-identify-live-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.em-identify-method,
.em-identify-method *,
.em-identify-method *::before,
.em-identify-method *::after {
    box-sizing: border-box;
}

.em-identify-method {
    display: grid;
    position: fixed;
    z-index: 950;
    inset: 0;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: rgba(7, 16, 35, 0.58);
    pointer-events: auto;
}

.em-identify-method-dialog {
    width: min(590px, 100%);
    max-height: min(680px, calc(100dvh - 36px));
    overflow: auto;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.em-identify-method-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.em-identify-method-heading > div {
    min-width: 0;
}

.em-identify-method-heading h2 {
    margin: 0;
    font-size: clamp(20px, 3vw, 27px);
    line-height: 1.12;
}

.em-identify-method-device,
.em-identify-method-recommendation {
    margin: 7px 0 0;
    color: #526174;
    font-size: 13px;
    line-height: 1.45;
}

.em-identify-method-recommendation {
    margin-top: 17px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 13px;
    color: #1e3a8a;
    background: #eff6ff;
}

.em-identify-method-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid #dbe4ef;
    border-radius: 50%;
    color: #526174;
    background: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.em-identify-method-close:hover,
.em-identify-method-close:focus-visible {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
    outline: 3px solid rgba(96, 165, 250, 0.3);
    outline-offset: 2px;
}

.em-identify-method-choice {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}

.em-identify-method-choice legend {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 850;
}

.em-identify-method-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.em-identify-method-options label {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    color: #334155;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.em-identify-method-options label:has(input:checked) {
    border-color: #6ee7b7;
    color: #047857;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

.em-identify-method-options label:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.5;
}

.em-identify-method-options input {
    width: 18px;
    height: 18px;
    accent-color: #059669;
}

.em-identify-method-status {
    display: block;
    min-height: 19px;
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.em-identify-method-status.is-connected {
    color: #047857;
}

.em-identify-method-status.is-requesting {
    color: #1d4ed8;
}

.em-identify-method-status.is-error {
    color: #b91c1c;
}

.em-identify-method-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.em-identify-method-accept {
    min-width: 118px;
    min-height: 42px;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 7px 17px rgba(5, 150, 105, 0.24);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.em-identify-method-accept:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.em-identify-method-accept:focus-visible {
    outline: 3px solid rgba(52, 211, 153, 0.36);
    outline-offset: 2px;
}

.em-feedback-identify-active .em-app-main-action {
    border-color: #2563eb;
}

.em-identify-completion,
.em-identify-completion *,
.em-identify-completion *::before,
.em-identify-completion *::after {
    box-sizing: border-box;
}

.em-identify-completion {
    display: grid;
    position: fixed;
    z-index: 970;
    inset: 0;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: rgba(7, 16, 35, 0.66);
    pointer-events: auto;
}

.em-identify-completion-dialog {
    position: relative;
    width: min(620px, 100%);
    max-height: min(680px, calc(100dvh - 36px));
    overflow: auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 24px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.38);
    text-align: center;
}

.em-identify-completion-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid #dbe4ef;
    border-radius: 50%;
    color: #64748b;
    background: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.em-identify-completion-close:hover,
.em-identify-completion-close:focus-visible {
    border-color: #93c5fd;
    color: #1d4ed8;
    outline: 3px solid rgba(96, 165, 250, 0.28);
    outline-offset: 2px;
}

.em-identify-completion-icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 13px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
    font-size: 34px;
    font-weight: 900;
}

.em-identify-completion-dialog h2 {
    margin: 0;
    font-size: clamp(23px, 4vw, 32px);
    line-height: 1.12;
}

.em-identify-completion-lead,
.em-identify-completion-feedback {
    margin: 9px auto 0;
    color: #526174;
    font-size: 14px;
    line-height: 1.45;
}

.em-identify-completion-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 20px 0 0;
}

.em-identify-completion-stats > div {
    min-width: 0;
    padding: 13px 8px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #f8fafc;
}

.em-identify-completion-stats dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.em-identify-completion-stats dd {
    margin: 5px 0 0;
    color: #0f172a;
    font-size: 23px;
    font-weight: 900;
}

.em-identify-completion-feedback {
    max-width: 480px;
    min-height: 41px;
    margin-top: 16px;
    color: #14532d;
    font-weight: 750;
}

.em-identify-completion-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.em-identify-completion-actions button {
    min-height: 43px;
    padding: 9px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    background: #fff;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.em-identify-completion-actions .em-identify-completion-restart {
    border-color: #059669;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 7px 17px rgba(5, 150, 105, 0.24);
}

.em-identify-completion-actions button:focus-visible {
    outline: 3px solid rgba(52, 211, 153, 0.34);
    outline-offset: 2px;
}

/* Defensa visual durante el primer ciclo de sincronización del App Shell. */
.phonicscore-opensheetmusicdisplay__placeholder[data-em-active-mode="identify"] .em-app-metronome-button,
.phonicscore-opensheetmusicdisplay__placeholder[data-em-active-mode="identify"] .em-app-loop-action,
.phonicscore-opensheetmusicdisplay__placeholder[data-em-active-mode="identify"] .em-app-regenerate-action {
    display: none !important;
}

@media (max-width: 600px) {
    .em-identify-method {
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .em-identify-method-dialog {
        max-height: calc(100dvh - 20px);
        padding: 18px;
        border-radius: 17px;
    }

    .em-identify-method-options {
        grid-template-columns: 1fr;
    }

    .em-identify-completion {
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .em-identify-completion-dialog {
        max-height: calc(100dvh - 20px);
        padding: 23px 16px 18px;
        border-radius: 18px;
    }

    .em-identify-completion-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em-identify-completion-actions {
        flex-direction: column;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .em-identify-method {
        padding: max(7px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .em-identify-method-dialog {
        max-height: calc(100dvh - 14px);
        padding: 14px 18px;
        border-radius: 15px;
    }

    .em-identify-method-heading h2 {
        font-size: 19px;
    }

    .em-identify-method-recommendation {
        margin-top: 9px;
        padding: 8px 11px;
        font-size: 11px;
    }

    .em-identify-method-choice {
        margin-top: 10px;
    }

    .em-identify-method-options label {
        min-height: 40px;
        padding: 7px 11px;
    }

    .em-identify-method-actions {
        margin-top: 9px;
    }

    .em-identify-completion {
        padding: max(7px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .em-identify-completion-dialog {
        max-height: calc(100dvh - 14px);
        padding: 14px 54px 13px;
        border-radius: 16px;
    }

    .em-identify-completion-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 6px;
        font-size: 24px;
    }

    .em-identify-completion-dialog h2 {
        font-size: 20px;
    }

    .em-identify-completion-lead {
        margin-top: 4px;
        font-size: 11px;
    }

    .em-identify-completion-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin-top: 9px;
    }

    .em-identify-completion-stats > div {
        padding: 7px 5px;
        border-radius: 10px;
    }

    .em-identify-completion-stats dt {
        font-size: 9px;
    }

    .em-identify-completion-stats dd {
        margin-top: 2px;
        font-size: 18px;
    }

    .em-identify-completion-feedback {
        min-height: 0;
        margin-top: 7px;
        font-size: 10px;
    }

    .em-identify-completion-actions {
        flex-direction: row;
        margin-top: 8px;
    }

    .em-identify-completion-actions button {
        min-height: 35px;
        padding: 6px 13px;
        font-size: 11px;
    }
}
