/*
 * EM FEEDBACK 4.3.0.15.3 - App Shell y controles compactos por modo.
 *
 * Esta capa solo presenta controles. El estado y las acciones musicales siguen
 * perteneciendo a los controles nativos del motor Premium.
 */
.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted) {
    position: relative;
    isolation: isolate;
    min-height: clamp(340px, 54vh, 420px);
    max-height: clamp(380px, 64vh, 480px);
    overflow: hidden !important;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
}

.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted) > * {
    visibility: hidden !important;
}

.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted)::before,
.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted)::after {
    position: absolute;
    z-index: 2147483000;
    left: 50%;
    visibility: visible !important;
    transform: translateX(-50%);
    width: calc(100% - 36px);
    color: #0f172a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    pointer-events: none;
}

.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted)::before {
    content: "Preparando partitura";
    top: calc(50% - 34px);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 850;
    line-height: 1.2;
}

.phonicscore-opensheetmusicdisplay__placeholder:not(.em-feedback-shell-mounted)::after {
    content: "Un momento, estamos organizando el ejercicio.";
    top: calc(50% + 10px);
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.em-app-shell-v26 {
    --em-app-blue: #2563eb;
    --em-app-green: #059669;
    --em-app-green-soft: #ecfdf5;
    --em-app-ink: #0f172a;
    --em-app-muted: #64748b;
    --em-app-line: #e2e8f0;
    --em-app-soft: #f8fafc;
    --em-app-shadow: 0 -5px 22px rgba(15, 23, 42, 0.08);
    position: relative;
    background: var(--em-app-soft) !important;
}

.em-app-start-gate,
.em-app-start-gate *,
.em-app-start-gate *::before,
.em-app-start-gate *::after {
    box-sizing: border-box;
}

.em-feedback-start-gated:not(.em-feedback-practice-started) {
    min-height: clamp(340px, 54vh, 420px);
    max-height: clamp(380px, 64vh, 480px);
    overflow: hidden !important;
}

.em-app-start-gate {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: clamp(10px, 2vw, 18px);
    color: var(--em-app-ink);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.96));
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.em-app-start-gate[hidden] {
    display: none !important;
}

.em-app-start-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(calc(100% - 8px), 760px);
    max-height: calc(100% - 4px);
    min-height: 0;
    padding: clamp(18px, 2.8vw, 28px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.16);
    text-align: center;
    scrollbar-width: thin;
}

.em-app-start-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 17px;
    color: #1d4ed8;
    background: #eff6ff;
    box-shadow: 0 9px 24px rgba(37, 99, 235, 0.16);
    animation: em-start-pulse 1.6s ease-in-out infinite;
}

.em-app-start-icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em-app-start-gate.is-ready .em-app-start-icon {
    color: #047857;
    background: #ecfdf5;
    box-shadow: 0 9px 24px rgba(5, 150, 105, 0.16);
    animation: em-start-ready 360ms ease-out both;
}

.em-app-start-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 850;
    line-height: 1.18;
}

.em-app-start-subtitle {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.em-app-start-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin-top: 18px;
    padding: 8px 15px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.em-app-start-loading[hidden],
.em-app-start-modes[hidden],
.em-app-start-mode[hidden] {
    display: none !important;
}

.em-app-start-loading-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.42);
    animation: em-start-dot 1.35s ease-out infinite;
}

.em-app-start-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
    margin-top: 16px;
}

.em-app-start-mode {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 76px;
    padding: 10px 12px;
    overflow: hidden;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
    font: inherit;
    text-align: left;
    touch-action: manipulation;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.em-app-start-mode-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-start-mode-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em-app-start-mode-video .em-app-start-mode-icon {
    color: #6d28d9;
    background: #f5f3ff;
}

.em-app-start-mode-practice .em-app-start-mode-icon {
    color: #166534;
    background: #ecfdf5;
}

.em-app-start-mode-autograde .em-app-start-mode-icon {
    color: #7c2d12;
    background: #fff7ed;
}

.em-app-start-mode-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.em-app-start-mode-copy strong {
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.em-app-start-mode-copy small {
    min-width: 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.em-app-start-mode:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.em-app-start-mode-practice:not(:disabled) {
    cursor: pointer;
    border-color: #a7f3d0;
    background: #f0fdf4;
    opacity: 1;
}

.em-app-start-mode-practice:hover:not(:disabled),
.em-app-start-mode-practice:focus-visible {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.18);
    transform: translateY(-2px) scale(1.01);
}

.em-app-start-mode:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.42);
    outline-offset: 2px;
}

.em-app-start-mode-practice:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

@keyframes em-start-pulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.035); }
}

