@import url("/static/tokens.css?v=91");

:root {
    --page-padding: 24px;
    --shell-padding: 16px;
    --shell-gap: 12px;
    --app-height: 100dvh;
    --viewport-top: 0px;
    --viewport-height: min(100dvh, var(--app-height));
    --viewport-bottom: max(0px, calc(100dvh - var(--viewport-top) - var(--viewport-height)));
    --app-top: calc(var(--viewport-top) + var(--safe-top));
    --app-bottom: calc(var(--viewport-bottom) + var(--safe-bottom));
    --usable-height: max(0px, calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom)));
    --header-height: 64px;
    --footer-height: 108px;
    --device-safe-top: 0px;
    --device-safe-bottom: 0px;
    --device-safe-left: 0px;
    --device-safe-right: 0px;
    --content-safe-top: 0px;
    --content-safe-bottom: 0px;
    --content-safe-left: 0px;
    --content-safe-right: 0px;
    --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--device-safe-top)) + var(--content-safe-top));
    --safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--device-safe-bottom)) + var(--content-safe-bottom));
    --safe-left: calc(max(env(safe-area-inset-left, 0px), var(--device-safe-left)) + var(--content-safe-left));
    --safe-right: calc(max(env(safe-area-inset-right, 0px), var(--device-safe-right)) + var(--content-safe-right));

}

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

body {
    margin: 0;
    background: var(--ambient), var(--canvas);
    color: var(--text);
    font-size: var(--type-body);
    line-height: 1.5;
}

html, body {
    height: 100%;
    overflow: hidden;
}

html.telegram-mini-app, html.telegram-mini-app * {
    touch-action: pan-x pan-y;
}

html.telegram-mini-app input[type="range"] {
    touch-action: pan-y;
}

button, input, select {
    font: inherit;
}

button, a, input, select {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    cursor: pointer;
}

button, select {
    touch-action: manipulation;
}

button {
    border: 0;
}

button:disabled, input:disabled, select:disabled {
    opacity: .45;
    cursor: default;
}

a {
    color: inherit;
    text-underline-offset: 3px;
}

body.using-keyboard :is(button, a, input, select, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

::selection {
    background: var(--selection);
    color: var(--text);
}

input {
    caret-color: var(--accent);
}

input::placeholder {
    color: var(--muted);
    opacity: 1;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

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

::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 6px;
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: var(--type-page);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.2;
    text-wrap: balance;
}

h2 {
    font-size: var(--type-section);
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1.35;
}

h3 {
    font-size: 15px;
    font-weight: 600;
}

p {
    color: var(--muted);
}

.icon {
    width: var(--icon-size);
    height: var(--icon-size);
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

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

.danger {
    color: var(--danger);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: calc(var(--app-top) + 8px);
    left: calc(var(--safe-left) + 8px);
    padding: 12px;
    background: var(--action);
    color: var(--accent-text);
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    opacity: 1;
    pointer-events: auto;
}

.button, .icon-button, .text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    white-space: nowrap;
    border-radius: var(--radius-control);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.button {
    min-height: var(--control-size);
    padding: var(--space-3) var(--space-4);
    font-weight: 500;
    font-size: var(--type-label);
    line-height: 1.4;
}

.primary {
    color: var(--accent-text);
}

/* Hover belongs to a mouse; touch retains only transient :active feedback. */
:where(body.using-mouse) .primary:hover:enabled {
    filter: brightness(1.08);
}

.quiet {
    color: var(--text);
    background: var(--control);
    border-color: transparent;
    box-shadow: var(--shadow-control);
}

:where(body.using-mouse) .quiet:hover:enabled, :where(body.using-mouse) .icon-button:hover:enabled, :where(body.using-mouse) .text-button:hover:enabled {
    background: var(--hover);
}

.icon-button {
    border-radius: 50%;
    width: var(--control-size);
    height: var(--control-size);
    flex: none;
}

.text-button {
    background: transparent;
    min-height: var(--control-size);
    padding: 4px 8px;
    font-size: var(--type-label);
    font-weight: 500;
    color: var(--accent);
}

.text-button.danger {
    color: var(--danger);
}

:where(body.using-mouse) .play-button:hover:enabled {
    filter: brightness(1.08);
}

:is(.primary, .play-button, .search-submit, #chat-send):active:enabled {
    filter: brightness(.92);
}

:is(.quiet, .icon-button:not(.search-submit), .text-button):active:enabled {
    background: var(--hover);
    box-shadow: var(--shadow-pressed);
}

:is(.home-link, .primary-nav button, .mobile-nav button):active {
    background: var(--hover);
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--raised);
    font-size: var(--type-small);
    font-weight: 500;
    color: var(--muted);
}

.status-chip {
    display: inline-flex;
    width: fit-content;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.avatar {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: var(--hover);
    color: var(--accent);
    font-weight: 600;
    overflow: hidden;
    flex: none;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.avatar > :is(img, span) {
    grid-area: 1 / 1;
}

button.avatar {
    width: var(--control-size);
    height: var(--control-size);
    box-shadow: var(--shadow-control);
    background: var(--control);
}

.avatar.large {
    width: 64px;
    height: 64px;
    font-size: 28px;
}

.app-shell {
    height: max(0px, var(--usable-height));
    margin-top: var(--app-top);
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr) 288px;
    gap: var(--shell-gap);
    grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
    padding: var(--shell-padding) calc(var(--safe-right) + var(--shell-padding)) var(--shell-padding) calc(var(--safe-left) + var(--shell-padding));
}

.telegram-top-title {
    display: none;
}

.topbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--control-size);
    text-decoration: none;
    font-size: 21px;
    letter-spacing: -.025em;
    font-weight: 700;
}

.brand > .icon {
    color: var(--accent);
    width: 25px;
    height: 25px;
}

.brand-dot {
    color: var(--accent);
}

.page-title {
    display: none;
}

.room-presence {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.connection-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    flex: none;
}

.connection-dot.connected {
    background: var(--success);
}

.presence-divider {
    margin: 0 4px;
    color: var(--line);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-actions .quiet {
    font-size: var(--type-meta);
}

.sidebar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 12px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-surface);
}

.primary-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.primary-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-control);
    background: transparent;
    text-align: left;
    color: var(--muted);
    font-weight: 500;
}

:where(body.using-mouse) .primary-nav button:hover {
    background: var(--raised);
    color: var(--text);
}

.primary-nav [aria-current="page"] {
    background: var(--selection);
    box-shadow: var(--shadow-inset);
    color: var(--accent);
    font-weight: 650;
}

.primary-nav .tablet-queue {
    display: none;
}

.sidebar-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 4px 8px;
    font-size: 12px;
    color: var(--muted);
}

.sidebar-playlists {
    overflow-y: auto;
    flex: 1;
}

.sidebar-playlists > p {
    margin: 10px 12px;
    font-size: 12px;
}

.sidebar-playlists button {
    min-height: var(--control-size);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border-radius: 6px;
    text-align: left;
}

:where(body.using-mouse) .sidebar-playlists button:hover {
    background: var(--raised);
}

.sidebar-playlists button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-playlists .icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.sidebar-bottom {
    padding-top: 20px;
}

.sidebar-bottom button {
    background: transparent;
    width: 100%;
    justify-content: flex-start;
    font-weight: 500;
}

.workspace {
    scroll-padding-block: var(--space-4);
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 12px var(--page-padding) var(--space-6);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

:is(.workspace, .queue-rail, .player):focus {
    outline: none;
}

.workspace-view {
    max-width: 1100px;
    margin: 0 auto;
}

.workspace-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.workspace-heading > div {
    min-width: 0;
}

.workspace-heading > .button {
    align-self: flex-start;
    flex: none;
}

.home-heading p {
    margin-top: 6px;
    font-size: var(--type-meta);
    line-height: 1.5;
}

.home-heading h1 {
    max-width: min(70vw, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-heading .icon-button {
    flex: none;
}

.now-feature {
    display: grid;
    grid-template-columns: minmax(160px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 16px 28px;
    padding: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
}

.now-feature:not(.is-empty) .feature-artwork {
    grid-row: 1 / span 2;
    padding: 8px;
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 18px;
}

.now-feature:not(.is-empty) .feature-copy {
    align-self: end;
}

.now-feature.is-empty {
    grid-template-columns: 80px minmax(0, 1fr);
}

.now-feature.is-empty .feature-artwork {
    width: 80px;
    box-shadow: none;
}

.now-feature.is-empty .feature-copy h2 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-artwork {
    padding: 0;
    background: var(--raised);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
}

.feature-artwork img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 450ms cubic-bezier(.25, 1, .5, 1);
}

.now-feature[data-playback="playing"] .feature-artwork img {
    transform: scale(1.04);
}

:where(body.using-mouse) .now-feature:not([data-playback="playing"]) .feature-artwork:hover img {
    transform: scale(1.025);
}

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

.feature-copy h2 {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-copy > p {
    font-size: 15px;
}

.feature-meta {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    min-width: 0;
    margin-top: var(--space-3);
}

.feature-meta .status-chip {
    flex: none;
    font-size: var(--type-caption);
    font-weight: 600;
    line-height: 1.5;
}

.feature-meta #home-requester {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--type-caption);
    line-height: 1.5;
}

.feature-meta #home-requester::before {
    content: "·";
    margin-right: var(--space-2);
}

.feature-actions {
    grid-column: 2;
    align-self: start;
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.feature-actions .button {
    min-height: 48px;
}

.is-empty .feature-actions {
    grid-column: 1 / -1;
}

.feature-actions .badge {
    background: var(--canvas);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.feature-actions .button.quiet {
    background: var(--control);
    color: var(--text);
}

.feature-actions .icon {
    width: 18px;
    height: 18px;
}

.group-heading, .settings-section > h2 {
    font-size: var(--type-section);
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: -.02em;
    color: var(--text);
}

.sidebar-section-heading, .queue-section-title {
    font-size: var(--type-meta);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--muted);
}

.group-heading {
    margin: 28px 0 14px;
}

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

.home-link {
    width: 100%;
    min-height: 128px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 12px;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
    text-align: left;
}

.home-link-arrow {
    display: none;
}

.home-link + .home-link {
    position: relative;
}

.home-link + .home-link::before {
    display: none;
}

:where(body.using-mouse) .home-link:hover {
    background: var(--raised);
}

.home-link strong {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.home-link-copy {
    min-width: 0;
}

.home-link-copy > span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.home-link-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--control);
    box-shadow: var(--shadow-control);
    border-radius: var(--radius-control);
}

.subpage-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.subpage-heading h1 {
    font-size: var(--type-page);
    line-height: 1.35;
    letter-spacing: -.015em;
}

.subpage-heading p {
    font-size: 13px;
    margin-top: 4px;
}

.subpage-heading .icon-button {
    flex: none;
}

.back-icon {
    transform: rotate(180deg);
}

.music-section, .library-section + .library-section {
    margin-top: 24px;
}

.music-shelf-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(132px, 22%, 180px);
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    padding: 4px 4px 8px;
    scrollbar-width: none;
}

.music-shelf-list::-webkit-scrollbar {
    display: none;
}

.music-shelf-card {
    min-width: 0;
    padding: 8px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    text-align: left;
    scroll-snap-align: start;
}

.music-shelf-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-artwork);
    background: var(--raised);
}

.music-shelf-card strong, .music-shelf-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-shelf-card strong {
    margin: 9px 2px 2px;
    font-size: var(--type-track);
    line-height: 1.3;
}

.music-shelf-card span {
    margin: 0 2px 2px;
    color: var(--muted);
    font-size: var(--type-caption);
}

.music-shelf-card:hover {
    background: var(--hover);
}

.artist-shelf-list {
    grid-auto-columns: 104px;
}

.artist-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 132px;
    padding: 8px 4px;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.artist-card img {
    flex: none;
    width: 82px;
    height: 82px;
    aspect-ratio: 1;
    border-radius: 50%;
}

.artist-card strong {
    width: 100%;
    margin-top: 9px;
}

.artist-card:hover {
    background: var(--hover);
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
}

.artist-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 70px;
    padding: 8px;
    border-radius: var(--radius);
    background: var(--surface);
    text-align: left;
}

.artist-list-item img {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.artist-list-item span {
    min-width: 0;
}

.artist-list-item strong, .artist-list-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-list-item small {
    margin-top: 3px;
    color: var(--muted);
}

.artist-list-item:hover {
    background: var(--hover);
}

.artist-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.artist-hero > img {
    flex: none;
    width: clamp(96px, 24vw, 160px);
    height: clamp(96px, 24vw, 160px);
    border-radius: 50%;
    object-fit: cover;
    background: var(--raised);
}

.artist-hero > div {
    min-width: 0;
}

.artist-description {
    display: -webkit-box;
    max-width: 65ch;
    margin: 8px 0 14px;
    color: var(--muted);
    line-height: 1.5;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.artist-hero .button {
    min-height: 42px;
}

.music-collection-cover {
    flex: none;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-artwork);
    background: var(--raised);
}

#music-collection-view .subpage-heading > div {
    min-width: 0;
}

#music-collection-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#music-collection-view .music-collection-play {
    flex: none;
    align-self: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

#home-view, #mix-view, #library-view {
    container-type: inline-size;
}

.track-list.recommendation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

body[data-view="home"] #home-recommendations.is-up-next {
    animation: up-next-enter 280ms cubic-bezier(.2, .8, .2, 1) both;
}

#home-recommendations.is-up-next .recommendation-grid {
    display: block;
    max-height: min(58vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--muted) transparent;
}

@keyframes up-next-enter {
    from {
        opacity: .55;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendation-grid .track-row {
    min-width: 0;
    gap: 8px;
}

.recommendation-status {
    grid-column: 1 / -1;
    padding: 12px 0;
    font-size: var(--type-meta);
}

.recommendation-grid > .text-button {
    justify-self: start;
}

@container (min-width: 720px) {
    .track-list.recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }

    #home-recommendations.is-up-next .recommendation-grid {
        display: block;
    }
}

.library-section > h2 {
    margin-bottom: 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--type-section);
}

