.sf-esp {
    --sf-esp-font-size: 36px;
    --sf-esp-radius: 22px;
    --sf-esp-pad: clamp(22px, 4vw, 46px);
    --sf-esp-word-fade-in: 1.2s;
    --sf-esp-translation-fade-in: 1.45s;
    --sf-esp-stage-fade-out: 1.8s;
    --sf-esp-translation-lift: 14px;
    --sf-esp-exit-lift: -18px;
    --sf-esp-button-bg: linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.16) 46%, rgba(255,255,255,.08) 100%);
    --sf-esp-button-bg-hover: linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(226,232,240,.26) 46%, rgba(148,163,184,.15) 100%);
    --sf-esp-button-border: rgba(255,255,255,.34);
    --sf-esp-button-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px rgba(0,0,0,.18);
    --sf-esp-button-hover-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 8px 20px rgba(0,0,0,.20), 0 0 0 1px rgba(251,146,60,.52), 0 0 14px rgba(249,115,22,.18);
    --sf-esp-green: linear-gradient(180deg, #4ade80 0%, #22c55e 48%, #15803d 100%);
    --sf-esp-green-hover: linear-gradient(180deg, #86efac 0%, #22c55e 48%, #166534 100%);
    --sf-esp-orange: linear-gradient(180deg, #fdba74 0%, #f97316 48%, #c2410c 100%);
    --sf-esp-orange-hover: linear-gradient(180deg, #fed7aa 0%, #fb923c 48%, #c2410c 100%);
    --sf-esp-volume-filled: rgba(226,232,240,.92);
    --sf-esp-volume-empty: rgba(148,163,184,.38);
    --sf-esp-scrub-filled: #22c55e;
    --sf-esp-scrub-empty: rgba(148,163,184,.34);
    --sf-esp-tooltip-bg: #475569;
    --sf-esp-tooltip-text: #ffffff;
    box-sizing: border-box;
    width: min(100%, 998px);
    margin: var(--sf-esp-margin-top, 32px) auto 32px;
    padding: var(--sf-esp-pad);
    border-radius: var(--sf-esp-radius);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.sf-esp *,
.sf-esp *::before,
.sf-esp *::after {
    box-sizing: border-box;
}

.sf-esp--dark {
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.16), transparent 34%),
        linear-gradient(135deg, #111827 0%, #0b1020 55%, #020617 100%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.sf-esp--light,
.sf-esp--card {
    --sf-esp-button-bg: linear-gradient(180deg, #fff 0%, #e2e8f0 48%, #cbd5e1 100%);
    --sf-esp-button-bg-hover: linear-gradient(180deg, #fff 0%, #eef2f7 45%, #cbd5e1 100%);
    --sf-esp-button-border: rgba(100,116,139,.42);
    --sf-esp-button-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 16px rgba(15,23,42,.12);
    --sf-esp-button-hover-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 8px 18px rgba(15,23,42,.14), 0 0 0 1px rgba(249,115,22,.44), 0 0 12px rgba(249,115,22,.14);
    --sf-esp-volume-filled: rgba(71,85,105,.9);
    --sf-esp-volume-empty: rgba(148,163,184,.42);
    --sf-esp-scrub-empty: rgba(100,116,139,.28);
}

.sf-esp--light {
    color: #111827;
    background: radial-gradient(circle at top left, rgba(17,24,39,.08), transparent 34%), linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid rgba(17,24,39,.12);
    box-shadow: 0 18px 50px rgba(15,23,42,.10);
}

.sf-esp--card {
    color: #111827;
    background: #fff;
    border: 1px solid rgba(17,24,39,.12);
    box-shadow: 0 12px 35px rgba(15,23,42,.10);
}

.sf-esp--minimal {
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    box-shadow: none;
}

.sf-esp__dev-meta {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
    gap: 2px;
    font-size: 10px;
    line-height: 1.2;
}

.sf-esp__dev-version,
.sf-esp__dev-label {
    padding: 3px 8px;
    border-radius: 999px;
    color: rgba(255,255,255,.88);
    background: rgba(15,23,42,.68);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    font-size: inherit;
    line-height: inherit;
    font-weight: 800;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.sf-esp__topbar {
    min-height: 42px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    position: relative;
    z-index: 3;
}

.sf-esp__meta {
    min-width: 74px;
    display: grid;
    gap: 5px;
    justify-items: start;
    font-variant-numeric: tabular-nums;
}

.sf-esp__round-indicator,
.sf-esp__sentence-indicator {
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .08em;
    font-weight: 750;
    opacity: 1;
    transition: opacity .3s ease, transform .3s ease;
}

.sf-esp__sentence-indicator {
    opacity: 0;
    transform: translateY(-2px);
}

.sf-esp__sentence-indicator.is-visible {
    opacity: .72;
    transform: translateY(0);
}

.sf-esp__round-indicator--dots,
.sf-esp__round-indicator--numbered {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sf-esp__round-mark {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .25s ease, background .25s ease, transform .25s ease;
}

.sf-esp__round-indicator--dots .sf-esp__round-mark.is-current {
    opacity: 1;
    background: currentColor;
    transform: scale(1.16);
}

.sf-esp__round-indicator--numbered .sf-esp__round-mark {
    width: 22px;
    height: 22px;
    font-size: 10px;
    font-weight: 800;
}

@media (min-width: 900px) {
    .sf-esp:not(:fullscreen) .sf-esp__round-indicator--numbered .sf-esp__round-mark {
        box-sizing: border-box;
        width: 24px;
        height: 24px;
        border-width: 2px;
        border-radius: 999px;
    }
}

.sf-esp__round-indicator--numbered .sf-esp__round-mark.is-current {
    opacity: 1;
    color: #fff;
    background: linear-gradient(180deg, #fdba74, #f97316);
    border-color: rgba(253,186,116,.75);
    transform: translateY(-1px);
}

.sf-esp__logo {
    display: block;
    width: auto;
    object-fit: contain;
    object-position: right top;
    opacity: .92;
}

.sf-esp__logo--small { max-height: 34px; max-width: 130px; }
.sf-esp__logo--medium { max-height: 48px; max-width: 180px; }
.sf-esp__logo--large { max-height: 64px; max-width: 240px; }

.sf-esp__title {
    margin: 0 0 18px;
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .82;
    text-align: center;
}

.sf-esp__stage {
    position: relative;
    min-height: clamp(230px, 32vw, 390px);
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 22px;
    padding: clamp(18px, 4vw, 40px) 10px;
}

.sf-esp__status { display: none; }

.sf-esp__word {
    min-height: 1.28em;
    font-size: clamp(26px, 5vw, var(--sf-esp-font-size));
    line-height: 1.22;
    font-weight: 750;
    letter-spacing: .01em;
    max-width: 920px;
    opacity: 0;
    transform: translateY(0);
    transition: opacity var(--sf-esp-word-fade-in) ease, transform var(--sf-esp-stage-fade-out) ease;
    will-change: opacity, transform;
}

.sf-esp__word.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-esp__word.is-exiting {
    opacity: 0;
    transform: translateY(var(--sf-esp-exit-lift));
    transition-duration: var(--sf-esp-stage-fade-out);
}

.sf-esp__word.is-typing::after {
    content: "";
    display: inline-block;
    width: .08em;
    height: .95em;
    margin-left: .08em;
    vertical-align: -.08em;
    background: currentColor;
    opacity: .7;
    animation: sfEspCursor 1s steps(2, start) infinite;
}

.sf-esp__note {
    position: relative;
    box-sizing: border-box;
    max-width: min(880px, 100%);
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    padding: clamp(21px, 3vw, 34px) clamp(19px, 4vw, 42px);
    border-radius: 20px;
    font-size: clamp(20px, 3.5vw, calc(var(--sf-esp-font-size) * .72));
    line-height: 1.28;
    font-weight: 650;
    letter-spacing: .005em;
    text-align: center;
    color: #111827;
    background: linear-gradient(135deg, #fffdf7 0%, #fff7dd 62%, #ffefbd 100%);
    border: 2px solid #f59e0b;
    box-shadow:
        0 0 0 5px rgba(245,158,11,.12),
        0 18px 44px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.95);
    opacity: 0;
    transition: opacity .35s ease;
}


.sf-esp__note--left {
    text-align: left;
}

.sf-esp__note[hidden] {
    display: none !important;
}

/* A real note item owns the stage by itself. Sentence layout rules remain unchanged. */
.sf-esp.is-note-item .sf-esp__word,
.sf-esp.is-note-item .sf-esp__translation {
    display: none;
}

.sf-esp.is-note-item .sf-esp__stage {
    gap: 0;
}

.sf-esp:fullscreen.is-note-item .sf-esp__note {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sf-esp__note.is-visible {
    opacity: 1;
}

.sf-esp__note-format--bold {
    font-weight: 900;
}

.sf-esp__note-format--underline {
    text-decoration-line: underline;
    text-decoration-thickness: .08em;
    text-underline-offset: .14em;
    text-decoration-color: #b45309;
}


/* Exact per-item formatting for Sentence and Flash Word English text. */
.sf-esp__text-format--bold {
    font-weight: 900;
}

.sf-esp__text-format--underline {
    text-decoration-line: underline;
    text-decoration-thickness: .08em;
    text-underline-offset: .14em;
    text-decoration-color: currentColor;
}

.sf-esp__note.is-exiting {
    opacity: 0;
}

.sf-esp__translation {
    min-height: 1.35em;
    font-size: clamp(18px, 3.2vw, 28px);
    line-height: 1.34;
    max-width: 850px;
    opacity: 0;
    transform: translateY(var(--sf-esp-translation-lift));
    transition: opacity var(--sf-esp-translation-fade-in) ease, transform var(--sf-esp-translation-fade-in) ease;
    color: inherit;
    will-change: opacity, transform;
}

.sf-esp__translation.is-visible {
    opacity: .88;
    transform: translateY(0);
}

.sf-esp__translation.is-exiting {
    opacity: 0;
    transform: translateY(var(--sf-esp-exit-lift));
    transition-duration: var(--sf-esp-stage-fade-out);
}

.sf-esp__tap-controls {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 4vw, 36px);
    background: rgba(2, 6, 23, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.sf-esp__tap-controls[hidden] {
    display: none !important;
}

.sf-esp__tap-controls.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sf-esp__tap-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.46);
    border-radius: 50%;
    color: #fff;
    background: rgba(15,23,42,.72);
    box-shadow: 0 10px 30px rgba(0,0,0,.34);
    cursor: pointer;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.sf-esp__tap-button--side {
    width: 54px;
    height: 54px;
}

.sf-esp__tap-button--main {
    width: 70px;
    height: 70px;
}

.sf-esp__tap-button svg {
    width: 48%;
    height: 48%;
}

.sf-esp__tap-button:disabled {
    opacity: .32;
    cursor: default;
}

.sf-esp__tap-button:not(:disabled):hover,
.sf-esp__tap-button:not(:disabled):focus-visible {
    background: rgba(15,23,42,.9);
    transform: scale(1.05);
}

.sf-esp__scrubber-wrap {
    position: relative;
    width: 100%;
    margin: 0 0 18.5px;
    padding-top: 0;
}

.sf-esp__scrubber {
    --sf-esp-scrub-pct: 0%;

    -webkit-appearance: none !important;
    appearance: none !important;

    display: block;
    width: 100%;
    height: 14px;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;

    cursor: pointer;
}

.sf-esp__scrubber::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--sf-esp-scrub-filled) 0%,
        var(--sf-esp-scrub-filled) var(--sf-esp-scrub-pct),
        var(--sf-esp-scrub-empty) var(--sf-esp-scrub-pct),
        var(--sf-esp-scrub-empty) 100%
    );
    box-shadow: none;
    transition: height .16s ease;
}

.sf-esp__scrubber::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: var(--sf-esp-scrub-empty);
    box-shadow: none;
    transition: height .16s ease;
}

.sf-esp__scrubber::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--sf-esp-scrub-filled);
    transition: height .16s ease;
}

.sf-esp__scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sf-esp-scrub-filled);
    border: 1px solid rgba(21,128,61,.82);
    box-shadow:
        0 2px 9px rgba(0,0,0,.34),
        0 0 0 3px rgba(34,197,94,.10);
transition:
    transform .16s ease,
    box-shadow .16s ease;
margin-top: -3px;
}

.sf-esp__scrubber::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sf-esp-scrub-filled);
    border: 1px solid rgba(21,128,61,.82);
    box-shadow:
        0 2px 9px rgba(0,0,0,.34),
        0 0 0 3px rgba(34,197,94,.10);
    transition:
        transform .16s ease,
        box-shadow .16s ease;
}