@keyframes em-start-ready {
    from { transform: scale(0.82); opacity: 0.45; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes em-start-dot {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.44); }
    70%, 100% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.em-app-shell-layer,
.em-app-shell-layer *,
.em-app-shell-layer *::before,
.em-app-shell-layer *::after {
    box-sizing: border-box;
}

.em-app-shell-layer {
    position: relative;
    z-index: 500;
    width: 100%;
    max-width: 100%;
    color: var(--em-app-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.em-app-shell-layer button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.em-app-shell-layer svg {
    display: block;
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em-app-bottom-ui {
    width: 100%;
    padding: 10px 14px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--em-app-line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--em-app-shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.em-app-progress-block {
    width: 100%;
    margin-bottom: 9px;
}

.em-app-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 0 2px 5px;
    color: #475569;
    font-size: 12px;
    line-height: 1.2;
}

.em-app-exercise-title {
    min-width: 0;
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-app-progress-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.em-app-progress-position {
    overflow: hidden;
    color: var(--em-app-muted);
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-app-time-position {
    flex: 0 0 auto;
    color: var(--em-app-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.em-app-progress-track {
    position: relative;
    width: 100%;
    height: 7px;
    overflow: visible;
    border: 1px solid #e5eaf1;
    border-radius: 999px;
    background: #f1f5f9;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
    opacity: 0.72;
}

.em-app-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, var(--em-app-blue));
    pointer-events: none;
}

.em-app-seek-preview {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--em-app-seek-preview, 0%);
    border-radius: inherit;
    background: rgba(37, 99, 235, 0.26);
    opacity: 0;
    pointer-events: none;
}

.em-app-progress-thumb {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    transform: translate(-50%, -50%);
    transition: width 120ms ease, height 120ms ease, box-shadow 120ms ease;
}

.em-app-progress-thumb::after {
    position: absolute;
    inset: -14px;
    content: "";
}

.em-app-progress-track[data-em-progress-ready="true"] {
    opacity: 1;
}

.em-app-progress-track[data-em-progress-ready="true"] .em-app-progress-thumb {
    background: var(--em-app-blue);
}

.em-app-progress-track[data-em-seek-ready="true"].is-enabled {
    cursor: grab;
    touch-action: none;
}

.em-app-progress-track[data-em-seek-ready="true"].is-enabled.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

.em-app-progress-track.is-dragging .em-app-progress-thumb {
    width: 15px;
    height: 15px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.38);
}

.em-app-progress-track[data-em-seek-ready="true"].is-enabled:hover {
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.em-app-progress-track[data-em-seek-ready="true"].is-enabled:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 4px;
}

.em-app-progress-track.is-seeking .em-app-seek-preview {
    opacity: 1;
}

.em-score-navigation-surface {
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
}

.em-score-pinching .em-score-navigation-surface {
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
}

.em-app-controls-scroller {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.em-app-controls-scroller::-webkit-scrollbar {
    display: none;
}

.em-app-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    min-width: 100%;
    padding: 1px 1px 2px;
}

.em-app-mode-selector,
.em-app-main-action,
.em-app-control,
.em-app-pdf-action,
.em-app-compact-group,
.em-app-metronome-button,
.em-app-input-method-button,
.em-app-identify-tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 999px;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.em-app-mode-selector {
    gap: 7px;
    min-width: 164px;
    padding: 8px 13px;
    border: 1px solid #a7f3d0;
    color: #047857;
    background: var(--em-app-green-soft);
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    font-weight: 800;
}

.em-app-mode-selector:disabled {
    cursor: default;
    opacity: 1;
}

.em-app-mode-selector:not(:disabled) {
    cursor: pointer;
}

.em-app-mode-selector:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: #6ee7b7;
    background: #d1fae5;
}

.em-app-mode-icon,
.em-app-main-icon,
.em-app-pdf-icon {
    display: grid;
    place-items: center;
}

.em-app-mode-icon {
    font-size: 17px;
}

.em-app-mode-text,
.em-app-main-text,
.em-app-pdf-text {
    white-space: nowrap;
}

.em-app-separator {
    flex: 0 0 auto;
    width: 1px;
    height: 25px;
    margin: 0 1px;
    background: var(--em-app-line);
}

.em-app-control,
.em-app-pdf-action {
    padding: 0;
    border: 1px solid var(--em-app-line);
    color: #526174;
    background: #f8fafc;
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.055);
    cursor: pointer;
}

.em-app-compact-group {
    gap: 0;
    padding: 2px;
    border: 1px solid var(--em-app-line);
    background: #f8fafc;
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.055);
}

.em-app-compact-group .em-app-control {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.em-app-compact-value {
    min-width: 42px;
    padding: 0 4px;
    color: #334155;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.em-app-transpose-value::before {
    content: "T ";
    color: var(--em-app-muted);
    font-weight: 750;
}

.em-app-control {
    width: 42px;
    min-width: 42px;
    font-size: 18px;
}

.em-app-pdf-action {
    gap: 7px;
    min-width: 118px;
    padding: 8px 13px;
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.em-app-metronome-button {
    gap: 5px;
    min-width: 88px;
    padding: 7px 11px;
    border: 1px solid #dbe4ef;
    color: #526174;
    background: #f8fafc;
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.055);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.em-app-metronome-button:hover:not(:disabled) {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #dbeafe;
}

.em-app-metronome-button:active:not(:disabled) {
    transform: scale(0.96);
}

.em-app-metronome-button:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.48);
    outline-offset: 2px;
}

.em-app-metronome-button strong {
    color: #334155;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.em-app-metronome-icon {
    display: grid;
    place-items: center;
    font-size: 17px;
}

.em-app-control:hover:not(:disabled),
.em-app-pdf-action:hover:not(:disabled) {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #dbeafe;
}

.em-app-compact-group .em-app-control:hover:not(:disabled) {
    border-color: transparent;
    background: #dbeafe;
}

.em-app-main-action {
    gap: 7px;
    min-width: 116px;
    padding: 8px 18px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 7px 17px rgba(5, 150, 105, 0.26);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.em-app-input-method-button,
.em-app-identify-tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 118px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: #047857;
    background: var(--em-app-green-soft);
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.em-app-input-method-button[hidden],
.em-app-identify-tool-button[hidden],
.em-app-loop-action[hidden],
.em-app-metronome-button[hidden] {
    display: none !important;
}

.em-app-input-method-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #6ee7b7;
    background: #d1fae5;
}

.em-app-input-method-button:active:not(:disabled) {
    transform: scale(0.96);
}

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

.em-app-input-method-button:disabled,
.em-app-identify-tool-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.em-app-autograde-method-icon {
    display: grid;
    place-items: center;
    font-size: 17px;
}

.em-app-autograde-method-icon svg {
    width: 1.2em;
    height: 1.2em;
}

.em-app-autograde-method-text {
    white-space: nowrap;
}

.em-app-identify-method-icon,
.em-app-identify-tool-icon {
    display: grid;
    place-items: center;
    font-size: 17px;
}

.em-app-identify-method-icon svg,
.em-app-identify-tool-icon svg {
    width: 1.2em;
    height: 1.2em;
}

.em-app-identify-method-text,
.em-app-identify-tool-text {
    white-space: nowrap;
}

.em-app-identify-tool-button {
    min-width: 104px;
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-identify-tool-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #93c5fd;
    background: #dbeafe;
}

.em-app-main-action.is-playing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 7px 17px rgba(217, 119, 6, 0.26);
}

