/* FreeSongFinder Studio: separate, compact recognition panel. */
#sf-shell .sf-inline-feedback,
#sf-shell .sf-inline-feedback *,
#sf-shell .sf-inline-feedback *::before,
#sf-shell .sf-inline-feedback *::after { box-sizing: border-box; }

#sf-shell .sf-inline-feedback[hidden],
#sf-shell .sf-inline-feedback [hidden] { display: none !important; }

#sf-shell .sf-inline-feedback {
    --sf-inline-accent: var(--fsfs-accent, var(--sf-accent, #6565d9));
    --sf-inline-ink: var(--fsfs-ink, #171b29);
    --sf-inline-muted: #687185;
    --sf-inline-line: var(--fsfs-line, #e5e7ec);
    display: block;
    width: 100%;
    max-width: none;
    margin: 18px 0 0;
    overflow: hidden;
    border: 1px solid var(--sf-inline-line);
    border-top: 1px solid var(--sf-inline-line);
    border-radius: 0 !important;
    background: #fff;
    color: var(--sf-inline-ink);
    box-shadow: none !important;
    scroll-margin-block: 90px;
}

#sf-shell .sf-inline-feedback h3,
#sf-shell .sf-inline-feedback p { margin: 0 !important; }

/* Honest, indeterminate loading state without a separate overlay. */
#sf-shell .sf-inline-loading {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 134px;
    padding: 24px 30px;
}
#sf-shell .sf-inline-loading-mark {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    background: #f3f3fd;
    color: var(--sf-inline-accent);
}
#sf-shell .sf-inline-loading-mark svg { display: block; width: 27px; height: 27px; }
#sf-shell .sf-inline-loading-copy { flex: 1; min-width: 0; opacity: 1; transition: opacity .18s ease; }
#sf-shell .sf-inline-loading-copy.is-changing { opacity: .5; }
#sf-shell .sf-inline-loading-title {
    color: var(--sf-inline-ink) !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    letter-spacing: -.02em;
}
#sf-shell .sf-inline-loading-subtitle {
    margin-top: 4px !important;
    color: var(--sf-inline-muted) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
}
#sf-shell .sf-inline-spinner {
    display: block;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid #dedff3;
    border-top-color: var(--sf-inline-accent);
    border-radius: 50%;
    transform-origin: center;
    -webkit-transform-origin: center;
    -webkit-animation: sf-inline-spin .85s linear infinite !important;
    animation: sf-inline-spin .85s linear infinite !important;
}
@-webkit-keyframes sf-inline-spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}
@keyframes sf-inline-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Song on the left, listening links in a tidy right column. */
#sf-shell .sf-inline-success { padding: 23px 28px; }
#sf-shell .sf-inline-result-main {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 32px;
}
#sf-shell .sf-inline-track {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 12px 21px;
    flex: 1 1 auto;
    min-width: 0;
}
#sf-shell .sf-inline-cover {
    position: relative;
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border: 1px solid var(--sf-inline-line);
    background: #f2f2fc;
    border-radius: 0 !important;
}
#sf-shell .sf-inline-cover-fallback { color: var(--sf-inline-accent); }
#sf-shell .sf-inline-cover-fallback svg { display: block; width: 34px; height: 34px; }
#sf-shell .sf-inline-cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0 !important;
}
#sf-shell .sf-inline-track-info { grid-column: 2; grid-row: 1; min-width: 0; }
#sf-shell .sf-inline-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px !important;
    color: var(--sf-inline-accent) !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
}
#sf-shell .sf-inline-status svg { display: block; flex: 0 0 14px; width: 14px; height: 14px; }
#sf-shell .sf-inline-track-title {
    overflow-wrap: anywhere;
    color: var(--sf-inline-ink) !important;
    font-size: clamp(22px, 2.8vw, 29px) !important;
    line-height: 1.2 !important;
    letter-spacing: -.035em;
    font-weight: 600 !important;
}
/* Both result headings receive programmatic focus for screen readers.
   They are not controls or part of the Tab sequence; avoid showing the
   browser/theme focus rectangle on these static headings. */