.sf-esp__scrubber:hover:not(.is-scrub-hover-suppressed)::-moz-range-track,
.sf-esp__scrubber:hover:not(.is-scrub-hover-suppressed)::-moz-range-progress {
    height: 6px;
}

.sf-esp__scrubber:hover:not(.is-scrub-hover-suppressed)::-moz-range-thumb {
    transform: scale(1.35);
    box-shadow:
        0 4px 13px rgba(0,0,0,.38),
        0 0 0 4px rgba(34,197,94,.20);
}

.sf-esp__scrubber:hover:not(.is-scrub-hover-suppressed)::-webkit-slider-runnable-track {
    height: 6px;
}

.sf-esp__scrubber:hover:not(.is-scrub-hover-suppressed)::-webkit-slider-thumb {
    transform: scale(1.35);
    box-shadow:
        0 4px 13px rgba(0,0,0,.38),
        0 0 0 4px rgba(34,197,94,.20);
}

.sf-esp__scrubber-bubble {
    position: absolute;
    top: auto;
    bottom: 18px;
    transform: translateX(-50%);
    min-width: 46px;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: rgba(15,23,42,.94);
    box-shadow: 0 6px 16px rgba(0,0,0,.24);
    pointer-events: none;
    z-index: 6;
}

.sf-esp__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.sf-esp__button,
.sf-esp__volume {
    appearance: none;
    border: 1px solid var(--sf-esp-button-border);
    border-radius: 999px;
    background: var(--sf-esp-button-bg) !important;
    color: inherit !important;
    box-shadow: var(--sf-esp-button-shadow) !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.15);
}