.em-app-control:active:not(:disabled),
.em-app-main-action:active:not(:disabled),
.em-app-pdf-action:active:not(:disabled) {
    transform: scale(0.96);
}

.em-app-control:focus-visible,
.em-app-main-action:focus-visible,
.em-app-pdf-action:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.48);
    outline-offset: 2px;
}

.em-app-control:disabled,
.em-app-main-action:disabled,
.em-app-pdf-action:disabled,
.em-app-metronome-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.em-app-visual-only:disabled {
    opacity: 0.38;
}

.em-app-flex-spacer {
    flex: 1 1 24px;
    min-width: 12px;
}

.em-app-engine-status {
    flex: 0 0 auto;
    max-width: 220px;
    overflow: hidden;
    color: var(--em-app-muted);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-app-engine-status[hidden],
.em-app-pdf-action[hidden],
.em-app-settings-action[hidden],
.em-app-regenerate-action[hidden],
.em-app-compact-group[hidden] {
    display: none !important;
}

.em-app-settings-overlay,
.em-app-settings-overlay *,
.em-app-settings-overlay *::before,
.em-app-settings-overlay *::after {
    box-sizing: border-box;
}

.em-app-settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: em-settings-fade-in 180ms ease-out both;
}

.em-app-settings-overlay[hidden] {
    display: none !important;
}

.em-app-settings-panel {
    display: flex;
    flex-direction: column;
    width: min(520px, 94vw);
    height: var(--em-app-viewport-height, 100dvh);
    max-height: var(--em-app-viewport-height, 100dvh);
    overflow: hidden;
    border-left: 1px solid rgba(203, 213, 225, 0.92);
    color: #0f172a;
    background: #f8fafc;
    box-shadow: -24px 0 68px rgba(15, 23, 42, 0.22);
    outline: 0;
    animation: em-settings-slide-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.em-app-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex: 0 0 auto;
    min-height: 78px;
    padding: max(16px, env(safe-area-inset-top)) 20px 15px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.98);
}

.em-app-panel-heading > div {
    min-width: 0;
}

.em-app-panel-heading h2,
.em-app-panel-heading p {
    margin: 0;
}

.em-app-panel-heading h2 {
    color: #0f172a;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.2;
}

