:root {
    --bg: #090909;
    --bg-deep: #050405;
    --surface: rgba(22, 18, 20, 0.92);
    --surface-strong: rgba(30, 23, 26, 0.98);
    --surface-soft: rgba(243, 235, 221, 0.032);
    --surface-softer: rgba(243, 235, 221, 0.018);
    --surface-hover: rgba(243, 235, 221, 0.05);
    --surface-inset: rgba(13, 10, 12, 0.84);
    --surface-selected: rgba(184, 106, 79, 0.11);
    --surface-selected-strong: rgba(184, 106, 79, 0.17);
    --text: #f1e8db;
    --text-strong: #f6f1e8;
    --muted: #b7aa9a;
    --muted-strong: #d0c3b6;
    --line: rgba(184, 106, 79, 0.2);
    --line-strong: rgba(184, 106, 79, 0.34);
    --line-cool: rgba(110, 45, 47, 0.18);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --gold: #b86a4f;
    --gold-strong: #d78a63;
    --accent: #b86a4f;
    --accent-strong: #d78a63;
    --teal: #c89282;
    --teal-strong: #e1ab98;
    --bachata: #b05c52;
    --bachata-soft: rgba(176, 92, 82, 0.18);
    --salsa: #c79a3b;
    --salsa-soft: rgba(199, 154, 59, 0.18);
    --merengue: #4e8b84;
    --merengue-soft: rgba(78, 139, 132, 0.18);
    --danger: #c86a5f;
    --danger-soft: rgba(200, 106, 95, 0.12);
    --success: #5f8f7a;
    --success-soft: rgba(95, 143, 122, 0.14);
    --shadow-xl: 0 34px 84px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.24);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shell: 1320px;
}

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

html {
    min-height: 100%;
    color-scheme: dark;
    background:
        radial-gradient(circle at 18% 18%, rgba(110, 45, 47, 0.24), transparent 34%),
        radial-gradient(circle at 52% 0%, rgba(184, 106, 79, 0.12), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(62, 28, 33, 0.16), transparent 30%),
        linear-gradient(180deg, #0c090a 0%, #090708 44%, #070507 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.mobile-menu-open {
    overflow: hidden;
}

body:not(.cabaret-active-page) .site-shell::before,
body:not(.cabaret-active-page) .site-shell::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body:not(.cabaret-active-page) .site-shell::before {
    background:
        radial-gradient(circle at 15% 6%, rgba(110, 45, 47, 0.24), transparent 28%),
        radial-gradient(circle at 35% 24%, rgba(184, 106, 79, 0.055), transparent 20%),
        linear-gradient(180deg, rgba(5, 5, 6, 0), rgba(3, 3, 4, 0.2));
    filter: blur(8px);
    opacity: 0.76;
}

body:not(.cabaret-active-page) .site-shell::after {
    background:
        linear-gradient(180deg, rgba(3, 3, 4, 0.14), rgba(3, 3, 4, 0)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.006) 0,
            rgba(255, 255, 255, 0.006) 1px,
            transparent 1px,
            transparent 4px
        );
    opacity: 0.14;
    mix-blend-mode: soft-light;
}

body:not(.cabaret-active-page) .main-shell {
    position: relative;
    z-index: 1;
}

body.library-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 18%, rgba(110, 45, 47, 0.12), transparent 26%),
        radial-gradient(circle at 78% 12%, rgba(184, 106, 79, 0.05), transparent 24%);
    opacity: 0.85;
}

a {
    color: inherit;
    text-decoration: none;
}