#sf-shell #sf-result-title:focus,
#sf-shell #sf-empty-title:focus {
    outline: none !important;
    box-shadow: none !important;
}
#sf-shell .sf-inline-track-artist {
    margin-top: 4px !important;
    color: #4f586c !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}
#sf-shell .sf-inline-track-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    margin-top: 11px;
    color: var(--sf-inline-muted);
}
#sf-shell .sf-inline-meta-item {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 400;
}
#sf-shell .sf-inline-meta-item + .sf-inline-meta-item::before {
    content: '\00b7';
    display: inline-block;
    margin: 0 9px;
    color: #a6abbb;
}

#sf-shell .sf-inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}
#sf-shell .sf-inline-track > .sf-inline-actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    margin-top: 1px;
}
#sf-shell .sf-inline-action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--sf-inline-line);
    border-radius: 0 !important;
    background: #fff;
    color: #485167;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 12px !important;
    line-height: 1.3;
    font-weight: 600 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
#sf-shell .sf-inline-action svg {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: none;
}
#sf-shell .sf-inline-action:hover { background: #f8f8ff; border-color: #c5c7e9; color: var(--sf-inline-accent); }
#sf-shell .sf-inline-action--primary { background: #f3f3fc; color: var(--sf-inline-accent); border-color: #e4e4f6; }
#sf-shell .sf-inline-action--primary:hover { background: #eaeafa; border-color: #c4c4e7; color: #4f4fc3; }
#sf-shell .sf-inline-action.is-copied { color: #19734a; border-color: #b9e2ce; background: #f0faf5; }

/* Flat service list, separated by a single vertical rule on wide screens. */
#sf-shell .sf-inline-listen {
    display: flex;
    flex: 0 0 225px;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    margin: 0;
    padding-block: 6px 0;
    padding-inline: 27px 0;
    border: 0;
    border-inline-start: 1px solid var(--sf-inline-line);
}
#sf-shell .sf-inline-listen-label {
    color: #707889 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    letter-spacing: .065em;
    text-transform: uppercase;
}
#sf-shell .sf-inline-platforms {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
}
#sf-shell a.sf-inline-platform-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 31px;
    padding-block: 4px;
    padding-inline: 0 2px;
    border: 0;
    border-radius: 0 !important;
    background: transparent;
    color: #465166 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: color .15s ease;
}
#sf-shell a.sf-inline-platform-link:hover,
#sf-shell a.sf-inline-platform-link:focus-visible { color: var(--sf-inline-accent) !important; background: transparent; }
#sf-shell .sf-inline-platform-icon,
#sf-shell .sf-inline-platform-arrow { display: inline-flex; align-items: center; justify-content: center; color: inherit; }
#sf-shell .sf-inline-platform-icon svg { display: block; width: 18px; height: 18px; fill: none; }
#sf-shell .sf-inline-platform-arrow svg { display: block; width: 12px; height: 12px; fill: none; }
#sf-shell .sf-inline-platform-arrow { margin-inline-start: auto; }
#sf-shell .sf-inline-platform-label { font-size: 12px; line-height: 1.35; font-weight: 500; white-space: nowrap; }
#sf-shell .sf-inline-action:focus-visible,
#sf-shell a.sf-inline-platform-link:focus-visible {
    outline: 2px solid var(--sf-inline-accent) !important;
    outline-offset: 3px;
}

/* The no-match panel shares the same flat visual language. */
#sf-shell .sf-inline-empty { padding: 33px 24px; text-align: center; }
#sf-shell .sf-inline-empty-mark { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 10px; color: var(--sf-inline-accent); }
#sf-shell .sf-inline-empty-mark svg { display: block; width: 27px; height: 27px; }
#sf-shell .sf-inline-empty-title {
    color: var(--sf-inline-ink) !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}