.em-app-panel-heading p {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.em-app-settings-close {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 50%;
    color: #475569;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.em-app-settings-close:hover {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.em-app-settings-close:focus-visible,
.em-app-settings-panel button:focus-visible,
.em-app-settings-panel select:focus-visible,
.em-app-settings-panel input:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.42);
    outline-offset: 2px;
}

.em-app-settings-scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 16px 16px max(24px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-width: auto;
    scrollbar-color: #94a3b8 #e2e8f0;
    scrollbar-gutter: stable;
}

.em-app-settings-scroll::-webkit-scrollbar {
    width: 12px;
}

.em-app-settings-scroll::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.em-app-settings-scroll::-webkit-scrollbar-thumb {
    border: 3px solid #e2e8f0;
    border-radius: 999px;
    background: #94a3b8;
}

.em-app-setting-section {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.055);
}

.em-app-setting-section > * {
    flex-shrink: 0;
}

.em-app-setting-section-heading {
    padding: 14px 15px 11px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.em-app-setting-section-heading h3,
.em-app-setting-section-heading p {
    margin: 0;
}

.em-app-setting-section-heading h3 {
    color: #1e293b;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
}

.em-app-setting-section-heading p {
    margin-top: 3px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}

.em-app-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    min-height: 63px;
    padding: 11px 15px;
    border-bottom: 1px solid #edf2f7;
}

.em-app-setting-section > :last-child {
    border-bottom: 0;
}

.em-app-setting > span:first-child,
.em-app-settings-native-action > span:nth-child(2),
.em-app-settings-regenerate > span:nth-child(2) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.em-app-setting b,
.em-app-settings-native-action b,
.em-app-settings-regenerate b {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.em-app-setting small,
.em-app-settings-native-action small,
.em-app-settings-regenerate small {
    color: #64748b;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
}

.em-app-setting select,
.em-app-setting input[type="number"] {
    flex: 0 0 min(190px, 44%);
    width: min(190px, 44%);
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    color: #334155;
    background: #f8fafc;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.em-app-input-suffix {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 5px !important;
    min-width: 0;
}

.em-app-input-suffix input[type="number"] {
    width: 82px;
    min-width: 0;
}

.em-app-input-suffix > b {
    color: #64748b;
    font-size: 11px;
}

.em-app-panel-visual-only {
    opacity: 0.58;
}

.em-app-panel-visual-only :disabled {
    cursor: not-allowed;
}

.em-app-segmented {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
}

.em-app-segmented button {
    min-height: 36px;
    padding: 6px 9px;
    border: 0;
    border-right: 1px solid #dbe3ee;
    color: #64748b;
    background: transparent;
    font-size: 9.5px;
    font-weight: 750;
}

.em-app-segmented button:last-child {
    border-right: 0;
}

.em-app-switch-setting {
    flex-direction: row !important;
}

.em-app-switch {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 25px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e2e8f0;
}

.em-app-switch > span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24);
}

.em-app-switch[aria-checked="true"] {
    border-color: #93c5fd;
    background: #60a5fa;
}

.em-app-switch[aria-checked="true"] > span {
    transform: translateX(19px);
}