.sf-esp__button {
    font: inherit;
    font-size: 14px;
    line-height: 1;
    min-height: 40px;
    padding: 11px 16px;
    cursor: pointer;
    transition: transform .18s ease, background .2s ease, opacity .16s ease, box-shadow .2s ease, border-color .2s ease;
}

.sf-esp__button svg,
.sf-esp__volume svg {
    width: 19px;
    height: 19px;
    display: block;
}

.sf-esp--light .sf-esp__button,
.sf-esp--light .sf-esp__volume,
.sf-esp--card .sf-esp__button,
.sf-esp--card .sf-esp__volume {
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.sf-esp__button:hover:not(:disabled),
.sf-esp__volume:hover {
    transform: translateY(-1px);
    background: var(--sf-esp-button-bg-hover) !important;
    border-color: rgba(251,146,60,.64);
    box-shadow: var(--sf-esp-button-hover-shadow) !important;
}

.sf-esp__button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.sf-esp__button--primary {
    font-weight: 800;
    min-width: 92px;
    padding-inline: 24px;
}

.sf-esp__button--primary.is-start {
    background: var(--sf-esp-green) !important;
    border-color: rgba(134,239,172,.58);
    color: #fff !important;
}

.sf-esp__button--primary.is-start:hover {
    background: var(--sf-esp-green-hover) !important;
    border-color: rgba(134,239,172,.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 8px 20px rgba(0,0,0,.20), 0 0 15px rgba(34,197,94,.22) !important;
}

.sf-esp__button--primary.is-playing,
.sf-esp__button--speed.is-selected,
.sf-esp__button--mode.is-selected,
.sf-esp__button--resume-continue {
    background: var(--sf-esp-orange) !important;
    border-color: rgba(253,186,116,.68);
    color: #fff !important;
}

.sf-esp__button--primary.is-playing:hover,
.sf-esp__button--speed.is-selected:hover,
.sf-esp__button--mode.is-selected:hover,
.sf-esp__button--resume-continue:hover {
    background: var(--sf-esp-orange-hover) !important;
}

.sf-esp__button--primary.is-resume {
    background: var(--sf-esp-green) !important;
    border-color: rgba(134,239,172,.58);
    color: #fff !important;
}

.sf-esp__button--primary.is-resume:hover {
    background: var(--sf-esp-green-hover) !important;
    border-color: rgba(134,239,172,.82);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.34),
        0 8px 20px rgba(0,0,0,.20),
        0 0 15px rgba(34,197,94,.22) !important;
}

.sf-esp__button--icon {
    width: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sf-esp__button--primary.is-playing,
.sf-esp__button--primary.is-resume {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sf-esp__button--speed { min-width: 66px; font-weight: 700; }
.sf-esp__button--mode { font-size: 13px; font-weight: 700; }

.sf-esp__mode-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.sf-esp__speed-group,
.sf-esp__more-control {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}


.sf-esp__more-button svg {
    transform-origin: 50% 50%;
    transition: transform .22s ease;
}

.sf-esp__more-button.is-open svg {
    transform: rotate(32deg);
}

.sf-esp__more-button.is-open {
    background: var(--sf-esp-orange) !important;
    border-color: rgba(253,186,116,.68);
    color: #fff !important;
}

.sf-esp__more-button.is-open:hover {
    background: var(--sf-esp-orange-hover) !important;
}

.sf-esp__more-panel {
    width: fit-content;
    max-width: min(100%, 720px);
    margin: 18.5px auto 0;
}

.sf-esp__more-panel[hidden] { display: none !important; }

.sf-esp__more-card {
    position: relative;
    padding: 16px;
    border: 1px solid var(--sf-esp-button-border);
    border-radius: 18px;
    background: var(--sf-esp-button-bg);
    box-shadow: var(--sf-esp-button-shadow);
}

.sf-esp__more-close {
    appearance: none;
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 3;
    border: 0;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 999px;
    background: var(--sf-esp-green);
    color: #fff;
    font: inherit;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(22,163,74,.28);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sf-esp__more-close > span {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    font-size: 0;
    line-height: 0;
}

.sf-esp__more-close > span::before,
.sf-esp__more-close > span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1.25px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.sf-esp__more-close > span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sf-esp__more-close > span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sf-esp__more-close:hover,
.sf-esp__more-close:focus-visible {
    background: var(--sf-esp-orange-hover);
    box-shadow: 0 4px 14px rgba(234,88,12,.30);
    transform: translateY(-1px);
}

.sf-esp__more-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.sf-esp__more-body {
    display: grid;
    gap: 10px;
    padding-top: 9px;
}

.sf-esp__more-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(148,163,184,.24);
}

.sf-esp__more-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.sf-esp__more-row--timer {
    padding-top: 6px;
}

.sf-esp__more-label-spacer {
    width: 17px;
    min-width: 17px;
    height: 1px;
}

.sf-esp__more-timer-control {
    justify-content: center;
}

.sf-esp__more-label {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    opacity: .88;
}

.sf-esp__more-label-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
}


.sf-esp__more-info {
    appearance: none;
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
    padding: 0;
    border: 1px solid rgba(253,186,116,.72);
    border-radius: 999px;
    background: var(--sf-esp-orange);
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.20);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.sf-esp__more-info:hover,
.sf-esp__more-info:focus-visible {
    background: var(--sf-esp-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 13px rgba(0,0,0,.24);
}

.sf-esp .sf-esp__more-info[aria-expanded="false"]:focus {
    background: var(--sf-esp-orange) !important;
    color: #fff !important;
    transform: none;
    box-shadow: 0 3px 9px rgba(0,0,0,.20);
}

.sf-esp__more-info:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.sf-esp__more-info-tooltip {
    position: absolute;
    left: 0;
    top: auto;
    bottom: calc(100% + 8px);
    z-index: 80;
    width: max-content;
    max-width: min(330px, calc(100vw - 64px));
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--sf-esp-tooltip-text);
    background: var(--sf-esp-tooltip-bg);
    box-shadow: 0 9px 26px rgba(0,0,0,.30);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.sf-esp__more-info[aria-expanded="true"] + .sf-esp__more-info-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

@media (any-hover: hover) and (any-pointer: fine) {
    .sf-esp__more-label-wrap:hover > .sf-esp__more-info-tooltip,
    .sf-esp__more-info:focus-visible + .sf-esp__more-info-tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.sf-esp__more-tooltip-line {
    display: block;
}

.sf-esp__more-tooltip-line + .sf-esp__more-tooltip-line {
    margin-top: 10px;
}

.sf-esp__more-tooltip-term {
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 800;
}

.sf-esp__more-tooltip-line--icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sf-esp__more-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.sf-esp__more-tooltip-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.sf-esp .sf-esp__button:focus,
.sf-esp .sf-esp__button:active {
    color: inherit !important;
    outline: 2px solid transparent;
}

.sf-esp .sf-esp__button:focus-visible,
.sf-esp .sf-esp__volume input:focus-visible,
.sf-esp .sf-esp__volume button:focus-visible,
.sf-esp .sf-esp__scrubber:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.sf-esp__volume {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 5px 12px 5px 7px;
    transition: transform .18s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sf-esp__mute-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sf-esp__volume.is-volume-activate {
    padding: 0;
    background: var(--sf-esp-green) !important;
    border-color: rgba(134,239,172,.58);
    color: #fff !important;
    box-shadow: var(--sf-esp-button-shadow) !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.15);
}

.sf-esp__volume.is-volume-activate:hover {
    background: var(--sf-esp-green-hover) !important;
    border-color: rgba(134,239,172,.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 8px 20px rgba(0,0,0,.20), 0 0 15px rgba(34,197,94,.22) !important;
}

.sf-esp__volume-activate {
    appearance: none;
    width: 100%;
    min-height: inherit;
    border: 0;
    border-radius: inherit;
    padding: 11px 16px;
    color: inherit;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 15px;
    line-height: 1;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.sf-esp__volume-activate:hover,
.sf-esp__volume-activate:focus-visible {
    background: transparent;
}

.sf-esp__volume-activate:active {
    transform: translateY(1px);
}

.sf-esp__volume-activate[hidden] {
    display: none !important;
}

.sf-esp__volume-standard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sf-esp__volume-standard[hidden] {
    display: none !important;
}

.sf-esp__mute {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    width: 30px;
    height: 28px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.sf-esp__mute.is-muted {
    color: inherit;
    background: transparent;
    box-shadow: none;
}

.sf-esp__mute-x {
    stroke: #ef4444;
}

.sf-esp__volume-slider-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sf-esp__volume-slider-label {
    display: none;
}

.sf-esp__volume input[type="range"] {
    --sf-esp-volume-pct: 100%;
    appearance: none;
    width: 83px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sf-esp-volume-filled) 0%, var(--sf-esp-volume-filled) var(--sf-esp-volume-pct), var(--sf-esp-volume-empty) var(--sf-esp-volume-pct), var(--sf-esp-volume-empty) 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.32), 0 1px 0 rgba(255,255,255,.16);
    cursor: pointer;
}

.sf-esp__volume input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    border: 1px solid rgba(71,85,105,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.30);
}

.sf-esp__volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    border: 1px solid rgba(71,85,105,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.30);
}

.sf-esp__timer {
    position: relative;
    min-width: 116px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    opacity: .86;
    white-space: nowrap;
}

/* Optional per-sentence teaching highlights. */
.sf-esp__highlight {
    position: relative;
    will-change: color, opacity, text-shadow;
}

.sf-esp__highlight--underline-color {
    color: inherit;
    text-shadow: none;
    transition: color var(--sf-esp-highlight-fade-duration, .8s) ease, text-shadow var(--sf-esp-highlight-fade-duration, .8s) ease;
}

.sf-esp__highlight--underline-color.is-active {
    color: #fb923c;
    text-shadow: 0 0 10px rgba(249,115,22,.18);
}


.sf-esp__highlight--lift {
    display: inline-block;
    will-change: transform;
    transform: translateY(0);
    transition: transform var(--sf-esp-highlight-fade-duration, .8s) cubic-bezier(.22,.75,.28,1);
}

.sf-esp__highlight--lift.is-active {
    transform: translateY(-5px);
}

.sf-esp__word.has-highlight--spotlight .sf-esp__spotlight-rest {
    opacity: 1;
    transition: opacity var(--sf-esp-highlight-fade-duration, .8s) ease;
}

.sf-esp__word.has-highlight--spotlight.is-highlight-active .sf-esp__spotlight-rest {
    opacity: .32;
}

.sf-esp__highlight--spotlight {
    opacity: 1;
    transition: opacity var(--sf-esp-highlight-fade-duration, .8s) ease, text-shadow var(--sf-esp-highlight-fade-duration, .8s) ease;
}

.sf-esp__highlight--spotlight.is-active {
    opacity: 1;
    text-shadow: 0 0 11px rgba(255,255,255,.24);
}

/* No audio spinner/pulse. */
.sf-esp.is-playing-audio .sf-esp__stage::before {
    content: none !important;
    display: none !important;
}

/* Lightweight contextual tooltips for controls and round indicators. */
.sf-esp.sf-esp--tooltips [data-sf-tooltip] {
    position: relative;
}


@media (max-width: 932px) and (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
    .sf-esp:fullscreen {
        padding-top: max(10px, env(safe-area-inset-top));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    .sf-esp:fullscreen .sf-esp__stage {
        padding: 6px;
    }

    .sf-esp:fullscreen:not(.is-note-item):not(.is-flash-item) .sf-esp__stage {
        gap: 24px;
    }

    .sf-esp:fullscreen .sf-esp__word {
        width: min(96vw, 1100px);
        max-width: none;
        font-size: clamp(27px, 4.1vw, 38px);
        line-height: 1.18;
    }

    .sf-esp:fullscreen .sf-esp__translation {
        width: min(94vw, 1050px);
        max-width: none;
        font-size: clamp(18px, 2.8vw, 25px);
        line-height: 1.26;
    }

    .sf-esp:fullscreen .sf-esp__note {
        box-sizing: border-box;
        max-width: min(94vw, 1050px);
        max-height: 100%;
        padding: 16px 22px;
        font-size: clamp(19px, 2.6vw, 24px);
        line-height: 1.22;
    }
}

@media (hover: hover) and (pointer: fine) {
    .sf-esp.sf-esp--tooltips [data-sf-tooltip]::after {
        content: attr(data-sf-tooltip);
        position: absolute;
        left: 50%;
        bottom: calc(100% + 10px);
        transform: translate(-50%, 4px);
        width: max-content;
        max-width: 270px;
        padding: 7px 9px;
        border-radius: 7px;
        color: var(--sf-esp-tooltip-text);
        background: var(--sf-esp-tooltip-bg);
        box-shadow: 0 8px 24px rgba(0,0,0,.26);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: 0;
        text-transform: none;
        white-space: normal;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 50;
        transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    }

    .sf-esp.sf-esp--tooltips [data-sf-tooltip-pos="bottom"]::after {
        top: calc(100% + 9px);
        bottom: auto;
        transform: translate(-50%, -4px);
    }

    .sf-esp.sf-esp--tooltips [data-sf-tooltip]:hover::after,
    .sf-esp.sf-esp--tooltips [data-sf-tooltip]:focus-visible::after {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }

    .sf-esp.sf-esp--tooltips .sf-esp__more-button.is-open::after {
        opacity: 0;
        visibility: hidden;
    }
}

.sf-esp__help-button {
    font-weight: 850;
    font-size: 16px;
}

.sf-esp__help-panel {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2,6,23,.52);
    backdrop-filter: blur(4px);
}

.sf-esp__help-panel[hidden] { display: none !important; }

.sf-esp__help-card {
    width: min(100%, 620px);
    max-height: min(78vh, 620px);
    overflow: auto;
    padding: 20px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}

.sf-esp__help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.sf-esp__help-head strong { font-size: 18px; }

.sf-esp__help-close {
    appearance: none;
    border: 0;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
    color: #fff;
    font: inherit;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    padding: 0 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22,163,74,.28);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sf-esp__help-close:hover,
.sf-esp__help-close:focus-visible {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
    box-shadow: 0 4px 14px rgba(234,88,12,.30);
    transform: translateY(-1px);
}

.sf-esp__help-list {
    display: grid;
    gap: 9px;
}

.sf-esp__help-list > div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    justify-items: start;
    padding: 9px 0;
    border-top: 1px solid rgba(255,255,255,.11);
}

.sf-esp__help-symbol {
    justify-self: start;
    font-weight: 800;
    color: #fdba74;
}


.sf-esp__help-symbol--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
}

.sf-esp__help-symbol--icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.sf-esp__help-timer-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15,23,42,.35);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255,255,255,.92);
}