.section-heading p {
    font-size: 12px;
    margin-top: 5px;
}

.section-heading > .muted {
    font-size: 12px;
}

.empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 40px 16px;
    color: var(--muted);
    text-align: center;
}

.empty-state .icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.empty-state h3 {
    color: var(--text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
}

.empty-state p {
    max-width: 30ch;
    font-size: var(--type-meta);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: var(--empty-icon-size);
    height: var(--empty-icon-size);
    margin-bottom: 4px;
    background: var(--raised);
    border-radius: var(--radius);
}

.empty-state.is-error .icon {
    color: var(--danger);
}

.empty-state > .button {
    margin-top: 8px;
}

.empty-state.compact {
    align-items: flex-start;
    padding: 16px 0;
    font-size: var(--type-meta);
    text-align: left;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.track-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    min-height: var(--track-row-height);
    border-radius: 10px;
}

:where(body.using-mouse) .track-row:hover {
    background: var(--raised);
}

.track-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    min-height: 64px;
    padding: 0;
    background: transparent;
    text-align: left;
    border-radius: var(--radius-artwork);
}

.track-art-shell {
    position: relative;
    display: block;
    flex: none;
    width: var(--track-artwork-size);
    height: var(--track-artwork-size);
}

.track-art-shell .icon {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 20px;
    height: 20px;
    padding: 4px;
    border-radius: 50%;
    background: var(--control);
    color: var(--text);
    stroke-width: 2.2;
}

.playing-bars {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 6px 5px;
    border-radius: 50%;
    background: var(--action);
    box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
}

.playing-bars span {
    width: 3px;
    height: 55%;
    border-radius: 2px;
    background: var(--accent-text);
    animation: playing-bar 850ms ease-in-out infinite alternate;
}

.playing-bars span:nth-child(2) {
    height: 100%;
    animation-delay: -450ms;
}

.playing-bars span:nth-child(3) {
    height: 70%;
    animation-delay: -250ms;
}

.track-row.is-playing {
    background: var(--selection);
}

.track-row.is-playing .track-copy strong {
    color: var(--accent);
}

@keyframes playing-bar {
    to {
        height: 25%;
    }
}

.track-art {
    width: var(--track-artwork-size);
    height: var(--track-artwork-size);
    object-fit: cover;
    flex: none;
    border-radius: var(--radius-artwork);
    background: var(--raised);
}

.track-copy {
    flex: 1;
    min-width: 0;
}

.track-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    min-width: 0;
}

.track-meta > p {
    min-width: 0;
    flex: 1;
}

:is(.workspace-view, .music-section, .library-section) > .track-list:has(> .track-row, > .loading-state) {
    padding: 4px 16px;
    background: var(--surface);
    border-radius: var(--radius);
}

:is(.workspace-view, .music-section, .library-section) > .track-list > .track-row + .track-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(var(--track-artwork-size) + 12px);
    right: 0;
    height: 1px;
    background: var(--line);
}

@container (min-width: 720px) {
    .recommendation-grid > .track-row:nth-child(2)::before {
        display: none;
    }
}

.track-copy strong {
    display: block;
    font-size: var(--type-track);
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.track-copy p {
    font-size: var(--type-meta);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0;
}

.track-duration {
    flex: none;
    font-size: var(--type-small);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.track-actions {
    display: flex;
    align-items: center;
    flex: none;
    gap: 0;
    color: var(--muted);
}

.track-actions:empty {
    display: none;
}

.track-actions .icon {
    width: 20px;
    height: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    padding: 6px 8px 6px 18px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
    transition: border-color var(--transition);
}

.search-form:focus-within {
    border-color: var(--accent);
}

#search-clear {
    color: var(--muted);
    background: transparent;
}

#search-input:focus-visible {
    outline: none;
}

#search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.search-submit {
    border-radius: 12px;
    color: var(--accent-text);
}

.search-summary {
    margin: 16px 4px 8px;
    font-size: var(--type-meta);
}

.search-summary:empty {
    display: none;
}

.search-form > .icon {
    color: var(--muted);
}

.search-form input {
    outline: none;
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text);
    outline-offset: 0;
    height: var(--control-size);
    font-size: 16px;
}

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

.collection-grid > .empty-state {
    grid-column: 1 / -1;
}

.collection {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    min-width: 0;
    text-align: left;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-surface);
}

:where(body.using-mouse) .collection:hover {
    background: var(--hover);
}

.collection-copy {
    min-width: 0;
    flex: 1;
}

.collection-cover {
    flex: none;
    width: var(--playlist-artwork-size);
    height: var(--playlist-artwork-size);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: var(--raised);
    border-radius: 12px;
    overflow: hidden;
    color: var(--accent);
}

:where(body.using-mouse) .collection:hover .collection-cover {
    background: var(--hover);
}

.collection-cover .icon {
    width: 24px;
    height: 24px;
}

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

.collection-cover[data-count] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1px;
}

.collection-cover[data-count="1"] img {
    grid-column: span 2;
    grid-row: span 2;
}

.collection-cover[data-count="2"] img {
    grid-row: span 2;
}

.collection-cover[data-count="3"] img:first-child {
    grid-row: span 2;
}

.collection-grid:has(> .collection, > .loading-state) {
    background: transparent;
}

.collection > .icon {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.collection + .collection::before {
    display: none;
}

.collection-cover.settings-icon {
    width: var(--playlist-artwork-size);
    height: var(--playlist-artwork-size);
    border-radius: 12px;
}

.collection-cover.settings-icon .icon {
    width: 26px;
    height: 26px;
}

.collection-copy > strong {
    display: block;
    font-size: var(--type-track);
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-copy > span {
    display: block;
    font-size: var(--type-caption);
    margin-top: 5px;
    color: var(--muted);
}

#playlist-detail > .section-heading {
    align-items: flex-start;
    margin-bottom: 20px;
}

#playlist-detail > .section-heading > div:first-child {
    min-width: 0;
}

#playlist-detail-title {
    overflow-wrap: anywhere;
}

#playlist-detail-meta {
    margin-top: 4px;
    font-size: var(--type-meta);
}

#playlist-detail > .track-list:has(> .track-row, > .loading-state) {
    padding: 4px 16px;
    background: var(--surface);
    border-radius: var(--radius);
}

#library-message:not(:empty) {
    padding: 0 0 12px;
    color: var(--muted);
}

.account {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
    max-width: 780px;
    padding: 24px 20px;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
}

.account > div:last-child {
    min-width: 0;
}

.account h2 {
    font-size: 22px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account p {
    font-size: var(--type-meta);
    margin: 5px 0 8px;
    overflow-wrap: anywhere;
}

.settings-section {
    margin-top: 24px;
    max-width: 780px;
}

.settings-section > h2 {
    margin-bottom: 8px;
    padding-inline: 16px;
}

.settings-group {
    background: var(--glass);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
}

.settings-group > .setting-row, .settings-group #room-admin-settings .setting-row {
    padding: 12px 16px;
}

.settings-group .setting-row + .setting-row, .settings-group > .profile-link + .setting-row, .settings-group > #room-admin-settings > .setting-row:first-child, .settings-group > #room-admin-settings + .setting-row {
    border-top: 1px solid var(--line);
}

.settings-group > .listeners-heading {
    padding: 16px 16px 0;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
}

.settings-group > .participant-list {
    padding: 0 16px 16px;
}

.setting-row {
    font-size: var(--type-setting);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding: 12px 0;
}

.setting-row label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    font-weight: 600;
}

.setting-row > div {
    min-width: 0;
}

.setting-row p {
    font-size: var(--type-meta);
    line-height: 1.5;
    font-weight: 400;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.setting-row > :last-child:not(:first-child) {
    flex-shrink: 0;
}

#profile-connection {
    font-size: var(--type-meta);
}

select, #dialog-input {
    background: var(--raised);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 9px 12px;
    min-height: var(--control-size);
    box-shadow: var(--shadow-inset);
    max-width: 100%;
}

select {
    min-width: 112px;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex: none;
}

input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 44px;
    height: 26px;
    border-radius: 20px;
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
    outline: 1px solid var(--switch-off);
    outline-offset: -1px;
    transition: background var(--transition);
}

input[type="checkbox"]::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 14px;
    left: 4px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 1px 2px 4px rgb(0 0 0 / 35%);
    transition: transform var(--transition), background var(--transition);
}

input[type="checkbox"]:checked::after {
    background: var(--action);
    outline-color: transparent;
    box-shadow: var(--shadow-inset);
}

input[type="checkbox"]:checked::before {
    transform: translateX(18px);
    background: var(--accent-text);
}

.setting-row:has(input[type="checkbox"]:enabled), .voice-setting-row:has(input[type="checkbox"]:enabled) {
    cursor: pointer;
}

.listeners-heading {
    margin: 20px 0 12px;
}

.profile-about {
    padding-bottom: 24px;
}

.partner-invite-form {
    display: grid;
    gap: 16px;
    padding: 16px 20px 20px;
}

.partner-invite-form label {
    display: grid;
    gap: 8px;
}

.partner-invite-form input {
    width: 100%;
    min-width: 0;
    min-height: var(--control-size);
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--control);
    color: var(--text);
}

.partner-invite-form p {
    font-size: var(--type-meta);
}

.partner-invite-form .button {
    justify-self: start;
}

.session-join-form {
    max-width: 350px;
    margin-top: 24px;
    padding: 0;
}

.session-join-form .button {
    justify-self: stretch;
}

.passcode-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 4px 8px 4px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-input);
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
}

.passcode-control > .icon {
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.passcode-control input {
    flex: 1;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 16px;
}

.passcode-control:focus-within {
    border-color: transparent;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.passcode-control input:focus-visible {
    outline: none;
}

.passcode-control:has([aria-invalid="true"]) {
    border-color: var(--danger);
}

.passcode-control:has([aria-invalid="true"]):focus-within {
    border-color: transparent;
    outline-color: var(--danger);
}

.passcode-toggle {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
}

.passcode-toggle[aria-pressed="true"] {
    color: var(--accent);
}

.session-join-form .button.primary, .button.passcode-save {
    min-height: 52px;
    background: var(--accent);
    color: var(--canvas);
    font-size: 15px;
    font-weight: 600;
}

.session-join-form .button .icon {
    width: 20px;
    height: 20px;
    margin-left: auto;
}

.session-join-form .button > span {
    text-align: left;
    flex: 1;
}

.passcode-entry .session-actions {
    margin-top: 16px;
}

.passcode-entry .session-actions .text-button {
    min-height: 44px;
}

.partner-section .settings-group {
    margin-bottom: 12px;
}

.partner-toggle-row {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

#partner-password-form {
    border-top: 1px solid var(--line);
}

.settings-note .text-button.inline-link {
    min-height: 0;
    padding: 0 2px;
    font-size: inherit;
    text-decoration: underline;
    vertical-align: baseline;
}

.about-summary {
    padding: 16px;
}

.about-summary > p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.bot-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    color: var(--accent);
}

.bot-avatar > :is([data-bot-photo], svg) {
    grid-area: 1 / 1;
}

.bot-avatar > [data-bot-photo] {
    width: 100%;
    height: 100%;
}

.bot-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.bot-identity-copy {
    min-width: 0;
}

.bot-identity-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bot-handle {
    display: block;
    margin-top: 2px;
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
}

:where(body.using-mouse) .bot-handle:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bot-active {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

.profile-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: var(--settings-row-height);
    padding: 12px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    color: var(--text);
    text-decoration: none;
}

.profile-link > span:not(.settings-icon) {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 4px;
}

.profile-link strong {
    font-size: var(--type-setting);
    font-weight: 650;
    line-height: 1.35;
}

.profile-link small {
    display: block;
    color: var(--muted);
    font-size: var(--type-meta);
    font-weight: 400;
    line-height: 1.5;
}

.profile-link > .setting-value {
    flex: none;
    max-width: 30%;
    text-align: right;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.profile-link + .profile-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 72px;
    right: 16px;
    height: 1px;
    background: var(--line);
}

:where(body.using-mouse) .profile-link:hover {
    background: var(--hover);
}

#profile-view, #settings-view {
    max-width: 680px;
}

#profile-view .settings-section {
    margin-top: 16px;
}

#profile-view .settings-group {
    overflow: hidden;
}

body.using-keyboard .profile-link:focus-visible {
    outline-offset: -3px;
}

#settings-view .settings-section {
    margin-top: 0;
    max-width: none;
}

#settings-view .setting-row .button {
    max-width: 48%;
    padding-inline: 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--accent);
    font-size: 16px;
    font-weight: 400;
    white-space: normal;
    text-align: right;
}

#settings-view .setting-row .danger {
    color: var(--danger);
}

.settings-note {
    margin: 0;
    padding: 12px 16px 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.settings-icon {
    --tile-color: var(--tile-blue);
    display: grid;
    place-items: center;
    flex: none;
    width: var(--settings-icon-size);
    height: var(--settings-icon-size);
    border-radius: var(--settings-icon-radius);
    background: color-mix(in srgb, var(--tile-color) 18%, var(--surface));
    box-shadow: var(--shadow-soft);
    color: color-mix(in srgb, var(--tile-color) 42%, white);
}

.settings-icon .icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
}

.settings-icon[data-tone="blue"] {
    --tile-color: var(--tile-blue);
}

.settings-icon[data-tone="orange"] {
    --tile-color: var(--tile-orange);
}

.settings-icon[data-tone="green"] {
    --tile-color: var(--tile-green);
}

.settings-icon[data-tone="violet"] {
    --tile-color: var(--tile-violet);
}

.settings-icon[data-tone="cyan"] {
    --tile-color: var(--tile-cyan);
}

.settings-icon[data-tone="red"] {
    --tile-color: var(--tile-red);
}

.setting-row > .row-icon {
    width: 36px;
    height: 36px;
    padding: 8px;
    flex: none;
    color: var(--muted);
    background: var(--canvas);
    border-radius: var(--radius-artwork);
    box-shadow: var(--shadow-inset);
}