a[href],
button,
[role="button"] {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
.page-title,
.section-title,
.hero-side-value,
.metric-value,
.category-count,
.brand-copy strong,
.song-title {
    font-family: "Sora", sans-serif;
}

.shell {
    width: min(calc(100% - 2rem), var(--shell));
    margin-inline: auto;
}

.site-shell {
    position: relative;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(184, 106, 79, 0.08);
    background: rgba(7, 7, 8, 0.86);
    backdrop-filter: blur(24px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

.topbar::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(110, 45, 47, 0.14), rgba(184, 106, 79, 0.28), transparent);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 5.9rem;
    padding: 1rem 0;
}

@media (max-width: 980px) {
    .topbar-inner {
        min-height: 4.8rem;
        padding: 0.55rem 0;
        gap: 1rem;
    }
}

/* Cabina: el espacio, no Wurlitzer, es quien está trabajando esta noche. */
.cabina-brand-lockup {
    gap: .72rem;
}

.brand-badge.cabina-workspace-badge {
    width: 2.4rem;
    height: 2.4rem;
    overflow: hidden;
    border: 0;
    border-radius: .78rem;
    background: transparent;
    box-shadow: none;
}

.brand-badge.cabina-workspace-badge .brand-mark {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.brand-copy.cabina-brand-copy small {
    display: flex;
    align-items: center;
    gap: .38rem;
    color: #d99069;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .2em;
}

.cabina-brand-copy strong {
    display: flex;
    align-items: center;
    gap: .38rem;
    line-height: 1.05;
}

.cabina-workspace-chevron {
    color: #a59c94;
    font-family: Manrope, sans-serif;
    font-size: .9em;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-.08em);
}

.cabina-wordmark-icon {
    display: inline-block;
    width: 1.28rem;
    height: 1.28rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.cabina-account-trigger {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-color: rgba(220, 147, 109, .34);
    border-radius: 50%;
    background: linear-gradient(145deg, #5f3428, #241614);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.cabina-account-trigger .cabina-account-initials {
    position: static;
    width: auto;
    height: auto;
    color: #f6dfcd;
    background: transparent;
    transform: none;
    font-family: "Sora", sans-serif;
    font-size: .7rem;
    font-weight: 800;
}

.cabina-desktop-avatar {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border: 1px solid rgba(220, 147, 109, .34);
    border-radius: 50%;
    color: #f6dfcd;
    background: linear-gradient(145deg, #5f3428, #241614);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    font-family: "Sora", sans-serif;
    font-size: .7rem;
    font-weight: 800;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.cabina-home-page .main-shell {
    padding-top: 1.35rem;
}

@media (max-width: 560px) {
    .brand-badge.cabina-workspace-badge {
        width: 2.4rem;
        height: 2.4rem;
        border-radius: .78rem;
    }

    .brand-badge.cabina-workspace-badge .brand-mark {
        width: 100%;
        height: 100%;
    }

    .cabina-brand-copy strong { font-size: 1.08rem; }

    .brand-copy.cabina-brand-copy small {
        font-size: .72rem;
        letter-spacing: .19em;
    }

    .cabina-account-trigger {
        display: grid;
        width: 2.5rem;
        height: 2.5rem;
        margin-left: auto;
    }

    body.cabina-home-page .main-shell { padding-top: .9rem; }
}

@media (max-width: 560px) {
    .topbar-inner {
        min-height: 4rem;
        padding: 0.35rem 0;
        gap: 0.65rem;
    }
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex-shrink: 0;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(184, 106, 79, 0.14);
    background:
        radial-gradient(circle at 50% 20%, rgba(184, 106, 79, 0.13), transparent 48%),
        linear-gradient(180deg, rgba(20, 16, 18, 0.98), rgba(8, 8, 9, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 14px 30px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .brand-badge {
        width: 3.2rem;
        height: 3.2rem;
        border-radius: 1rem;
    }
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    object-fit: contain;
}

@media (max-width: 560px) {
    .brand-mark {
        width: 2rem;
        height: 2rem;
    }
}

.brand-copy {
    min-width: 0;
}

.brand-copy strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}

.brand-copy small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

@media (max-width: 560px) {
    .brand-copy strong {
        font-size: 1rem;
        margin-bottom: 0.05rem;
    }

    .brand-copy small {
        margin-top: 0.05rem;
        font-size: 0.55rem;
        letter-spacing: 0.15em;
    }
}

.topbar-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.nav-row,
.topbar-actions,
.mobile-panel-actions,
.action-row,
.tag-row,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

@media (max-width: 720px) {
    .action-row,
    .tag-row {
        gap: 0.5rem;
    }
}

@media (max-width: 560px) {
    .action-row,
    .tag-row {
        gap: 0.35rem;
    }
}

.nav-row {
    justify-content: center;
    flex: 1;
}

.nav-pill,
.mobile-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 650;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.nav-pill:hover,
.mobile-nav-link:hover {
    color: var(--text);
    border-color: var(--border-default);
    background: var(--surface-soft);
}

.nav-pill-active,
.mobile-nav-link-active {
    color: var(--text-strong);
    border-color: rgba(184, 106, 79, 0.24);
    background:
        linear-gradient(180deg, rgba(184, 106, 79, 0.13), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.026);
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar-actions {
    justify-content: flex-end;
}

.account-menu {
    position: relative;
}

.account-menu-toggle {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 70;
    display: grid;
    min-width: 13.5rem;
    padding: 0.45rem;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(18, 17, 19, 0.99), rgba(8, 9, 11, 0.99));
    box-shadow: var(--shadow-lg);
}

.account-menu-dropdown[hidden] {
    display: none;
}

.account-menu-dropdown form {
    margin: 0;
}

.account-menu-item {
    display: flex;
    width: 100%;
    min-height: 2.45rem;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    padding: 0.65rem 0.75rem;
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 750;
    text-align: left;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
    background: var(--surface-hover);
    color: var(--text-strong);
    outline: none;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    position: relative;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    background: var(--surface-soft);
    color: var(--text);
    box-shadow: var(--shadow-md);
}

.mobile-toggle span {
    position: absolute;
    left: 50%;
    width: 1.2rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
    transition: transform 160ms ease, opacity 160ms ease;
}

.mobile-toggle span:nth-child(1) {
    top: 1rem;
}

.mobile-toggle span:nth-child(2) {
    top: 1.45rem;
}

.mobile-toggle span:nth-child(3) {
    top: 1.9rem;
}

body.mobile-menu-open .mobile-toggle span:nth-child(1) {
    transform: translateX(-50%) translateY(0.45rem) rotate(45deg);
}

body.mobile-menu-open .mobile-toggle span:nth-child(2) {
    opacity: 0;
}

body.mobile-menu-open .mobile-toggle span:nth-child(3) {
    transform: translateX(-50%) translateY(-0.45rem) rotate(-45deg);
}

.mobile-panel {
    display: none;
    padding-bottom: 1rem;
}

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

.mobile-nav-list {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--border-default);
    border-radius: 1.6rem;
    background: rgba(15, 19, 24, 0.96);
    box-shadow: var(--shadow-lg);
}

.mobile-panel.is-open {
    animation: mobile-panel-enter 180ms ease-out;
}

.mobile-nav-link {
    justify-content: flex-start;
    min-height: 3rem;
}

.mobile-panel-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.mobile-panel-form {
    margin: 0;
}

@keyframes mobile-panel-enter {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-shell {
    padding: 2.25rem 0 5rem;
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        filter 180ms ease;
}

body.is-page-leaving .main-shell {
    opacity: 0;
    transform: translateY(0.35rem);
    filter: blur(1.5px);
}

body.is-page-entering .main-shell {
    opacity: 0;
    transform: translateY(0.45rem);
    filter: blur(1.5px);
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 220ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
    animation-name: wurlitzer-page-out;
}

::view-transition-new(root) {
    animation-name: wurlitzer-page-in;
}

@keyframes wurlitzer-page-out {
    from {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    to {
        opacity: 0;
        transform: translateY(0.35rem);
        filter: blur(2px);
    }
}

@keyframes wurlitzer-page-in {
    from {
        opacity: 0;
        transform: translateY(0.45rem);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.toast-stack {
    position: fixed;
    right: 1.35rem;
    bottom: 1.35rem;
    z-index: 80;
    display: grid;
    gap: 0.7rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    padding: 0.95rem 1rem 1rem 1.05rem;
    border-radius: 1.15rem;
    border: 1px solid var(--border-default);
    background:
        radial-gradient(circle at top right, rgba(184, 136, 88, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(25, 27, 30, 0.98), rgba(14, 16, 19, 0.98));
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    opacity: 0;
    transform: translateX(1rem) scale(0.985);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease;
    cursor: pointer;
}

.toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.22rem;
    background: rgba(184, 136, 88, 0.92);
}

.toast::after {
    content: "";
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(184, 136, 88, 0.82);
    box-shadow: 0 0 0 0.22rem rgba(184, 136, 88, 0.1);
}

.toast-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-exit {
    opacity: 0;
    transform: translateX(0.8rem) scale(0.985);
}

.toast-body p {
    margin: 0;
    color: var(--text-strong);
    max-width: 28ch;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
}

.toast-success {
    border-color: rgba(122, 145, 132, 0.18);
    background:
        radial-gradient(circle at top right, rgba(122, 145, 132, 0.1), transparent 36%),
        linear-gradient(180deg, rgba(25, 27, 30, 0.98), rgba(14, 16, 19, 0.98));
}

.toast-success::before,
.toast-success::after {
    background: rgba(122, 145, 132, 0.92);
}

.toast-error {
    border-color: rgba(200, 106, 95, 0.2);
    background:
        radial-gradient(circle at top right, rgba(200, 106, 95, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(25, 27, 30, 0.98), rgba(14, 16, 19, 0.98));
}

.toast-error::before,
.toast-error::after {
    background: rgba(200, 106, 95, 0.94);
}

.toast-info,
.toast-warning {
    border-color: rgba(184, 136, 88, 0.18);
    background:
        radial-gradient(circle at top right, rgba(184, 136, 88, 0.1), transparent 36%),
        linear-gradient(180deg, rgba(25, 27, 30, 0.98), rgba(14, 16, 19, 0.98));
}

.toast:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(0) translateY(-1px);
}

.page-stack {
    display: grid;
    gap: 1.5rem;
}

.page-hero,
.split-layout,
.hero-home,
.summary-grid,
.category-grid,
.workspace-grid,
.history-grid,
.catalog-grid,
.recipe-grid,
.filter-grid,
.field-grid,
.helper-grid,
.inner-grid {
    display: grid;
    gap: 1.25rem;
}

.page-hero {
    align-items: stretch;
}

.hero-home {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.home-hero-minimal {
    min-height: 18rem;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 0.85rem;
}

.home-hero-minimal .page-title {
    max-width: none;
}

.home-stack {
    gap: 2rem;
}

.home-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr);
    align-items: stretch;
    gap: 1.25rem;
}

.home-welcome-copy,
.home-public-panel,
.home-section {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top left, rgba(110, 45, 47, 0.22), transparent 38%),
        linear-gradient(180deg, rgba(17, 18, 21, 0.98), rgba(9, 11, 14, 0.97));
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.home-welcome-copy {
    display: grid;
    align-content: center;
    min-height: 24rem;
    padding: clamp(1.75rem, 2.4vw, 2.35rem);
}

.home-title {
    max-width: 16.6ch;
    margin-top: 0.9rem;
    color: var(--text-strong);
    font-family: "Sora", sans-serif;
    font-size: clamp(2.85rem, 3.55vw, 3.35rem);
    font-weight: 800;
    line-height: 1.04;
    text-wrap: balance;
}

.home-lead {
    max-width: 42rem;
    margin-top: 1.35rem;
    color: var(--muted-strong);
    font-size: 1.02rem;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.55rem;
}

.home-public-panel {
    display: grid;
    align-content: space-between;
    gap: 1.2rem;
    padding: 1.65rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(184, 136, 88, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(16, 17, 20, 0.98), rgba(8, 9, 11, 0.98));
}

.home-system-logo {
    width: 5.75rem;
    height: 5.75rem;
    justify-self: center;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42));
}

.home-public-card {
    padding: 1.15rem;
    border: 1px solid rgba(184, 106, 79, 0.12);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(184, 136, 88, 0.08), transparent 42%),
        rgba(255, 255, 255, 0.026);
}

.home-public-card h2 {
    margin-top: 0.6rem;
    color: var(--text-strong);
    font-family: "Sora", sans-serif;
    font-size: 1.35rem;
    line-height: 1.22;
}

.home-public-action-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.home-public-action-list span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    line-height: 1.55;
    font-weight: 700;
}

.home-public-action-list span::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(184, 136, 88, 0.72);
    box-shadow: 0 0 0 0.32rem rgba(184, 136, 88, 0.08);
}

.home-public-panel > p {
    color: var(--muted);
    line-height: 1.6;
}

.home-section {
    padding: 1.8rem;
}

.home-workspace-grid {
    margin-top: 1.2rem;
}

.home-workspace-card {
    min-height: 8.6rem;
    padding: 1.15rem 1.25rem;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.home-workspace-card .workspace-logo-frame-large {
    width: clamp(4.45rem, 4.5vw, 5.1rem);
    height: clamp(4.45rem, 4.5vw, 5.1rem);
    border-radius: 1.1rem;
}

.home-workspace-card:hover {
    transform: translateY(-3px);
}

.home-workspace-brand {
    align-items: center;
    width: 100%;
    gap: 1.15rem;
}

.home-workspace-brand .workspace-copy p {
    margin-top: 0.45rem;
    color: var(--muted);
    line-height: 1.5;
}

.home-card-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid rgba(184, 106, 79, 0.16);
    border-radius: 999px;
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.026);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.home-card-arrow svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-workspace-card:hover .home-card-arrow {
    transform: translateX(3px);
    border-color: rgba(184, 136, 88, 0.32);
    background: rgba(184, 136, 88, 0.1);
}

.home-flow-section {
    display: grid;
    gap: 1.25rem;
}

.home-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-flow-item {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid rgba(184, 106, 79, 0.11);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
}

.home-flow-index {
    display: inline-flex;
    margin-bottom: 1rem;
    color: var(--accent-soft);
    font-family: "Sora", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.home-flow-item h3 {
    color: var(--text-strong);
    font-size: 1rem;
}

.home-flow-item p {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.split-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: start;
}

.split-tight {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.stack-column {
    display: grid;
    gap: 1.25rem;
    align-content: start;
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.workspace-grid,
.history-grid,
.catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.workspace-grid-minimal {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.recipe-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.helper-grid,
.inner-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    align-items: end;
}

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

.panel,
.workspace-card,
.metric-card,
.category-card,
.history-card,
.catalog-card,
.slot-card,
.song-card,
.hero-main {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(17, 18, 21, 0.98), rgba(9, 11, 14, 0.97));
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.panel::before,
.workspace-card::before,
.metric-card::before,
.category-card::before,
.history-card::before,
.catalog-card::before,
.slot-card::before,
.song-card::before,
.hero-main::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at top left, rgba(184, 106, 79, 0.055), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 38%);
    pointer-events: none;
}

.panel,
.workspace-card,
.hero-main {
    padding: 1.8rem;
}

.metric-card,
.category-card,
.history-card,
.catalog-card,
.slot-card,
.song-card {
    padding: 1.35rem;
}

.panel-feature,
.hero-main,
.hero-side {
    background:
        radial-gradient(circle at 0% 0%, rgba(110, 45, 47, 0.24), transparent 34%),
        linear-gradient(90deg, rgba(184, 106, 79, 0.075), transparent 24%),
        linear-gradient(135deg, rgba(15, 12, 14, 0.99), rgba(10, 11, 13, 0.98) 58%, rgba(7, 8, 10, 0.98));
    border-color: rgba(210, 128, 88, 0.16);
    box-shadow:
        0 32px 86px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.018),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel-soft {
    background:
        linear-gradient(180deg, rgba(15, 16, 19, 0.95), rgba(9, 10, 13, 0.96));
    border-color: rgba(255, 255, 255, 0.045);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.library-page .panel::before,
body.library-page .metric-card::before,
body.library-page .catalog-card::before,
body.library-page .song-card::before {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.022), transparent 46%);
}

body.library-page .panel-feature {
    background:
        radial-gradient(circle at top left, rgba(184, 136, 88, 0.055), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.02), transparent 24%),
        linear-gradient(180deg, rgba(26, 28, 31, 0.98), rgba(17, 19, 22, 0.96));
}

body.library-page .panel,
body.library-page .metric-card,
body.library-page .catalog-card,
body.library-page .song-card {
    border-color: var(--border-subtle);
}

body.library-page .table-card {
    background: rgba(12, 14, 17, 0.6);
}

body.library-page .filter-grid {
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(130px, 0.8fr)) minmax(150px, auto) minmax(15rem, auto);
    column-gap: 0.95rem;
    row-gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012)),
        rgba(8, 10, 13, 0.58);
}

body.library-page .filter-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.7rem;
    min-width: 15rem;
}

body.library-page .filter-actions .button {
    min-height: 3.05rem;
    white-space: nowrap;
}

body.library-page .field-block-toggle {
    align-self: end;
    justify-items: start;
}

body.library-page .trending-filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 2.95rem;
    padding: 0.72rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.004)),
        rgba(255, 255, 255, 0.004);
    color: #958c84;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

body.library-page .trending-filter-chip:hover {
    border-color: rgba(255, 255, 255, 0.085);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.006)),
        rgba(255, 255, 255, 0.008);
    color: #aaa097;
    transform: translateY(-1px);
}

body.library-page .trending-filter-chip:has(input:checked) {
    border-color: rgba(243, 177, 104, 0.28);
    background:
        linear-gradient(135deg, rgba(232, 139, 99, 0.075), rgba(210, 168, 91, 0.045)),
        rgba(255, 255, 255, 0.008);
    color: #edc9ad;
    box-shadow:
        inset 0 1px 0 rgba(255, 226, 183, 0.018),
        0 3px 8px rgba(226, 128, 85, 0.028);
}

body.library-page .trending-filter-chip:has(input:focus-visible) {
    box-shadow:
        0 0 0 4px rgba(126, 185, 177, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

body.library-page .trending-filter-chip:active {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.012);
}

body.library-page .trending-filter-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 1180px) {
    body.library-page .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.library-page .filter-grid .field-block:first-child,
    body.library-page .filter-actions {
        grid-column: 1 / -1;
    }

    body.library-page .filter-actions {
        min-width: 0;
        justify-content: flex-end;
        align-items: center;
    }
}

