#sitespeaker-player {
    position: fixed;
    left: 34px;
    right: auto;
    --sitespeaker-base-bottom: 96px;
    bottom: var(--sitespeaker-base-bottom);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
}
#sitespeaker-player[hidden] { display: none !important; }
#sitespeaker-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
#sitespeaker-status[hidden] { display: none !important; }
#sitespeaker-toggle {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #246b5b;
    color: #fff;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .22);
    cursor: pointer;
    pointer-events: auto;
    overflow: hidden;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, width .2s ease, border-radius .2s ease;
}
#sitespeaker-player.has-status #sitespeaker-toggle {
    width: auto;
    max-width: min(330px, calc(100vw - 68px));
    padding: 0 17px 0 15px;
    border-radius: 29px;
    gap: 10px;
    justify-content: flex-start;
}
#sitespeaker-player.has-status .sitespeaker-toggle-label {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 145px);
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: auto !important;
    clip-path: none !important;
    border: 0 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis;
    color: #fff;
    font: 600 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}
#sitespeaker-toggle:hover,
#sitespeaker-toggle:focus-visible {
    background: #195448;
    transform: translateY(-2px);
    outline: 3px solid rgba(36, 107, 91, .25);
    outline-offset: 3px;
}
#sitespeaker-toggle:active { transform: translateY(0); }
#sitespeaker-toggle:disabled { cursor: wait; opacity: 1; }
#sitespeaker-player.is-generating #sitespeaker-toggle {
    animation: sitespeaker-pulse 1.45s ease-in-out infinite;
}
#sitespeaker-toggle svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}
#sitespeaker-toggle svg[hidden] { display: none !important; }
.sitespeaker-speaking-block {
    background: rgba(255, 227, 110, .38);
    box-shadow: 0 0 0 4px rgba(255, 227, 110, .18);
    border-radius: 4px;
    transition: background-color .2s ease;
}
.sitespeaker-word {
    border-radius: 3px;
    transition: background-color .1s ease;
}
.sitespeaker-speaking-word {
    background: #ffe36e;
    color: inherit;
    box-shadow: 0 0 0 2px #ffe36e;
}
@keyframes sitespeaker-pulse {
    0%, 100% { box-shadow: 0 7px 20px rgba(0, 0, 0, .22), 0 0 0 0 rgba(36, 107, 91, .4); }
    50% { box-shadow: 0 7px 20px rgba(0, 0, 0, .22), 0 0 0 10px rgba(36, 107, 91, 0); }
}
#sitespeaker-stop {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: 0 0 9px 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7a332d;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
    cursor: pointer;
    pointer-events: auto;
    transition: transform .18s ease, background .18s ease;
}
#sitespeaker-stop[hidden] { display: none !important; }
#sitespeaker-stop:hover,
#sitespeaker-stop:focus-visible {
    background: #5d241f;
    transform: translateY(-1px);
    outline: 3px solid rgba(122, 51, 45, .22);
    outline-offset: 2px;
}
#sitespeaker-stop svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
@media (max-width: 600px) {
    #sitespeaker-player { left: 34px; right: auto; --sitespeaker-base-bottom: 118px; bottom: var(--sitespeaker-base-bottom); }
    #sitespeaker-toggle { width: 56px; height: 56px; min-width: 56px; min-height: 56px; }
    #sitespeaker-player.has-status #sitespeaker-toggle { width: auto; max-width: calc(100vw - 68px); }
}
@media (prefers-reduced-motion: reduce) {
    #sitespeaker-player.is-generating #sitespeaker-toggle { animation: none; }
    #sitespeaker-toggle, .sitespeaker-word { transition: none; }
}
/* Keep the theme's jump-to-top control available above all floating widgets. */
.w-toplink.sitespeaker-toplink-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1000000 !important;
    transform: translate3d(0, 0, 0) !important;
    background: #176d5b !important;
    color: #fff !important;
}