.setting-row > div, .setting-row > label {
    flex: 1;
}

.notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--raised);
    border-radius: 8px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 13px;
}

.queue-rail {
    min-width: 0;
    min-height: 0;
    padding: 20px 16px;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
}

.queue-heading {
    margin-bottom: 20px;
}

.queue-heading h2 {
    font-size: var(--type-section);
    margin: 0;
    color: var(--text);
}

.queue-group:not([hidden]) + .queue-group {
    margin-top: 20px;
}

.queue-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--section-heading);
}

.queue-next-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
}

.queue-next-heading .text-button {
    font-weight: 400;
}

.queue-rail .track-row {
    gap: 12px;
    padding: 8px 0;
}

.queue-rail .track-duration {
    display: block;
    font-size: 12px;
}

.queue-rail .track-art {
    width: var(--track-artwork-size);
    height: var(--track-artwork-size);
}

#queue-current {
    margin-top: 8px;
}

#queue-current .current {
    background: var(--selection);
    box-shadow: var(--shadow-inset);
    padding-inline: 8px;
}

#queue-tracks .track-row + .track-row {
    position: relative;
}

#queue-tracks .track-row + .track-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 56px;
    right: 0;
    height: 1px;
    background: var(--line);
}

.queue-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 72px;
    margin-top: 16px;
    padding: 12px;
    border: 0;
    border-radius: 14px;
    background: var(--control);
    box-shadow: var(--shadow-control);
    color: var(--text);
    text-align: left;
}

.queue-add-symbol {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
    color: var(--accent);
    border-radius: 12px;
}

.queue-search > span:nth-child(2) {
    display: grid;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.queue-search strong {
    font-size: var(--type-setting);
    font-weight: 650;
}

.queue-search small {
    color: var(--muted);
    font-size: var(--type-caption);
}

.queue-add-arrow {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

:where(body.using-mouse) .queue-search:hover {
    background: var(--hover);
}

.queue-search:active {
    box-shadow: var(--shadow-pressed);
}

.queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 8px;
    text-align: center;
}

.queue-empty-icon {
    display: grid;
    place-items: center;
    width: var(--empty-icon-size);
    height: var(--empty-icon-size);
    margin-bottom: 8px;
    background: var(--raised);
    color: var(--accent);
    border-radius: var(--radius);
}

.queue-empty-icon .icon {
    width: 32px;
    height: 32px;
}

.queue-empty h3 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
}

.queue-empty p {
    max-width: 25ch;
    font-size: 14px;
    line-height: 1.5;
}

.queue-empty .button {
    margin-top: 8px;
}

#queue-current .track-copy strong {
    color: var(--text);
}

.player:not(.is-expanded) {
    cursor: pointer;
}

body[data-playback="idle"] .player:not(.is-expanded) {
    display: none;
}

@media (min-width: 700px) {
    body[data-playback="idle"] {
        --footer-height: 0px;
    }
}

.mini-player-progress {
    display: none;
}

.player {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 6px 24px;
    padding: 14px 24px;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
    border-radius: var(--radius);
    z-index: 5;
}

.player-track {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.player-artwork-stage {
    display: contents;
}

.player-artwork {
    width: 56px;
    height: 56px;
    flex: none;
    background: var(--raised);
    padding: 0;
    border-radius: var(--radius-artwork);
    overflow: hidden;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 450ms cubic-bezier(.25, 1, .5, 1), box-shadow 450ms cubic-bezier(.25, 1, .5, 1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.player-artwork img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player[data-playback="playing"] .player-artwork {
    transform: scale(1.05);
}

.player[data-playback="playing"]:not(.is-expanded) .player-artwork {
    box-shadow: 0 6px 16px rgb(0 0 0 / 20%), var(--shadow-surface);
}

.player[data-playback="paused"] .player-artwork,
.player[data-playback="idle"] .player-artwork {
    transform: scale(1);
}

.player-track-copy {
    min-width: 0;
    flex: 1;
    position: relative;
}

.player-title-button {
    background: transparent;
    padding: 0;
    text-align: left;
    width: 100%;
    min-height: var(--control-size);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-radius: 4px;
}

.player-track-copy strong {
    display: block;
    max-width: 100%;
    font-size: var(--type-track);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 600;
}

:is(.player-track-copy > span, .player-title-button > span) {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--muted);
    font-size: var(--type-small);
    margin-top: 2px;
}

#player-status:not(:empty) {
    color: var(--accent);
}

.player-save-button {
    display: none;
}

.player-controls {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
}

.transport {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transport .icon-button {
    width: var(--control-size);
    height: var(--control-size);
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

.transport [aria-pressed="true"] {
    color: var(--accent);
}

.play-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--accent-text);
}

.play-button:disabled {
    background: var(--raised);
    color: var(--muted);
    opacity: 1;
    box-shadow: none;
}

.player[data-buffering="true"] .play-button::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: buffering-fade 200ms ease-out, buffering 800ms linear infinite;
}

.player[data-buffering="true"] .play-button .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke-width: 1;
}

@keyframes buffering {
    to {
        transform: rotate(360deg);
    }
}

@keyframes buffering-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player[data-buffering="true"] .play-button::after {
        animation: none;
        border-right-color: currentColor;
    }
}

.play-button .icon {
    width: 19px;
    height: 19px;
}

.progress {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    font-size: var(--type-small);
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.progress > span {
    min-width: 30px;
}

.progress > span:last-child {
    text-align: right;
}

input[type="range"] {
    --fill: 0%;
    --range-fill: linear-gradient(to right, var(--accent) var(--fill), var(--range-track) var(--fill));
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    height: var(--control-size);
    border-radius: var(--radius-control);
    background: transparent;
    cursor: pointer;
    margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: var(--radius-control);
    background: var(--range-fill);
    box-shadow: var(--shadow-inset);
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: var(--radius-control);
    background: var(--range-fill);
    box-shadow: var(--shadow-inset);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -7px;
    background: var(--control);
    border: 1px solid var(--control-edge);
    border-radius: 50%;
    box-shadow: var(--shadow-control);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--control);
    border: 1px solid var(--control-edge);
    border-radius: 50%;
    box-shadow: var(--shadow-control);
}

input[type="range"]:active:enabled::-webkit-slider-thumb {
    border-color: var(--accent);
    box-shadow: var(--shadow-pressed);
}

input[type="range"]:active:enabled::-moz-range-thumb {
    border-color: var(--accent);
    box-shadow: var(--shadow-pressed);
}

.progress input {
    flex: 1;
    margin-block: -8px;
}

.player-extras {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    color: var(--muted);
}

.player-extras input {
    width: 80px;
    --fill: 100%;
}

.expanded-player-header {
    display: none;
}

/* A separate fixed layer keeps artwork behind native safe areas and scrolling controls. */
.player-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 19;
    overflow: hidden;
    pointer-events: none;
    background-color: #242731;
    transition: background-color 700ms ease;
}

.player-atmosphere .player-backdrop {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .18;
    filter: blur(56px) saturate(1.25) brightness(.65);
    transform: scale(1.14);
}

.player-atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(8 10 17 / 10%) 8%, rgb(8 10 17 / 22%) 42%, rgb(8 10 17 / 84%) 100%);
}

body:has(.player.is-expanded.has-lyrics) .player-atmosphere::after {
    background: linear-gradient(to bottom, rgb(255 255 255 / 4%) 0%, rgb(8 10 17 / 40%) 46%, rgb(5 7 12 / 96%) 100%);
}

.track-actions-menu {
    position: fixed;
    width: min(280px, calc(100vw - 24px));
    max-height: calc(var(--usable-height) - 24px);
    overflow-y: auto;
    left: var(--track-menu-left, 50%);
    top: var(--track-menu-top, auto);
    bottom: var(--track-menu-bottom, calc(var(--app-bottom) + var(--footer-height) + 12px));
    margin: 0;
    padding: 8px;
    transform: var(--track-menu-transform, translateX(-50%));
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.track-actions-menu::backdrop {
    background: var(--overlay);
    backdrop-filter: blur(5px);
}

.track-actions-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: var(--type-label);
}

.track-actions-menu button[hidden] {
    display: none;
}

.track-actions-menu button:hover:enabled, .track-actions-menu button:focus-visible {
    background: var(--selection);
    color: var(--accent);
}

.track-actions-menu button .icon {
    width: 20px;
    height: 20px;
}