/* Higher specificity than the generic feedback paragraph reset above. */
#sf-shell .sf-inline-empty p.sf-inline-empty-text {
    display: block;
    width: 100%;
    max-width: 620px;
    margin: 7px auto 0 !important;
    text-align: center !important;
    color: var(--sf-inline-muted) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}
#sf-shell .sf-inline-empty-actions { justify-content: center; margin-top: 18px; }

@media (max-width: 760px) {
    #sf-shell .sf-inline-result-main { flex-direction: column; gap: 20px; }
    #sf-shell .sf-inline-listen {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 17px;
        width: 100%;
        padding: 15px 0 0;
        border-inline-start: 0;
        border-top: 1px solid var(--sf-inline-line);
    }
    #sf-shell .sf-inline-platforms { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 19px; }
    #sf-shell a.sf-inline-platform-link { width: auto; }
    #sf-shell .sf-inline-platform-arrow { margin-inline-start: 0; }
}
@media (max-width: 600px) {
    #sf-shell .sf-inline-feedback { margin-top: 14px; scroll-margin-block: 76px; }
    #sf-shell .sf-inline-loading { gap: 12px; min-height: 118px; padding: 18px 16px; }
    #sf-shell .sf-inline-loading-mark { flex-basis: 38px; width: 38px; height: 38px; }
    #sf-shell .sf-inline-loading-mark svg { width: 24px; height: 24px; }
    #sf-shell .sf-inline-loading-title { font-size: 16px !important; }
    #sf-shell .sf-inline-loading-subtitle { font-size: 12px !important; }
    #sf-shell .sf-inline-spinner { flex-basis: 18px; width: 18px; height: 18px; }
    #sf-shell .sf-inline-success { padding: 20px 16px; }
    #sf-shell .sf-inline-result-main { gap: 17px; }
    #sf-shell .sf-inline-track { grid-template-columns: 80px minmax(0, 1fr); gap: 12px 14px; }
    #sf-shell .sf-inline-track > .sf-inline-actions { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
    #sf-shell .sf-inline-cover { width: 80px; height: 80px; }
    #sf-shell .sf-inline-cover { grid-row: 1; }
    #sf-shell .sf-inline-cover-fallback svg { width: 27px; height: 27px; }
    #sf-shell .sf-inline-status { font-size: 10px !important; margin-bottom: 5px !important; }
    #sf-shell .sf-inline-track-title { font-size: 21px !important; }
    #sf-shell .sf-inline-track-artist { font-size: 13px !important; }
    #sf-shell .sf-inline-track-meta { margin-top: 7px; }
    #sf-shell .sf-inline-meta-item { font-size: 11px; }
    #sf-shell .sf-inline-actions { gap: 8px; }
    #sf-shell .sf-inline-action { flex: 1 1 auto; min-height: 41px; }
    #sf-shell .sf-inline-listen { align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 14px; }
    #sf-shell .sf-inline-platforms { gap: 8px 17px; }
    #sf-shell .sf-inline-platform-label { font-size: 12px; }
    #sf-shell .sf-inline-empty { padding: 28px 16px; }
}
@media (max-width: 355px) {
    #sf-shell .sf-inline-track { grid-template-columns: 70px minmax(0, 1fr); column-gap: 11px; }
    #sf-shell .sf-inline-cover { width: 70px; height: 70px; }
    #sf-shell .sf-inline-track-title { font-size: 19px !important; }
    #sf-shell .sf-inline-actions .sf-inline-action { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    /* Keep the progress indicator active, at a gentler speed, even when
       the phone is configured to reduce interface motion. */
    #sf-shell .sf-inline-spinner {
        -webkit-animation-duration: 1.8s !important;
        animation-duration: 1.8s !important;
    }
    #sf-shell .sf-inline-loading-copy,
    #sf-shell .sf-inline-action,
    #sf-shell a.sf-inline-platform-link { transition: none; }
}
