.ibfml-app {
    --ibfml-ink: #17231f;
    --ibfml-muted: #64706b;
    --ibfml-line: #dfe7e2;
    --ibfml-surface: #ffffff;
    --ibfml-soft: #f3f7f4;
    --ibfml-primary: #126e5a;
    --ibfml-primary-dark: #0a4f40;
    --ibfml-accent: #e8a83a;
    --ibfml-shadow: 0 20px 60px rgba(19, 43, 35, .1);
    color: var(--ibfml-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 24px auto 64px;
    max-width: 1440px;
}

.ibfml-app *,
.ibfml-app *::before,
.ibfml-app *::after {
    box-sizing: border-box;
}

.ibfml-app button,
.ibfml-app input,
.ibfml-app select,
.ibfml-app textarea {
    font: inherit;
}

.ibfml-runtime-warning {
    background: #fff4df;
    border: 1px solid #eac47d;
    border-radius: 12px;
    color: #735216;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.ibfml-hero {
    background:
        radial-gradient(circle at 83% 15%, rgba(232, 168, 58, .24), transparent 24%),
        radial-gradient(circle at 72% 100%, rgba(105, 183, 154, .21), transparent 30%),
        linear-gradient(125deg, #0c3f35 0%, #126e5a 56%, #1b8169 100%);
    border-radius: 30px;
    color: #fff;
    min-height: 350px;
    overflow: hidden;
    padding: clamp(36px, 6vw, 78px);
    position: relative;
}

.ibfml-hero::after {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    content: "";
    height: 340px;
    position: absolute;
    right: -70px;
    top: -95px;
    width: 340px;
}

.ibfml-hero__glow {
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    height: 230px;
    position: absolute;
    right: 50px;
    top: -10px;
    width: 230px;
}

.ibfml-hero__content {
    max-width: 760px;
    position: relative;
    z-index: 1;
}

.ibfml-eyebrow {
    color: #d4f0e5;
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    margin-bottom: 14px;
}

.ibfml-hero h1 {
    color: #fff;
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: .98;
    margin: 0 0 20px;
}

.ibfml-hero p {
    color: rgba(255, 255, 255, .78);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    margin: 0;
    max-width: 650px;
}

.ibfml-hero__stats {
    display: flex;
    gap: clamp(22px, 5vw, 58px);
    margin-top: 42px;
}

.ibfml-hero__stats div {
    display: flex;
    flex-direction: column;
}

.ibfml-hero__stats strong {
    color: #fff;
    font-size: 23px;
    line-height: 1.2;
}

.ibfml-hero__stats span {
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    margin-top: 3px;
}

.ibfml-toolbar {
    align-items: center;
    background: var(--ibfml-surface);
    border: 1px solid rgba(223, 231, 226, .8);
    border-radius: 20px;
    box-shadow: var(--ibfml-shadow);
    display: flex;
    gap: 12px;
    margin: -32px 38px 0;
    padding: 14px;
    position: relative;
    z-index: 2;
}

.ibfml-search {
    align-items: center;
    background: var(--ibfml-soft);
    border: 1px solid transparent;
    border-radius: 13px;
    display: flex;
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    transition: border-color .2s, box-shadow .2s;
}

.ibfml-search:focus-within {
    border-color: rgba(18, 110, 90, .45);
    box-shadow: 0 0 0 4px rgba(18, 110, 90, .09);
}

.ibfml-search svg {
    fill: none;
    height: 21px;
    stroke: var(--ibfml-muted);
    stroke-linecap: round;
    stroke-width: 1.8;
    width: 21px;
}

.ibfml-search input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ibfml-ink);
    flex: 1;
    height: 52px;
    min-width: 0;
    outline: 0;
    padding: 0 12px;
}

.ibfml-search__clear {
    background: transparent;
    border: 0;
    color: var(--ibfml-muted);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    padding: 5px;
}

.ibfml-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 12px;
    color: var(--ibfml-ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 52px;
    padding: 0 19px;
    text-decoration: none;
    transition: transform .2s, border-color .2s, background .2s;
}

.ibfml-button:hover {
    border-color: #b9c9c1;
    transform: translateY(-1px);
}

.ibfml-button svg {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
    width: 20px;
}