.lyrics-stage {
    --lyric-size: 30px;
    position: relative;
    width: 100%;
    min-height: 120px;
    height: 100%;
    background-color: var(--player-palette, #242731);
    background-image: linear-gradient(180deg, rgb(255 255 255 / 12%), rgb(11 13 20 / 32%) 43%, rgb(7 8 13 / 92%));
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: var(--radius);
    box-shadow: inset 0 1px rgb(255 255 255 / 12%), 0 16px 36px rgb(0 0 0 / 16%);
    transition: background-color 700ms ease;
}

body.using-keyboard .lyrics-stage:focus-within {
    outline: 2px solid #79c5ff;
    outline-offset: 4px;
}

.lyrics-panel {
    position: absolute;
    inset: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: rgb(255 255 255 / 22%) transparent;
    padding-inline: 18px;
    border-radius: var(--radius-control);
}

.lyrics-panel:focus-visible {
    outline: none;
}

.lyrics-panel[data-state="synced"] {
    mask-image: linear-gradient(transparent, black 32px, black calc(100% - 32px), transparent);
}

.lyrics-panel:not([data-state="synced"]):not([data-state="plain"]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.lyrics-status {
    color: #f3f5f9;
    line-height: 1.5;
    max-width: 36ch;
}

.lyrics-panel[data-state="plain"] .lyrics-status {
    padding-top: 24px;
    font-size: 13px;
}

.lyrics-lines {
    padding-block: 24px;
}

.lyrics-lines:empty {
    display: none;
}

.lyric-line {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 18px;
    border-radius: 14px;
    background: transparent;
    color: #e5eaf4;
    text-align: left;
    font-size: var(--lyric-size);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
    opacity: .7;
    transition: color 180ms ease-out, opacity 180ms ease-out;
}

.lyric-line > span {
    display: block;
    transform: scale(.84);
    transform-origin: left center;
    transition: transform 220ms ease-out;
}

.lyric-line.is-near {
    opacity: .85;
}

.lyric-line.is-near > span {
    transform: scale(.92);
}

.lyric-line.is-current {
    color: #f3f5f9;
    opacity: 1;
    text-shadow: 0 2px 16px rgb(0 0 0 / 22%);
}

.lyric-line.is-current > span, .lyrics-panel[data-state="plain"] .lyric-line > span {
    transform: none;
}

.lyrics-panel[data-state="plain"] .lyric-line {
    color: #f3f5f9;
    opacity: .9;
}

.player.is-expanded.has-lyrics .lyric-line.is-current,
:where(body.using-mouse) .player.is-expanded.has-lyrics button.lyric-line:hover:enabled {
    color: #f3f5f9;
}

button.lyric-line:disabled {
    opacity: .7;
}

button.lyric-line.is-near:disabled {
    opacity: .85;
}

button.lyric-line.is-current:disabled {
    opacity: 1;
}

:where(body.using-mouse) button.lyric-line:hover:enabled {
    color: #f3f5f9;
    opacity: 1;
}

.player.is-expanded.has-lyrics .player-track {
    display: none;
}

.player.is-expanded {
    border-radius: 0;
    box-shadow: none;
    position: fixed;
    inset: var(--viewport-top) 0 var(--viewport-bottom);
    height: var(--viewport-height);
    animation: player-reveal 220ms cubic-bezier(.16, 1, .3, 1);
    display: grid;
    grid-template-columns: minmax(0, 420px);
    grid-template-rows: 44px minmax(220px, 1fr) 58px 72px 44px 44px;
    justify-content: center;
    padding: calc(var(--safe-top) + 20px) calc(var(--safe-right) + 24px) calc(var(--safe-bottom) + 20px) calc(var(--safe-left) + 24px);
    gap: clamp(12px, 2vh, 20px);
    border: 0;
    background: transparent;
    color: var(--text);
    z-index: 20;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.player.is-expanded.has-lyrics {
    grid-template-columns: minmax(0, 640px);
    grid-template-rows: 44px minmax(120px, 1fr) 58px 72px 44px;
}

.player.is-expanded.has-lyrics .expanded-player-header {
    grid-row: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.player.is-expanded .expanded-player-header {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
}

.player-header-label {
    color: #f3f5f9;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
}

.player-browser-back {
    display: none;
}

.player.is-expanded .player-browser-back:not([hidden]) {
    position: absolute;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 22px;
    background: rgb(255 255 255 / 9%);
    color: #f3f5f9;
    box-shadow: 0 3px 12px rgb(0 0 0 / 16%), inset 0 1px rgb(255 255 255 / 12%);
    font-size: 13px;
    font-weight: 600;
}

.player-browser-back .icon {
    width: 18px;
    height: 18px;
}

.player.is-expanded.has-lyrics :is(.player-browser-back, .player-header-label) {
    display: none;
}

.player-heading {
    max-width: calc(100% - 96px);
    text-align: center;
    min-width: 0;
}

.player-heading strong, .player-heading span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.player-heading strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.player-heading span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2px;
}

.expanded-player-header .lyrics-back {
    position: absolute;
    left: 0;
    width: 44px;
    height: 44px;
    color: #f3f5f9;
    background: transparent;
    box-shadow: none;
}

.lyrics-back[hidden] {
    display: none;
}

.player.is-expanded .player-track {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.player.is-expanded .player-artwork-stage {
    grid-row: 1;
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    align-self: stretch;
    justify-self: stretch;
    container-type: size;
    min-height: 0;
    min-width: 0;
}

.player.is-expanded .player-artwork {
    width: min(100cqw, 100cqh, 420px);
    height: auto;
    aspect-ratio: 1;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgb(0 0 0 / 24%);
}

.player.is-expanded .player-track-copy {
    grid-row: 2;
    grid-column: 1;
}

.player.is-expanded .player-track-copy strong {
    font-size: var(--type-player);
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    letter-spacing: -.025em;
}

.player.is-expanded :is(#player-artist, .progress, .player-extras) {
    color: var(--text);
}

.player.is-expanded :is(.player-track-copy > span, .player-title-button > span) {
    font-size: var(--type-label);
    line-height: 1.4;
    margin-top: var(--space-2);
}

.player.is-expanded :is(#player-status, #player-artist):empty {
    display: none;
}

.player.is-expanded #player-status:not(:empty) {
    font-size: 13px;
}

.player.is-expanded .player-save-button {
    display: inline-flex;
    width: 44px;
    height: 44px;
    grid-row: 2;
    align-self: center;
    color: var(--muted);
    background: var(--control);
    box-shadow: var(--shadow-soft);
}

.player.is-expanded .player-save-button {
    grid-column: 2;
}

.player.is-expanded .player-save-button .icon {
    width: 19px;
    height: 19px;
}

.player.is-expanded .lyrics-stage {
    grid-row: 2;
}

.player.is-expanded .player-controls {
    grid-row: 4;
    grid-column: 1;
    width: 100%;
}

.player.is-expanded .transport {
    width: 100%;
    justify-content: space-evenly;
    gap: 16px;
}

.player.is-expanded .transport .icon-button {
    width: 56px;
    height: 56px;
}

.player.is-expanded .play-button {
    width: 72px;
    height: 72px;
    flex: none;
}

.player.is-expanded .play-button .icon {
    width: 30px;
    height: 30px;
}

.player.is-expanded .progress {
    grid-row: 3;
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 44px 14px;
    width: 100%;
    gap: 0;
    font-size: 12px;
    font-weight: 500;
}

.player.is-expanded .progress input {
    grid-row: 1;
    grid-column: 1 / -1;
    height: 44px;
    margin-block: 0;
}

.player.is-expanded .progress > span {
    grid-row: 2;
    grid-column: 1;
}

.player.is-expanded .progress > span:last-child {
    grid-column: 2;
}

.player.is-expanded .player-extras {
    grid-row: 5;
    grid-column: 1;
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
}

.player.is-expanded .player-extras input {
    width: auto;
    flex: 1;
    max-width: 240px;
}

.player.is-expanded #player-view-button, .player:not(.is-expanded) #player-sleep-button {
    display: none;
}

.player-shortcuts {
    display: none;
}

.player.is-expanded .player-shortcuts {
    grid-row: 6;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.player.is-expanded .player-shortcuts .icon-button {
    width: 44px;
    height: 44px;
    background: transparent;
    box-shadow: none;
    color: #f3f5f9;
}

.player.is-expanded .player-shortcuts .icon {
    width: 21px;
    height: 21px;
}

body.using-keyboard .player.is-expanded .player-shortcuts .icon-button:focus-visible {
    outline-color: #79c5ff;
}

:where(body.using-mouse) .player.is-expanded .player-shortcuts .icon-button:hover:enabled {
    background: rgb(255 255 255 / 10%);
}

.player.is-expanded .player-shortcuts .icon-button:active:enabled {
    background: rgb(255 255 255 / 14%);
}

.player.is-expanded.has-lyrics .player-shortcuts {
    display: none;
}

.player.is-expanded.has-lyrics .progress {
    grid-row: 3;
}

.player.is-expanded.has-lyrics .player-controls {
    grid-row: 4;
}

.player.is-expanded.has-lyrics .player-extras {
    grid-row: 5;
}

@keyframes player-reveal {
    from {
        clip-path: inset(5% 0 0 round 12px);
    }
    to {
        clip-path: inset(0);
    }
}

.mobile-nav {
    display: none;
}

.listen-banner {
    position: fixed;
    left: calc(212px + 28px + var(--safe-left));
    bottom: calc(var(--app-bottom) + var(--footer-height) + 16px);
    max-width: calc(100vw - 270px - var(--safe-left) - var(--safe-right));
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    border-radius: 14px;
    z-index: 25;
}

.listen-banner > .icon {
    color: var(--accent);
    flex: none;
}

.listen-banner-copy {
    flex: 1;
    min-width: 0;
}

.listen-banner .button {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
}

.listen-banner .button .icon {
    width: 16px;
    height: 16px;
}

.listen-banner strong {
    display: block;
}

.listen-banner strong {
    font-size: 13px;
}

.conversation-panel {
    position: fixed;
    width: 360px;
    right: calc(20px + var(--safe-right));
    bottom: calc(var(--app-bottom) + var(--footer-height) + 16px);
    max-height: min(600px, calc(var(--usable-height) - var(--header-height) - var(--footer-height) - 32px));
    background: var(--surface);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    z-index: 40;
    overflow: hidden;
}

.panel-header {
    min-height: 64px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    flex: none;
}

.panel-header > div:first-of-type {
    min-width: 0;
    flex: 1;
}

.panel-back {
    color: var(--text);
    background: transparent;
}

.panel-header h2 {
    font-size: 18px;
}

.panel-header p {
    font-size: var(--type-meta);
    margin-top: 4px;
}

.chat-panel {
    height: 500px;
    container-type: size;
}

.chat-messages {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding: 16px;
    overscroll-behavior: contain;
}

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    padding-right: 24px;
}

.chat-message.self {
    justify-content: flex-end;
    padding-right: 0;
    padding-left: 36px;
}

.message-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    flex: none;
    margin-bottom: 2px;
}

.chat-bubble {
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px 7px;
    background: var(--raised);
    border-radius: 16px 16px 16px 5px;
}

.chat-sender {
    display: block;
    font-size: var(--type-small);
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 4px;
}

.chat-bubble p {
    color: var(--text);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.5;
}

.chat-bubble time {
    display: block;
    text-align: right;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.chat-message.self .chat-bubble {
    background: var(--message-self);
    border-radius: 16px 16px 4px 16px;
}

.chat-message.self time {
    color: var(--text);
    opacity: .75;
}

.chat-form {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 12px;
    flex: none;
    border-top: 1px solid var(--line);
}

.composer-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.chat-composer {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--raised);
    border-radius: 16px;
}

.chat-composer:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chat-form input {
    min-width: 0;
    width: 100%;
    padding: 12px 8px;
    border: 0;
    background: transparent;
    color: var(--text);
}

/* The rounded composer owns input focus; override the global keyboard ring. */
#chat-input:focus-visible {
    outline: none;
}

#chat-send {
    flex: none;
    background: var(--action);
    color: var(--accent-text);
    border-radius: 12px;
}

#chat-send:disabled {
    background: transparent;
    color: var(--muted);
}

:where(body.using-mouse) #chat-send:not(:disabled):hover {
    filter: brightness(1.08);
}

.chat-form > span {
    grid-column: 2 / -1;
    font-size: 12px;
    color: var(--muted);
}

/* Keep the composer and close action visible when the keyboard leaves a short panel. */
@container (max-height: 240px) {
    .chat-panel .panel-header {
        padding: 4px 12px;
    }

    .chat-panel .chat-messages {
        padding: 0 16px;
    }

    .chat-panel .chat-form {
        padding: 8px 12px;
    }

    .chat-panel .chat-composer {
        padding: 0;
    }

    .chat-panel .chat-form input {
        padding: 10px 8px;
    }
}

.panel-actions {
    display: flex;
    gap: 4px;
    flex: none;
}

.voice-settings-button[aria-expanded="true"] {
    background: var(--raised);
    color: var(--accent);
}

.panel-header > div:first-child {
    min-width: 0;
}

.voice-settings {
    min-height: 0;
    padding: 8px 16px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex: 0 1 auto;
    overflow-y: auto;
}

.voice-setting-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.voice-setting-row + .voice-setting-row {
    border-top: 1px solid var(--line);
}

.voice-setting-row strong {
    display: block;
}

.voice-setting-row label {
    display: flex;
    align-items: center;
    min-height: var(--control-size);
}

.voice-setting-row strong {
    font-size: var(--type-body);
    font-weight: 400;
}

.voice-policy-button {
    min-height: 44px;
    max-width: 156px;
    padding: 8px;
    color: var(--accent);
    font-size: var(--type-body);
    font-weight: 400;
    white-space: normal;
    text-align: right;
    line-height: 1.35;
}

.voice-settings-note {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--raised);
    color: var(--muted);
    font-size: 12px;
}

.listeners-panel {
    background: var(--canvas);
}

.listeners-panel .listeners-header {
    min-height: var(--header-height);
    justify-content: flex-start;
    padding: 8px 16px;
    gap: 12px;
    border-bottom: 0;
}

.listeners-header h2 {
    font-size: var(--type-nav);
    font-weight: 500;
    letter-spacing: 0;
}

.listeners-header .browser-back {
    margin-left: -4px;
    color: var(--accent);
}

.listeners-content {
    min-height: 0;
    margin: 0 16px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border-radius: var(--radius);
}

#listeners-summary {
    padding: 16px 20px 4px;
    color: var(--section-heading);
    font-size: var(--type-meta);
    font-weight: 500;
}

.listeners-panel .participant-list {
    padding: 0 12px 12px;
    gap: 0;
}

.listeners-panel .participant {
    position: relative;
    min-height: 64px;
    border-radius: 0;
}

.listeners-panel .participant + .participant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 58px;
    right: 8px;
    height: 1px;
    background: var(--line);
}

.listeners-panel .participant strong {
    font-weight: 500;
}

.listener-count {
    min-height: var(--control-size);
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: inherit;
    color: inherit;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

:where(body.using-mouse) .listener-count:hover {
    color: var(--accent);
    background: var(--raised);
}

.select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    padding: 0;
    margin: -1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.choice-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: none;
    min-height: 44px;
    min-width: 88px;
    max-width: 46%;
    padding: 10px 12px;
    background: var(--control);
    box-shadow: var(--shadow-control);
    color: var(--accent);
    border-radius: var(--radius-control);
    text-align: left;
    font-size: var(--type-label);
    font-weight: 600;
}

.choice-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:where(body.using-mouse) .choice-trigger:hover:enabled {
    color: var(--text);
}

.participant-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.voice-panel .participant-list {
    overflow-y: auto;
    padding: 16px;
    min-height: 0;
    flex: 1;
}

.participant {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px;
    border-radius: 8px;
}

.participant > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.participant strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.participant p {
    font-size: var(--type-meta);
}

.participant .avatar {
    width: 38px;
    height: 38px;
}

.participant.is-speaking .avatar {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.participant.is-speaking p {
    color: var(--accent);
}

.voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 8px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    flex: none;
}

.voice-mini {
    position: fixed;
    right: calc(20px + var(--safe-right));
    bottom: calc(var(--app-bottom) + var(--footer-height) + 16px);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--raised);
    box-shadow: var(--shadow);
    border-radius: 28px;
    z-index: 30;
}

dialog {
    background: var(--surface);
    color: var(--text);
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: min(440px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
    padding: 28px;
    overflow: visible;
    top: calc(var(--app-top) + 16px);
    bottom: calc(var(--app-bottom) + 16px);
    left: var(--safe-left);
    right: var(--safe-right);
    max-height: max(0px, calc(var(--usable-height) - 32px));
}

#dialog-form {
    max-height: max(0px, calc(var(--usable-height) - 88px));
    overflow-y: auto;
}

dialog::backdrop {
    background: var(--overlay);
}

dialog p {
    margin: 12px 0 20px;
    max-height: 25dvh;
    overflow-y: auto;
}

dialog p:empty {
    display: none;
}

.write-access-notice {
    width: min(460px, calc(100vw - 48px - var(--safe-left) - var(--safe-right)));
    max-width: none;
    padding: 32px;
    border-radius: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: center;
    box-shadow: var(--shadow-surface);
}

.write-access-symbol {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    color: var(--accent);
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-control);
}

.write-access-symbol .icon {
    width: 36px;
    height: 36px;
}

.write-access-notice h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.write-access-notice p {
    max-height: none;
    overflow: visible;
}

#write-access-description {
    margin: 12px 0 24px;
    color: var(--muted);
    font-size: var(--type-setting);
    line-height: 1.6;
    text-wrap: pretty;
}

.write-access-benefits {
    display: grid;
    gap: 20px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.write-access-benefits li {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: var(--type-label);
    line-height: 1.5;
}

.write-access-benefits .icon {
    flex: none;
    color: var(--accent);
}

.write-access-notice .primary {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
    padding-inline: 20px;
    border-radius: var(--radius-control);
}

.write-access-notice .primary[aria-busy="true"] [data-write-access-label] {
    display: none;
}

.write-access-notice .primary[aria-busy="true"]::before {
    content: 'Requesting access…';
}

.write-access-notice .text-button {
    display: block;
    min-height: 44px;
    margin: 8px auto 0;
}

.write-access-notice .write-access-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: var(--type-caption);
    line-height: 1.5;
}

#write-access-status {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: var(--type-meta);
    line-height: 1.5;
}

@media (max-width: 699px) {
    .write-access-notice {
        top: auto;
        bottom: var(--app-bottom);
        width: calc(100vw - var(--safe-left) - var(--safe-right));
        max-height: var(--usable-height);
        margin: 0 auto;
        padding: 28px 24px 20px;
        border-radius: 24px 24px 0 0;
    }

    .write-access-symbol {
        width: 80px;
        height: 80px;
    }
}

@media (max-height: 600px) {
    .write-access-notice {
        padding: 20px 24px;
    }

    .write-access-symbol {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .write-access-symbol .icon {
        width: 28px;
        height: 28px;
    }

    .write-access-benefits {
        gap: 12px;
        margin-bottom: 20px;
    }
}

@media (forced-colors: active) {
    .write-access-notice, .write-access-symbol {
        border: 1px solid CanvasText;
    }
}

dialog label {
    margin-top: 20px;
    display: block;
    font-size: var(--type-small);
    color: var(--muted);
    margin-bottom: 8px;
}

#dialog-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: transparent;
}

dialog input, dialog select {
    width: 100%;
}