@media (max-width: 720px) {
    body.library-page .filter-grid {
        padding: 0.8rem;
        gap: 0.55rem;
    }
}

@media (max-width: 560px) {
    body.library-page .filter-grid {
        padding: 0.65rem;
        gap: 0.45rem;
        border-radius: 1rem;
    }
}

body.library-page [data-open-library-demo].button-small {
    min-width: 5.4rem;
    border-color: rgba(255, 255, 255, 0.075);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.012);
}

body.library-page .catalog-grid {
    gap: 1.05rem;
}

body.library-page .catalog-card {
    min-height: 12.1rem;
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-content: start;
    gap: 0.95rem;
    padding: 1.2rem;
}

body.library-page .catalog-card-copy {
    min-width: 0;
}

body.library-page .catalog-card .song-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.library-page .catalog-card .song-artist {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.42rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.library-page .catalog-card-tags {
    margin-top: 0;
}

body.library-page .catalog-card-actions {
    display: flex;
    align-self: end;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

body.library-page .catalog-card-actions form {
    margin: 0;
}

body.library-page .catalog-listen-button {
    min-width: 0;
    padding-inline: 1rem;
}

body.library-page .catalog-add-button {
    min-width: 9.8rem;
}

.panel-nested {
    height: 100%;
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 24rem;
}

.hero-side {
    padding: 1.8rem;
}

.hero-platform-logo,
.auth-logo {
    width: clamp(5.5rem, 12vw, 8.5rem);
    height: auto;
    object-fit: contain;
}

.hero-platform-logo {
    margin-bottom: 1rem;
}

.hero-home .page-title {
    max-width: 12ch;
    font-size: clamp(3rem, 6.4vw, 5.6rem);
    letter-spacing: -0.06em;
}

.home-hero-minimal {
    min-height: 22rem;
    border-color: rgba(210, 128, 88, 0.2);
}

.hero-side-value {
    margin: 0.85rem 0 0.65rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    color: var(--text-strong);
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: #d4a596;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 4.55rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    color: var(--text-strong);
}

.page-title-compact {
    font-size: clamp(2.1rem, 4.2vw, 3.45rem);
    white-space: nowrap;
}

.section-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2.25rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--text-strong);
}

.page-copy,
.section-copy,
.muted,
.song-artist {
    color: var(--muted);
    line-height: 1.7;
}

.page-copy,
.section-copy {
    margin-top: 0.9rem;
    max-width: 62ch;
    font-size: 1rem;
}

.muted {
    font-size: 0.95rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 720px) {
    .section-head {
        gap: 0.7rem;
    }
}

@media (max-width: 560px) {
    .section-head {
        gap: 0.5rem;
    }
}

.section-head-wide {
    align-items: flex-start;
}

.metric-card {
    min-height: 10.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-color: var(--border-subtle);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01)),
        rgba(5, 6, 8, 0.24);
}

.metric-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.metric-value {
    margin-top: 0.85rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--text-strong);
}

.metric-meta {
    display: block;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.workspace-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.workspace-brand-large {
    align-items: center;
    gap: 1.18rem;
}

.workspace-logo-frame {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 4.9rem;
    height: 4.9rem;
    overflow: hidden;
    border-radius: 1.15rem;
    border: 1px solid rgba(210, 128, 88, 0.18);
    background: rgba(2, 2, 3, 0.92);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.workspace-logo-frame-has-image {
    width: 5.2rem;
    height: 5.2rem;
}

.workspace-logo-frame-large {
    width: clamp(6.65rem, 6.4vw, 7.85rem);
    height: clamp(6.65rem, 6.4vw, 7.85rem);
    margin-top: 0.18rem;
    border-radius: 1.48rem;
}

.workspace-logo-img {
    display: block;
    width: calc(100% - 0.6rem);
    height: calc(100% - 0.6rem);
    object-fit: contain;
    object-position: center;
    filter: saturate(1.02) contrast(1.02);
}

.workspace-logo-frame-large .workspace-logo-img {
    width: calc(100% - 0.72rem);
    height: calc(100% - 0.72rem);
}

.workspace-logo-fit-cover .workspace-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workspace-logo-fit-contain .workspace-logo-img {
    object-fit: contain;
}

.workspace-logo-frame-fallback {
    background:
        radial-gradient(circle at center, rgba(210, 128, 88, 0.24), transparent 66%),
        linear-gradient(135deg, rgba(110, 45, 47, 0.52), rgba(184, 106, 79, 0.22)),
        rgba(5, 5, 7, 0.92);
}

.workspace-logo-letter {
    color: var(--text-strong);
    font-family: "Sora", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.workspace-logo {
    flex: 0 0 auto;
    width: 4.7rem;
    height: 4.7rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-default);
    object-fit: cover;
    background: var(--surface-soft);
    box-shadow: var(--shadow-md);
}

.workspace-logo-image {
    object-fit: contain;
    padding: 0.45rem;
    background:
        radial-gradient(circle at center, rgba(210, 128, 88, 0.12), transparent 66%),
        rgba(8, 8, 10, 0.88);
}

.workspace-logo-large {
    width: 6rem;
    height: 6rem;
    border-radius: 1.8rem;
}

.workspace-logo-fallback {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(110, 45, 47, 0.28), rgba(184, 106, 79, 0.2));
    color: var(--text-strong);
    font-family: "Sora", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.workspace-copy {
    min-width: 0;
}

.workspace-copy h3,
.category-card h3,
.history-card h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.2rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.workspace-card-meta {
    margin-top: 1.1rem;
}

.workspace-card-minimal {
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.workspace-card-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.workspace-card-minimal.home-workspace-card {
    min-height: 7rem;
    justify-content: center;
}

.workspace-card-link.home-workspace-card {
    flex-direction: row;
    align-items: center;
}

.category-card {
    min-height: 12rem;
}

.category-card-bachata {
    border-color: rgba(176, 92, 82, 0.24);
    background:
        linear-gradient(180deg, rgba(176, 92, 82, 0.1), rgba(255, 255, 255, 0.014)),
        rgba(8, 10, 13, 0.72);
}

.category-card-salsa {
    border-color: rgba(199, 154, 59, 0.24);
    background:
        linear-gradient(180deg, rgba(199, 154, 59, 0.1), rgba(255, 255, 255, 0.014)),
        rgba(8, 10, 13, 0.72);
}

.category-card-merengue {
    border-color: rgba(78, 139, 132, 0.26);
    background:
        linear-gradient(180deg, rgba(78, 139, 132, 0.1), rgba(255, 255, 255, 0.014)),
        rgba(8, 10, 13, 0.72);
}

.category-count {
    display: block;
    margin: 1rem 0 0.4rem;
    font-size: 2.5rem;
    line-height: 0.95;
    color: var(--text-strong);
}

.list-stack {
    display: grid;
    gap: 0.95rem;
}

.library-results-stack {
    display: grid;
    gap: 1.35rem;
}

.library-completion-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(184, 136, 88, 0.18);
    border-radius: 1.05rem;
    background:
        linear-gradient(135deg, rgba(184, 136, 88, 0.11), rgba(184, 106, 79, 0.045)),
        rgba(8, 10, 12, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.library-completion-copy {
    display: grid;
    gap: 0.32rem;
}

.library-completion-copy .section-title,
.library-completion-copy .section-copy,
.library-completion-note {
    margin: 0;
}

.library-completion-note {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.library-completion-actions {
    justify-content: flex-end;
}

.library-completion-actions form {
    margin: 0;
}

.list-link-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.15rem;
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012)),
        rgba(8, 10, 13, 0.72);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.list-link-card:hover,
.history-card:hover,
.workspace-card:hover,
.catalog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(210, 128, 88, 0.28);
    background:
        linear-gradient(180deg, rgba(184, 106, 79, 0.06), rgba(255, 255, 255, 0.016)),
        rgba(10, 11, 14, 0.82);
    box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.list-link-card strong {
    display: block;
    color: var(--text-strong);
    line-height: 1.35;
}

.list-link-card span {
    display: block;
    margin-top: 0.3rem;
}

.list-link-card-spread {
    align-items: center;
}

.list-link-card-played {
    border-color: rgba(95, 143, 122, 0.24);
    background: linear-gradient(180deg, rgba(95, 143, 122, 0.08), rgba(255, 255, 255, 0.018));
}

.history-card {
    display: block;
    min-height: 13rem;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 14rem;
}

.message {
    padding: 1rem 1.05rem;
    border: 1px solid var(--border-default);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.026);
}

.message-error {
    border-color: rgba(200, 106, 95, 0.22);
    background: rgba(200, 106, 95, 0.08);
    color: #f4d3ce;
}

.classification-loader-form {
    max-width: 56rem;
}

.classification-tool-layout {
    align-items: start;
}

.classification-card-list {
    display: grid;
    gap: 0.95rem;
}

.classification-row {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012)),
        rgba(8, 10, 13, 0.78);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.classification-row:hover {
    transform: translateY(-2px);
    border-color: rgba(210, 128, 88, 0.26);
    background:
        linear-gradient(180deg, rgba(184, 106, 79, 0.06), rgba(255, 255, 255, 0.014)),
        rgba(10, 11, 14, 0.84);
    box-shadow: var(--shadow-lg);
}

.classification-row-bachata {
    border-color: rgba(176, 92, 82, 0.22);
}

.classification-row-salsa {
    border-color: rgba(199, 154, 59, 0.22);
}

.classification-row-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.classification-position {
    display: grid;
    gap: 0.28rem;
    min-width: 5rem;
}

.classification-position-current {
    color: var(--text-strong);
    font-family: "Sora", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.classification-position-source {
    color: var(--muted);
    font-size: 0.84rem;
}

.classification-copy {
    min-width: 0;
}

.classification-row-actions {
    justify-content: flex-start;
}

.classification-issue {
    margin: 0.75rem 0 0;
}

.classification-tool-empty[hidden] {
    display: none;
}

.library-added-feedback[hidden] {
    display: none;
}

.library-added-feedback {
    margin-top: 1.2rem;
}

.library-added-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.35rem;
    padding: 1.2rem 1.25rem;
    border: 1px solid rgba(95, 143, 122, 0.2);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at top right, rgba(95, 143, 122, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(15, 17, 19, 0.98), rgba(9, 11, 13, 0.96));
    box-shadow: 0 18px 38px rgba(5, 9, 14, 0.26);
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
}

.library-added-card.is-visible {
    animation: library-added-card-enter 420ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.library-added-copy {
    min-width: 0;
}

.library-added-note {
    max-width: 58ch;
}

.helper-card {
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012)),
        rgba(8, 10, 13, 0.72);
}

.helper-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-strong);
}

.slot-card {
    border-color: rgba(184, 136, 88, 0.14);
}

.slot-head {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.slot-head h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.05rem;
}

.slot-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: #1c1305;
    font-family: "Sora", sans-serif;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(184, 136, 88, 0.18);
}