.ibfml-button--primary {
    background: var(--ibfml-primary);
    border-color: var(--ibfml-primary);
    color: #fff;
}

.ibfml-button--primary:hover {
    background: var(--ibfml-primary-dark);
    border-color: var(--ibfml-primary-dark);
    color: #fff;
}

.ibfml-button--danger {
    border-color: #e6b9b5;
    color: #9a3028;
}

.ibfml-button--danger:hover {
    background: #fff0ef;
    border-color: #d9938d;
}

.ibfml-button--filter span {
    align-items: center;
    background: var(--ibfml-primary);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    height: 20px;
    justify-content: center;
    width: 20px;
}

.ibfml-filters {
    animation: ibfml-slide-in .22s ease-out;
    background: var(--ibfml-surface);
    border: 1px solid var(--ibfml-line);
    border-radius: 18px;
    margin: 20px 38px 0;
    padding: 25px;
}

@keyframes ibfml-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ibfml-filters__head,
.ibfml-results-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.ibfml-filters__head h2 {
    font-size: 18px;
    margin: 0 0 4px;
}

.ibfml-filters__head p {
    color: var(--ibfml-muted);
    font-size: 13px;
    margin: 0;
}

.ibfml-link-button {
    background: none;
    border: 0;
    color: var(--ibfml-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.ibfml-filter-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 22px;
}

.ibfml-filter-group {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.ibfml-filter-group legend {
    color: #44524c;
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 7px;
    padding: 0;
}

.ibfml-option-search {
    background: #fff !important;
    border: 1px solid var(--ibfml-line) !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: none !important;
    color: var(--ibfml-ink) !important;
    min-height: 40px;
    outline: none;
    padding: 8px 10px !important;
    width: 100%;
}

.ibfml-option-search:focus {
    border-color: var(--ibfml-primary) !important;
    box-shadow: 0 0 0 3px rgba(18, 110, 90, .1) !important;
    position: relative;
    z-index: 1;
}

.ibfml-option-list {
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 10px;
    max-height: 190px;
    min-height: 46px;
    overflow: auto;
    padding: 5px;
}

.ibfml-option-search + .ibfml-option-list {
    border-radius: 0 0 10px 10px;
    border-top: 0;
}

.ibfml-check-option {
    align-items: flex-start;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    font-size: 12px;
    gap: 8px;
    line-height: 1.35;
    padding: 7px;
}

.ibfml-check-option[hidden] {
    display: none !important;
}

.ibfml-check-option:hover {
    background: var(--ibfml-soft);
}

.ibfml-check-option input,
.ibfml-vcast-option input,
.ibfml-form-check input,
.ibfml-form-checks input {
    accent-color: var(--ibfml-primary);
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.ibfml-option-empty {
    color: var(--ibfml-muted);
    font-size: 12px;
    margin: 7px 0 0;
}

.ibfml-option-hint {
    color: var(--ibfml-muted);
    font-size: 11px;
    line-height: 1.4;
    margin: 7px 0 0;
}

.ibfml-vcast-options {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ibfml-vcast-option {
    cursor: pointer;
    position: relative;
}

.ibfml-vcast-option input {
    opacity: 0;
    position: absolute;
}

.ibfml-vcast-option span {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 9px;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
}

.ibfml-vcast-option input:checked + span {
    background: var(--ibfml-primary);
    border-color: var(--ibfml-primary);
    color: #fff;
}

.ibfml-vcast-option input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(18, 110, 90, .16);
}

.ibfml-vcast-option.is-unavailable {
    cursor: not-allowed;
    opacity: .35;
}

.ibfml-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.ibfml-field > span {
    color: #44524c;
    font-size: 12px;
    font-weight: 750;
}

.ibfml-field input,
.ibfml-field select,
.ibfml-field textarea {
    background: #fff !important;
    border: 1px solid var(--ibfml-line) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: var(--ibfml-ink) !important;
    min-height: 44px;
    outline: none;
    padding: 10px 12px !important;
    width: 100%;
}

.ibfml-field input:focus,
.ibfml-field select:focus,
.ibfml-field textarea:focus {
    border-color: var(--ibfml-primary) !important;
    box-shadow: 0 0 0 3px rgba(18, 110, 90, .1) !important;
}

.ibfml-form-check,
.ibfml-form-checks {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 10px;
    display: flex;
    gap: 14px;
    min-height: 44px;
    padding: 10px 12px;
}

.ibfml-form-checks label {
    align-items: center;
    display: flex;
    gap: 5px;
}

.ibfml-field .ibfml-form-check input[type="checkbox"],
.ibfml-field .ibfml-form-checks input[type="checkbox"] {
    background: initial !important;
    border: initial !important;
    box-shadow: none !important;
    min-height: 0;
    padding: 0 !important;
    width: auto;
}

.ibfml-results-head {
    margin: 38px 8px 18px;
}

.ibfml-results-head p {
    color: var(--ibfml-muted);
    margin: 0;
}

.ibfml-results-head strong {
    color: var(--ibfml-ink);
}

.ibfml-view-switch {
    background: var(--ibfml-soft);
    border-radius: 10px;
    display: flex;
    padding: 3px;
}

.ibfml-view-switch button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--ibfml-muted);
    cursor: pointer;
    display: flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.ibfml-view-switch button.is-active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 54, 46, .1);
    color: var(--ibfml-primary);
}