dialog .choice-trigger {
    width: 100%;
    max-width: none;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.toast {
    position: fixed;
    inset: auto auto calc(var(--app-bottom) + 16px) 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: min(240px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
    max-width: min(480px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
    min-height: 52px;
    max-height: min(30dvh, 240px);
    margin: 0;
    z-index: 100;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 28px;
    background: #285d83;
    color: #fff;
    box-shadow: var(--shadow-toast), inset 0 1px rgb(255 255 255 / 15%);
    font-size: var(--type-label);
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    overflow-y: auto;
    pointer-events: none;
    animation: toast-reveal 180ms ease-out;
    transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.toast::backdrop {
    display: none;
}

.toast[data-tone="success"] {
    background: #236548;
}

.toast[data-tone="warning"] {
    background: #8a5715;
}

.toast[data-tone="error"] {
    background: #b94450;
}

.toast > .icon {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.toast > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.toast.is-leaving {
    opacity: 0;
    transform: translate(-50%, 6px);
}

@keyframes toast-reveal {
    from {
        opacity: 0;
        transform: translate(-50%, 6px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        transition: none;
    }
}

.session-blocked > :not(#session-notice):not(script):not(noscript) {
    visibility: hidden;
}

.session-notice {
    position: fixed;
    inset: var(--app-top) var(--safe-right) var(--app-bottom) var(--safe-left);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ambient), var(--canvas);
    padding: clamp(24px, 4vw, 56px);
    z-index: 90;
}

.session-frame {
    width: min(100%, 1100px);
    min-height: 100%;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
}

.session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.session-header .brand {
    display: flex;
    min-width: 0;
    font-size: 22px;
}

.session-header .brand > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-header .bot-brand {
    flex: 1;
    gap: 10px;
}

.bot-brand .bot-avatar {
    width: 36px;
    height: 36px;
}

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

.bot-brand-copy > strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-brand .bot-active {
    font-size: 11px;
    white-space: normal;
}

.session-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    text-align: end;
}

.session-status::before {
    content: '';
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.session-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 48%;
}

.session-avatar {
    width: 40px;
    height: 40px;
}

.session-avatar > #session-profile-photo {
    width: 100%;
    height: 100%;
}

.session-profile-copy {
    min-width: 0;
}

.session-profile-copy strong, .session-profile-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-profile-copy strong {
    font-size: 14px;
    font-weight: 600;
}

.session-profile-copy span {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.session-notice.is-entry .session-status {
    display: none;
}

.session-notice[data-state="connecting"] .session-status {
    display: inline-flex;
}

.session-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    padding-block: 64px;
}

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

.session-copy h1 {
    margin: 0 0 24px;
    font-size: clamp(36px, 4.5vw, 60px);
    line-height: 1.08;
    letter-spacing: -.03em;
    font-weight: 600;
    white-space: pre-line;
    text-wrap: balance;
    outline: none;
}

.session-copy h1:focus-visible {
    outline: none;
}

.session-notice.is-entry .session-copy h1 {
    font-size: clamp(36px, 4.2vw, 54px);
    line-height: 1.1;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
    margin-bottom: 20px;
}

.session-intro > p {
    font-size: 16px;
    line-height: 1.65;
    max-width: 42ch;
    color: var(--muted);
    margin: 0;
    overflow-wrap: anywhere;
}

.session-steps {
    list-style: none;
    counter-reset: session-step;
    padding: 24px 0 0;
    margin: 28px 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 16px;
}

.session-steps li {
    counter-increment: session-step;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    font-size: 14px;
    line-height: 1.55;
}

.session-steps li::before {
    content: counter(session-step);
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.session-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.session-actions .button {
    min-height: 56px;
    padding: 14px 20px;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: normal;
    text-align: left;
}

.session-actions .button .icon {
    width: 20px;
    height: 20px;
}

.session-action-arrow {
    margin-left: auto;
}

.session-notice.is-entry .session-actions {
    max-width: 350px;
    gap: 12px;
}

.session-notice.is-entry .session-actions .button {
    width: 100%;
}

.session-audio-note {
    flex-basis: 100%;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.session-notice.is-entry .session-actions .text-button {
    margin-inline: auto;
    font-size: 13px;
    min-height: 44px;
}

.session-actions:has(> [hidden]:first-child):has(> [hidden]:last-child) {
    display: none;
}

.session-copy > .session-hint {
    margin-top: 20px;
    font-size: 14px;
}

.session-track, .session-empty {
    min-width: 0;
}

.session-track > strong, .session-empty > strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -.02em;
}

.session-track > p, .session-empty > p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.session-track-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--muted);
}

.session-track-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    flex: none;
}

.session-track[data-playing="true"] .session-track-status {
    color: var(--accent);
}

.session-track[data-playing="true"] .session-track-status::before {
    background: currentColor;
}

.session-art {
    min-width: 0;
}

.session-notice.is-entry .session-art {
    width: 100%;
    max-width: 368px;
    justify-self: center;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--shadow-surface);
}

.session-sleeve {
    min-width: 0;
}

.session-notice.is-entry .session-sleeve {
    margin-bottom: 20px;
}

.session-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-control);
    background: var(--raised);
    box-shadow: var(--shadow-control);
    overflow: hidden;
}

.session-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.session-record {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
}

.record-surface {
    fill: var(--surface);
    stroke: var(--line);
}

.record-grooves {
    stroke: var(--line);
    stroke-width: 1;
}

.record-arc {
    stroke: var(--accent);
    stroke-width: 2;
}

.record-label {
    fill: var(--raised);
}

.record-lock {
    stroke: var(--accent);
    stroke-width: 2.5;
}

.record-play {
    display: none;
    fill: var(--accent);
}

.session-notice.is-entry .record-play {
    display: block;
}

.session-notice.is-entry .record-lock, .session-notice.is-entry .session-art-caption {
    display: none;
}

.session-art-caption {
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
    margin: 20px 0 0;
}

.session-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 699px) {
    .session-notice {
        padding: 12px 24px 24px;
    }

    .session-header {
        gap: 16px;
    }

    .session-header .brand {
        font-size: 20px;
    }

    .session-profile {
        gap: 8px;
    }

    .session-avatar {
        width: 34px;
        height: 34px;
    }

    .session-status {
        max-width: 130px;
    }

    .session-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-block: 40px;
    }

    .session-art {
        grid-row: 1;
    }

    .session-record {
        width: min(44vw, 168px);
    }

    .session-notice.is-entry .session-layout {
        flex: none;
        align-content: start;
        gap: 24px;
        padding-block: 32px;
    }

    .session-footer {
        margin-top: auto;
    }

    .session-notice.is-entry .session-copy {
        display: contents;
    }

    .session-notice.is-entry .session-intro {
        grid-row: 1;
    }

    .session-notice.is-entry .session-copy h1 {
        font-size: clamp(30px, 8.6vw, 36px);
        line-height: 1.12;
        margin-bottom: 16px;
    }

    .session-notice.is-entry .session-intro > p {
        font-size: 15px;
        line-height: 1.6;
    }

    .session-notice.is-entry .session-art {
        grid-row: 2;
        max-width: none;
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: center;
        gap: 16px;
        padding: 16px;
    }

    .session-notice.is-entry .session-sleeve {
        margin: 0;
    }

    .session-notice.is-entry .session-record {
        width: 100%;
    }

    .session-track > strong, .session-empty > strong {
        font-size: 17px;
    }

    .session-track > p, .session-empty > p {
        font-size: 13px;
    }

    .session-track-status {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 8px;
    }

    .session-notice.is-entry .session-actions {
        grid-row: 3;
        max-width: none;
        margin: 0;
    }

    .session-notice.is-entry .session-actions .button {
        flex-basis: 100%;
    }

    .session-art-caption {
        display: none;
    }

    .session-copy h1 {
        font-size: clamp(30px, 8vw, 36px);
        margin-bottom: var(--space-4);
    }

    .session-steps {
        margin-top: 24px;
        padding-top: 20px;
        gap: 12px;
    }

    .session-actions {
        margin-top: 28px;
    }

    .session-actions .button {
        flex: 1;
    }
}

@media (max-height: 700px) and (max-width: 699px) {
    .session-layout {
        padding-block: 28px;
        gap: 24px;
    }

    .session-record {
        width: 96px;
    }

    .session-notice.is-entry .session-layout {
        padding-block: 24px;
        gap: 20px;
    }
}

@media (max-width: 359px) {
    .session-notice {
        padding-inline: 20px;
    }

    .session-notice.is-entry .session-art {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .session-profile {
        max-width: 44%;
    }
}

/* Tablet: compact navigation, queue becomes a workspace. */
@media (max-width: 1099px) {
    .app-shell {
        grid-template-columns: 182px minmax(0, 1fr);
    }

    .topbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .primary-nav .tablet-queue {
        display: flex;
    }

    .queue-rail {
        border: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .queue-rail .track-duration {
        display: block;
    }

    #queue-mount .queue-rail {
        padding: 0;
        background: transparent;
        overflow: visible;
    }

    #queue-mount .queue-group {
        padding: 12px 16px;
        background: var(--surface);
        border-radius: var(--radius);
    }

    #queue-mount .queue-group:not([hidden]) + .queue-group {
        margin-top: 16px;
    }

    #queue-mount .queue-group > .queue-section-title {
        padding-top: 8px;
    }

    #queue-mount .queue-empty {
        padding-block: 48px;
    }

    #queue-mount .queue-heading h2 {
        font-size: var(--type-page);
        font-weight: 600;
        color: var(--text);
    }

    .player {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr) auto;
        gap: 6px 16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .player-extras input {
        width: 60px;
    }

    .listen-banner {
        left: 202px;
    }

    .room-presence {
        font-size: 12px;
    }
}