.sf-esp__resume-prompt {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2,6,23,.68);
    backdrop-filter: blur(5px);
}

.sf-esp__resume-prompt[hidden] { display: none !important; }

.sf-esp__resume-card {
    width: min(100%, 430px);
    display: grid;
    gap: 12px;
    text-align: center;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(30,41,59,.98), rgba(15,23,42,.98));
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}

.sf-esp__resume-card strong { font-size: 20px; }
.sf-esp__resume-card span { opacity: .75; font-variant-numeric: tabular-nums; }
.sf-esp__resume-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

.sf-esp:fullscreen {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: clamp(28px, 5vw, 72px);
    display: flex;
    flex-direction: column;
}

.sf-esp:fullscreen .sf-esp__stage {
    flex: 1 1 auto;
    min-height: 0;
}

@media (min-width: 900px) {
    .sf-esp:fullscreen .sf-esp__scrubber-wrap {
        margin-bottom: 30px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber {
        height: 28px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber::-webkit-slider-runnable-track {
        height: 10px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber::-moz-range-track,
    .sf-esp:fullscreen .sf-esp__scrubber::-moz-range-progress {
        height: 10px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        margin-top: -9px;
        border-width: 2px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }

    .sf-esp:fullscreen .sf-esp__scrubber-bubble {
        bottom: 40px;
        min-width: 86px;
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 23px;
    }

    .sf-esp:fullscreen .sf-esp__round-indicator--numbered {
        gap: 10px;
    }

    .sf-esp:fullscreen .sf-esp__round-indicator--numbered .sf-esp__round-mark {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-width: 2px;
    }

    .sf-esp:fullscreen .sf-esp__controls {
        gap: 16px;
    }

    .sf-esp:fullscreen .sf-esp__button--icon,
    .sf-esp:fullscreen .sf-esp__button--primary.is-playing,
    .sf-esp:fullscreen .sf-esp__button--primary.is-resume {
        width: 64px;
        min-width: 64px;
        height: 64px;
        min-height: 64px;
    }

    .sf-esp:fullscreen .sf-esp__button--icon svg,
    .sf-esp:fullscreen .sf-esp__button--primary svg {
        width: 30px;
        height: 30px;
    }

    .sf-esp:fullscreen .sf-esp__tap-button--side {
        width: 82px;
        height: 82px;
    }

    .sf-esp:fullscreen .sf-esp__tap-button--main {
        width: 104px;
        height: 104px;
    }
}

@keyframes sfEspCursor {
    0%, 45% { opacity: .7; }
    46%, 100% { opacity: 0; }
}

@keyframes sfEspHighlightLift {
    0% { transform: translateY(0); }
    45% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sf-esp *,
    .sf-esp *::before,
    .sf-esp *::after {
        animation: none !important;
    }
}

@media (max-width: 767px) {
    .sf-esp {
        --sf-esp-word-fade-in: 1.4s;
        --sf-esp-translation-fade-in: 1.8s;
        --sf-esp-stage-fade-out: 1.9s;
        --sf-esp-translation-lift: 14px;
        --sf-esp-exit-lift: -18px;
    }

    .sf-esp__topbar { min-height: 34px; }
    .sf-esp__logo--small { max-height: 28px; max-width: 110px; }
    .sf-esp__logo--medium { max-height: 38px; max-width: 145px; }
    .sf-esp__logo--large { max-height: 48px; max-width: 180px; }
}

@media (max-width: 560px) {
    .sf-esp {
        margin: 22px auto;
        border-radius: 16px;
    }

    .sf-esp__controls { justify-content: center; }
    .sf-esp__volume { max-width: 100%; }
    .sf-esp__volume input[type="range"] { width: min(105px, 27vw); }
    .sf-esp__more-card { padding: 12px; }
    .sf-esp__more-close { top: 2px; right: 2px; }
    .sf-esp__more-body { padding-top: 9px; }
    .sf-esp__more-row { grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; }
    .sf-esp__speed-group { flex-wrap: nowrap; gap: 4px; }
    .sf-esp__button--speed { min-width: 58px; padding-inline: 10px; }
    .sf-esp__speed-group,
    .sf-esp__mode-group,
    .sf-esp__more-control { width: 100%; justify-content: center; }
    .sf-esp__button--mode { flex: 0 1 auto; }

    .sf-esp__note {
        padding-inline: clamp(14px, 4vw, 20px);
    }
}


@media (max-width: 932px) and (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
    .sf-esp:fullscreen {
        padding-top: max(10px, env(safe-area-inset-top));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    .sf-esp:fullscreen .sf-esp__stage {
        padding: 6px;
    }

    .sf-esp:fullscreen:not(.is-note-item):not(.is-flash-item) .sf-esp__stage {
        gap: 24px;
    }

    .sf-esp:fullscreen .sf-esp__word {
        width: min(96vw, 1100px);
        max-width: none;
        font-size: clamp(27px, 4.1vw, 38px);
        line-height: 1.18;
    }

    .sf-esp:fullscreen .sf-esp__translation {
        width: min(94vw, 1050px);
        max-width: none;
        font-size: clamp(18px, 2.8vw, 25px);
        line-height: 1.26;
    }

    .sf-esp:fullscreen .sf-esp__note {
        box-sizing: border-box;
        max-width: min(94vw, 1050px);
        max-height: 100%;
        padding: 16px 22px;
        font-size: clamp(19px, 2.6vw, 24px);
        line-height: 1.22;
    }
}

@media (hover: hover) and (pointer: fine) {
    .sf-esp.sf-esp--tooltips .sf-esp__round-indicator[data-sf-tooltip]::after,
    .sf-esp.sf-esp--tooltips .sf-esp__round-mark[data-sf-tooltip]::after {
        left: 0;
        right: auto;
        transform: translate(0, -4px);
    }

    .sf-esp.sf-esp--tooltips .sf-esp__round-indicator[data-sf-tooltip]:hover::after,
    .sf-esp.sf-esp--tooltips .sf-esp__round-indicator[data-sf-tooltip]:focus-visible::after,
    .sf-esp.sf-esp--tooltips .sf-esp__round-mark[data-sf-tooltip]:hover::after,
    .sf-esp.sf-esp--tooltips .sf-esp__round-mark[data-sf-tooltip]:focus-visible::after {
        transform: translate(0, 0);
    }
}

@media (min-width: 1024px) {
    .sf-esp:fullscreen .sf-esp__word {
        width: min(1800px, 92vw);
        max-width: none;
        font-size: clamp(38px, min(3.2vw, 7vh), 64px);
        line-height: 1.18;
    }

    .sf-esp:fullscreen .sf-esp__translation {
        width: min(1650px, 90vw);
        max-width: none;
        font-size: clamp(24px, min(2.2vw, 5vh), 38px);
        line-height: 1.28;
    }

    .sf-esp:fullscreen .sf-esp__note {
        box-sizing: border-box;
        max-width: min(1600px, 92vw);
        max-height: 100%;
        font-size: clamp(25px, min(1.8vw, 4vh), 36px);
        line-height: 1.22;
    }
}


/* Flash Word item — same visual typography as Sentence, while preserving quick Flash timing. */
.sf-esp.is-flash-item .sf-esp__note {
    display: none !important;
}

.sf-esp.is-flash-item .sf-esp__word,
.sf-esp.is-flash-item .sf-esp__translation {
    transform: translateY(0);
}

.sf-esp.is-flash-item .sf-esp__word {
    opacity: 0;
    transition: opacity .18s ease;
}

.sf-esp.is-flash-item .sf-esp__word.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-esp.is-flash-item .sf-esp__translation {
    opacity: 0;
    transition: opacity .18s ease;
}

.sf-esp.is-flash-item .sf-esp__translation.is-visible {
    opacity: .88;
    transform: translateY(0);
}

.sf-esp.is-flash-item .sf-esp__word.is-exiting,
.sf-esp.is-flash-item .sf-esp__translation.is-exiting {
    opacity: 0;
    transform: translateY(0);
    transition: opacity .35s ease;
}



@media (prefers-reduced-motion: reduce) {
    .sf-esp__more-button svg {
        transition: none;
    }
}

/* Larger, less obstructive YouTube-like stage controls. */
.sf-esp__tap-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    padding-inline: clamp(28px, 12vw, 150px);
    background: transparent;
}

.sf-esp__tap-button {
    background: rgba(15,23,42,.16);
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 5px 16px rgba(0,0,0,.16);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.sf-esp__tap-button--side {
    width: 72px;
    height: 72px;
}

.sf-esp__tap-button--main {
    width: 86px;
    height: 86px;
    justify-self: center;
}

.sf-esp__tap-button[data-sf-tap-prev] {
    justify-self: start;
}

.sf-esp__tap-button[data-sf-tap-next] {
    justify-self: end;
}

.sf-esp__tap-button--side svg {
    width: 78%;
    height: 78%;
}

.sf-esp__tap-button--main svg {
    width: 72%;
    height: 72%;
}

.sf-esp__tap-button:not(:disabled):hover,
.sf-esp__tap-button:not(:disabled):focus-visible {
    background: rgba(15,23,42,.30);
}

.sf-esp--light .sf-esp__tap-button {
    color: #0f172a;
    background: rgba(255,255,255,.18);
    border-color: rgba(15,23,42,.24);
    box-shadow: 0 5px 16px rgba(15,23,42,.12);
}

.sf-esp--light .sf-esp__tap-button:not(:disabled):hover,
.sf-esp--light .sf-esp__tap-button:not(:disabled):focus-visible {
    background: rgba(255,255,255,.38);
}

/* Learner-selected appearance controls. */
.sf-esp__theme-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

/* Full-screen desktop volume control scales with the other controls. */
@media (min-width: 900px) {
    .sf-esp:fullscreen .sf-esp__volume {
        min-height: 64px;
        padding: 8px 18px 8px 10px;
        gap: 10px;
    }

    .sf-esp:fullscreen .sf-esp__volume.is-volume-activate {
        padding: 0;
    }

    .sf-esp:fullscreen .sf-esp__mute {
        width: 46px;
        height: 46px;
        padding: 7px;
    }

    .sf-esp:fullscreen .sf-esp__volume svg {
        width: 31px;
        height: 31px;
    }

    .sf-esp:fullscreen .sf-esp__volume input[type="range"] {
        width: 150px;
        height: 12px;
    }

    .sf-esp:fullscreen .sf-esp__volume input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        border-width: 2px;
    }

    .sf-esp:fullscreen .sf-esp__volume input[type="range"]::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border-width: 2px;
    }

    .sf-esp:fullscreen .sf-esp__tap-controls {
        padding-inline: clamp(72px, 15vw, 280px);
    }

    .sf-esp:fullscreen .sf-esp__tap-button--side {
        width: 108px;
        height: 108px;
    }

    .sf-esp:fullscreen .sf-esp__tap-button--main {
        width: 126px;
        height: 126px;
    }

    .sf-esp:fullscreen .sf-esp__more-panel {
        max-width: min(92vw, 980px);
        margin-top: 28px;
    }

    .sf-esp:fullscreen .sf-esp__more-card {
        padding: 28px;
        border-radius: 24px;
    }

    .sf-esp:fullscreen .sf-esp__more-body {
        gap: 16px;
        padding-top: 14px;
    }

    .sf-esp:fullscreen .sf-esp__more-row {
        gap: 20px;
        padding-top: 16px;
    }

    .sf-esp:fullscreen .sf-esp__more-label {
        font-size: 18px;
    }

    .sf-esp:fullscreen .sf-esp__more-info {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        font-size: 15px;
    }

    .sf-esp:fullscreen .sf-esp__more-close {
        top: 6px;
        right: 6px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .sf-esp:fullscreen .sf-esp__more-close > span,
    .sf-esp:fullscreen .sf-esp__more-close > span::before,
    .sf-esp:fullscreen .sf-esp__more-close > span::after {
        width: 17px;
    }

    .sf-esp:fullscreen .sf-esp__more-control,
    .sf-esp:fullscreen .sf-esp__theme-group,
    .sf-esp:fullscreen .sf-esp__mode-group,
    .sf-esp:fullscreen .sf-esp__speed-group {
        gap: 11px;
    }

    .sf-esp:fullscreen .sf-esp__more-panel .sf-esp__button--mode,
    .sf-esp:fullscreen .sf-esp__more-panel .sf-esp__button--speed,
    .sf-esp:fullscreen .sf-esp__more-panel .sf-esp__button--repeat {
        min-height: 48px;
        padding: 10px 17px;
        font-size: 17px;
        border-radius: 14px;
    }

    .sf-esp:fullscreen .sf-esp__more-info-tooltip {
        font-size: 16px;
        max-width: min(520px, 70vw);
    }

    .sf-esp:fullscreen .sf-esp__timer {
        font-size: 17px;
    }
}

@media (max-width: 600px) {
    .sf-esp__tap-controls {
        padding-inline: 18px;
    }

    .sf-esp__tap-button--side {
        width: 58px;
        height: 58px;
    }

    .sf-esp__tap-button--main {
        width: 72px;
        height: 72px;
    }
}


/* 0.2.8.48 — one-tap stage zones with brief, non-blocking feedback. */
.sf-esp__stage {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.sf-esp__stage * {
    -webkit-tap-highlight-color: transparent;
}

.sf-esp__tap-controls.is-visible {
    pointer-events: none;
}

.sf-esp__tap-controls.is-feedback--previous [data-sf-tap-replay],
.sf-esp__tap-controls.is-feedback--previous [data-sf-tap-next],
.sf-esp__tap-controls.is-feedback--replay [data-sf-tap-prev],
.sf-esp__tap-controls.is-feedback--replay [data-sf-tap-next],
.sf-esp__tap-controls.is-feedback--next [data-sf-tap-prev],
.sf-esp__tap-controls.is-feedback--next [data-sf-tap-replay] {
    opacity: 0;
    visibility: hidden;
}

.sf-esp__tap-controls.is-feedback--previous [data-sf-tap-prev],
.sf-esp__tap-controls.is-feedback--replay [data-sf-tap-replay],
.sf-esp__tap-controls.is-feedback--next [data-sf-tap-next] {
    opacity: 1;
    visibility: visible;
}

/* Auto-hiding navigation remains available, but the explicit
   Show controls / Hide controls text toggle was removed in 0.2.8.56. */
.sf-esp__navigation-shell {
    position: relative;
    width: 100%;
}

.sf-esp__navigation {
    width: 100%;
}

.sf-esp.has-auto-navigation .sf-esp__navigation {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}

.sf-esp.has-auto-navigation.is-navigation-visible .sf-esp__navigation {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .sf-esp.has-auto-navigation .sf-esp__navigation {
        transition: none;
    }
}



/* 0.2.8.60 landing-page audio gate.
   Before sound activation, keep the navigation in its normal bottom position.
   Show the progress bar plus the green audio CTA; hide every other control.
   After activation JS removes the gate class and the normal navigation returns
   unchanged. */
.sf-esp.is-autoplay-volume-gate .sf-esp__navigation-shell {
    position: relative;
    inset: auto;
    z-index: auto;
    width: 100%;
    height: auto;
    pointer-events: auto;
}

.sf-esp.is-autoplay-volume-gate .sf-esp__navigation,
.sf-esp.has-auto-navigation.is-autoplay-volume-gate .sf-esp__navigation,
.sf-esp.has-auto-navigation.is-autoplay-volume-gate.is-navigation-visible .sf-esp__navigation {
    width: 100%;
    height: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
}

.sf-esp.is-autoplay-volume-gate .sf-esp__controls > :not(.sf-esp__volume) {
    display: none !important;
}

.sf-esp.is-autoplay-volume-gate .sf-esp__controls {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    pointer-events: auto;
}

.sf-esp.is-autoplay-volume-gate .sf-esp__volume {
    pointer-events: auto;
    margin: 0;
}



/* v0.2.8.67 — one first-phase countdown pie spanning audio + pre-typing delay. */
.sf-esp__countdown-pie {
    --sf-esp-countdown-angle: 360deg;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    background: conic-gradient(
        #22c55e 0turn,
        #22c55e var(--sf-esp-countdown-angle),
        rgba(148,163,184,.26) var(--sf-esp-countdown-angle),
        rgba(148,163,184,.26) 1turn
    );
    border: 1px solid rgba(255,255,255,.48);
    box-shadow: 0 9px 28px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.sf-esp__countdown-pie[hidden] {
    display: none !important;
}

.sf-esp__countdown-pie.is-visible {
    opacity: .96;
    animation: sfEspCountdownFloat 1.45s ease-in-out infinite alternate;
}

@keyframes sfEspCountdownFloat {
    from { transform: translate(-50%, calc(-50% - 15px)); }
    to { transform: translate(-50%, calc(-50% + 15px)); }
}

.sf-esp--light .sf-esp__countdown-pie,
.sf-esp--card .sf-esp__countdown-pie,
.sf-esp--minimal .sf-esp__countdown-pie {
    border-color: rgba(15,23,42,.18);
    box-shadow: 0 7px 22px rgba(15,23,42,.15), inset 0 1px 0 rgba(255,255,255,.88);
}

@media (max-width: 767px) {
    .sf-esp__countdown-pie {
        width: 64px;
        height: 64px;
    }
}

/* Fullscreen scales the countdown pie along with the other learner controls. */
@media (min-width: 900px) {
    .sf-esp:fullscreen .sf-esp__countdown-pie {
        width: 116px;
        height: 116px;
        border-width: 2px;
        box-shadow: 0 14px 38px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.42);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-esp__countdown-pie.is-visible {
        animation: none;
        transform: translate(-50%, -50%);
    }
}

.sf-esp.sf-esp--wide-stage {
    width: 100%;
    max-width: none;
    container-type: inline-size;
}

/* v0.2.8.69 — Wide stage sizing only.
   On desktop, the player fills the actual parent row until viewport height
   becomes the tighter constraint. At that point the player width is reduced
   too, so the original 998:390 stage proportion is preserved rather than
   flattening the player. The 300 px vertical reserve covers player chrome
   (padding, top bar, scrubber and controls) plus normal outer breathing room. */
@media (min-width: 999px) {
    .sf-esp.sf-esp--wide-stage {
        /* 998 / 390 = 2.558974. Written as ordinary calc terms for broad browser support. */
        width: min(100%, calc(255.897vh - 767.692px));
    }

    @supports (height: 100svh) {
        .sf-esp.sf-esp--wide-stage {
            width: min(100%, calc(255.897svh - 767.692px));
        }
    }

    .sf-esp.sf-esp--wide-stage .sf-esp__stage {
        min-height: 39.05cqw;
    }
}

.sf-esp.sf-esp--wide-stage .sf-esp__word {
    max-width: 1050px;
}

.sf-esp.sf-esp--wide-stage .sf-esp__translation {
    max-width: 980px;
}



/* 0.2.8.72 — optional landing-page compact presentation.
   These classes are attribute-driven and do not affect ordinary lesson players. */
.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) {
    padding-top: 10px;
}

.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__dev-meta,
.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__round-indicator {
    display: none !important;
}

/* The topbar is now only needed when a learner logo is configured. */
.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__topbar {
    min-height: 0;
}

.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__meta {
    min-width: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__topbar:not(:has(.sf-esp__logo)) {
    display: none;
}

.sf-esp.sf-esp--landing-compact-top:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__stage,
.sf-esp.sf-esp--landing-compact-top.sf-esp--wide-stage:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__stage {
    min-height: clamp(165px, 22vw, 250px);
    padding-top: 8px;
    padding-bottom: 12px;
}

/* Landing-only text reduction. Tuned for the narrower desktop column used on the landing page.
   Normal lesson players and fullscreen keep their ordinary sizes. */
.sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__stage {
    padding-left: 4px;
    padding-right: 4px;
}

.sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__word {
    width: 100%;
    max-width: 100%;
    padding-inline: 1px;
    font-size: 25px;
}

.sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__translation {
    width: 100%;
    max-width: 100%;
    padding-inline: 1px;
    font-size: 19px;
}

.sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__note {
    width: min(100%, 880px);
    max-width: 100%;
    padding: 7px 4px;
    border-radius: 10px;
    border-width: 1px;
    font-size: 18px;
    line-height: 1.18;
    box-shadow:
        0 0 0 2px rgba(245,158,11,.08),
        0 6px 14px rgba(0,0,0,.16),
        inset 0 1px 0 rgba(255,255,255,.90);
}

@media (max-width: 767px) {
    .sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__word {
        font-size: 22px;
    }

    .sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__translation {
        font-size: 17px;
    }

    .sf-esp.sf-esp--landing-compact-typography:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__note {
        padding: 6px 3px;
        border-radius: 9px;
        font-size: 16px;
        line-height: 1.17;
    }
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) {
    padding-bottom: 10px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__scrubber-wrap {
    margin-bottom: 8px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__controls {
    gap: 5px;
}

/* Standard transport controls are 42 px. Landing compact mode reduces desktop
   controls by about 25%; phones use a moderate compact reduction for easier tapping. */
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--icon,
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-playing,
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-resume {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--icon svg,
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-playing svg,
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-resume svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 767px) {
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__controls {
        gap: 8px;
    }

    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--icon,
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-playing,
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-resume {
        width: 28px;
        min-width: 28px;
        height: 28px;
        min-height: 28px;
    }

    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--icon svg,
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-playing svg,
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__button--primary.is-resume svg {
        width: 13px;
        height: 13px;
    }
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) [data-sf-fullscreen],
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) [data-sf-more] {
    display: none !important;
}

/* Landing compact controls keep the normal volume pill/container.
   Only the internal speaker/slider sizing remains compact. */
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume-standard {
    gap: 3px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__mute {
    width: 22px;
    height: 21px;
    padding: 2px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume svg {
    width: 14px;
    height: 14px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume input[type="range"] {
    width: 94px;
    height: 12px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume-slider-label {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: block;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 9px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: .01em;
    text-transform: lowercase;
    opacity: .46;
    pointer-events: none;
    text-shadow: none;
    transition: opacity .14s ease;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume-slider-label.is-hidden {
    opacity: 0;
}

@media (max-width: 767px) {
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume input[type="range"] {
        width: 82px;
        height: 11px;
    }

    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume-slider-label {
        font-size: 8px;
    }
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume input[type="range"]::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
}

.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
}


/* 0.2.8.78 — landing audio gate and NOTE readability refinements. */
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume.is-volume-activate {
    height: 32px;
    min-height: 32px;
    padding: 0;
}
.sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume.is-volume-activate .sf-esp__volume-activate {
    height: 32px;
    min-height: 32px;
    padding: 0 13px;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
}
@media (max-width: 767px) {
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume.is-volume-activate,
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume.is-volume-activate .sf-esp__volume-activate {
        height: 28px;
        min-height: 28px;
    }
    .sf-esp.sf-esp--landing-compact-controls:not(:is(:fullscreen, :-webkit-full-screen)) .sf-esp__volume.is-volume-activate .sf-esp__volume-activate {
        padding-inline: 10px;
        font-size: 16px;
    }
}