.ibfml-view-switch svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.8;
    width: 17px;
}

.ibfml-view-switch [data-view="cards"] svg {
    fill: currentColor;
    stroke: none;
}

.ibfml-cards {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ibfml-card {
    background: var(--ibfml-surface);
    border: 1px solid var(--ibfml-line);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    min-height: 310px;
    overflow: hidden;
    padding: 23px;
    position: relative;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

.ibfml-card:hover {
    border-color: #b9cfc5;
    box-shadow: 0 22px 50px rgba(22, 54, 43, .1);
    transform: translateY(-4px);
}

.ibfml-card__top {
    align-items: flex-start;
    display: flex;
    gap: 15px;
}

.ibfml-play {
    align-items: center;
    background: var(--ibfml-primary);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(18, 110, 90, .22);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    height: 48px;
    justify-content: center;
    transition: background .2s, transform .2s;
    width: 48px;
}

.ibfml-play:hover {
    background: var(--ibfml-primary-dark);
    transform: scale(1.06);
}

.ibfml-play:disabled {
    background: #b8c2bd;
    box-shadow: none;
    cursor: not-allowed;
}

.ibfml-play svg {
    fill: currentColor;
    height: 19px;
    margin-left: 3px;
    width: 19px;
}

.ibfml-card__identity {
    flex: 1;
    min-width: 0;
}

.ibfml-playlist-add {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 50%;
    color: var(--ibfml-primary);
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    font-size: 23px;
    font-weight: 500;
    height: 38px;
    justify-content: center;
    line-height: 1;
    width: 38px;
}

.ibfml-playlist-add:hover {
    background: var(--ibfml-soft);
    border-color: #b9cfc5;
}

.ibfml-card__section {
    color: var(--ibfml-primary);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.ibfml-card__code {
    background: var(--ibfml-soft);
    border-radius: 5px;
    color: var(--ibfml-muted);
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    padding: 3px 6px;
}

.ibfml-card h2 {
    color: var(--ibfml-ink);
    font-size: 20px;
    line-height: 1.28;
    margin: 22px 0 7px;
}

.ibfml-card__track {
    color: var(--ibfml-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.ibfml-card__track strong {
    color: #3d4b45;
    font-weight: 700;
}

.ibfml-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 20px 0;
}

.ibfml-tag {
    background: #edf6f2;
    border-radius: 999px;
    color: #176651;
    font-size: 11px;
    font-weight: 750;
    padding: 5px 9px;
}

.ibfml-tag--warm {
    background: #fff5e4;
    color: #986711;
}

.ibfml-card__footer {
    align-items: center;
    border-top: 1px solid var(--ibfml-line);
    color: var(--ibfml-muted);
    display: flex;
    font-size: 12px;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
}

.ibfml-card__footer span {
    align-items: center;
    display: flex;
    gap: 5px;
}

.ibfml-card__footer span:last-child {
    margin-left: auto;
}

.ibfml-table-wrap {
    border: 1px solid var(--ibfml-line);
    border-radius: 16px;
    overflow: auto;
}

.ibfml-table {
    border: 0;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
    min-width: 1350px;
    width: 100%;
}

.ibfml-table__comment {
    max-width: 280px;
    min-width: 190px;
    white-space: normal;
}

.ibfml-table th {
    background: var(--ibfml-soft);
    color: #52605a;
    font-size: 11px;
    letter-spacing: .05em;
    padding: 15px;
    text-align: left;
    text-transform: uppercase;
}

.ibfml-table td {
    border-top: 1px solid var(--ibfml-line);
    padding: 14px 15px;
    vertical-align: middle;
}

.ibfml-table tr:hover td {
    background: #fafcfb;
}

.ibfml-table .ibfml-play {
    height: 36px;
    width: 36px;
}

.ibfml-table__actions {
    align-items: center;
    display: flex;
    gap: 7px;
}

.ibfml-table .ibfml-playlist-add {
    height: 32px;
    width: 32px;
}

.ibfml-loading {
    align-items: center;
    color: var(--ibfml-muted);
    display: flex;
    justify-content: center;
    min-height: 220px;
}

.ibfml-loading span {
    animation: ibfml-pulse 1s infinite alternate;
    background: var(--ibfml-primary);
    border-radius: 50%;
    height: 8px;
    margin: 0 3px;
    width: 8px;
}

.ibfml-loading span:nth-child(2) { animation-delay: .2s; }
.ibfml-loading span:nth-child(3) { animation-delay: .4s; }
.ibfml-loading p { margin-left: 10px; }

@keyframes ibfml-pulse {
    to { opacity: .2; transform: translateY(-5px); }
}

.ibfml-empty {
    background: var(--ibfml-soft);
    border: 1px dashed #c5d4cd;
    border-radius: 18px;
    padding: 60px 20px;
    text-align: center;
}

.ibfml-empty > div {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: var(--ibfml-primary);
    display: flex;
    font-size: 25px;
    font-weight: 800;
    height: 60px;
    justify-content: center;
    margin: 0 auto 18px;
    width: 60px;
}

.ibfml-empty h2 { margin: 0 0 7px; }
.ibfml-empty p { color: var(--ibfml-muted); margin: 0 0 20px; }

.ibfml-pagination {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin-top: 32px;
}

.ibfml-pagination button {
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 9px;
    color: var(--ibfml-ink);
    cursor: pointer;
    height: 40px;
    min-width: 40px;
}

.ibfml-pagination button.is-active {
    background: var(--ibfml-primary);
    border-color: var(--ibfml-primary);
    color: #fff;
}

.ibfml-pagination button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.ibfml-modal[hidden],
.ibfml-filters[hidden],
.ibfml-cards[hidden],
.ibfml-table-wrap[hidden],
.ibfml-empty[hidden],
.ibfml-loading[hidden],
.ibfml-native-player[hidden],
.ibfml-player-frame[hidden],
.ibfml-player-error[hidden] {
    display: none !important;
}

.ibfml-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 999999;
}

.ibfml-modal__backdrop {
    backdrop-filter: blur(8px);
    background: rgba(6, 24, 19, .74);
    inset: 0;
    position: absolute;
}

.ibfml-player-dialog,
.ibfml-form-dialog,
.ibfml-playlist-add-dialog,
.ibfml-playlists-dialog {
    animation: ibfml-modal-in .25s ease-out;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
    max-height: calc(100vh - 44px);
    overflow: auto;
    position: relative;
    width: min(960px, 100%);
    z-index: 1;
}

@keyframes ibfml-modal-in {
    from { opacity: 0; transform: scale(.97) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ibfml-modal__close {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--ibfml-line);
    border-radius: 50%;
    color: var(--ibfml-ink);
    cursor: pointer;
    display: flex;
    font-size: 27px;
    height: 40px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 17px;
    top: 17px;
    width: 40px;
    z-index: 2;
}

.ibfml-player-dialog__meta {
    padding: 27px 75px 21px 27px;
}

.ibfml-player-dialog__meta span {
    color: var(--ibfml-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ibfml-player-dialog__meta h2 {
    color: var(--ibfml-ink);
    font-size: 24px;
    margin: 5px 0;
}

.ibfml-player-dialog__meta p {
    color: var(--ibfml-muted);
    margin: 0;
}

.ibfml-player-frame {
    aspect-ratio: 16 / 9;
    background: #091a15;
    width: 100%;
}

.ibfml-player-frame iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.ibfml-native-player {
    align-items: center;
    background:
        radial-gradient(circle at 80% 10%, rgba(232, 168, 58, .22), transparent 27%),
        linear-gradient(135deg, #0d3f35, #126e5a);
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 280px;
    padding: 42px 28px;
}

.ibfml-native-player__art {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: flex;
    height: 110px;
    justify-content: center;
    width: 110px;
}

.ibfml-native-player__art svg {
    fill: none;
    height: 48px;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    width: 48px;
}

.ibfml-native-player audio {
    max-width: 620px;
    width: 100%;
}

.ibfml-player-error {
    background: rgba(255, 255, 255, .94);
    border-radius: 10px;
    color: #7b2d27;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 3px;
    max-width: 620px;
    padding: 12px 15px;
    width: 100%;
}

.ibfml-player-actions {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 16px 27px 21px;
}

.ibfml-player-queue-controls {
    align-items: center;
    display: flex;
    gap: 9px;
}

.ibfml-player-queue-controls[hidden] {
    display: none !important;
}

.ibfml-player-queue-controls .ibfml-button {
    min-height: 40px;
    padding: 0 14px;
}

.ibfml-player-queue-controls span {
    color: var(--ibfml-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ibfml-drive-link {
    color: var(--ibfml-primary);
    font-size: 13px;
    font-weight: 700;
}

.ibfml-form-dialog {
    padding: clamp(24px, 4vw, 42px);
    width: min(920px, 100%);
}

.ibfml-playlist-add-dialog {
    padding: 34px;
    width: min(560px, 100%);
}

.ibfml-playlist-add-dialog .ibfml-eyebrow {
    color: var(--ibfml-primary);
}

.ibfml-playlist-add-dialog h2 {
    margin: 0 0 5px;
}

.ibfml-playlist-add-dialog > p {
    color: var(--ibfml-muted);
    margin: 0 45px 22px 0;
}

.ibfml-playlist-picker {
    border: 1px solid var(--ibfml-line);
    border-radius: 12px;
    max-height: 230px;
    overflow: auto;
    padding: 6px;
}

.ibfml-playlist-choice {
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 9px;
}

.ibfml-playlist-choice:hover {
    background: var(--ibfml-soft);
}

.ibfml-playlist-choice input {
    accent-color: var(--ibfml-primary);
}

.ibfml-playlist-choice span {
    display: flex;
    flex: 1;
    justify-content: space-between;
}

.ibfml-playlist-choice small,
.ibfml-playlist-picker__empty {
    color: var(--ibfml-muted);
}

.ibfml-playlist-picker__empty {
    font-size: 13px;
    margin: 10px;
}

.ibfml-playlist-create-inline {
    align-items: flex-end;
    display: flex;
    gap: 9px;
    margin-top: 17px;
}

.ibfml-playlist-create-inline label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

.ibfml-playlist-create-inline label span {
    color: #44524c;
    font-size: 12px;
    font-weight: 750;
}

.ibfml-playlist-create-inline input,
.ibfml-playlists-sidebar input {
    border: 1px solid var(--ibfml-line);
    border-radius: 10px;
    min-height: 44px;
    padding: 9px 11px;
    width: 100%;
}

.ibfml-playlists-dialog {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 590px;
    width: min(1100px, 100%);
}

.ibfml-playlists-sidebar {
    background: var(--ibfml-soft);
    border-right: 1px solid var(--ibfml-line);
    padding: 30px 20px;
}

.ibfml-playlists-sidebar h2 {
    font-size: 23px;
    margin: 0 38px 20px 0;
}

.ibfml-playlists-sidebar form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ibfml-playlists-sidebar form .ibfml-button {
    min-height: 42px;
}

.ibfml-playlists-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 20px;
    max-height: 390px;
    overflow: auto;
}

.ibfml-playlist-list-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--ibfml-ink);
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 10px;
    text-align: left;
}

.ibfml-playlist-list-item:hover,
.ibfml-playlist-list-item.is-active {
    background: #fff;
}

.ibfml-playlist-list-item span {
    background: #e5ede8;
    border-radius: 999px;
    color: var(--ibfml-muted);
    font-size: 11px;
    padding: 3px 7px;
}

.ibfml-playlist-detail {
    padding: 34px;
}

.ibfml-playlist-detail__empty {
    color: var(--ibfml-muted);
    padding: 100px 20px;
    text-align: center;
}

.ibfml-playlist-detail__empty h3 {
    color: var(--ibfml-ink);
    margin-bottom: 5px;
}

.ibfml-playlist-detail__head {
    align-items: flex-start;
    border-bottom: 1px solid var(--ibfml-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding-right: 42px;
    padding-bottom: 20px;
}

.ibfml-playlist-detail__head > div:first-child {
    flex: 1;
    min-width: 0;
}

.ibfml-playlist-detail__head h3 {
    font-size: 25px;
    margin: 0 0 4px;
}

.ibfml-playlist-description {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
    max-width: 100%;
    width: 100%;
}

.ibfml-playlist-description__head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.ibfml-playlist-description__head > span {
    color: #44524c;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.ibfml-playlist-description__head button {
    background: transparent;
    border: 0;
    color: var(--ibfml-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 0 3px 8px;
}

.ibfml-playlist-description > p {
    color: var(--ibfml-muted);
    line-height: 1.5;
    margin: 2px 0 0;
    max-width: 70ch;
    white-space: pre-wrap;
}

.ibfml-playlist-description__editor {
    width: 100%;
}

.ibfml-playlist-description__editor[hidden] {
    display: none !important;
}

.ibfml-playlist-description__editor textarea {
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 9px;
    color: var(--ibfml-ink);
    line-height: 1.45;
    min-height: 76px;
    min-height: clamp(76px, 18cqi, 150px);
    padding: 9px 10px;
    resize: vertical;
    width: 100%;
}

.ibfml-playlist-description__editor textarea:focus {
    border-color: var(--ibfml-primary);
    box-shadow: 0 0 0 3px rgba(18, 110, 90, .1);
    outline: 0;
}

.ibfml-playlist-description__editor small {
    color: var(--ibfml-muted);
    display: block;
    font-size: 11px;
    margin-top: 5px;
}

.ibfml-playlist-description__editor small.is-saved {
    color: var(--ibfml-primary);
}

.ibfml-playlist-description__editor small.is-error {
    color: #9a3028;
}

@container (max-width: 360px) {
    .ibfml-playlist-description__editor textarea {
        min-height: 100px;
    }
}

.ibfml-playlist-detail__head p {
    color: var(--ibfml-muted);
    margin: 0;
}

.ibfml-playlist-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ibfml-playlist-detail__actions .ibfml-button {
    min-height: 42px;
    padding: 0 13px;
}

.ibfml-playlist-items {
    display: flex;
    flex-direction: column;
    max-height: 430px;
    overflow: auto;
}

.ibfml-playlist-item {
    align-items: center;
    border-bottom: 1px solid var(--ibfml-line);
    display: flex;
    gap: 13px;
    padding: 13px 3px;
}

.ibfml-play--small {
    height: 38px;
    width: 38px;
}

.ibfml-playlist-item__meta {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ibfml-playlist-item__meta strong,
.ibfml-playlist-item__meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ibfml-playlist-item__meta span {
    color: var(--ibfml-muted);
    font-size: 12px;
    margin-top: 3px;
}

.ibfml-playlist-item__actions {
    display: flex;
    gap: 5px;
}

.ibfml-playlist-item__actions button {
    background: #fff;
    border: 1px solid var(--ibfml-line);
    border-radius: 7px;
    color: var(--ibfml-muted);
    cursor: pointer;
    font-size: 11px;
    padding: 6px 8px;
}

.ibfml-playlist-item__actions button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.ibfml-playlist-items__empty {
    color: var(--ibfml-muted);
    padding: 55px 10px;
    text-align: center;
}

.ibfml-form-dialog__head {
    margin-bottom: 28px;
    padding-right: 45px;
}

.ibfml-form-dialog__head .ibfml-eyebrow {
    color: var(--ibfml-primary);
}

.ibfml-form-dialog__head h2 {
    font-size: 30px;
    margin: 0 0 7px;
}

.ibfml-form-dialog__head p {
    color: var(--ibfml-muted);
    margin: 0;
}

.ibfml-form-grid {
    display: grid;
    gap: 17px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ibfml-field--wide {
    grid-column: 1 / -1;
}

.ibfml-form-message {
    background: #edf8f3;
    border: 1px solid #b8ddcf;
    border-radius: 10px;
    color: #145b48;
    margin-top: 20px;
    padding: 12px 14px;
}

.ibfml-form-message.is-error {
    background: #fff0ef;
    border-color: #efc0bc;
    color: #8d2e27;
}

.ibfml-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 26px;
}

body.ibfml-modal-open {
    overflow: hidden;
}

@media (max-width: 1050px) {
    .ibfml-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ibfml-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .ibfml-app {
        margin: 0 auto 40px;
    }

    .ibfml-hero {
        border-radius: 0 0 26px 26px;
        min-height: 330px;
        padding: 42px 21px 68px;
    }

    .ibfml-hero h1 {
        font-size: 42px;
    }

    .ibfml-hero__stats {
        gap: 25px;
        justify-content: space-between;
        margin-top: 33px;
    }

    .ibfml-hero__stats strong {
        font-size: 18px;
    }

    .ibfml-toolbar {
        flex-wrap: wrap;
        margin: -37px 14px 0;
        padding: 10px;
    }

    .ibfml-search {
        flex-basis: 100%;
    }

    .ibfml-button--filter,
    .ibfml-toolbar > .ibfml-button--primary {
        flex: 1;
    }

    .ibfml-filters {
        border-radius: 15px;
        margin: 14px;
        padding: 19px;
    }

    .ibfml-filters__head {
        align-items: flex-start;
        gap: 12px;
    }

    .ibfml-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ibfml-results-head {
        margin: 30px 15px 14px;
    }

    .ibfml-cards {
        gap: 13px;
        grid-template-columns: 1fr;
        padding: 0 14px;
    }

    .ibfml-card {
        min-height: 280px;
        padding: 20px;
    }

    .ibfml-card:hover {
        transform: none;
    }

    .ibfml-view-switch {
        display: none;
    }

    .ibfml-pagination {
        margin-top: 23px;
    }

    .ibfml-modal {
        align-items: flex-end;
        padding: 0;
    }

    .ibfml-player-dialog,
    .ibfml-form-dialog {
        border-radius: 22px 22px 0 0;
        max-height: 94vh;
    }

    .ibfml-player-dialog__meta {
        padding: 24px 66px 18px 20px;
    }

    .ibfml-player-dialog__meta h2 {
        font-size: 20px;
    }

    .ibfml-player-frame {
        aspect-ratio: 4 / 3;
    }

    .ibfml-native-player {
        min-height: 260px;
        padding: 35px 20px;
    }

    .ibfml-player-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .ibfml-player-queue-controls {
        justify-content: space-between;
        width: 100%;
    }

    .ibfml-playlist-add-dialog {
        border-radius: 22px 22px 0 0;
        padding: 28px 19px;
    }

    .ibfml-playlist-create-inline {
        align-items: stretch;
        flex-direction: column;
    }

    .ibfml-playlists-dialog {
        border-radius: 22px 22px 0 0;
        grid-template-columns: 1fr;
        max-height: 94vh;
        min-height: 0;
        overflow: auto;
    }

    .ibfml-playlists-sidebar {
        border-bottom: 1px solid var(--ibfml-line);
        border-right: 0;
    }

    .ibfml-playlists-list {
        max-height: 180px;
    }

    .ibfml-playlist-detail {
        padding: 25px 19px;
    }

    .ibfml-playlist-detail__head {
        flex-direction: column;
        padding-right: 38px;
    }

    .ibfml-playlist-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ibfml-playlist-item__meta {
        width: calc(100% - 55px);
    }

    .ibfml-playlist-item__actions {
        margin-left: 51px;
    }

    .ibfml-form-dialog {
        padding: 27px 19px;
    }

    .ibfml-form-grid {
        grid-template-columns: 1fr;
    }

    .ibfml-field--wide {
        grid-column: auto;
    }

    .ibfml-form-actions {
        flex-direction: column-reverse;
    }

    .ibfml-form-actions .ibfml-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .ibfml-hero__stats span {
        font-size: 11px;
    }

    .ibfml-filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ibfml-app *,
    .ibfml-app *::before,
    .ibfml-app *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