/* Phone: workspace, compact persistent player, bottom navigation. */
@media (max-width: 699px) {
    :root {
        --shell-padding: 0px;
        --shell-gap: 0px;
        --page-padding: 16px;
        --mobile-player-height: 84px;
        --mobile-nav-height: 70px;
        --header-height: 62px;
    }

    body {
        --mobile-footer-height: calc(var(--mobile-player-height) + var(--mobile-nav-height));
        --footer-height: var(--mobile-footer-height);
        font-size: var(--type-body);
    }

    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: var(--header-height) minmax(0, 1fr) var(--mobile-player-height) var(--mobile-nav-height);
    }

    body[data-playback="idle"] {
        --mobile-player-height: 0px;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        padding-left: 12px;
        padding-right: 12px;
        gap: 6px;
    }

    .brand {
        display: none;
    }

    .page-title {
        display: block;
        grid-column: 2;
        grid-row: 1;
        font-size: var(--type-nav);
        font-weight: 500;
        letter-spacing: 0;
        text-align: center;
        max-width: calc(100vw - 208px - var(--safe-left) - var(--safe-right));
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .room-presence {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        font-size: 11px;
        gap: 4px;
    }

    .listener-count {
        padding: 4px 0;
        white-space: nowrap;
    }

    .room-presence .presence-divider, #connection-label {
        display: none;
    }

    .topbar-actions {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        gap: 0;
    }

    .topbar-actions .button {
        padding: 0;
        width: 44px;
        height: 44px;
    }

    .topbar-actions .avatar {
        display: none;
    }

    .desktop-label {
        display: none;
    }

    .workspace {
        padding-top: var(--space-4);
    }

    .workspace-heading {
        margin-bottom: 20px;
        align-items: flex-start;
    }

    #profile-view > .workspace-heading {
        display: none;
    }

    #queue-mount .queue-heading {
        display: none;
    }

    .now-feature {
        grid-template-columns: 124px minmax(0, 1fr);
        gap: 18px;
        padding: 20px;
    }

    .now-feature:not(.is-empty) .feature-artwork {
        grid-row: auto;
    }

    .now-feature.is-empty {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .now-feature.is-empty .feature-artwork {
        width: 64px;
    }

    .feature-artwork {
        width: 100%;
    }

    .feature-copy h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .feature-copy > p {
        font-size: 14px;
    }

    .feature-actions {
        grid-column: 1 / -1;
        flex-wrap: nowrap;
    }

    .feature-actions .button {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 12px 8px;
    }

    .music-section {
        margin-top: 24px;
    }

    .music-shelf-list {
        grid-auto-columns: clamp(132px, 43%, 172px);
        gap: 10px;
        margin-inline: -12px;
        padding-inline: 12px;
    }

    .artist-shelf-list {
        grid-auto-columns: 104px;
    }

    .artist-hero {
        align-items: flex-start;
        gap: 14px;
    }

    .music-shelf-card {
        padding: 8px;
    }

    .section-heading {
        flex-wrap: wrap;
    }

    .section-heading p {
        max-width: 34ch;
    }

    .collection-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .track-row {
        gap: var(--space-2);
        padding: var(--space-2) 0;
        min-height: 64px;
    }

    .track-actions {
        gap: 0;
    }

    .track-duration {
        font-size: 12px;
    }

    .search-form {
        gap: 8px;
        padding-left: 12px;
    }

    .search-form input {
        font-size: 16px;
    }

    .account {
        gap: 16px;
    }

    .account h2 {
        font-size: 20px;
    }

    .account p {
        font-size: var(--type-meta);
        overflow-wrap: anywhere;
    }

    .setting-row {
        gap: 12px;
    }

    #settings-view > .workspace-heading:has(.browser-back[hidden]) {
        display: none;
    }

    .setting-row p {
        max-width: 29ch;
    }

    .setting-row .button {
        padding: 9px 12px;
    }

    .notice {
        flex-wrap: wrap;
    }

    .player {
        grid-row: 3;
        grid-template-columns: minmax(0, 1fr) 92px;
        gap: 8px;
    }

    .player:not(.is-expanded) {
        position: relative;
        grid-template-rows: minmax(0, 1fr);
        margin: 8px var(--page-padding);
        padding: 10px 12px;
        border: 0;
        border-radius: 16px;
    }

    body.home-scrolled {
        --mobile-player-height: 0px;
        --mobile-footer-height: var(--mobile-nav-height);
        --footer-height: var(--mobile-nav-height);
    }

    body.home-scrolled .player:not(.is-expanded) {
        position: fixed;
        inset: auto calc(var(--safe-right) + 76px) calc(var(--app-bottom) + 5px) calc(var(--safe-left) + 76px);
        width: auto;
        height: 60px;
        margin: 0;
        padding: 8px;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 4px;
        border-radius: 30px;
        background: color-mix(in srgb, var(--surface) 88%, transparent);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        --mini-artwork-size: 40px;
    }

    body.home-scrolled .player:not(.is-expanded) .transport > [data-action="skip-track"] {
        display: none;
    }

    body.home-scrolled .mobile-nav-rail {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    body.home-scrolled .mobile-nav button:is([data-nav="queue"], [data-nav="profile"]) {
        display: none;
    }

    body.home-scrolled .mobile-nav button:is([data-nav="home"], [data-nav="search"]) {
        width: 56px;
        height: 56px;
        min-height: 56px;
        padding: 0;
        border-radius: 50%;
        background: var(--control);
        box-shadow: var(--shadow-control);
    }

    body.home-scrolled .mobile-nav button[aria-current="page"] {
        background: var(--selection);
    }

    body.home-scrolled .mobile-nav button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .player:not(.is-expanded) .mini-player-progress {
        display: block;
        position: absolute;
        left: var(--space-3);
        right: var(--space-3);
        bottom: 0;
        height: 2px;
        background: var(--line);
        pointer-events: none;
        overflow: hidden;
    }

    .mini-player-fill {
        display: block;
        height: 100%;
        width: clamp(0%, calc(var(--playback-progress, 0) * 1%), 100%);
        background: var(--accent);
    }

    .player-track {
        grid-row: 1;
        gap: 10px;
    }

    .player:not(.is-expanded) .player-track-copy strong {
        font-size: var(--type-control);
        line-height: 1.35;
    }

    .player:not(.is-expanded) .player-title-button > span {
        font-size: var(--type-caption);
    }

    .player[data-playback="idle"]:not(.is-expanded) .mini-player-progress {
        display: none;
    }

    .player-artwork {
        width: var(--mini-artwork-size);
        height: var(--mini-artwork-size);
    }

    .player:not(.is-expanded) .player-artwork {
        border-radius: var(--radius-artwork);
    }

    .transport > .icon-button {
        display: none;
    }

    .player:not(.is-expanded) .transport > [data-action="skip-track"] {
        display: inline-flex;
        width: 44px;
        height: 44px;
    }

    .player:not(.is-expanded) .transport {
        gap: var(--space-1);
    }

    .player:not(.is-expanded) .progress {
        display: none;
    }

    .player:not(.is-expanded) #player-status {
        display: none;
    }

    .player[data-notice="true"]:not(.is-expanded) #player-status {
        display: block;
    }

    .player[data-notice="true"]:not(.is-expanded) #player-artist {
        display: none;
    }

    .player:not(.is-expanded) #player-status .text-button {
        background: transparent;
        min-height: 0;
        padding: 0;
        font-size: 12px;
    }

    .player-extras {
        display: none;
    }

    .player.is-expanded {
        gap: 12px;
    }

    .player.is-expanded .transport > .icon-button {
        display: inline-flex;
    }

    .player.is-expanded .player-extras {
        display: flex;
    }

    .lyrics-stage {
        --lyric-size: clamp(24px, 6.2vw, 26px);
    }

    .lyrics-panel {
        padding-inline: 10px;
    }

    .mobile-nav {
        grid-row: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px 12px 6px;
        background: transparent;
    }

    .mobile-nav-rail {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2px;
        width: min(100%, 360px);
        padding: 4px;
        border: 1px solid var(--glass-edge);
        border-radius: 24px;
        background: var(--surface);
        background: color-mix(in srgb, var(--surface) 86%, transparent);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(18px) saturate(1.2);
        -webkit-backdrop-filter: blur(18px) saturate(1.2);
    }

    .mobile-nav button {
        min-height: 52px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px;
        background: transparent;
        color: var(--muted);
        font-size: 10px;
        font-weight: 600;
        border-radius: 19px;
    }

    .mobile-nav .icon {
        width: var(--icon-size);
        height: var(--icon-size);
    }

    .mobile-nav [aria-current="page"] {
        color: var(--accent);
        background: var(--selection);
        box-shadow: var(--shadow-inset);
    }

    .listen-banner {
        left: calc(12px + var(--safe-left));
        right: calc(12px + var(--safe-right));
        bottom: calc(var(--app-bottom) + var(--mobile-footer-height) + 10px);
        max-width: none;
        padding: 10px 12px;
        gap: 10px;
    }

    .conversation-panel {
        inset: calc(var(--app-top) + var(--header-height) + 10px) calc(12px + var(--safe-right)) calc(var(--app-bottom) + var(--mobile-footer-height) + 10px) calc(12px + var(--safe-left));
        width: auto;
        max-height: none;
        height: auto;
    }

    .panel-header {
        padding: 8px 12px;
        min-height: var(--header-height);
    }

    body.conversation-open :is(.topbar, .workspace) {
        visibility: hidden;
    }

    :root[data-scheme] .conversation-panel:is(.chat-panel, .voice-panel) {
        inset: var(--app-top) var(--safe-right) calc(var(--app-bottom) + var(--mobile-footer-height)) var(--safe-left);
        width: auto;
        max-height: none;
        height: auto;
        border-radius: 0;
        background: var(--canvas);
    }

    .voice-panel .participant-list {
        margin: 16px;
        padding: 8px;
        background: var(--surface);
        border-radius: var(--radius);
    }

    .voice-settings {
        margin: 16px 16px 0;
        border: 0;
        border-radius: var(--radius);
        max-height: 45%;
    }

    .voice-controls > .button.primary {
        flex: 1;
    }

    .voice-panel .empty-state {
        padding: 24px 12px;
        margin: auto;
    }

    .voice-panel .participant-list:has(> .empty-state) {
        background: transparent;
    }

    :is(.workspace-view, .music-section, .library-section) > .track-list:has(> .track-row, > .loading-state) {
        padding-inline: 12px;
    }

    :is(.workspace-view, .music-section, .library-section) > .track-list > .track-row + .track-row::before {
        left: calc(var(--track-artwork-size) + 8px);
    }

    #playlist-detail > .section-heading {
        display: block;
    }

    #playlist-detail .row-actions {
        margin-top: 16px;
    }

    #playlist-detail .row-actions > .button {
        flex: 1;
    }

    #playlist-detail-title {
        overflow-wrap: anywhere;
    }

    #playlist-detail > .track-list:has(> .track-row, > .loading-state) {
        padding-inline: 12px;
    }

    .listeners-panel {
        top: var(--app-top);
        left: var(--safe-left);
        right: var(--safe-right);
        border-radius: 0;
        box-shadow: none;
    }

    body.listeners-open :is(.topbar, .workspace) {
        visibility: hidden;
    }

    .chat-form input {
        font-size: 16px;
    }

    .voice-mini {
        right: calc(12px + var(--safe-right));
        bottom: calc(var(--app-bottom) + var(--mobile-footer-height) + 10px);
    }

    .queue-rail .track-duration {
        display: block;
    }
}

@media (max-height: 740px) {
    .player.is-expanded {
        grid-template-rows: 44px minmax(190px, 1fr) 58px 64px 44px 44px;
        gap: var(--space-2);
        padding-block: calc(var(--safe-top) + 12px) calc(var(--safe-bottom) + 12px);
    }

    .player.is-expanded .player-artwork {
        width: min(80cqw, 80cqh, 280px);
    }

    .player.is-expanded.has-lyrics {
        grid-template-rows: 44px minmax(100px, 1fr) 58px 64px 44px;
    }

    .player.is-expanded .play-button {
        width: 64px;
        height: 64px;
    }

    .player.is-expanded .player-track {
        gap: var(--space-2);
    }
}

@media (max-width: 359px) {
    .player.is-expanded .transport {
        gap: 4px;
    }

    .player.is-expanded .play-button {
        width: 64px;
        height: 64px;
        flex: none;
    }

    .topbar-actions .avatar {
        display: none;
    }

    .feature-actions .button {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-view="home"] #home-recommendations.is-up-next {
        animation: none;
    }

    .lyric-line, .lyric-line > span, .lyrics-stage {
        transition: none;
    }

    .workspace {
        scroll-behavior: auto;
    }

    .player.is-expanded {
        animation: none;
    }

    .player-artwork, .feature-artwork img, .button, .icon-button, .text-button, .collection-cover {
        transition: none !important;
        transform: none !important;
    }

    input[type="checkbox"], input[type="checkbox"]::before, input[type="checkbox"]::after {
        transition: none;
    }
}

#settings-view .telegram-group {
    background: var(--glass);
    margin-top: 20px;
    overflow: hidden;
}

#settings-view .telegram-group:first-of-type {
    margin-top: 0;
}

.telegram-group-title {
    margin: 0;
    padding: 20px 16px 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: .025em;
}

#settings-view .telegram-group .setting-row {
    position: relative;
    min-height: 76px;
    padding: 14px 16px;
    gap: 12px;
    border-top: 0;
    font-size: var(--type-setting);
}

#settings-view .telegram-group .setting-row + .setting-row::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 0;
    height: 1px;
    background: var(--line);
}

#settings-view .telegram-group .setting-row label {
    flex: 1;
    min-width: 0;
}

:where(body.using-mouse) #settings-view .telegram-group .setting-row:has(:is(button, input):enabled):hover {
    background: var(--hover);
}

#settings-view .setting-row .button {
    font-size: var(--type-label);
    font-weight: 600;
    max-width: 48%;
    padding-inline: 12px;
    white-space: normal;
    text-align: center;
}

#settings-view .choice-trigger {
    font-size: var(--type-label);
    font-weight: 600;
}

#settings-view .telegram-note {
    padding: 10px 20px 0;
    font-size: var(--type-meta);
    line-height: 1.6;
}

#chat-settings-status {
    padding: 0 0 16px;
    color: var(--muted);
}

#settings-view .telegram-group .listeners-heading {
    padding: 18px 20px 4px;
    color: var(--section-heading);
}

#settings-view .telegram-group > .participant-list {
    padding: 0 12px 12px;
}

.slow-mode-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-right: 20px;
}

.slow-mode-heading output {
    padding-top: 12px;
    color: var(--accent);
    font-size: var(--type-body);
}

.slow-mode-scale {
    position: relative;
    margin: 20px 20px 12px;
}

.slow-mode-scale::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 12px;
    right: 12px;
    height: 4px;
    background: var(--muted);
}

.slow-mode-labels {
    position: relative;
    height: 20px;
    margin-inline: 12px;
    pointer-events: none;
}

.slow-mode-labels span {
    position: absolute;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: var(--type-small);
    white-space: nowrap;
}

.slow-mode-labels span::after {
    content: '';
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border: 3px solid var(--raised);
    border-radius: 50%;
    background: var(--muted);
}

.slow-mode-labels .is-selected {
    color: var(--accent);
}

.slow-mode-labels .is-selected::after {
    background: var(--accent);
}

#chat-cooldown {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 44px;
    padding: 0;
    background: transparent;
}

#chat-cooldown::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid var(--raised);
    background: var(--accent);
}

#chat-cooldown::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--raised);
    background: var(--accent);
}

#chat-cooldown::-moz-range-track {
    background: transparent;
}

.slow-mode-control[aria-disabled="true"] .slow-mode-scale {
    opacity: .45;
}


.loading-state {
    width: 100%;
    grid-column: 1 / -1;
}

.track-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
}

.skeleton-art {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--radius-artwork);
    background: var(--raised);
}

.skeleton-lines {
    flex: 1;
    display: grid;
    gap: 8px;
}

.skeleton-lines span {
    display: block;
    width: min(70%, 240px);
    height: 10px;
    border-radius: 4px;
    background: var(--raised);
}

.skeleton-lines span + span {
    width: min(45%, 160px);
}

@media (max-width: 699px) {
    .player[data-notice="true"]:not(.is-expanded) .player-title-button {
        justify-content: flex-start;
        padding-bottom: 18px;
    }

    .player[data-notice="true"]:not(.is-expanded) #player-status {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

.choice-trigger::after {
    content: '';
    width: 7px;
    height: 7px;
    flex: none;
    border: solid currentColor;
    border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg) translateY(-2px);
}

.choice-trigger[aria-expanded="true"] {
    background: var(--selection);
    box-shadow: var(--shadow-inset);
}

.choice-trigger[aria-expanded="true"]::after {
    transform: rotate(225deg) translate(-2px, -1px);
}

.choice-screen {
    position: fixed;
    inset: auto;
    width: min(400px, calc(100vw - 32px));
    height: auto;
    max-height: min(640px, calc(var(--usable-height) - 32px));
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.choice-screen[open] {
    display: flex;
    flex-direction: column;
    animation: selection-reveal 180ms ease-out;
}

.choice-screen::backdrop {
    background: var(--overlay-selection);
}

.choice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: none;
    padding: 18px 20px 8px;
}

.choice-header h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.choice-header .icon-button {
    order: 2;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
}

.choice-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px 16px;
}

.choice-content .settings-group {
    background: transparent;
    box-shadow: none;
}

.choice-content .telegram-group-title {
    padding: 0 8px 16px;
    font-size: var(--type-meta);
    font-weight: 400;
    letter-spacing: 0;
}

.choice-menu {
    display: grid;
    gap: 6px;
    outline-offset: -2px;
    border-radius: 14px;
}