.song-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.02rem;
    line-height: 1.35;
}

.song-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    column-gap: 0;
    row-gap: 0.18rem;
}

.song-title-line .song-title {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

.song-title-line [data-role="trending-host"] {
    display: inline-flex;
    flex: 0 0 auto;
}

.song-title-line [data-role="trending-host"]:empty {
    display: none;
}

.song-artist {
    margin-top: 0.3rem;
}

@media (max-width: 720px) {
    .song-title {
        font-size: 0.93rem;
    }

    .song-artist {
        margin-top: 0.18rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 560px) {
    .song-title {
        font-size: 0.85rem;
    }

    .song-artist {
        margin-top: 0.12rem;
        font-size: 0.78rem;
    }
}

.song-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

@media (max-width: 720px) {
    .song-card-head {
        gap: 0.7rem;
    }
}

@media (max-width: 560px) {
    .song-card-head {
        gap: 0.5rem;
    }
}

@keyframes library-added-card-enter {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
    }
    60% {
        opacity: 1;
        transform: translateY(2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.3rem;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, filter 160ms ease;
}

@media (max-width: 720px) {
    .button {
        min-height: 2.65rem;
        padding: 0.62rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 560px) {
    .button {
        min-height: 2.35rem;
        padding: 0.5rem 0.85rem;
        font-size: 0.76rem;
    }
}

.button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: var(--surface-hover);
    filter: none;
}

.button:focus-visible,
.nav-pill:focus-visible,
.mobile-nav-link:focus-visible,
.mobile-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(126, 185, 177, 0.16);
}

.button-primary {
    border-color: rgba(184, 106, 79, 0.38);
    background: linear-gradient(135deg, #cf8963, #a55546);
    color: #fef5f5;
    box-shadow:
        0 16px 34px rgba(110, 45, 47, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-primary:hover {
    border-color: rgba(184, 106, 79, 0.42);
    background: linear-gradient(135deg, #d9966f, #b35e4e);
    color: #fef5f5;
    box-shadow:
        0 18px 36px rgba(110, 45, 47, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button-secondary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
        rgba(255, 255, 255, 0.014);
    color: var(--text);
}

.button-ghost {
    background: transparent;
    color: var(--muted-strong);
}

.button-danger {
    border-color: rgba(200, 106, 95, 0.24);
    background:
        linear-gradient(180deg, rgba(200, 106, 95, 0.14), rgba(200, 106, 95, 0.07)),
        rgba(255, 255, 255, 0.012);
    color: #f6d0c9;
}

.button-small {
    min-height: 2.55rem;
    padding: 0.72rem 1rem;
    font-size: 0.88rem;
}

@media (max-width: 720px) {
    .button-small {
        min-height: 2.2rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 560px) {
    .button-small {
        min-height: 1.95rem;
        padding: 0.4rem 0.65rem;
        font-size: 0.7rem;
    }
}

.hold-remove-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hold-remove-button-progress {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, rgba(200, 106, 95, 0.18), rgba(200, 106, 95, 0.34));
    opacity: 1;
    transition: transform 120ms linear;
}

.hold-remove-button.is-holding {
    border-color: rgba(200, 106, 95, 0.28);
    color: #f7ddd8;
}

.hold-remove-button.is-holding .hold-remove-button-progress {
    animation: hold-remove-fill 1.2s linear forwards;
}

.hold-unlock-button.is-holding .hold-remove-button-progress {
    animation-duration: 800ms;
}

.hold-remove-button.is-confirmed .hold-remove-button-progress {
    background: linear-gradient(90deg, rgba(184, 136, 88, 0.24), rgba(200, 157, 108, 0.4));
    transform: scaleX(1);
}

.hold-remove-button-bachata .hold-remove-button-progress {
    background: linear-gradient(90deg, rgba(168, 99, 88, 0.18), rgba(168, 99, 88, 0.42));
}

.hold-remove-button-salsa .hold-remove-button-progress {
    background: linear-gradient(90deg, rgba(176, 143, 68, 0.18), rgba(176, 143, 68, 0.42));
}

.hold-remove-button-merengue .hold-remove-button-progress {
    background: linear-gradient(90deg, rgba(70, 143, 137, 0.18), rgba(70, 143, 137, 0.42));
}

.hold-remove-button-default .hold-remove-button-progress {
    background: linear-gradient(90deg, rgba(140, 148, 161, 0.18), rgba(140, 148, 161, 0.34));
}

.hold-remove-button-label {
    position: relative;
    z-index: 1;
}

@keyframes hold-remove-fill {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

.button[disabled],
.button[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .pill {
        min-height: 1.75rem;
        padding: 0.25rem 0.65rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 560px) {
    .pill {
        min-height: 1.55rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.64rem;
    }
}

.pill-soft {
    border-color: rgba(184, 136, 88, 0.22);
    background: rgba(184, 136, 88, 0.1);
    color: #dbc39f;
}

/* ---- El color de un género ------------------------------------------------
   Cada color se declara una vez: la base en tres números sueltos, para que
   rgba() la pueda diluir en borde y fondo, y la tinta del texto. La pintura
   sale toda de esas dos variables, así que un color nuevo es una línea y no
   seis reglas repetidas.

   La lista viva está en playlists/palette.py; este bloque es su gemelo. Si
   agregas un color allá sin agregarlo acá, la prueba
   PaletaDeGenerosTests.test_cada_color_de_la_paleta_tiene_su_regla_en_el_css
   te avisa antes de que aparezca gris en pantalla.

   Las claves viejas (bachata, salsa, merengue) siguen acá con el color de
   siempre: un género que ya existía no cambia de aspecto por esto. */

/* Cada color se declara en dos formas del mismo selector: la clase, que usa la
   pastilla, y el atributo `data-paleta`, que usa todo lo demás —el número de la
   cabina, la ficha del historial, el botón de estilo de EN VIVO—. Así el color
   viaja por herencia y cada familia necesita una regla, no once. */

.pill-genre-bachata, [data-paleta="bachata"],
.pill-genre-bordo, [data-paleta="bordo"] { --gen: 176, 92, 82; --gen-ink: #ecc7c1; }

.pill-genre-salsa, [data-paleta="salsa"],
.pill-genre-ambar, [data-paleta="ambar"] { --gen: 199, 154, 59; --gen-ink: #ebd79c; }

.pill-genre-merengue, [data-paleta="merengue"],
.pill-genre-verdemar, [data-paleta="verdemar"] { --gen: 78, 139, 132; --gen-ink: #c0e5e0; }

.pill-genre-cobre, [data-paleta="cobre"] { --gen: 217, 139, 101; --gen-ink: #ffd9bf; }
.pill-genre-salvia, [data-paleta="salvia"] { --gen: 127, 174, 152; --gen-ink: #d2e8dd; }
.pill-genre-arcilla, [data-paleta="arcilla"] { --gen: 192, 122, 79; --gen-ink: #f0cdb0; }
.pill-genre-ciruela, [data-paleta="ciruela"] { --gen: 150, 96, 133; --gen-ink: #e9cee1; }
.pill-genre-oliva, [data-paleta="oliva"] { --gen: 142, 146, 84; --gen-ink: #e0e3bb; }
.pill-genre-indigo, [data-paleta="indigo"] { --gen: 100, 116, 168; --gen-ink: #ccd4f0; }
.pill-genre-rosa, [data-paleta="rosa"] { --gen: 196, 138, 138; --gen-ink: #f2d3d3; }
.pill-genre-humo, [data-paleta="humo"] { --gen: 150, 141, 133; --gen-ink: #ded5cd; }

/* Fiestas Patrias no es un color plano, pero lo que no es la bandera —el
   número de la cabina, el canto del botón de estilo— necesita un tono con qué
   pintarse. Se usa el rojo. */
.pill-genre-fiestas-patrias, [data-paleta="fiestas-patrias"] { --gen: 197, 42, 34; --gen-ink: #ffd9d6; }

.pill-genre {
    border-color: rgba(var(--gen), 0.36);
    background: rgba(var(--gen), 0.22);
    color: var(--gen-ink);
}

/* Va después de .pill-genre a propósito: misma fuerza, gana el de más abajo.
   Un género sin color elegido y sin nombre reconocible se queda neutro, como
   siempre. */
.pill-genre-default {
    border-color: var(--border-default);
    background: var(--surface-soft);
    color: var(--muted-strong);
}

/* ---- PEDIDO ESPECIAL: Fiestas Patrias -------------------------------------
   La única pastilla que no es un color plano. Es la bandera leída de izquierda
   a derecha: azul con la estrella, el filo blanco, y el rojo ocupando el
   resto. Sin animación aposta: en una lista de treinta canciones, treinta
   pastillas parpadeando es una pesadilla, y ésta ya resalta sola entre tonos
   apagados.

   PARA APAGARLO: se apaga desde playlists/palette.py (ver el comentario de
   FIESTAS_PATRIAS). Estas reglas pueden quedarse acá sin molestar a nadie. */

/* Un esmalte azul con la estrella solitaria y un filo rojo abajo. La bandera
   entera metida de fondo se veía barata y, peor, era frágil: el azul, el filo
   blanco, el relleno y la estrella iban en medidas fijas que tenían que cuadrar
   entre sí, y en el celular la pastilla achica su tipografía y se descuadraban
   todas —la estrella terminaba encima del texto—.

   Acá no hay nada que cuadrar. La estrella es un elemento más de la fila, así
   que nunca se monta sobre el nombre, y todo va en `em`: la pastilla se puede
   achicar o agrandar y se ve igual. Un color de campo y dos acentos, que es
   como se ve cara una insignia. */
.pill-genre.pill-genre-fiestas-patrias {
    gap: 0.42em;
    border-color: rgba(226, 234, 255, 0.34);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, #22459c 0%, #16306f 100%);
    color: #f2f6ff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -1.5px 0 rgba(206, 46, 37, 0.92),
        0 2px 9px rgba(16, 34, 82, 0.42);
    letter-spacing: 0.005em;
}

/* La estrella va dibujada, no como carácter: `★` cambia de forma y de peso
   según la tipografía que alcance a cargar, y en una insignia eso se nota. */
.pill-genre.pill-genre-fiestas-patrias::before {
    content: "";
    flex: 0 0 auto;
    width: 0.92em;
    height: 0.92em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 1.8l3.09 6.57 6.91.95-5 5.07L18.18 22 12 18.6 5.82 22 7 14.39l-5-5.07 6.91-.95z'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

.pill-gold {
    border-color: rgba(184, 136, 88, 0.28);
    background: linear-gradient(135deg, rgba(184, 136, 88, 0.14), rgba(200, 157, 108, 0.1));
    color: #e4ceb0;
}

.pill-success {
    border-color: rgba(122, 145, 132, 0.24);
    background: var(--success-soft);
    color: #d0ddd5;
}

.song-trending-badge,
.pill-trending {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 0.96rem;
    margin-left: 0.5rem;
    padding: 0.08rem 0.52rem;
    border: 1px solid rgba(243, 177, 104, 0.44);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(232, 139, 99, 0.18), rgba(210, 168, 91, 0.09)),
        rgba(107, 58, 42, 0.12);
    color: #ffd9bd;
    box-shadow:
        0 0 0 1px rgba(255, 226, 183, 0.025),
        0 3px 9px rgba(226, 128, 85, 0.08);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.015em;
    text-transform: none;
    white-space: nowrap;
}

.pill-warning {
    border-color: rgba(184, 136, 88, 0.3);
    background: rgba(184, 136, 88, 0.12);
    color: #e4ceb0;
}

.pill-active-playlist {
    border-color: rgba(184, 136, 88, 0.38);
    background: rgba(184, 136, 88, 0.18);
    color: #ead4b6;
}

.pill-played {
    border-color: rgba(150, 126, 116, 0.36);
    background: rgba(150, 126, 116, 0.16);
    color: #ddcbc3;
}

.pill-tag {
    border-color: rgba(123, 142, 132, 0.2);
    background: rgba(123, 142, 132, 0.08);
    color: #bcc8c1;
}

.pill-muted {
    color: var(--muted);
}

.top-gap {
    margin-top: 1.25rem;
}

@media (max-width: 720px) {
    .top-gap {
        margin-top: 0.85rem;
    }
}

@media (max-width: 560px) {
    .top-gap {
        margin-top: 0.6rem;
    }
}

.subtle-divider {
    height: 1px;
    margin: 1.5rem 0;
    background: linear-gradient(90deg, transparent, rgba(184, 136, 88, 0.18), transparent);
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}

[data-library-filters].is-live-loading,
[data-library-results].is-live-loading {
    opacity: 0.62;
    transition: opacity 160ms ease;
}

[data-library-filters].is-live-loading {
    pointer-events: none;
}

.field-block {
    display: grid;
    gap: 0.6rem;
}

@media (max-width: 720px) {
    .field-block {
        gap: 0.4rem;
    }
}

@media (max-width: 560px) {
    .field-block {
        gap: 0.3rem;
    }
}

label {
    display: block;
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 650;
}

.field-label {
    display: block;
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 650;
}

@media (max-width: 720px) {
    label,
    .field-label {
        font-size: 0.8rem;
        font-weight: 600;
    }
}

form p {
    display: grid;
    gap: 0.6rem;
    margin: 0;
}

.helptext {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(184, 106, 79, 0.12);
    border-radius: 1.1rem;
    background:
        linear-gradient(180deg, rgba(18, 14, 17, 0.94), rgba(10, 10, 12, 0.98));
    padding: 0.92rem 1rem;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

@media (max-width: 720px) {
    input,
    select,
    textarea {
        padding: 0.75rem 0.85rem;
        border-radius: 0.9rem;
        font-size: 0.95rem;
    }
}

input::placeholder,
textarea::placeholder {
    color: #7d746a;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5.5 7.75 4.5 4.5 4.5-4.5' stroke='%23c9ac74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.8rem;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(126, 185, 177, 0.34);
    background: rgba(12, 16, 21, 0.9);
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    margin: 0;
    border-radius: 0.35rem;
    accent-color: var(--gold);
    box-shadow: none;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 1.15rem;
    background: var(--surface-soft);
}

.checkbox-row label {
    margin: 0;
}

.choice-grid > div {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.choice-grid > div > div {
    min-width: 0;
}

.choice-grid label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    height: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.choice-grid label:hover {
    transform: translateY(-1px);
    border-color: var(--line);
    background: var(--surface-hover);
}

.form-errors,
ul.errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #e6ada3;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-errors,
form .errorlist {
    display: grid;
    gap: 0.25rem;
}

.table-card {
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 1.55rem;
    background:
        linear-gradient(180deg, rgba(13, 15, 18, 0.99), rgba(8, 10, 13, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 24px 58px rgba(0, 0, 0, 0.24);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    min-width: 760px;
}

th:nth-child(1),
td:nth-child(1) {
    width: 37%;
}

th:nth-child(2),
td:nth-child(2) {
    width: 12%;
}

th:nth-child(3),
td:nth-child(3) {
    width: 23%;
}

th:nth-child(4),
td:nth-child(4) {
    width: 15%;
}

th:nth-child(5),
td:nth-child(5) {
    width: 6%;
}

th:nth-child(6),
td:nth-child(6) {
    width: 7%;
}

thead {
    background:
        linear-gradient(180deg, rgba(184, 106, 79, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.014);
}

th,
td {
    padding: 1rem 1.15rem;
    text-align: left;
    vertical-align: middle;
}

th {
    color: rgba(229, 217, 205, 0.72);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.table-sort-link:hover,
.table-sort-link.is-active {
    color: var(--text-strong);
}

.table-sort-indicator {
    font-size: 0.82rem;
    letter-spacing: 0;
}

td {
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    overflow-wrap: anywhere;
}

.library-tag-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.library-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.library-tag-empty {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.2;
}

.song-flags,
.library-song-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.playlist-song-flags:empty {
    display: none;
}

.library-table-action-cell {
    text-align: center;
    padding-left: 0.8rem;
    padding-right: 1.55rem;
}

.library-icon-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
        rgba(255, 255, 255, 0.014);
    color: var(--muted-strong);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.library-icon-button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: var(--surface-hover);
    color: var(--text-strong);
}

.library-icon-button svg {
    position: relative;
    z-index: 1;
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.library-tag-edit-button {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    min-width: 2.2rem;
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.018);
    color: #c7b9aa;
}

.library-tag-edit-button:hover {
    transform: none;
    border-color: rgba(184, 136, 88, 0.34);
    background:
        linear-gradient(180deg, rgba(184, 136, 88, 0.14), rgba(184, 136, 88, 0.055)),
        rgba(12, 10, 10, 0.9);
    color: #f0d7a4;
    box-shadow:
        0 0 0 4px rgba(184, 136, 88, 0.075),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.library-tag-edit-button:focus-visible {
    border-color: rgba(184, 136, 88, 0.42);
    color: #f0d7a4;
}

.library-listen-button {
    border-color: rgba(184, 136, 88, 0.18);
    color: #d8b77f;
}

.library-listen-button:hover {
    border-color: rgba(184, 136, 88, 0.34);
    background: rgba(184, 136, 88, 0.08);
    color: #f0d7a4;
}

.library-listen-button svg {
    width: 1.05rem;
    height: 1.05rem;
}

.library-listen-button .listen-play-icon {
    fill: currentColor;
    stroke: none;
}

.library-remove-button {
    border-color: rgba(200, 106, 95, 0.18);
    color: #dfb8b0;
}

tbody tr {
    transition: background 160ms ease;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background: rgba(6, 8, 10, 0.74);
    backdrop-filter: blur(14px);
}

body.modal-open .main-shell {
    z-index: 120;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-panel {
    width: min(100%, 56rem);
    max-height: min(90vh, 58rem);
    overflow: hidden;
    border-radius: 1.6rem;
    border: 1px solid var(--border-default);
    background: var(--surface-strong);
    box-shadow: var(--shadow-xl);
}

.library-demo-modal-panel {
    max-width: 52rem;
}

.library-tag-modal-panel {
    max-width: 44rem;
}

.modal-head,
.modal-foot {
    padding: 1.2rem 1.3rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-foot {
    border-bottom: 0;
    border-top: 1px solid var(--border-subtle);
}

.modal-body {
    padding: 1.2rem 1.3rem;
    overflow: auto;
    max-height: calc(90vh - 11rem);
}

.demo-player-shell {
    border-radius: 1.45rem;
    border: 1px solid var(--border-default);
    background: var(--surface-softer);
    overflow: hidden;
}

.demo-player-shell iframe {
    display: block;
    width: 100%;
    min-height: 22rem;
    border: 0;
}

.demo-player-shell audio {
    display: block;
    width: 100%;
}

.tag-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.classification-editor-section {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-section-label {
    margin: 0 0 0.75rem;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.classification-trending-choice {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 3.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(215, 138, 99, 0.2);
    border-radius: 1rem;
    background: rgba(215, 138, 99, 0.06);
    cursor: pointer;
}

.classification-trending-choice span {
    display: grid;
    gap: 0.22rem;
}

.classification-trending-choice strong {
    color: var(--text-strong);
    font-size: 0.95rem;
    line-height: 1.2;
}

.classification-trending-choice small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.tag-editor-choice {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 3rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.tag-editor-choice:hover {
    transform: translateY(-1px);
    border-color: var(--line);
    background: var(--surface-hover);
}

.modal-head-row,
.modal-foot-row {
    display: grid;
    gap: 1rem;
    align-items: center;
}

.modal-head-row {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
}

.modal-foot-row {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
}

.modal-close-button {
    width: 2.8rem;
    min-width: 2.8rem;
    padding: 0;
}

.modal-confirm-copy {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.modal-foot .action-row {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: max-content;
}

.modal-foot .action-row .button,
.modal-foot .action-row a,
.modal-foot .action-row form {
    flex: 0 0 auto;
    width: auto;
}

@media (max-width: 860px) {
    .library-completion-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .library-completion-actions,
    .library-completion-actions .button,
    .library-completion-actions form {
        width: 100%;
    }

    .modal-foot-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .modal-foot .action-row {
        justify-content: flex-end;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .modal-backdrop {
        place-items: center;
        padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
        overflow-y: auto;
    }

    .modal-panel {
        width: min(100%, 38rem);
        max-height: calc(100svh - 1.5rem);
        display: flex;
        flex-direction: column;
        border-radius: 1.25rem;
    }

    .library-tag-modal-panel,
    .library-demo-modal-panel {
        max-width: none;
    }

    .modal-head,
    .modal-foot {
        padding: 0.85rem 0.95rem;
    }

    .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        padding: 0.9rem 0.95rem;
    }

    .modal-head-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.75rem;
    }

    .modal-head .section-title {
        font-size: clamp(1.35rem, 7vw, 2rem);
        line-height: 1.04;
    }

    .modal-head .song-artist,
    .modal-head .section-copy {
        margin-top: 0.35rem;
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .modal-close-button,
    .modal-close {
        width: 2.35rem;
        min-width: 2.35rem;
        height: 2.35rem;
    }

    .tag-editor-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .tag-editor-choice {
        min-height: 3.05rem;
        padding: 0.75rem 0.82rem;
        border-radius: 0.95rem;
        font-size: 0.92rem;
    }

    .tag-editor-choice input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
    }

    .modal-foot-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-confirm-copy {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .modal-foot .action-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 0.55rem;
    }

    .modal-foot .action-row .button,
    .modal-foot .action-row a,
    .modal-foot .action-row form {
        width: 100%;
        min-width: 0;
    }

    .modal-foot .action-row .button {
        min-height: 2.35rem;
        padding: 0.55rem 0.7rem;
        font-size: 0.78rem;
    }
}

tbody tr:hover {
    background:
        linear-gradient(90deg, rgba(184, 106, 79, 0.06), rgba(255, 255, 255, 0.015) 34%, transparent 82%);
}

.table-actions form {
    margin: 0;
}

.mobile-card-list {
    display: grid;
    gap: 1rem;
}

.empty-state {
    padding: 1.6rem;
    border: 1px dashed rgba(184, 136, 88, 0.24);
    border-radius: 1.5rem;
    background: rgba(242, 237, 229, 0.016);
}

.empty-state-inline {
    margin: 0.75rem;
}

.empty-state-small {
    padding: 1.1rem 1.2rem;
    border-radius: 1.15rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.auth-layout {
    min-height: calc(100vh - 13rem);
    display: grid;
    place-items: center;
    padding: 1.5rem 0 0.5rem;
}

.auth-panel {
    width: min(100%, 31rem);
    padding: 1.8rem 1.8rem 1.65rem;
}

.auth-head {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.auth-copy {
    display: grid;
    gap: 0.55rem;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 1.95rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(123, 142, 132, 0.2);
    background: rgba(123, 142, 132, 0.08);
    color: var(--teal-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-copy .page-title {
    margin-top: 0.05rem;
}

.auth-copy-text {
    margin-top: 0;
    max-width: 28ch;
    color: var(--muted-strong);
}

.auth-logo {
    width: clamp(6.2rem, 10vw, 7.2rem);
    border-radius: 1.15rem;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.auth-form {
    margin-top: 1.5rem;
}

.auth-form p + p {
    margin-top: 0.2rem;
}

.auth-actions {
    margin-top: 0.35rem;
    justify-content: flex-start;
}

.auth-actions .button {
    min-width: 0;
}

.auth-actions .button-primary {
    min-width: 7.4rem;
}

body.account-page .site-footer {
    display: none;
}

.account-password-panel {
    width: min(100%, 32rem);
    padding: clamp(1.25rem, 2.1vw, 1.65rem);
    background:
        radial-gradient(circle at 0% 0%, rgba(110, 45, 47, 0.16), transparent 31%),
        linear-gradient(90deg, rgba(184, 106, 79, 0.045), transparent 24%),
        linear-gradient(135deg, rgba(15, 12, 14, 0.98), rgba(10, 11, 13, 0.98) 62%, rgba(7, 8, 10, 0.98));
    box-shadow:
        0 22px 58px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.016),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.account-password-head {
    padding-bottom: 0.1rem;
}

.account-password-panel .page-title {
    max-width: 100%;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.account-password-panel .auth-copy-text {
    max-width: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.account-password-panel .auth-form {
    gap: 0.72rem;
    margin-top: 1.05rem;
}

.account-password-panel .field-block {
    gap: 0.38rem;
}

.account-password-panel label {
    font-size: 0.84rem;
}

.password-reveal-field {
    position: relative;
    display: grid;
}

.password-reveal-field input {
    min-height: 2.7rem;
    padding-right: 3.2rem;
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(13, 10, 12, 0.98), rgba(8, 8, 10, 0.98));
}

.password-reveal-button {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.password-reveal-button:hover,
.password-reveal-button:focus-visible {
    border-color: var(--border-default);
    background: var(--surface-hover);
    color: var(--text-strong);
    outline: none;
}

.password-reveal-button svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-reveal-button .password-eye-closed,
.password-reveal-field.is-visible .password-eye-open {
    display: none;
}

.password-reveal-field.is-visible .password-eye-closed {
    display: block;
}

.account-password-panel .errorlist {
    padding-left: 0.1rem;
    font-size: 0.82rem;
}

.account-password-panel .auth-actions {
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.account-password-panel .auth-actions .button {
    min-height: 2.65rem;
    padding: 0.7rem 1.15rem;
}

.account-password-panel .account-password-back {
    min-height: 2.5rem;
    padding-inline: 0.95rem;
    color: var(--muted-strong);
}

.platform-admins-shell {
    gap: 1.25rem;
}

.platform-admins-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.platform-admins-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 0.78fr) minmax(0, 1.22fr);
    gap: 1.25rem;
    align-items: start;
}

.platform-admins-layout > * {
    min-width: 0;
}

.password-tool-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.6rem;
    align-items: stretch;
}

.password-tool-row .button {
    width: auto;
}

.password-tool-feedback:empty {
    display: none;
}

.workspace-choice-grid {
    margin-top: 0.15rem;
}

.admin-card-list {
    display: grid;
    gap: 0.85rem;
}

.admin-card {
    display: grid;
    gap: 0.95rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border-default);
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)),
        rgba(5, 6, 8, 0.26);
}

.admin-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-card h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-strong);
    font-size: 1.05rem;
}

.admin-card-tags {
    margin-top: 0.55rem;
    gap: 0.45rem;
}

.admin-workspaces {
    display: grid;
    gap: 0.25rem;
}

.admin-workspaces span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-workspaces p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.5;
}

.admin-card-actions {
    display: grid;
    gap: 0.75rem;
}

.admin-card-actions form {
    margin: 0;
}

.admin-reset-form {
    display: grid;
    gap: 0.6rem;
}

.site-footer {
    position: relative;
    z-index: 1;
    padding: 0 0 2rem;
}

.site-footer-inner {
    border: 1px solid rgba(184, 106, 79, 0.08);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at top left, rgba(184, 106, 79, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
        rgba(7, 8, 10, 0.72);
    color: var(--muted);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.site-footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.4rem;
    align-items: center;
    padding: 1.45rem 1.55rem;
}

.site-footer-copy {
    min-width: 0;
    max-width: 42rem;
}

.site-footer-eyebrow {
    color: var(--accent-soft);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.site-footer-message {
    margin-top: 0.55rem;
    color: var(--muted);
    line-height: 1.65;
}

.site-footer-contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    min-width: min(100%, 31rem);
}

.site-footer-contact-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.8rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(184, 106, 79, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.024);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.site-footer-contact-card:hover {
    transform: translateY(-1px);
    border-color: rgba(184, 136, 88, 0.28);
    background: rgba(184, 136, 88, 0.07);
}

.site-footer-contact-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.8rem;
    color: #e4ceb0;
    background: rgba(184, 136, 88, 0.12);
}

.site-footer-contact-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-footer-contact-card:nth-child(2) .site-footer-contact-icon svg path:nth-child(2) {
    fill: currentColor;
    stroke: none;
}

.site-footer-contact-copy {
    min-width: 0;
}

.site-footer-contact-label {
    display: block;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
}

.site-footer-contact-value {
    display: block;
    margin-top: 0.25rem;
    overflow-wrap: anywhere;
    color: var(--text-strong);
    font-weight: 700;
    line-height: 1.35;
}

.site-footer-bottom {
    border-top: 1px solid rgba(184, 106, 79, 0.08);
    padding: 0.85rem 1.55rem;
}

.site-footer-signature {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-brand-logo {
    width: auto;
    height: 2.2rem;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
}

::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(184, 136, 88, 0.82), rgba(200, 157, 108, 0.78)) padding-box;
}

@media (max-width: 1180px) {
    .hero-home,
    .home-welcome,
    .split-layout,
    .split-tight {
        grid-template-columns: 1fr;
    }

    .home-welcome-copy {
        min-height: 0;
    }

    .home-title {
        max-width: 17ch;
    }

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

    .site-footer-main {
        grid-template-columns: 1fr;
    }

    .site-footer-contact-list {
        min-width: 0;
    }

    .platform-admins-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .topbar-inner {
        min-height: 5.2rem;
    }

    .topbar-desktop {
        display: none;
    }

    .mobile-toggle,
    .mobile-panel {
        display: block;
    }

    .hero-home .page-title {
        max-width: 14ch;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .field-grid,
    .inner-grid,
    .helper-grid,
    .category-grid,
    .recipe-grid,
    .summary-grid,
    .summary-grid-compact {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .toast-stack {
        right: 0.85rem;
        left: 0.85rem;
        bottom: max(0.85rem, env(safe-area-inset-bottom));
        width: auto;
    }

    .toast {
        padding: 0.9rem 0.95rem 0.95rem 1rem;
        border-radius: 1rem;
        transform: translateY(0.9rem) scale(0.985);
        transition: opacity 220ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease;
    }

    .toast-visible {
        transform: translateY(0) scale(1);
    }

    .toast-exit {
        transform: translateY(0.7rem) scale(0.985);
    }

    .toast::after {
        top: 0.85rem;
        right: 0.85rem;
    }

    .toast-body p {
        max-width: none;
        font-size: 0.92rem;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(calc(100% - 1.25rem), var(--shell));
    }

    .main-shell {
        padding-top: 1.5rem;
        padding-bottom: 4rem;
    }

    .panel,
    .workspace-card,
    .hero-main,
    .hero-side {
        padding: 1.25rem;
    }

    .home-welcome-copy,
    .home-public-panel,
    .home-section {
        padding: 1.25rem;
    }

    .home-title {
        font-size: 2.75rem;
    }

    .home-lead {
        font-size: 1rem;
    }

    .home-flow-grid,
    .site-footer-contact-list {
        grid-template-columns: 1fr;
    }

    .site-footer-main {
        padding: 1.25rem;
    }

    .site-footer-bottom {
        padding: 0.85rem 1.25rem;
    }

    .metric-card,
    .category-card,
    .history-card,
    .catalog-card,
    .slot-card,
    .song-card {
        padding: 1rem;
    }

    .platform-admins-head {
        display: grid;
    }

    .password-tool-row {
        grid-template-columns: 1fr 1fr;
    }

    .password-tool-row input {
        grid-column: 1 / -1;
    }

    .workspace-brand-large {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-row {
        width: 100%;
    }

    .action-row .button,
    .action-row form {
        flex: 1 1 auto;
    }

    .action-row form .button {
        width: 100%;
    }

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

    .song-card-head {
        flex-direction: column;
    }

    .library-added-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .classification-row-main {
        flex-direction: column;
    }

    .classification-position {
        min-width: 0;
    }

    .pagination {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .metric-card,
    .category-card,
    .history-card,
    .catalog-card,
    .slot-card,
    .song-card {
        padding: 0.8rem;
    }
}

@media (max-width: 560px) {
    .page-title {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .brand-badge {
        width: 3.35rem;
        height: 3.35rem;
        border-radius: 1.1rem;
    }

    .brand-mark {
        width: 2.15rem;
        height: 2.15rem;
    }

    .brand-copy strong {
        font-size: 1.08rem;
    }

    .brand-copy small {
        font-size: 0.62rem;
        letter-spacing: 0.17em;
    }

    .workspace-grid,
    .history-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .home-title {
        font-size: 2.35rem;
    }

    .home-workspace-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .workspace-card-link.home-workspace-card {
        flex-direction: column;
        align-items: stretch;
    }

    .home-card-arrow {
        margin-top: 1rem;
        margin-left: 0;
        align-self: flex-end;
    }

    .button,
    .user-badge {
        width: 100%;
    }

    .auth-panel {
        width: min(100%, 33rem);
        padding: 1.35rem 1.2rem 1.2rem;
    }

    .auth-head {
        gap: 0.85rem;
    }

    .auth-actions {
        width: 100%;
    }

    .auth-actions .button,
    .auth-actions a {
        flex: 1 1 100%;
    }

    .account-password-panel {
        padding: 1rem 0.95rem;
        border-radius: 1.2rem;
    }

    body.account-page .main-shell {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    body.account-page .auth-layout {
        min-height: auto;
        place-items: start center;
        padding: 0.35rem 0 0;
    }

    .account-password-panel .auth-copy {
        gap: 0.4rem;
    }

    .account-password-panel .auth-kicker {
        min-height: 1.6rem;
        padding: 0.25rem 0.65rem;
        font-size: 0.62rem;
        letter-spacing: 0.18em;
    }

    .account-password-panel .page-title {
        font-size: clamp(1.55rem, 7vw, 1.95rem);
        line-height: 1.08;
    }

    .account-password-panel .auth-copy-text {
        font-size: 0.82rem;
        line-height: 1.45;
        white-space: normal;
    }

    .account-password-panel .auth-form {
        gap: 0.62rem;
        margin-top: 0.9rem;
    }

    .account-password-panel .field-block {
        gap: 0.34rem;
    }

    .account-password-panel label {
        font-size: 0.78rem;
    }

    .password-reveal-field input {
        min-height: 2.55rem;
        padding-right: 2.85rem;
        border-radius: 0.9rem;
    }

    .password-reveal-button {
        right: 0.35rem;
        width: 2rem;
        height: 2rem;
    }

    .account-password-panel .auth-actions {
        gap: 0.5rem;
        align-items: center;
        justify-content: flex-start;
        margin-top: 0.35rem;
    }

    .account-password-panel .auth-actions .button-primary {
        flex: 1 1 100%;
        width: 100%;
        min-height: 2.55rem;
        font-size: 0.84rem;
    }

    .account-password-panel .auth-actions .account-password-back {
        flex: 0 0 auto;
        width: auto;
        min-height: 2.1rem;
        padding: 0.45rem 0.75rem;
        border-color: transparent;
        background: transparent;
        font-size: 0.78rem;
    }

    .choice-grid > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .topbar {
        overflow: visible;
        background: rgba(7, 7, 8, 0.94);
    }

    .topbar-inner {
        justify-content: space-between;
        min-height: 4.25rem;
        padding: 0.45rem 0;
    }

    .mobile-panel {
        position: absolute;
        top: calc(100% + 0.45rem);
        left: 0;
        right: 0;
        z-index: 45;
        padding: 0.55rem;
        border: 1px solid var(--border-default);
        border-radius: 1.2rem;
        background:
            linear-gradient(180deg, rgba(17, 16, 18, 0.99), rgba(7, 8, 10, 0.99));
        box-shadow: var(--shadow-lg);
    }

    .mobile-nav-list {
        gap: 0.45rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .mobile-nav-link {
        min-height: 2.65rem;
        padding: 0 0.9rem;
        font-size: 0.92rem;
    }

    .mobile-panel-actions {
        margin-top: 0.45rem;
    }

    /* ------------------------------------------------------------------
       Navegación pública en celular.
       La casa del bailarín tiene tres puertas y nada más: esconderlas tras
       un menú cuesta un toque extra y borra dónde está parada la persona.
       Por eso aquí el panel deja de ser desplegable y se vuelve una fila
       de píldoras fija bajo el nombre del evento, como en el mockup.
       ------------------------------------------------------------------ */
    .topbar-publico .mobile-panel {
        display: block;
        position: static;
        padding: 0 0 0.5rem;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        animation: none;
    }

    .topbar-publico .mobile-nav-list {
        display: flex;
        gap: 0.4rem;
        /* si el evento tuviera más puertas, se arrastran en vez de apilarse */
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar-publico .mobile-nav-list::-webkit-scrollbar {
        display: none;
    }

    .topbar-publico .mobile-nav-link {
        justify-content: center;
        flex: 0 0 auto;
        min-height: 2.5rem;
        padding: 0 0.95rem;
        border-color: var(--border-default);
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .topbar-publico .mobile-nav-link-active {
        border-color: rgba(184, 106, 79, 0.36);
    }

    .topbar-publico .topbar-inner {
        min-height: 3.9rem;
        padding-bottom: 0.2rem;
    }
}

@media (max-width: 720px) {
    body.library-page .main-shell {
        padding-top: 0.95rem;
    }

    body.library-page .page-stack,
    body.library-page .library-results-stack {
        gap: 1rem;
    }

    body.library-page .panel-feature {
        padding: 1.05rem;
        border-radius: 1.55rem;
    }

    body.library-page .panel:not(.panel-feature) {
        padding: 1rem;
        border-radius: 1.35rem;
    }

    body.library-page .eyebrow {
        margin-bottom: 0.35rem;
        font-size: 0.62rem;
        letter-spacing: 0.22em;
    }

    body.library-page .page-title {
        font-size: clamp(2rem, 9.8vw, 2.8rem);
        line-height: 0.96;
    }

    body.library-page .page-copy,
    body.library-page .section-copy {
        margin-top: 0.65rem;
        font-size: 0.88rem;
        line-height: 1.6;
    }

    body.library-page .section-title {
        font-size: clamp(1.35rem, 6.8vw, 1.85rem);
    }

    body.library-page .summary-grid-compact {
        gap: 0.65rem;
    }

    body.library-page .metric-card {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.18rem 0.8rem;
        align-items: end;
        padding: 0.78rem 0.85rem;
        border-radius: 1rem;
    }

    body.library-page .metric-label {
        grid-column: 1 / -1;
        font-size: 0.58rem;
        letter-spacing: 0.18em;
    }

    body.library-page .metric-value {
        margin-top: 0;
        font-size: 1.7rem;
    }

    body.library-page .metric-meta {
        grid-column: 1 / -1;
        padding-top: 0.1rem;
        font-size: 0.72rem;
        line-height: 1.4;
    }

    body.library-page .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.52rem;
        padding: 0.65rem;
        border-radius: 1rem;
    }

    body.library-page .filter-grid .field-block:first-child,
    body.library-page .filter-actions {
        grid-column: 1 / -1;
    }

    body.library-page .field-block {
        gap: 0.28rem;
    }

    body.library-page label {
        color: var(--muted);
        font-size: 0.64rem;
        font-weight: 800;
        letter-spacing: 0.04em;
    }

    body.library-page input,
    body.library-page select {
        min-height: 2.35rem;
        padding: 0.52rem 0.75rem;
        border-radius: 0.78rem;
        font-size: 0.84rem;
    }

    body.library-page select {
        background-position: right 0.65rem center;
        background-size: 1rem;
        padding-right: 2rem;
    }

    body.library-page .filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }

    body.library-page .filter-actions .button {
        width: 100%;
        min-height: 2.25rem;
        padding: 0.48rem 0.65rem;
        font-size: 0.76rem;
    }

    body.library-page .field-block-toggle {
        align-self: end;
    }

    body.library-page .trending-filter-chip {
        width: 100%;
        min-height: 2.28rem;
        padding: 0.46rem 0.68rem;
        border-radius: 999px;
        font-size: 0.74rem;
    }

    body.library-page .mobile-card-list {
        display: grid;
        gap: 0.65rem;
    }

    body.library-page .library-song-card {
        padding: 0.82rem;
        border-radius: 1rem;
        border-color: rgba(255, 255, 255, 0.07);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008)),
            rgba(8, 10, 13, 0.76);
        box-shadow:
            0 10px 22px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.018);
    }

    body.library-page .library-song-main {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.7rem;
    }

    body.library-page .library-song-copy {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.library-page .library-song-card .song-title {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.86rem;
        line-height: 1.26;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body.library-page .library-song-card .song-artist {
        display: -webkit-box;
        overflow: hidden;
        margin-top: 0.18rem;
        font-size: 0.73rem;
        line-height: 1.35;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body.library-page .library-song-controls {
        display: flex;
        flex: 0 0 auto;
        gap: 0.35rem;
    }

    body.library-page .library-song-controls form {
        margin: 0;
    }

    body.library-page .library-song-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.32rem;
        margin-top: 0.55rem;
    }

    body.library-page .library-song-card .pill {
        min-height: 1.45rem;
        padding: 0.18rem 0.48rem;
        font-size: 0.58rem;
    }

    body.library-page .library-song-card .library-icon-button {
        width: 2.05rem;
        height: 2.05rem;
        min-width: 2.05rem;
    }

    body.library-page .library-song-card .library-tag-edit-button {
        width: 1.45rem;
        height: 1.45rem;
        min-width: 1.45rem;
    }

    body.library-page .library-song-card .library-icon-button svg {
        width: 0.9rem;
        height: 0.9rem;
    }

    body.library-page .catalog-grid {
        gap: 0.7rem;
    }

    body.library-page .catalog-card {
        min-height: 0;
        gap: 0.7rem;
        padding: 0.82rem;
        border-radius: 1rem;
    }

    body.library-page .catalog-card .song-title {
        font-size: 0.86rem;
        line-height: 1.26;
    }

    body.library-page .catalog-card .song-artist {
        margin-top: 0.2rem;
        font-size: 0.74rem;
        line-height: 1.4;
    }

    body.library-page .catalog-card-tags {
        gap: 0.32rem;
    }

    body.library-page .catalog-card .pill {
        min-height: 1.45rem;
        padding: 0.18rem 0.48rem;
        font-size: 0.58rem;
    }

    body.library-page .catalog-card-actions {
        display: grid;
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
        gap: 0.45rem;
    }

    body.library-page .catalog-card-actions form,
    body.library-page .catalog-card-actions .button {
        width: 100%;
        min-width: 0;
    }

    body.library-page .catalog-card-actions form:only-child {
        grid-column: 1 / -1;
    }

    body.library-page .catalog-card-actions .button {
        min-height: 2.2rem;
        padding: 0.48rem 0.6rem;
        font-size: 0.72rem;
    }

    body.library-page .pagination {
        gap: 0.45rem;
        margin-top: 1rem;
    }

    body.library-page .mobile-pagination {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.6rem;
        align-items: center;
        margin-top: 0.95rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.055);
    }

    body.library-page .mobile-pagination-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2rem;
        min-width: 3.6rem;
        padding: 0.3rem 0.65rem;
        border: 1px solid rgba(255, 255, 255, 0.075);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.018);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
    }

    body.library-page .mobile-pagination-actions {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    body.library-page .mobile-page-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.45rem;
        padding: 0.58rem 0.72rem;
        border: 1px solid var(--border-default);
        border-radius: 999px;
        color: var(--text);
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1;
    }

    body.library-page .mobile-page-button-primary {
        border-color: rgba(184, 106, 79, 0.34);
        background: linear-gradient(135deg, rgba(207, 137, 99, 0.92), rgba(165, 85, 70, 0.92));
        color: #1b0f0c;
    }

    body.library-page .mobile-page-button-secondary {
        background: rgba(255, 255, 255, 0.018);
        color: var(--muted-strong);
    }
}

@media (max-width: 560px) {
    .topbar .shell {
        width: min(calc(100% - 1rem), var(--shell));
    }

    .topbar-inner {
        min-height: 3.65rem;
        padding: 0.34rem 0;
        gap: 0.55rem;
    }

    .brand-lockup {
        flex: 1 1 auto;
        gap: 0.65rem;
        overflow: hidden;
    }

    .brand-badge {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 0.85rem;
    }

    .brand-mark {
        width: 1.72rem;
        height: 1.72rem;
    }

    .brand-copy strong {
        overflow: hidden;
        font-size: 0.98rem;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-copy small {
        overflow: hidden;
        margin-top: 0.08rem;
        font-size: 0.52rem;
        letter-spacing: 0.14em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-toggle {
        width: 2.55rem;
        height: 2.55rem;
        border-radius: 0.85rem;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
    }

    .mobile-toggle span {
        width: 1.05rem;
    }

    .mobile-toggle span:nth-child(1) {
        top: 0.82rem;
    }

    .mobile-toggle span:nth-child(2) {
        top: 1.22rem;
    }

    .mobile-toggle span:nth-child(3) {
        top: 1.62rem;
    }

    body.mobile-menu-open .mobile-toggle span:nth-child(1) {
        transform: translateX(-50%) translateY(0.4rem) rotate(45deg);
    }

    body.mobile-menu-open .mobile-toggle span:nth-child(3) {
        transform: translateX(-50%) translateY(-0.4rem) rotate(-45deg);
    }

    .mobile-nav-list {
        padding: 0;
        border-radius: 0;
    }

    .mobile-nav-link {
        min-height: 2.45rem;
        padding: 0 0.78rem;
        font-size: 0.86rem;
    }

    body.library-page .main-shell {
        padding-top: 0.72rem;
    }

    body.library-page .panel-feature,
    body.library-page .panel:not(.panel-feature) {
        padding: 0.9rem;
        border-radius: 1.25rem;
    }

    body.library-page .page-title {
        font-size: clamp(1.9rem, 9.2vw, 2.45rem);
    }

    body.library-page .page-copy,
    body.library-page .section-copy {
        font-size: 0.82rem;
    }

    body.library-page .filter-grid {
        gap: 0.46rem;
        padding: 0.58rem;
    }

    body.library-page input,
    body.library-page select {
        min-height: 2.18rem;
        padding-top: 0.46rem;
        padding-bottom: 0.46rem;
        font-size: 0.8rem;
    }

    body.library-page .mobile-card-list {
        display: grid;
        gap: 0.58rem;
    }

    body.library-page .mobile-pagination {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    body.library-page .mobile-pagination-count {
        width: fit-content;
    }

    body.library-page .catalog-card {
        gap: 0.65rem;
    }

    body.library-page .catalog-card-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    body.library-page .trending-filter-chip {
        min-height: 2.18rem;
        padding: 0.48rem 0.65rem;
        font-size: 0.74rem;
    }

    body.library-page .trending-filter-chip input {
        width: 100%;
        height: 100%;
        padding: 0;
    }

    .song-trending-badge,
    .pill-trending {
        min-height: 0.92rem;
        margin-left: 0.42rem;
        padding: 0.07rem 0.44rem;
        font-size: 0.56rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.01ms !important;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Nav de cabina por tareas — Fase 2b ===== */
/* Escritorio: las 4 tareas en la barra superior (rediseño coherente con la cabina). */
.topbar-desktop .cabina-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cabina-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.8rem;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.cabina-nav-item svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 1.7;
    flex-shrink: 0;
}

.cabina-nav-badge {
    position: absolute;
    top: -0.32rem;
    right: -0.18rem;
    display: inline-grid;
    place-items: center;
    min-width: 1.16rem;
    height: 1.16rem;
    padding: 0 0.27rem;
    border: 2px solid #090909;
    border-radius: 999px;
    background: #d78a63;
    color: #110b09;
    font: 800 0.64rem/1 "Manrope", sans-serif;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.cabina-nav-item:hover {
    color: var(--text);
    border-color: var(--border-default);
    background: var(--surface-soft);
}

.cabina-nav-item.is-on {
    color: #f6f1e8;
    border-color: rgba(184, 106, 79, 0.24);
    background:
        linear-gradient(180deg, rgba(184, 106, 79, 0.13), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.026);
}

.cabina-nav-item.is-on svg {
    color: #d78a63;
    stroke-width: 2;
}

/* Móvil: dock inferior fijo, fiel al mockup «La casa del organizador» (.cb-tabs). */
.cabina-tabs-dock,
.cabina-tabs-spacer {
    display: none;
}

@media (max-width: 980px) {
    .cabina-tabs-dock {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        background: rgba(8, 6, 7, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(184, 106, 79, 0.22);
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    }

    .cabina-tabs-dock .cabina-nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 0;
    }

    .cabina-tabs-dock .cabina-nav-item {
        flex-direction: column;
        gap: 4px;
        min-height: 0;
        padding: 6px 2px 5px;
        border: none;
        border-radius: 12px;
        background: none;
        color: #958c84;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .cabina-tabs-dock .cabina-nav-item svg {
        width: 19px;
        height: 19px;
        stroke-width: 1.7;
    }

    .cabina-tabs-dock .cabina-nav-badge {
        top: 2px;
        right: calc(50% - 21px);
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 9px;
    }

    .cabina-tabs-dock .cabina-nav-item:hover {
        color: #b7aa9a;
        background: none;
        border: none;
    }

    .cabina-tabs-dock .cabina-nav-item.is-on {
        color: #f6f1e8;
        background: rgba(207, 137, 99, 0.1);
        border: none;
    }

    .cabina-tabs-dock .cabina-nav-item.is-on svg {
        color: #d78a63;
        stroke-width: 2;
    }

    .cabina-tabs-dock .cabina-nav-item:focus-visible {
        outline: 2px solid #d78a63;
        outline-offset: -2px;
    }

    .cabina-tabs-spacer {
        display: block;
        height: calc(60px + env(safe-area-inset-bottom));
    }
}

/* ===== Estado de la jornada — Fase 2b (Paso 0: 5 estados explícitos) ===== */
/* Valores replicados del mockup "La casa del organizador" (.estado / .estado.espera). */
.estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    letter-spacing: .08em;
    font-weight: 800;
    text-transform: uppercase;
    color: #d2eee5;
    background: rgba(95, 143, 122, .14);
    border: 1px solid rgba(95, 158, 138, .36);
    border-radius: 999px;
    padding: 5px 11px;
}

.estado .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5f8f7a;
    box-shadow: 0 0 7px rgba(95, 143, 122, .85);
}

.estado.espera {
    color: #e7d3c4;
    background: rgba(184, 106, 79, .12);
    border-color: rgba(184, 106, 79, .36);
}

.estado.espera .dot {
    background: #d78a63;
    box-shadow: 0 0 7px rgba(215, 138, 99, .7);
}

.estado.vivo .dot {
    animation: estado-vivo-pulse 1.8s ease-out infinite;
}

@keyframes estado-vivo-pulse {
    0% { box-shadow: 0 0 0 0 rgba(95, 143, 122, .55); }
    70% { box-shadow: 0 0 0 6px rgba(95, 143, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(95, 143, 122, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .estado.vivo .dot {
        animation: none;
    }
}

/* ---- La nota del que está construyendo esto -------------------------------
   El «Invítame a un café» no cobra: pide tiempo. Abre esta nota, que dice que
   Wurlitzer lo hace una persona sola, se disculpa por lo que falta y deja un
   WhatsApp para quien quiera ayudar.

   Vive acá y no dentro de una pantalla porque la usan varias: la puerta de
   «todavía no hay jornada» y cualquier rincón en obra. El texto está una sola
   vez en playlists/includes/apoyo.html, así el número no queda escrito en dos
   lugares que después no coinciden. */

.apoyo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
}

.apoyo-taza {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1px solid rgba(184, 106, 79, 0.26);
    background: rgba(184, 106, 79, 0.1);
    color: #d78a63;
}

.apoyo-taza svg {
    width: 1.2rem;
    height: 1.2rem;
}

.apoyo-titulo {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    color: #f6f1e8;
}

.apoyo-texto {
    margin: 0;
    max-width: 24rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #b7aa9a;
}

/* El verde es de WhatsApp, no de la casa. Acá reconocer la marca de un vistazo
   vale más que la coherencia del color: el botón tiene que gritar «esto abre
   WhatsApp» antes de que nadie lea la etiqueta. */
.apoyo-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.85rem;
    margin-top: 0.6rem;
    padding: 0.7rem 1.25rem;
    border: 1px solid rgba(37, 211, 102, 0.34);
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.12);
    font-size: 0.83rem;
    font-weight: 800;
    color: #a8e9c1;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.apoyo-boton:hover,
.apoyo-boton:focus-visible {
    border-color: rgba(37, 211, 102, 0.55);
    background: rgba(37, 211, 102, 0.2);
    color: #d6f8e4;
}

.apoyo-boton svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: none;
}

.apoyo-pie {
    margin: 0.15rem 0 0;
    font-size: 0.73rem;
    line-height: 1.45;
    color: #8e857c;
}

/* ---- La nota, cuando llega como modal ---- */

.apoyo-modal {
    width: min(100% - 2rem, 25rem);
    max-height: calc(100dvh - 2.5rem);
    padding: 1.75rem 1.4rem 1.5rem;
    border: 1px solid rgba(241, 232, 219, 0.1);
    border-radius: 20px;
    background: #121013;
    color: #f6f1e8;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
    overflow: auto;
    overscroll-behavior: contain;
}

.apoyo-modal::backdrop {
    background: rgba(6, 5, 6, 0.72);
    backdrop-filter: blur(3px);
}

/* Entra y sale con calma, nunca de golpe. El cierre lo espera el guion: si se
   llamara close() de una, el modal desaparecería antes de animarse. */
.apoyo-modal[open] {
    animation: apoyo-entra 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.apoyo-modal[open]::backdrop {
    animation: apoyo-vela 240ms ease;
}

.apoyo-modal.se-va {
    animation: apoyo-sale 180ms ease forwards;
}

.apoyo-modal.se-va::backdrop {
    animation: apoyo-vela 180ms ease reverse forwards;
}

@keyframes apoyo-entra {
    from { opacity: 0; transform: translateY(0.9rem) scale(0.97); }
}

@keyframes apoyo-sale {
    to { opacity: 0; transform: translateY(0.5rem) scale(0.98); }
}

@keyframes apoyo-vela {
    from { opacity: 0; }
}

.apoyo-cerrar {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8e857c;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.apoyo-cerrar svg {
    width: 0.75rem;
    height: 0.75rem;
}

.apoyo-cerrar:hover,
.apoyo-cerrar:focus-visible {
    color: #f6f1e8;
    background: rgba(241, 232, 219, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .apoyo-modal[open],
    .apoyo-modal[open]::backdrop,
    .apoyo-modal.se-va,
    .apoyo-modal.se-va::backdrop {
        animation-duration: 1ms;
    }
}