.em-app-settings-native-action,
.em-app-settings-regenerate {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 67px;
    padding: 11px 15px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.em-app-settings-native-action:hover:not(:disabled),
.em-app-settings-regenerate:hover:not(:disabled) {
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-settings-native-action:disabled,
.em-app-settings-regenerate:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.em-app-setting-action-icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 39px !important;
    width: 39px;
    height: 39px;
    border-radius: 11px;
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-setting-action-arrow {
    flex: 0 0 auto !important;
    color: #94a3b8;
    font-size: 25px;
    line-height: 1;
}

.em-app-number-stepper {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 11px;
    background: #f8fafc;
}

.em-app-number-stepper button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    color: #526174;
    background: transparent;
    cursor: pointer;
}

.em-app-number-stepper button:hover:not(:disabled) {
    color: #1d4ed8;
    background: #dbeafe;
}

.em-app-number-stepper button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.em-app-number-stepper output {
    display: grid;
    place-items: center;
    min-width: 54px;
    height: 38px;
    padding: 0 6px;
    border-inline: 1px solid #dbe3ee;
    color: #334155;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 850;
}

.em-app-range-setting input[type="range"] {
    flex: 0 0 min(170px, 42%);
    width: min(170px, 42%);
}

.em-app-shortcut-list {
    display: grid;
    gap: 0;
}

.em-app-shortcut-list > div {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 15px;
    border-bottom: 1px solid #edf2f7;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 650;
}

.em-app-shortcut-list > div:last-child {
    border-bottom: 0;
}

.em-app-shortcut-list > div[aria-disabled="true"] {
    opacity: 0.58;
}

.em-app-shortcut-list > div.is-active {
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-shortcut-list kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 6px;
    color: #475569;
    background: #f8fafc;
    font-family: inherit;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

@keyframes em-settings-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes em-settings-slide-in {
    from { opacity: 0.6; transform: translateX(34px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 620px) {
    .em-app-settings-panel {
        width: 100vw;
        max-width: 100vw;
        border-left: 0;
    }

    .em-app-settings-scroll {
        padding-inline: 10px;
    }

    .em-app-setting {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .em-app-switch-setting,
    .em-app-connected-setting {
        align-items: center;
        flex-direction: row;
    }

    .em-app-setting select,
    .em-app-setting input[type="number"] {
        flex-basis: auto;
        width: 100%;
    }

    .em-app-input-suffix input[type="number"] {
        width: 88px;
    }

    .em-app-segmented {
        align-self: flex-start;
    }

    .em-app-range-setting input[type="range"] {
        flex-basis: auto;
        width: 100%;
    }
}

@media (max-height: 540px) and (orientation: landscape) {
    .em-app-settings-panel {
        width: min(620px, 88vw);
    }

    .em-app-panel-heading {
        min-height: 58px;
        padding-block: 8px;
    }

    .em-app-settings-scroll {
        padding-top: 10px;
    }
}

/*
 * Los nodos nativos permanecen vivos porque contienen los listeners del motor.
 * Solo se retiran visualmente cuando el adaptador confirma Play y Reset.
 */
.em-feedback-shell-ready .playback-buttons,
.em-feedback-shell-ready .left-aligned-button-container,
.em-feedback-shell-ready .right-aligned-button-container {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip-path: inset(50%) !important;
}

.em-app-shell-v26:fullscreen,
.em-app-shell-v26:-webkit-full-screen,
.em-app-shell-v26.em-is-fullscreen {
    display: flex !important;
    flex-direction: column !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
}

.em-app-shell-v26:fullscreen > .phonicscore-opensheetmusicdisplay__render-block,
.em-app-shell-v26:-webkit-full-screen > .phonicscore-opensheetmusicdisplay__render-block,
.em-app-shell-v26.em-is-fullscreen > .phonicscore-opensheetmusicdisplay__render-block {
    width: 100% !important;
    min-height: 0 !important;
    padding: 12px 14px !important;
    overflow: auto !important;
}

@media (max-width: 720px) {
    .em-feedback-start-gated:not(.em-feedback-practice-started) {
        min-height: min(390px, 76vh);
        max-height: min(460px, 86vh);
    }

    .em-app-start-gate {
        padding: 8px;
    }

    .em-app-start-card {
        width: calc(100% - 4px);
        max-width: 430px;
        max-height: calc(100% - 2px);
        padding: 13px;
    }

    .em-app-start-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 5px;
        border-radius: 14px;
    }

    .em-app-start-icon svg {
        width: 26px;
        height: 26px;
    }

    .em-app-start-title {
        font-size: 21px;
    }

    .em-app-start-subtitle {
        margin-top: 4px;
        font-size: 12.5px;
    }

    .em-app-start-modes {
        gap: 7px;
        margin-top: 10px;
    }

    .em-app-start-mode {
        min-height: 60px;
        padding: 8px 9px;
        gap: 8px;
    }

    .em-app-start-mode-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .em-app-start-mode-icon svg {
        width: 19px;
        height: 19px;
    }

    .em-app-start-mode-copy strong {
        font-size: 13px;
        line-height: 1.15;
    }

    .em-app-start-mode-copy small {
        display: none;
    }
}

@media (max-height: 540px) and (orientation: landscape) {
    .em-feedback-start-gated:not(.em-feedback-practice-started) {
        min-height: min(330px, 88vh);
        max-height: min(420px, 94vh);
    }

    .em-app-start-gate {
        padding: 6px 8px;
    }

    .em-app-start-card {
        width: min(calc(100% - 8px), 760px);
        max-width: 760px;
        max-height: calc(100% - 2px);
        padding: 9px 12px;
    }

    .em-app-start-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 2px;
        border-radius: 11px;
    }

    .em-app-start-icon svg {
        width: 22px;
        height: 22px;
    }

    .em-app-start-title {
        font-size: 18px;
    }

    .em-app-start-subtitle {
        margin-top: 2px;
        font-size: 12px;
    }

    .em-app-start-modes {
        gap: 6px;
        margin-top: 6px;
    }

    .em-app-start-mode {
        min-height: 50px;
        padding: 6px 9px;
    }

    .em-app-start-mode-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .em-app-start-mode-copy strong {
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .em-app-start-modes {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .em-app-bottom-ui {
        padding: 6px 9px max(7px, env(safe-area-inset-bottom));
    }

    .em-app-controls {
        gap: 6px;
    }

    .em-app-mode-selector,
    .em-app-main-action,
    .em-app-control,
    .em-app-pdf-action,
    .em-app-metronome-button {
        min-height: 36px;
    }

    .em-app-progress-block {
        margin-bottom: 6px;
    }

    .em-app-progress-meta {
        padding-bottom: 3px;
        font-size: 10px;
    }

    .em-app-control {
        width: 36px;
        min-width: 36px;
        font-size: 15px;
    }

    .em-app-mode-selector {
        min-width: 145px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .em-app-main-action {
        min-width: 100px;
        padding: 6px 13px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .em-app-bottom-ui {
        padding-inline: 8px;
    }

    .em-app-mode-selector {
        min-width: 42px;
        width: 42px;
        padding: 0;
    }

    .em-app-mode-text,
    .em-app-pdf-text {
        display: none;
    }

    .em-app-pdf-action {
        min-width: 42px;
        width: 42px;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .em-app-shell-layer *,
    .em-app-start-gate * {
        transition: none !important;
        animation: none !important;
    }
}

/* 4.3.0.5: el panel nativo permanece montado para conservar sus eventos. */
.em-app-shell-v26.em-feedback-shell-ready .control-panel {
    position: fixed !important;
    top: 0 !important;
    left: -10000px !important;
    display: block !important;
    width: 520px !important;
    height: auto !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.em-app-modes-overlay,
.em-app-modes-overlay *,
.em-app-modes-overlay *::before,
.em-app-modes-overlay *::after {
    box-sizing: border-box;
}

.em-app-modes-overlay {
    position: fixed;
    inset: 0;
    z-index: 1190;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.46);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: em-settings-fade-in 180ms ease-out both;
}

.em-app-modes-overlay[hidden] {
    display: none !important;
}

.em-app-mode-sheet {
    width: min(760px, 100%);
    max-height: min(680px, calc(100dvh - 48px));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    overflow: hidden auto;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 24px;
    color: #0f172a;
    background: #f8fafc;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    outline: 0;
    animation: em-settings-slide-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.em-app-sheet-handle {
    display: none;
    width: 44px;
    height: 4px;
    margin: 10px auto -2px;
    border-radius: 999px;
    background: #cbd5e1;
}

.em-app-modes-close {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 50%;
    color: #475569;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.em-app-modes-close:hover,
.em-app-modes-close:focus-visible,
.em-app-mode-card:focus-visible {
    color: #1d4ed8;
    border-color: #93c5fd;
    outline: 3px solid rgba(96, 165, 250, 0.42);
    outline-offset: 2px;
}

.em-app-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 20px 2px;
}

.em-app-mode-grid[data-mode-count="1"],
.em-app-start-modes[data-mode-count="1"] {
    grid-template-columns: minmax(0, 1fr);
}

.em-app-mode-card[hidden] {
    display: none !important;
}

.em-app-mode-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    color: #334155;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;
}

.em-app-mode-card:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: #86efac;
    color: #065f46 !important;
    background: #f0fdf4;
}

.em-app-mode-sheet .em-app-mode-card[aria-current="true"] {
    border-color: #86efac;
    color: #047857 !important;
    background: #ecfdf5;
}

.em-app-mode-sheet .em-app-mode-card[aria-current="true"]:hover,
.em-app-mode-sheet .em-app-mode-card[aria-current="true"]:focus-visible {
    border-color: #34d399;
    color: #065f46 !important;
    background: #d1fae5 !important;
}

.em-app-mode-sheet .em-app-mode-card[aria-current="true"] strong {
    color: inherit !important;
}

.em-app-mode-sheet .em-app-mode-card[aria-current="true"] small {
    color: #475569 !important;
}

.em-app-mode-card:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.em-app-mode-card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #475569;
    background: #f1f5f9;
}

.em-app-mode-card[aria-current="true"] .em-app-mode-card-icon {
    color: #047857;
    background: #dcfce7;
}

.em-app-mode-card svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em-app-mode-card > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.em-app-mode-card strong {
    font-size: 14px;
    font-weight: 850;
}

.em-app-mode-card small {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.em-app-settings-pdf {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 67px;
    padding: 11px 15px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.em-app-settings-pdf > span:nth-child(2) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.em-app-settings-pdf b {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.em-app-settings-pdf small {
    color: #64748b;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
}

.em-app-settings-pdf:hover:not(:disabled) {
    color: #1d4ed8;
    background: #eff6ff;
}

.em-app-settings-pdf:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.em-app-tempo-setting .em-app-number-stepper input {
    flex: 0 0 62px;
    width: 62px;
    min-height: 38px;
    padding: 0 4px;
    border: 0;
    border-inline: 1px solid #dbe3ee;
    border-radius: 0;
    background: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.em-app-tempo-setting .em-app-number-stepper input::-webkit-inner-spin-button,
.em-app-tempo-setting .em-app-number-stepper input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.em-app-range-setting > span:first-child output {
    margin-top: 2px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.em-app-range-setting input[type="range"] {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #2563eb var(--em-app-range-progress, 100%), #dbe3ee var(--em-app-range-progress, 100%));
    accent-color: #2563eb;
}

.em-app-volume-range-wrap {
    position: relative;
    display: flex;
    flex: 0 0 min(220px, 46%);
    flex-direction: column;
    width: min(220px, 46%);
    min-width: 150px;
    padding-bottom: 15px;
}

.em-app-volume-range-wrap input[type="range"] {
    width: 100%;
    margin: 0;
}

.em-app-volume-range-wrap input[type="range"].is-boosted {
    background: linear-gradient(
        to right,
        #2563eb 0%,
        #2563eb 50%,
        #f59e0b 50%,
        #f59e0b var(--em-app-range-progress, 50%),
        #dbe3ee var(--em-app-range-progress, 50%),
        #dbe3ee 100%
    );
    accent-color: #f59e0b;
}

.em-app-volume-normal-marker {
    display: none;
    position: absolute;
    top: 11px;
    left: 50%;
    width: max-content;
    max-width: 90px;
    margin: 0;
    transform: translateX(-50%);
    color: #64748b !important;
    font-size: 9px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    pointer-events: none;
}

.em-app-volume-maximum-marker {
    display: none;
    position: absolute;
    top: 11px;
    right: 0;
    margin: 0;
    color: #92400e !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    pointer-events: none;
}

.em-app-volume-normal-marker::before {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    width: 1px;
    height: 6px;
    background: #94a3b8;
    content: "";
}

[data-em-volume-boost-ready="true"][data-em-volume-boost-mode="practice"] .em-app-volume-normal-marker,
[data-em-volume-boost-ready="true"][data-em-volume-boost-mode="autograde"] .em-app-metronome-volume-setting .em-app-volume-normal-marker {
    display: block;
}

[data-em-volume-boost-ready="true"][data-em-volume-boost-mode="practice"] .em-app-volume-maximum-marker,
[data-em-volume-boost-ready="true"][data-em-volume-boost-mode="autograde"] .em-app-metronome-volume-setting .em-app-volume-maximum-marker {
    display: block;
}

[data-em-active-mode="autograde"] .em-app-score-volume-setting {
    background: #f8fafc;
}

[data-em-active-mode="autograde"] .em-app-score-volume-setting output {
    color: #64748b;
}

.em-app-volume-boost-warning {
    margin: 0;
    padding: 8px 15px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #92400e;
    background: #fffbeb;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.em-app-volume-boost-warning[hidden] {
    display: none !important;
}

@media (max-width: 620px) {
    .em-app-modes-overlay {
        align-items: center;
        padding: 16px;
    }

    .em-app-mode-sheet {
        width: 100%;
        max-height: calc(100dvh - 32px);
        border-radius: 24px;
    }

    .em-app-sheet-handle {
        display: block;
    }

    .em-app-mode-grid {
        grid-template-columns: 1fr;
    }

    .em-app-range-setting {
        align-items: stretch;
        flex-direction: column;
    }

    .em-app-volume-range-wrap,
    .em-app-range-setting input[type="range"] {
        flex-basis: auto;
        width: 100%;
    }

    .em-app-volume-range-wrap {
        min-width: 0;
    }
}

/* 4.3.0.4: viewport y pantalla completa sin alterar el render musical. */
html.em-feedback-document-fullscreen,
body.em-feedback-document-fullscreen {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.em-app-fullscreen-action[disabled] {
    opacity: 0.42;
}

.em-app-fullscreen-action:not([disabled]) {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.em-app-fullscreen-action:not([disabled]):hover,
.em-app-fullscreen-action:not([disabled]):focus-visible {
    color: #1e40af;
    border-color: #93c5fd;
    background: #dbeafe;
}

.em-app-shell-v26:fullscreen,
.em-app-shell-v26:-webkit-full-screen,
.em-app-shell-v26.em-is-fullscreen {
    box-sizing: border-box !important;
    height: var(--em-app-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-right: env(safe-area-inset-right) !important;
    padding-left: env(safe-area-inset-left) !important;
    background: #f8fafc !important;
    isolation: isolate;
}

.em-app-shell-v26:fullscreen > .phonicscore-opensheetmusicdisplay__render-block,
.em-app-shell-v26:-webkit-full-screen > .phonicscore-opensheetmusicdisplay__render-block,
.em-app-shell-v26.em-is-fullscreen > .phonicscore-opensheetmusicdisplay__render-block {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overscroll-behavior: contain;
    background: #fff !important;
}

.em-app-shell-v26:fullscreen > .em-app-shell-layer,
.em-app-shell-v26:-webkit-full-screen > .em-app-shell-layer,
.em-app-shell-v26.em-is-fullscreen > .em-app-shell-layer {
    flex: 0 0 auto;
    z-index: 800;
}

.em-feedback-practice-started > .phonicscore-opensheetmusicdisplay__render-block {
    animation: em-app-practice-reveal 220ms ease-out both;
}

.em-app-rotate-overlay,
.em-app-rotate-overlay * {
    box-sizing: border-box;
}

.em-app-rotate-overlay {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
    color: #fff;
    background: rgba(3, 7, 18, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    text-align: center;
    animation: em-rotate-overlay-in 180ms ease-out both;
}

.em-app-rotate-overlay[hidden] {
    display: none !important;
}

.em-app-rotate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 430px);
}

.em-app-rotate-phone {
    display: grid;
    place-items: center;
    width: 98px;
    height: 98px;
    margin-bottom: 20px;
    border: 1px solid rgba(147, 197, 253, 0.34);
    border-radius: 28px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
    animation: em-rotate-phone 1.8s ease-in-out infinite;
}

.em-app-rotate-phone svg {
    width: 62px;
    height: 62px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
}

.em-app-rotate-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(25px, 7vw, 34px);
    font-weight: 850;
    line-height: 1.15;
}

.em-app-rotate-card p {
    margin: 10px 0 22px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.55;
}

.em-app-rotate-exit {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.em-app-rotate-exit:hover,
.em-app-rotate-exit:focus-visible {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.34);
    outline: 3px solid rgba(147, 197, 253, 0.38);
    outline-offset: 3px;
}

.em-app-shell-v26[data-em-layout="desktop"] .em-app-controls-scroller {
    overflow-x: auto;
}

.em-app-shell-v26[data-em-layout^="tablet"] .em-app-bottom-ui {
    padding-inline: 11px;
}

.em-app-shell-v26[data-em-layout^="tablet"] .em-app-controls {
    gap: 7px;
}

.em-app-shell-v26[data-em-layout^="tablet"] .em-app-mode-selector {
    min-width: 148px;
}

.em-app-shell-v26[data-em-layout^="tablet"] .em-app-input-method-button,
.em-app-shell-v26[data-em-layout^="mobile"] .em-app-input-method-button,
.em-app-shell-v26[data-em-layout^="tablet"] .em-app-identify-tool-button,
.em-app-shell-v26[data-em-layout^="mobile"] .em-app-identify-tool-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.em-app-shell-v26[data-em-layout^="tablet"] .em-app-autograde-method-text,
.em-app-shell-v26[data-em-layout^="mobile"] .em-app-autograde-method-text,
.em-app-shell-v26[data-em-layout^="tablet"] .em-app-identify-method-text,
.em-app-shell-v26[data-em-layout^="mobile"] .em-app-identify-method-text,
.em-app-shell-v26[data-em-layout^="tablet"] .em-app-identify-tool-text,
.em-app-shell-v26[data-em-layout^="mobile"] .em-app-identify-tool-text {
    display: none;
}

.em-app-shell-v26[data-em-layout="tablet-portrait"] .em-app-settings-panel {
    width: min(500px, 86vw);
}

.em-app-shell-v26[data-em-layout="mobile-portrait"] .em-app-start-modes {
    grid-template-columns: 1fr;
}

.em-app-shell-v26[data-em-layout^="mobile"] .em-app-bottom-ui {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
}

.em-app-shell-v26[data-em-layout^="mobile"] .em-app-progress-thumb::after {
    inset: -18px;
}

.em-app-shell-v26[data-em-layout^="mobile"] .em-app-settings-panel {
    width: 100vw;
    max-width: 100vw;
    border-left: 0;
}

.em-app-shell-v26[data-em-layout="mobile-portrait"] .em-app-mode-selector {
    min-width: 42px;
    width: 42px;
    padding: 0;
}

.em-app-shell-v26[data-em-layout="mobile-portrait"] .em-app-mode-text,
.em-app-shell-v26[data-em-layout="mobile-portrait"] .em-app-pdf-text {
    display: none;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-bottom-ui {
    padding-top: 5px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-progress-block {
    margin-bottom: 4px;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-progress-meta {
    display: none;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-progress-track {
    height: 4px;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-mode-selector,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-main-action,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-input-method-button,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-identify-tool-button,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-control,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-pdf-action,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-metronome-button {
    min-height: 34px;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-control,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-pdf-action,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-input-method-button,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-identify-tool-button {
    width: 34px;
    min-width: 34px;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-mode-selector {
    min-width: 40px;
    width: 40px;
    padding: 0;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-mode-text,
.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-pdf-text {
    display: none;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] .em-app-main-action {
    min-width: 96px;
    padding: 5px 12px;
}

.em-app-shell-v26[data-em-layout="mobile-landscape"] > .phonicscore-opensheetmusicdisplay__render-block {
    padding: 6px 9px !important;
}

@keyframes em-app-practice-reveal {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

@keyframes em-rotate-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes em-rotate-phone {
    0%, 18% { transform: rotate(0deg); }
    48%, 72% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .em-feedback-practice-started > .phonicscore-opensheetmusicdisplay__render-block,
    .em-app-rotate-overlay,
    .em-app-rotate-phone {
        animation: none !important;
    }
}