.choice-option {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 48px 14px 16px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: var(--type-setting);
    font-weight: 500;
    line-height: 1.5;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.choice-option[aria-selected="true"] {
    color: var(--accent);
    background: var(--selection);
    box-shadow: var(--shadow-inset);
    font-weight: 650;
}

.choice-option[aria-selected="true"]::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 7px;
    height: 13px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.choice-option.is-highlighted {
    outline: 1px solid var(--accent);
    outline-offset: -2px;
    background: var(--hover);
}

:where(body.using-mouse) .choice-option:hover:enabled {
    background: var(--hover);
}

.choice-screen .settings-note {
    margin: 12px 4px 0;
    padding: 12px 8px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    max-height: none;
}

@keyframes selection-reveal {
    from {
        opacity: .7;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-lead {
    margin: 0 0 24px;
    max-width: 52ch;
    font-size: var(--type-meta);
    line-height: 1.6;
}

.setting-row > div > span, .setting-row > span:first-child {
    font-weight: 600;
}

.setting-row > :is(div, label) {
    min-width: 0;
}

.setting-row:has(.row-icon) {
    column-gap: 12px;
}

.setting-value {
    color: var(--accent);
    font-size: var(--type-meta);
    font-weight: 500;
}

.profile-link::after {
    content: '';
    width: 7px;
    height: 7px;
    flex: none;
    border: solid var(--subtle);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg);
    margin: 0 3px 0 8px;
}

.profile-link {
    min-height: 82px;
}

.profile-link > span:not(.settings-icon) {
    gap: 4px;
}

#settings-view .setting-row .button {
    background: var(--control);
    box-shadow: var(--shadow-control);
}

#settings-view .setting-row .button.danger {
    color: var(--danger);
}

#settings-view .telegram-group .setting-row + .setting-row::after {
    left: 16px;
    right: 16px;
}

#settings-view .telegram-group .setting-row:has(.row-icon) + .setting-row::after {
    left: 64px;
}

.browser-back, .workspace-back {
    background: var(--control);
    box-shadow: var(--shadow-control);
}

.workspace-back {
    display: none;
}

.topbar-actions .button {
    background: var(--control);
    box-shadow: var(--shadow-control);
    border-radius: 14px;
}

.topbar-actions [aria-expanded="true"] {
    color: var(--accent);
    background: var(--selection);
    box-shadow: var(--shadow-inset);
}

.topbar .brand > .icon {
    padding: 7px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--control);
    box-shadow: var(--shadow-control);
}

.brand-dot {
    display: none;
}

.track-actions .icon-button {
    background: transparent;
    box-shadow: none;
}

.track-list:has(> .track-row), .collection-cover, .player-artwork {
    box-shadow: var(--shadow-surface);
}

.track-art {
    background: var(--canvas);
}

.empty-icon, .queue-empty-icon {
    background: var(--canvas);
    box-shadow: var(--shadow-inset);
}

.empty-state h3, .queue-empty h3 {
    font-weight: 650;
    letter-spacing: -.02em;
}

.empty-state {
    padding-block: 56px;
}

.collection-cover.settings-icon .icon {
    width: 26px;
    height: 26px;
}

.player.is-expanded .transport > .icon-button {
    background: var(--control);
    box-shadow: var(--shadow-soft);
    color: var(--muted);
}

.player.is-expanded .transport > :is([data-action="restart-track"], [data-action="skip-track"]) {
    width: 52px;
    height: 52px;
    box-shadow: var(--shadow-control);
    color: var(--text);
}

.player.is-expanded .play-button {
    box-shadow: var(--shadow-action);
}

.player.is-expanded .player-artwork {
    padding: 10px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-surface);
}

.player.is-expanded[data-playback="playing"] .player-artwork {
    transform: scale(1.04);
    box-shadow: 0 20px 48px rgb(0 0 0 / 28%), var(--shadow-surface);
}

.player.is-expanded .player-artwork img {
    border-radius: 16px;
}

.player-extras .icon-button {
    background: transparent;
    box-shadow: none;
}

.player.is-expanded .player-extras .icon-button {
    background: var(--control);
    box-shadow: var(--shadow-soft);
}

:where(body.using-mouse) .player.is-expanded :is(.transport, .player-extras) .icon-button:hover:enabled {
    background: var(--hover);
}

.player :is(.transport, .player-extras) .icon-button[aria-pressed="true"], .player.is-expanded [data-action="sleep-focus"][data-active="true"] {
    background: var(--selection);
    color: var(--accent);
    box-shadow: var(--shadow-inset);
}

.player :is(.transport, .player-extras) .icon-button:active:enabled {
    box-shadow: var(--shadow-pressed);
}

.player .play-button:active:enabled {
    box-shadow: var(--shadow-pressed);
}

.player .play-button:disabled {
    box-shadow: none;
}

.player.is-expanded {
    color: #f3f5f9;
}

.player.is-expanded .player-track-copy strong {
    font-size: clamp(19px, 5vw, 22px);
}

.player.is-expanded :is(#player-artist, .progress, .player-extras) {
    color: #b0bac9;
}

.player.is-expanded .player-save-button,
.player.is-expanded .player-extras .icon-button {
    color: #f3f5f9;
    background: rgb(255 255 255 / 9%);
    box-shadow: 0 2px 12px rgb(0 0 0 / 14%), inset 0 1px rgb(255 255 255 / 15%);
}

.player.is-expanded #player-sleep-button[data-active="true"] {
    background: rgb(255 255 255 / 20%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%);
}

.player.is-expanded :is(.player-save-button, #player-sleep-button):focus {
    outline: none;
}

body.using-keyboard .player.is-expanded :is(.player-save-button, .player-browser-back, #player-sleep-button):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.player.is-expanded .transport > :is([data-action="restart-track"], [data-action="skip-track"]) {
    color: #f3f5f9;
    background: transparent;
    box-shadow: none;
}

.player.is-expanded .play-button {
    box-shadow: 0 6px 20px rgb(0 0 0 / 23%), inset 0 1px rgb(255 255 255 / 20%);
}

.player.is-expanded .player-artwork {
    background: rgb(255 255 255 / 10%);
    box-shadow: 0 18px 42px rgb(0 0 0 / 30%), inset 0 1px rgb(255 255 255 / 18%);
}

.player.is-expanded[data-playback="playing"] .player-artwork {
    box-shadow: 0 20px 48px rgb(0 0 0 / 34%), inset 0 1px rgb(255 255 255 / 18%);
}

.player.is-expanded input[type="range"] {
    --range-fill: linear-gradient(to right, #f3f5f9 var(--fill), rgb(243 245 249 / 38%) var(--fill));
}

.player.is-expanded input[type="range"]::-webkit-slider-runnable-track {
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 24%);
}

.player.is-expanded input[type="range"]::-moz-range-track {
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 24%);
}

.player.is-expanded input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -5px;
    background: #f3f5f9;
    border: 0;
    box-shadow: 0 1px 5px rgb(0 0 0 / 35%);
}

.player.is-expanded input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #f3f5f9;
    border: 0;
    box-shadow: 0 1px 5px rgb(0 0 0 / 35%);
}

.player.is-expanded :is(.transport, .player-extras) .icon-button,
.player.is-expanded .play-button {
    transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.player.is-expanded :is(.transport, .player-extras) .icon-button:active:enabled {
    transform: scale(.94);
}

#dialog-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.025em;
}

#dialog-description {
    font-size: 14px;
    line-height: 1.6;
}

.dialog-actions .button {
    min-height: 48px;
}

#dialog-input {
    background: var(--canvas);
    border-color: transparent;
    box-shadow: var(--shadow-inset);
    font-size: 16px;
}

.chat-composer {
    box-shadow: var(--shadow-inset);
    background: var(--canvas);
}

.participant strong {
    font-size: var(--type-setting);
    font-weight: 600;
}

.panel-header h2 {
    font-size: 20px;
    font-weight: 650;
}

.session-record .record-surface {
    fill: var(--raised);
}

.session-record {
    filter: drop-shadow(8px 10px 20px rgb(0 0 0 / 25%));
}

[hidden] {
    display: none;
}

@media (max-width: 699px) {
    :root {
        --header-height: 72px;
        --page-padding: 20px;
    }

    body[data-view="home"] {
        --header-height: 44px;
    }

    html.telegram-title-slot .telegram-top-title {
        position: fixed;
        top: calc(var(--viewport-top) + max(env(safe-area-inset-top, 0px), calc(var(--safe-top) - 44px)));
        left: 50%;
        z-index: 21;
        display: flex;
        align-items: center;
        justify-content: center;
        width: min(180px, calc(100vw - 200px));
        height: 44px;
        padding: 0 12px;
        transform: translateX(-50%);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        border-radius: 22px;
        background: color-mix(in srgb, var(--control) 78%, transparent);
        box-shadow: var(--shadow-soft);
        color: var(--text);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: -.02em;
        pointer-events: none;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    body[data-view="home"] .home-heading {
        display: none;
    }

    html.telegram-title-slot body:is(.conversation-open, .listeners-open, :has(.player.is-expanded)) .telegram-top-title {
        display: none;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-inline: 20px;
        gap: 12px;
    }

    .page-title {
        grid-column: 1;
        max-width: none;
        text-align: left;
        padding: 0;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: -.025em;
    }

    .topbar .room-presence {
        display: none;
    }

    .topbar-actions {
        grid-column: 2;
        gap: 8px;
    }

    .topbar-actions .button {
        width: 44px;
        margin: 0;
    }

    .topbar:has(.workspace-back:not([hidden])) {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .topbar:has(.workspace-back:not([hidden])) .workspace-back {
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
    }

    .topbar:has(.workspace-back:not([hidden])) .page-title {
        grid-column: 2;
    }

    .topbar:has(.workspace-back:not([hidden])) .topbar-actions {
        grid-column: 3;
    }

    #settings-view > .workspace-heading {
        display: none;
    }

    .workspace {
        padding-top: 16px;
    }

    body[data-view="home"] .workspace {
        padding-top: 8px;
    }

    .workspace-heading p {
        font-size: var(--type-meta);
        margin-top: 8px;
    }

    .home-heading h1, .workspace-heading h1 {
        font-size: 27px;
    }

    .home-heading .icon-button {
        display: none;
    }

    .now-feature:not(.is-empty) {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .now-feature:not(.is-empty) .feature-artwork {
        width: 144px;
        grid-row: auto;
        justify-self: center;
    }

    .now-feature:not(.is-empty) .feature-copy {
        text-align: center;
    }

    .now-feature:not(.is-empty) .feature-copy h2 {
        font-size: 25px;
    }

    .feature-meta {
        justify-content: center;
    }

    .feature-actions {
        gap: 12px;
    }

    .home-link {
        min-height: 116px;
        padding: 12px;
        gap: 12px;
    }

    .home-link .settings-icon {
        width: 36px;
        height: 36px;
    }

    .home-tools {
        gap: 10px;
    }

    .group-heading {
        margin-top: 28px;
    }

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

    .account {
        padding: 22px 18px;
    }

    .account .avatar {
        box-shadow: var(--shadow-inset);
    }

    #queue-mount .queue-rail {
        background: transparent;
        box-shadow: none;
    }

    #queue-mount .queue-group {
        box-shadow: var(--shadow-surface);
    }

    #queue-mount .queue-heading {
        display: none;
    }

    #queue-mount .queue-heading h2 {
        font-size: 27px;
    }

    .choice-screen {
        inset: auto calc(var(--safe-right) + 8px) calc(var(--app-bottom) + 8px) calc(var(--safe-left) + 8px);
        width: auto;
        max-width: none;
        max-height: min(80dvh, calc(var(--usable-height) - 16px));
        border-radius: 24px;
    }

    .choice-screen::before {
        content: '';
        display: block;
        flex: none;
        width: 34px;
        height: 4px;
        border-radius: 4px;
        margin: 10px auto 0;
        background: var(--range-track);
    }

    .choice-header {
        padding-top: 8px;
    }

    .choice-content {
        padding-bottom: 20px;
    }

    .player:not(.is-expanded) {
        background: var(--raised);
    }

    .player:not(.is-expanded) .mini-player-progress {
        bottom: 0;
        left: 16px;
        right: 16px;
        height: 2px;
    }

    .player:not(.is-expanded) .play-button {
        width: 44px;
        height: 44px;
    }

    .player:not(.is-expanded) .player-controls {
        grid-row: 1;
    }

    .mobile-nav {
        background: transparent;
    }

    .mobile-nav .icon {
        width: 21px;
        height: 21px;
    }

    .player.is-expanded .player-artwork {
        padding: 8px;
    }
}

@media (max-width: 359px) {
    :root {
        --page-padding: 16px;
    }

    .topbar {
        padding-inline: 16px;
        gap: 8px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .home-link {
        padding-inline: 10px;
    }

    .home-link strong {
        font-size: 12px;
    }

    .home-link-copy > span {
        font-size: 11px;
    }

    #settings-view .telegram-group .setting-row {
        gap: 10px;
        padding-inline: 12px;
    }

    .setting-row > .row-icon {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    #settings-view .telegram-group .setting-row:has(.row-icon) + .setting-row::after {
        left: 54px;
    }

    .choice-trigger {
        min-width: 72px;
        max-width: 44%;
        padding-inline: 10px;
    }

    .profile-link {
        padding-inline: 14px;
        gap: 12px;
    }

    .now-feature {
        padding: 18px;
    }
}

@media (max-width: 699px) and (max-height: 640px) {
    .now-feature:not(.is-empty) {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: var(--space-4);
    }

    .now-feature:not(.is-empty) .feature-artwork {
        width: 88px;
    }

    .now-feature:not(.is-empty) .feature-copy {
        align-self: center;
        text-align: left;
    }

    .now-feature:not(.is-empty) .feature-copy h2 {
        font-size: 22px;
    }

    .feature-meta {
        justify-content: flex-start;
        margin-top: var(--space-2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .choice-screen[open] {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .playing-bars span {
        animation: none;
    }
}

.idle-symbol {
    display: none;
}

.now-feature.is-empty {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
    gap: 18px;
}

.now-feature.is-empty .idle-symbol {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    background: var(--canvas);
    color: var(--accent);
    border-radius: 18px;
    box-shadow: var(--shadow-inset);
}

.now-feature.is-empty .idle-symbol .icon {
    width: 28px;
    height: 28px;
}

.now-feature.is-empty .feature-artwork, .now-feature.is-empty .status-chip {
    display: none;
}

.now-feature.is-empty .feature-copy h2 {
    font-size: 25px;
}

.now-feature.is-empty .feature-copy > p {
    font-size: var(--type-meta);
    line-height: 1.5;
}

.now-feature.is-empty .feature-actions {
    grid-column: 1;
}

.now-feature:not(.is-empty) {
    grid-template-columns: clamp(112px, 24%, 180px) minmax(0, 1fr);
    gap: 8px 20px;
    padding: 20px;
}

.now-feature:not(.is-empty) .feature-copy h2 {
    font-size: var(--type-player);
}

.now-feature:not(.is-empty) .feature-actions {
    gap: 8px;
}

.now-feature .feature-actions .button {
    min-height: 44px;
}

.now-feature.is-empty {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
}

.now-feature.is-empty .idle-symbol {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-control);
}

.now-feature.is-empty .idle-symbol .icon {
    width: 21px;
    height: 21px;
}

.now-feature.is-empty .feature-copy h2 {
    font-size: var(--type-section);
    margin-bottom: 2px;
}

.now-feature.is-empty .feature-actions {
    grid-column: 3;
    align-self: center;
}

.now-feature.is-empty #home-main-action {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    flex: none;
}

.now-feature.is-empty #home-main-action .icon {
    width: 21px;
    height: 21px;
}

.home-link {
    min-height: 104px;
    gap: 8px;
    padding: 12px;
}

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

.group-heading {
    margin: 24px 0 12px;
}

.partner-context {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 18px;
    padding: 32px 24px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-surface);
    text-align: center;
}

.partner-context-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--canvas);
    color: var(--accent);
    box-shadow: var(--shadow-inset);
}

.partner-context-icon .icon {
    width: 28px;
    height: 28px;
}

.partner-context h2 {
    font-size: 23px;
    font-weight: 700;
}

.partner-context p {
    max-width: 40ch;
    font-size: var(--type-meta);
    line-height: 1.6;
}

.partner-context small {
    max-width: 32ch;
    color: var(--muted);
    font-size: var(--type-caption);
    line-height: 1.5;
}

#history-view > .workspace-heading {
    align-items: center;
}

#history-view .subpage-heading {
    gap: 8px;
}

#history-view .subpage-heading h1 {
    font-size: 24px;
}

#history-view > .workspace-heading > .text-button {
    flex: none;
}

@media (max-width: 699px) {
    .now-feature:not(.is-empty) {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 8px 12px;
        padding: 14px;
    }

    .now-feature:not(.is-empty) .feature-artwork {
        grid-row: 1;
        width: 96px;
    }

    .now-feature:not(.is-empty) .feature-copy {
        align-self: center;
        text-align: left;
    }

    .now-feature:not(.is-empty) .feature-copy h2 {
        font-size: var(--type-section);
    }

    .now-feature:not(.is-empty) .feature-meta {
        justify-content: flex-start;
        margin-top: 6px;
    }

    .now-feature:not(.is-empty) .feature-actions {
        grid-column: 1 / -1;
    }

    .now-feature.is-empty {
        grid-template-columns: 36px minmax(0, 1fr) 44px;
        gap: 8px 12px;
        padding: 14px 16px;
    }

    .now-feature.is-empty .idle-symbol {
        width: 36px;
        height: 36px;
    }

    .now-feature.is-empty .feature-actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .now-feature.is-empty .feature-actions .button {
        flex: none;
        padding: 0;
    }

    .home-link {
        min-height: 100px;
    }

    .track-main {
        gap: var(--space-2);
    }

    .track-row {
        padding-block: 0;
    }
}

@media (max-width: 699px) and (min-height: 741px) {
    .player.is-expanded:not(.has-lyrics) {
        padding-top: calc(var(--safe-top) + 8px);
        padding-bottom: calc(var(--safe-bottom) + 12px);
    }

    .player.is-expanded:not(.has-lyrics) .player-artwork {
        width: min(82cqw, 82cqh, 320px);
    }
}

[hidden] {
    display: none;
}

.autoplay-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: var(--type-meta);
    font-weight: 600;
    flex: none;
    cursor: pointer;
}

.autoplay-shortcut[hidden] {
    display: none;
}

@media (max-width: 699px) {
    #mix-view > .workspace-heading {
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    #mix-view > .workspace-heading .subpage-heading {
        display: none;
    }
}

@media (max-width: 359px) {
    #mix-view .subpage-heading h1 {
        font-size: 22px;
    }

    .autoplay-shortcut {
        gap: 8px;
    }
}

#mix-view .mix-summary {
    display: none;
    margin: 0;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    border: 0;
    padding: 8px 16px 18px;
    margin: 0;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    min-width: 0;
    padding: 12px;
    background: var(--control);
    box-shadow: var(--shadow-control);
    border-radius: var(--radius-control);
    font-size: var(--type-label);
    font-weight: 600;
    cursor: pointer;
}

.theme-option:has(input:checked) {
    background: var(--selection);
    color: var(--accent);
    box-shadow: var(--shadow-inset);
}

.theme-option:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.theme-swatch {
    width: 20px;
    height: 20px;
    border: 1px solid var(--line);
    border-radius: 50%;
    flex: none;
}

.theme-swatch-dark {
    background: #272c35;
}

.theme-swatch-light {
    background: #eef2f7;
}

.theme-swatch-system {
    background: linear-gradient(135deg, #272c35 50%, #eef2f7 50%);
}

@media (max-width: 699px) {
    .theme-options {
        grid-template-columns: 1fr;
    }
}

.theme-check {
    width: 16px;
    height: 16px;
    margin-left: auto;
    visibility: hidden;
}

.theme-option:has(input:checked) .theme-check {
    visibility: visible;
}

.appearance-display {
    margin-top: 16px;
}

:root[data-theme="light"] .settings-icon {
    background: color-mix(in srgb, var(--tile-color) 12%, var(--surface));
    color: color-mix(in srgb, var(--tile-color) 65%, #16304a);
}

@media (max-width: 699px) {
    body[data-view="mix"] .workspace {
        padding-top: 8px;
    }

    #mix-view .mix-summary {
        display: block;
        color: var(--muted);
        font-size: var(--type-meta);
    }
}

/* Keep the player tactile without competing with the album artwork. */
.player-atmosphere .player-backdrop {
    opacity: .23;
    filter: blur(68px) saturate(1.35) brightness(.72);
}

.player-atmosphere::after {
    background: linear-gradient(180deg, rgb(9 12 19 / 24%) 0%, rgb(10 13 21 / 42%) 50%, rgb(8 10 17 / 91%) 100%);
}

.player.is-expanded .player-header-label {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .015em;
}

.player.is-expanded .player-artwork {
    background: rgb(255 255 255 / 11%);
    box-shadow: 12px 18px 44px rgb(0 0 0 / 30%), -5px -5px 22px rgb(255 255 255 / 6%), inset 0 1px rgb(255 255 255 / 18%);
}

.player.is-expanded[data-playback="playing"] .player-artwork {
    box-shadow: 14px 22px 48px rgb(0 0 0 / 34%), -5px -5px 22px rgb(255 255 255 / 6%), inset 0 1px rgb(255 255 255 / 18%);
}

.player.is-expanded .player-track-copy strong {
    font-size: clamp(22px, 4.8vw, 30px);
    font-weight: 700;
    line-height: 1.2;
}

.player.is-expanded .player-track-copy > span, .player.is-expanded .player-title-button > span {
    color: #c9d3e1;
}

.player.is-expanded .player-save-button, .player.is-expanded .player-extras .icon-button {
    background: rgb(255 255 255 / 11%);
    box-shadow: 5px 7px 16px rgb(0 0 0 / 24%), -3px -3px 10px rgb(255 255 255 / 5%), inset 0 1px rgb(255 255 255 / 19%);
}

.player.is-expanded .transport > :is([data-action="restart-track"], [data-action="skip-track"]) {
    color: #f3f5f9;
    background: rgb(255 255 255 / 8%);
    box-shadow: 4px 6px 14px rgb(0 0 0 / 22%), inset 0 1px rgb(255 255 255 / 14%);
}

.player.is-expanded .play-button {
    box-shadow: 6px 9px 22px rgb(0 0 0 / 29%), -2px -2px 10px rgb(255 255 255 / 6%), inset 0 1px rgb(255 255 255 / 24%);
}

.player.is-expanded .player-shortcuts {
    padding: 2px 4px;
    border-radius: 18px;
    background: rgb(255 255 255 / 5%);
    box-shadow: inset 3px 3px 9px rgb(0 0 0 / 22%), inset -1px -1px 5px rgb(255 255 255 / 7%);
}

.player.is-expanded .player-shortcuts .icon-button {
    border-radius: 14px;
}

.player.is-expanded .player-shortcuts .icon-button:focus-visible {
    outline: 2px solid #79c5ff;
    outline-offset: 2px;
}

/* Shared surfaces use one depth scale in both themes. */
:is(.now-feature, .home-link, .music-shelf-card, .settings-group, .partner-context, .queue-rail) {
    box-shadow: var(--shadow-surface);
}

:where(body.using-mouse) :is(.home-link, .music-shelf-card):hover {
    background: var(--hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-control);
}

:is(.home-link, .music-shelf-card) {
    transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

:is(.home-link, .music-shelf-card):active {
    transform: translateY(1px);
    box-shadow: var(--shadow-pressed);
}

.home-discovery-shelf .section-heading {
    align-items: flex-end;
}

.home-discovery-shelf .shelf-subtitle {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: var(--type-caption);
    line-height: 1.4;
    text-transform: uppercase;
}

#home-view .music-shelf-list {
    grid-auto-columns: clamp(132px, calc((100% - 70px) / 6), 180px);
}

#home-view .music-shelf-card {
    padding: 4px;
    background: transparent;
    box-shadow: none;
}

#home-view .music-shelf-card img {
    border-radius: var(--radius-artwork);
    box-shadow: var(--shadow-soft);
}

#home-view .music-shelf-card strong, #home-view .music-shelf-card span {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#home-view .music-shelf-card strong {
    margin-top: 10px;
    line-height: 1.35;
}

#home-view .music-shelf-card span {
    line-height: 1.4;
}

.home-trending-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
}

.home-trending-grid .track-row {
    min-width: 0;
}

@media (max-width: 950px) {
    .home-trending-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 699px) {
    #home-view .music-shelf-list {
        grid-auto-columns: clamp(132px, 43%, 172px);
    }

    .home-trending-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.track-row.is-playing {
    box-shadow: var(--shadow-inset);
}

.theme-option:has(input:checked) {
    box-shadow: var(--shadow-inset);
}

:root[data-theme="light"] .player:not(.is-expanded) {
    background: var(--surface);
    box-shadow: var(--shadow-surface);
}

@media (min-width: 900px) and (min-height: 680px) {
    .player.is-expanded:not(.has-lyrics) {
        grid-template-columns: minmax(300px, 520px) minmax(340px, 480px);
        grid-template-rows: 48px minmax(120px, 1fr) 58px 84px 58px 52px;
        column-gap: clamp(32px, 5vw, 72px);
        row-gap: 16px;
        align-content: center;
        padding-inline: max(32px, calc((100vw - 1120px) / 2));
    }

    .player.is-expanded:not(.has-lyrics) .expanded-player-header {
        grid-column: 1 / -1;
    }

    .player.is-expanded:not(.has-lyrics) .player-track {
        display: contents;
    }

    .player.is-expanded:not(.has-lyrics) .player-artwork-stage {
        grid-column: 1;
        grid-row: 2 / 7;
    }

    .player.is-expanded:not(.has-lyrics) .player-artwork {
        width: min(100cqw, 100cqh, 520px);
    }

    .player.is-expanded:not(.has-lyrics) .player-track-copy {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        padding-right: 60px;
    }

    .player.is-expanded:not(.has-lyrics) .player-track-copy strong {
        font-size: clamp(28px, 3vw, 38px);
    }

    .player.is-expanded:not(.has-lyrics) .player-save-button {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        justify-self: end;
    }

    .player.is-expanded:not(.has-lyrics) .progress {
        grid-column: 2;
        grid-row: 3;
    }

    .player.is-expanded:not(.has-lyrics) .player-controls {
        grid-column: 2;
        grid-row: 4;
    }

    .player.is-expanded:not(.has-lyrics) .player-extras {
        grid-column: 2;
        grid-row: 5;
    }

    .player.is-expanded:not(.has-lyrics) .player-shortcuts {
        grid-column: 2;
        grid-row: 6;
    }
}

@media (max-width: 699px) {
    .player.is-expanded {
        gap: clamp(9px, 1.4vh, 16px);
        padding-inline: calc(var(--safe-left) + 20px) calc(var(--safe-right) + 20px);
    }

    .player.is-expanded .player-track {
        gap: 18px;
    }

    .player.is-expanded:not(.has-lyrics) .player-artwork {
        width: min(100cqw, 100cqh, 380px);
    }

    .player.is-expanded .player-shortcuts {
        margin-top: 2px;
    }

    .now-feature:not(.is-empty) {
        gap: 12px;
    }

    .mobile-nav-rail {
        box-shadow: var(--shadow-surface);
    }
}

@media (max-width: 380px), (max-height: 650px) {
    .player.is-expanded:not(.has-lyrics) .player-artwork {
        width: min(78cqw, 78cqh, 280px);
    }

    .player.is-expanded .player-track-copy strong {
        font-size: 22px;
    }

    .player.is-expanded .player-shortcuts {
        padding: 0;
    }
}

@media (forced-colors: active) {
    .theme-option {
        outline: 1px solid ButtonText;
    }

    .theme-option:has(input:checked) {
        outline: 2px solid Highlight;
    }

    .lyrics-stage {
        outline: 1px solid CanvasText;
    }

    .lyrics-panel[data-state="synced"] {
        mask-image: none;
    }

    .lyric-line.is-current {
        text-decoration: underline;
        text-underline-offset: 6px;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        background: Canvas;
        outline: 1px solid CanvasText;
    }

    input[type="range"]::-moz-range-track {
        background: Canvas;
        outline: 1px solid CanvasText;
    }

    input[type="range"]::-webkit-slider-thumb {
        background: ButtonText;
        border-color: ButtonText;
    }

    input[type="range"]::-moz-range-thumb {
        background: ButtonText;
        border-color: ButtonText;
    }
}
