/*
 * Mobile presentation layer.
 * Keep mobile-only layout and simplification rules here so desktop styling
 * remains governed by assets/styles.css.
 */

/* Standalone Shared Note mobile header. The server marker excludes admin,
   Portfolio, and collection contexts; desktop rules remain unchanged. */
@media screen and (max-width: 768px) {
    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode {
        --preview-video-header-height: 76px;
        --preview-video-header-padding-top: 16px;
        --preview-video-header-padding-bottom: 16px;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-preview-topbar {
        display: flex;
        gap: 12px;
        align-items: center;
        box-sizing: border-box;
        height: var(--preview-video-header-height);
        min-height: var(--preview-video-header-height);
        padding-left: 12px;
        padding-right: 12px;
        background: #f2f0eb;
        border-bottom: 0;
        box-shadow: none;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-preview-topbar > .site-portfolio-headline {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        margin: 0;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .site-portfolio-headline-title {
        width: 100%;
        min-width: 0;
        margin: 0;
        justify-content: flex-start;
        text-align: left;
        font-size: 16px;
        line-height: 22px;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode :is(.site-portfolio-headline-prefix, .site-portfolio-headline-sep) {
        display: none;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .site-portfolio-headline-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        min-width: 0;
        max-height: 44px;
        overflow: hidden;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-preview-topbar :is(.preview-site-topbar-actions, .preview-site-topbar-actions-main) {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
        width: auto;
        margin: 0;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-collaboration-status {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        margin: 0;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-preview-language-form {
        min-width: 0;
        margin: 0;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-standalone-share-mobile-mode .blog-reader-language-select {
        box-sizing: border-box;
        width: 132px;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        background-color: transparent;
    }
}

/* Portfolio's individual Note reader only. Keep desktop, direct shares,
   collection embeds, and editor headers on their existing layouts. */
@media screen and (max-width: 768px) {
    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) {
        --preview-video-header-height: 76px;
        --preview-video-header-padding-top: 16px;
        --preview-video-header-padding-bottom: 16px;
        --preview-inline-gap: 12px;
        --portfolio-note-mobile-side-width: clamp(96px, 24vw, 110px);
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed):has(.blog-reader-preview-topbar :is(.blog-reader-collaboration-status, .blog-reader-preview-language-form)) {
        --preview-video-header-height: 132px;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-preview-topbar {
        display: grid;
        grid-template-columns: var(--portfolio-note-mobile-side-width) minmax(0, 1fr) var(--portfolio-note-mobile-side-width);
        grid-template-rows: 44px;
        grid-auto-rows: 44px;
        column-gap: 8px;
        row-gap: 12px;
        align-items: center;
        box-sizing: border-box;
        height: var(--preview-video-header-height);
        min-height: var(--preview-video-header-height);
        padding-left: 12px;
        padding-right: 12px;
        background: #f2f0eb;
        border-bottom: 0;
        box-shadow: none;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-preview-topbar > .site-portfolio-headline {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .site-portfolio-headline-title {
        width: 100%;
        min-width: 0;
        margin: 0;
        justify-content: center;
        text-align: center;
        font-size: 16px;
        line-height: 22px;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) :is(.site-portfolio-headline-prefix, .site-portfolio-headline-sep) {
        display: none;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .site-portfolio-headline-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        min-width: 0;
        max-height: 44px;
        overflow: hidden;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-preview-topbar :is(.preview-site-topbar-actions, .preview-site-topbar-actions-main) {
        display: contents;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .preview-back-btn {
        grid-column: 1;
        grid-row: 1;
        position: static;
        transform: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        padding: 0 8px;
        margin: 0;
        font-size: 13px;
        line-height: 1;
        white-space: nowrap;
        border-radius: 12px;
        background: transparent;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-collaboration-status {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        margin: 0;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-preview-language-form {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
        min-width: 0;
        margin: 0;
    }

    body.blog-reader-page.blog-reader-preview-mode.blog-reader-portfolio-note-mode:not(.blog-collection-preview-page):not(.blog-reader-collection-embed) .blog-reader-language-select {
        box-sizing: border-box;
        width: 132px;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        background-color: transparent;
    }
}

@media screen and (max-width: 768px) {
    .projects-dashboard {
        --mobile-dashboard-card-min: 180px;
        --mobile-dashboard-card-gap-x: 16px;
        --mobile-dashboard-card-gap-y: 10px;
        --mobile-dashboard-body-padding-x: 12px;
        --mobile-dashboard-body-padding-y: 14px;
        --mobile-card-action-inset: 16%;
        --mobile-card-action-gap: 16px;
        --mobile-card-action-slot: 38px;
        --mobile-card-action-padding-y: 14px;
        --mobile-card-action-padding-x: 12px;
        --mobile-card-button-height: 30px;
        --mobile-card-button-radius: 10px;
        --mobile-folder-tab-height: 36px;
        --mobile-folder-tab-radius: 13px;
        --mobile-folder-tab-padding-x: 15px;
        --mobile-folder-tab-gap: 12px;
        --mobile-folder-tab-font-size: 0.78rem;
        --mobile-inner-preview-radius: 12px;
    }

    .mobile-hide,
    .desktop-only-tool {
        display: none !important;
    }

    .projects-dashboard .topbar {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 22px;
    }

    .projects-dashboard .topbar .dashboard-brand-title-row {
        justify-content: center;
        margin-inline: auto;
        width: 100%;
        transform: translateY(0);
    }

    .projects-dashboard .topbar-actions {
        width: 100%;
        justify-content: center;
    }

    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tabs-section.is-expanded,
    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tab-body,
    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tab-cards-wrap,
    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tab-cards:not([hidden]) {
        flex: 1 1 auto;
        min-height: 0;
    }

    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tab-body {
        max-height: none;
    }

    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) .library-tab-cards:not([hidden]) {
        max-height: none;
        padding-bottom: calc(10px + 20%);
    }

    .projects-dashboard .project-folders-section:has(.library-tabs-section.is-expanded) {
        padding-bottom: 10px;
    }

    .projects-dashboard .project-folders-spacer {
        min-height: 0;
        margin-bottom: 0;
    }

    .projects-dashboard .library-tabs-section {
        margin-top: 21px;
    }

    .projects-dashboard .project-grid,
    .projects-dashboard .pinned-projects-cards,
    .projects-dashboard .library-tab-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--mobile-dashboard-card-gap-x);
        row-gap: var(--mobile-dashboard-card-gap-y);
        align-content: start;
        align-items: start;
        grid-auto-rows: max-content;
    }

    .projects-dashboard.dashboard-grid-scale-50 .project-grid,
    .projects-dashboard.dashboard-grid-scale-50 .pinned-projects-cards,
    .projects-dashboard.dashboard-grid-scale-50 .library-tab-cards,
    .projects-dashboard.dashboard-grid-scale-100 .project-grid,
    .projects-dashboard.dashboard-grid-scale-100 .pinned-projects-cards,
    .projects-dashboard.dashboard-grid-scale-100 .library-tab-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--mobile-dashboard-card-gap-x);
        row-gap: var(--mobile-dashboard-card-gap-y);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card {
        align-self: start;
        height: auto !important;
        min-height: 0 !important;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card .folder-body {
        height: auto !important;
        min-height: 0 !important;
    }

    .projects-dashboard .library-tabs-header {
        position: relative;
        flex-wrap: nowrap;
        align-items: flex-end;
    }

    .projects-dashboard .library-tabs-nav {
        flex: 0 0 100%;
    }

    .projects-dashboard .library-audio-filter-row {
        position: absolute;
        left: 28px;
        top: calc(100% + 16px);
        z-index: 6;
        flex: 0 0 auto;
        margin: 0;
        padding-left: 0;
        transform: none;
        justify-content: flex-start;
    }

    .projects-dashboard .library-audio-filter-row[hidden] {
        display: none !important;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .library-audio-filter-row {
        position: relative;
        left: auto;
        top: auto;
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        justify-self: center;
        z-index: 9;
        width: 82%;
        max-width: 276px;
        min-width: 0;
        margin-top: 2px;
        justify-content: space-between;
        gap: 10px;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .library-audio-filter-row .library-audio-filter-btn {
        flex: 1 1 0;
        width: auto;
        min-width: 0 !important;
        padding-inline: 8px;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .project-folder-card.project-create-card.mode-audio {
        grid-column: 1;
        grid-row: 1;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .project-folder-card.project-create-card.mode-audio[hidden] {
        display: block !important;
    }

    .projects-dashboard,
    .projects-dashboard .layout,
    .projects-dashboard .project-folders-section,
    .projects-dashboard .library-tab-body,
    .projects-dashboard .library-tab-cards-wrap,
    .projects-dashboard .library-tab-cards {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .projects-dashboard::-webkit-scrollbar,
    .projects-dashboard .layout::-webkit-scrollbar,
    .projects-dashboard .project-folders-section::-webkit-scrollbar,
    .projects-dashboard .library-tab-body::-webkit-scrollbar,
    .projects-dashboard .library-tab-cards-wrap::-webkit-scrollbar,
    .projects-dashboard .library-tab-cards::-webkit-scrollbar {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card:not(.project-create-card) .folder-body,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-create-card .folder-preview.create-project-preview {
        box-shadow: 0 8px 18px rgba(18, 32, 47, 0.045);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog),
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio {
        position: relative;
        padding-top: 0;
        margin-top: var(--mobile-folder-tab-height);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-create-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog, .mode-portfolio) {
        margin-top: var(--mobile-folder-tab-height);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-create-card .create-project-name-input {
        font-size: 0.63rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-create-card .create-project-name-input::placeholder {
        font-size: 0.63rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-body,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-body,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-body {
        border-top-left-radius: 0;
        overflow: visible;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-head-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-head-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-head-row {
        position: absolute;
        left: -1px;
        top: calc(-1 * var(--mobile-folder-tab-height));
        bottom: auto;
        width: auto;
        transform: none;
        justify-content: flex-start;
        z-index: 8;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-top,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-top {
        position: static;
        margin: 0;
        min-height: var(--mobile-folder-tab-height);
        height: var(--mobile-folder-tab-height);
        border-radius: var(--mobile-folder-tab-radius) var(--mobile-folder-tab-radius) 0 0;
        padding-inline: var(--mobile-folder-tab-padding-x);
        gap: var(--mobile-folder-tab-gap);
        justify-content: flex-start;
        pointer-events: auto;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top.folder-top-project-group {
        width: auto;
        max-width: 100%;
        border-radius: var(--mobile-folder-tab-radius) var(--mobile-folder-tab-radius) 0 0;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-top-label,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-top-divider {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top.folder-top-project-group .folder-top-label::after {
        content: "Coll.";
        font-size: 0.78rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top.folder-top-project-group .folder-top-meta {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-top-name,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-top-label,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo, .mode-files, .mode-audio, .mode-blog) .folder-top-meta,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top-name,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top-label,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top-divider,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-top-name {
        font-size: var(--mobile-folder-tab-font-size);
        line-height: 1.25;
        padding-bottom: 1px;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-top.folder-top-project-group .folder-top-label {
        font-size: 0;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-video .folder-actions-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-photo .folder-actions-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions {
        position: absolute;
        left: var(--mobile-card-action-inset);
        right: var(--mobile-card-action-inset);
        top: 50%;
        transform: translateY(-50%);
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--mobile-card-action-gap);
        width: auto;
        padding: var(--mobile-card-action-padding-y) var(--mobile-card-action-padding-x);
        z-index: 6;
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-body {
        position: relative;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-body::after {
        content: none;
        position: absolute;
        inset: 0;
        z-index: 1;
        border-radius: inherit;
        background: rgba(227, 193, 90, 0.25);
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-preview {
        border-radius: var(--mobile-inner-preview-radius);
        overflow: hidden;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .files-live-preview {
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: inherit;
        background: rgba(227, 193, 90, 0.25);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .files-live-row {
        display: none;
        min-height: 34px;
        padding: 4px 8px;
        border-radius: 9px;
        opacity: 0.5;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .files-live-main {
        gap: 2px;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .files-live-name {
        font-size: 0.78rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .files-live-count {
        font-size: 0.68rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-body {
        position: relative;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-body::after {
        content: none;
        position: absolute;
        inset: 0;
        z-index: 1;
        border-radius: inherit;
        background: rgba(213, 159, 214, 0.25);
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-preview {
        border-radius: 12px;
        overflow: hidden;
        opacity: 1;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-preview {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: inherit;
        background: rgba(213, 159, 214, 0.25);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-track-count {
        position: absolute;
        left: 0;
        right: 0;
        top: 24%;
        z-index: 2;
        color: #708398;
        font-size: 0.72rem;
        font-weight: 400;
        line-height: 1.2;
        text-align: center;
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-row {
        display: none;
        min-height: 34px;
        padding: 4px 8px;
        border-radius: 9px;
        opacity: 0.5;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-main-audio {
        gap: 2px;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-name-audio {
        font-size: 0.78rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .files-live-wave {
        height: 11px;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mode-blog:not(.project-create-card) .folder-body {
        position: relative;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mode-blog:not(.project-create-card) .folder-body::after {
        content: none;
        position: absolute;
        inset: 0;
        z-index: 1;
        border-radius: inherit;
        background: rgba(199, 179, 229, 0.25);
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mode-blog:not(.project-create-card) .folder-preview {
        border-radius: 12px;
        overflow: hidden;
        background: rgba(199, 179, 229, 0.25);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mode-blog:not(.project-create-card) .folder-preview > * {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row {
        position: absolute;
        left: var(--mobile-card-action-inset);
        right: var(--mobile-card-action-inset);
        top: 50%;
        transform: translateY(-50%);
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: var(--mobile-card-action-slot) var(--mobile-card-action-slot);
        gap: var(--mobile-card-action-gap);
        width: auto;
        padding: var(--mobile-card-action-padding-y) var(--mobile-card-action-padding-x);
        z-index: 6;
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-video .folder-actions-row::before,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-photo .folder-actions-row::before,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row::before,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row::before,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions::before,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row::before {
        content: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-video .folder-actions-row .project-card-menu,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-photo .folder-actions-row .project-card-menu,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .project-card-menu,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row .project-card-menu,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row .project-group-settings-menu,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row .project-card-menu {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-video .folder-actions-row .folder-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-video .folder-actions-row .folder-open-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-photo .folder-actions-row .folder-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-photo .folder-actions-row .folder-open-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .folder-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .folder-open-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row .folder-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row .folder-open-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .blog-collection-editor-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .open-video-group-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row .folder-open-btn {
        min-height: var(--mobile-card-action-slot);
        height: var(--mobile-card-action-slot);
        border-radius: 12px;
        font-size: 0.82rem;
        background: #ffffff;
        pointer-events: auto;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo) .folder-actions-row {
        grid-template-rows: var(--mobile-card-action-slot) var(--mobile-card-action-slot);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions {
        grid-template-rows: var(--mobile-card-action-slot) var(--mobile-card-action-slot);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo) .folder-actions-row .folder-open-btn {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row .folder-open-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .open-video-group-btn {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card:is(.mode-video, .mode-photo) .folder-actions-row .folder-preview-btn {
        grid-row: 2;
        justify-self: center;
        width: 80%;
        min-height: var(--mobile-card-button-height);
        height: var(--mobile-card-button-height);
        border-radius: var(--mobile-card-button-radius);
        font-size: 0.66rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-blog .folder-actions-row .folder-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .blog-collection-editor-btn {
        grid-row: 2;
        justify-self: center;
        width: 80%;
        min-height: var(--mobile-card-button-height);
        height: var(--mobile-card-button-height);
        border-radius: var(--mobile-card-button-radius);
        font-size: 0.66rem;
        background: #ffffff;
        pointer-events: auto;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .blog-collection-editor-btn {
        font-size: 0;
        color: transparent;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.project-group-card.mode-blog .folder-actions-row.project-group-actions .blog-collection-editor-btn::after {
        content: "Preview";
        font-size: 0.66rem;
        color: #111c2b;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row .folder-open-btn {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-files .folder-actions-row .folder-preview-btn {
        grid-row: 2;
        justify-self: center;
        width: 80%;
        min-height: var(--mobile-card-button-height);
        height: var(--mobile-card-button-height);
        border-radius: var(--mobile-card-button-radius);
        font-size: 0.66rem;
        background: #ffffff;
        pointer-events: auto;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row {
        grid-template-rows: var(--mobile-card-action-slot) var(--mobile-card-action-slot);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .folder-open-btn {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .folder-preview-btn {
        grid-row: 2;
        width: var(--mobile-card-action-slot);
        justify-self: center;
        border-radius: 999px;
        padding: 0;
        font-size: 0;
        color: transparent;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.mobile-bottom-pill-card.mode-audio .folder-actions-row .folder-preview-btn::before {
        content: "";
        width: 0;
        height: 0;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 10px solid rgba(18, 32, 47, 0.7);
        transform: translateX(2px);
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-body {
        position: relative;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .portfolio-card-preview {
        opacity: 0.5;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row {
        position: absolute;
        left: var(--mobile-card-action-inset);
        right: var(--mobile-card-action-inset);
        top: 50%;
        transform: translateY(-50%);
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: var(--mobile-card-action-slot) var(--mobile-card-action-slot);
        gap: var(--mobile-card-action-gap);
        width: auto;
        padding: var(--mobile-card-action-padding-y) var(--mobile-card-action-padding-x);
        z-index: 6;
        pointer-events: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row::before {
        content: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row .project-card-menu {
        display: none;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row .portfolio-preview-btn,
    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row .portfolio-open-btn {
        grid-row: 2;
        justify-self: center;
        width: 80%;
        min-height: var(--mobile-card-button-height);
        height: var(--mobile-card-button-height);
        border-radius: var(--mobile-card-button-radius);
        font-size: 0.66rem;
        background: #ffffff;
        pointer-events: auto;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row .portfolio-preview-btn {
        grid-row: 1;
    }

    .projects-dashboard:not(.dashboard-list-view) .project-folder-card.portfolio-site-card.mode-portfolio .folder-actions-row .portfolio-open-btn {
        grid-row: 2;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) {
        --preview-video-header-height: 124px;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .preview-site-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-items: center;
        gap: 14px;
        margin-bottom: 0;
        border-bottom: 1px solid var(--line);
    }

    .review-client.preview-page.dashboard-quick-preview.files-mode .preview-site-topbar {
        padding-bottom: var(--preview-video-header-padding-bottom, 24px);
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .site-portfolio-headline {
        display: flex;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .site-portfolio-headline-title {
        justify-content: center;
        margin: 0;
        text-align: center;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .preview-site-topbar-actions {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .preview-site-topbar-actions-main {
        justify-content: center;
        width: 100%;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode, .client-blog-mode) .layout {
        margin-top: 0;
    }

    .review-client.preview-page.dashboard-quick-preview:is([data-project-mode="video"], .client-photo-mode, .files-mode, .audio-mode) .client-media-section .library-head {
        display: none;
        margin: 0;
    }

    .review-client.preview-page.dashboard-quick-preview[data-project-mode="video"] .client-media-section {
        margin-top: -16px;
    }

    .review-client.preview-page.dashboard-quick-preview.files-mode .client-files-dropzone-row--preview {
        display: none;
        margin: 0;
        padding: 0;
        border-bottom: 0;
    }

    .review-client.preview-page.dashboard-quick-preview.files-mode .client-media-section {
        margin-top: var(--preview-video-header-padding-bottom, 24px);
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .client-media-section {
        margin-top: var(--preview-video-header-padding-bottom, 24px);
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .video-grid {
        width: min(100%, calc(100vw - 48px));
        max-width: 680px;
        margin-inline: auto;
        gap: 24px;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .video-grid .clip-card {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        border: 1px solid var(--line);
        border-radius: 26px;
        background: #ffffff;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .video-grid .clip-card.is-playback-mode-active {
        border-color: #bdd0e9;
        background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
        box-shadow:
            0 18px 42px rgba(74, 118, 178, 0.24),
            0 8px 18px rgba(74, 118, 178, 0.18);
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .video-grid .clip-card.is-playback-mode-active .audio-waveform-progress span {
        background: #8fb7ec;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .card-meta {
        padding: 18px 24px 15px;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-track-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px 30px;
        grid-template-rows: auto 34px auto;
        column-gap: 12px;
        row-gap: 8px;
        align-items: center;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-track-main {
        display: contents;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-track-main > .title-row {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        min-width: 0;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .clip-title {
        min-width: 0;
        max-width: 100%;
        margin: 0;
        font-size: 1rem;
        line-height: 1.15;
        font-weight: 400;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-card-title-actions {
        display: none;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-time-row {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        width: 100%;
        max-width: none;
        font-size: 0.68rem;
        line-height: 1.15;
        color: var(--muted);
        white-space: nowrap;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-time-total {
        margin-left: 0;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-play-toggle,
    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-reset-start-btn {
        grid-row: 1;
        align-self: center;
        justify-self: center;
        width: 28px;
        height: 28px;
        border: 0;
        border-radius: 0;
        background: transparent !important;
        color: #142338;
        box-shadow: none !important;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-play-toggle {
        grid-column: 2;
        font-size: 1.04rem;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-reset-start-btn {
        grid-column: 3;
        color: #6f8198;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-reset-start-btn svg {
        width: 18px;
        height: 18px;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-waveform {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
        height: 34px;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-waveform-base,
    .review-client.preview-page.dashboard-quick-preview.audio-mode .clip-card .audio-waveform-progress {
        padding: 0 8px;
    }

    .review-client.preview-page.dashboard-quick-preview.files-mode .layout {
        min-height: 100dvh;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .review-client.preview-page.dashboard-quick-preview.files-mode .preview-site-footer {
        margin-top: auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    .review-client.preview-page.dashboard-quick-preview.client-photo-mode .client-media-section {
        margin-top: 16px;
    }

    .review-client.preview-page.dashboard-quick-preview.client-photo-mode .client-photo-hero {
        width: 100vw;
        left: 50%;
        right: 50%;
        margin: 0 -50vw 28px;
        aspect-ratio: 1 / 1;
    }

    .review-client.preview-page.dashboard-quick-preview.client-photo-mode .video-grid.photo-grid {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }

    .review-client.preview-page.dashboard-quick-preview.client-blog-mode .dashboard-quick-blog-preview {
        padding-top: 16px;
    }

}

@media screen and (max-width: 480px) {
    .projects-dashboard {
        --mobile-dashboard-card-min: 158px;
        --mobile-dashboard-card-gap-x: 12px;
        --mobile-dashboard-card-gap-y: 8px;
        --mobile-dashboard-body-padding-x: 10px;
        --mobile-dashboard-body-padding-y: 12px;
        --mobile-card-action-inset: 14%;
        --mobile-card-action-gap: 12px;
        --mobile-card-action-slot: 34px;
        --mobile-card-action-padding-y: 12px;
        --mobile-card-action-padding-x: 10px;
        --mobile-card-button-height: 28px;
        --mobile-card-button-radius: 9px;
        --mobile-folder-tab-height: 34px;
        --mobile-folder-tab-radius: 12px;
        --mobile-folder-tab-padding-x: 12px;
        --mobile-folder-tab-gap: 9px;
    }

    .projects-dashboard .library-tabs-section {
        margin-top: 18px;
    }

    .projects-dashboard .library-tab-body {
        padding: var(--mobile-dashboard-body-padding-y) var(--mobile-dashboard-body-padding-x) 14px;
    }

    .projects-dashboard .library-tabs-nav .library-tab-toggle {
        min-height: 32px;
        height: 32px;
        padding-inline: 7px;
        font-size: 0.74rem;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .library-audio-filter-row {
        width: 80%;
        max-width: 252px;
        gap: 8px;
    }

    .projects-dashboard:not(.dashboard-list-view) .library-tab-cards[data-library-tab-cards="audio"] > .library-audio-filter-row .library-audio-filter-btn {
        min-height: 30px;
        height: 30px;
        padding-inline: 6px;
        font-size: 0.68rem;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
    body.projects-dashboard {
        min-height: 100svh;
        overflow: hidden;
        padding: 24px;
    }

    body.projects-dashboard::before {
        content: "Sorry, I’m the portrait-mode type.";
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: grid;
        place-items: center;
        box-sizing: border-box;
        padding: 24px;
        background: #ffffff;
        font-family: inherit;
        font-style: italic;
        font-size: 1rem;
        color: var(--ink);
        text-align: center;
        pointer-events: auto;
    }
}

/* Single-file Audio preview only. The public preview keeps the production
   controls and media handlers; this block changes their mobile presentation. */
@media screen and (max-width: 768px) {
    html.preview-audio-root,
    html.preview-audio-root body.preview-page.preview-audio-page {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        overscroll-behavior: none;
        background: #050608;
    }

    body.preview-page.preview-audio-page .layout {
        --preview-audio-control-bottom: clamp(14px, 2.5dvh, 24px);
        --preview-audio-cluster-shift: clamp(10px, calc(12dvh - 58px), 58px);
        --preview-audio-logo-shift: clamp(4px, 1.2dvh, 12px);
        --preview-audio-muted-white: rgba(255, 255, 255, 0.624);
        position: relative;
        width: 100vw;
        max-width: none;
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-rows: minmax(0, 83fr) minmax(0, 17fr);
        overflow: hidden;
        background: #050608;
    }

    body.preview-page.preview-audio-page .preview-site-topbar {
        position: absolute;
        top: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(17% + var(--preview-audio-control-bottom));
        left: auto;
        z-index: 5;
        width: auto;
        min-height: 44px;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        background: transparent;
        transform: translateY(var(--preview-audio-cluster-shift));
    }

    body.preview-page.preview-audio-page .site-portfolio-headline {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body.preview-page.preview-audio-page .preview-audio-header-actions {
        position: static;
        z-index: auto;
        align-self: auto;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin-left: auto;
    }

    body.preview-page.preview-audio-page .preview-audio-repeat-btn,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--preview-audio-muted-white);
        box-shadow: none;
    }

    body.preview-page.preview-audio-page .preview-audio-repeat-btn:hover,
    body.preview-page.preview-audio-page .preview-audio-repeat-btn:focus,
    body.preview-page.preview-audio-page .preview-audio-repeat-btn:focus-visible,
    body.preview-page.preview-audio-page .preview-audio-repeat-btn:active,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn:hover,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn:focus,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn:focus-visible,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn:active {
        background: transparent;
        color: var(--preview-audio-muted-white);
        box-shadow: none;
    }

    body.preview-page.preview-audio-page .preview-audio-repeat-btn.is-active {
        background: transparent;
        color: #d9c3a8;
    }

    body.preview-page.preview-audio-page .preview-audio-repeat-btn:focus-visible,
    body.preview-page.preview-audio-page .preview-audio-download-action .preview-download-btn:focus-visible {
        outline: 2px solid var(--preview-audio-muted-white);
        outline-offset: 2px;
    }

    body.preview-page.preview-audio-page .preview-audio-repeat-btn svg,
    body.preview-page.preview-audio-page .preview-audio-download-icon {
        display: block;
        width: 20px;
        height: 20px;
        margin: auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    body.preview-page.preview-audio-page .preview-audio-download-action {
        display: inline-flex;
        width: auto;
        margin: 0;
    }

    body.preview-page.preview-audio-page .preview-audio-download-label {
        display: none;
    }

    body.preview-page.preview-audio-page .preview-share-content {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding-top: 0;
        overflow: visible;
    }

    body.preview-page.preview-audio-page .preview-audio-shell {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: block;
        border: 0;
        border-radius: 0;
        background: #050608;
        overflow: visible;
        box-shadow: none;
    }

    body.preview-page.preview-audio-page .preview-audio-artwork {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        aspect-ratio: auto;
        border-right: 0;
        border-bottom: 0;
        background-color: #050608;
        overflow: hidden;
    }

    body.preview-page.preview-audio-page .preview-audio-artwork img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    body.preview-page.preview-audio-page .preview-audio-artwork::after {
        content: "";
        position: absolute;
        inset: 38% 0 0;
        z-index: 1;
        background: linear-gradient(
            180deg,
            rgba(5, 6, 8, 0) 0%,
            rgba(5, 6, 8, 0.3) 34%,
            rgba(5, 6, 8, 0.82) 72%,
            #050608 100%
        );
        pointer-events: none;
    }

    body.preview-page.preview-audio-page .preview-audio-content {
        position: absolute;
        right: 0;
        bottom: var(--preview-audio-control-bottom);
        left: 0;
        z-index: 2;
        display: block;
        min-width: 0;
        margin: 0;
        padding: 0 clamp(12px, 4vw, 24px);
        box-sizing: border-box;
        transform: translateY(var(--preview-audio-cluster-shift));
    }

    body.preview-page.preview-audio-page .preview-audio-mobile-title {
        display: block;
        min-width: 0;
        margin: 0 0 12px;
        color: #ffffff;
        font-family: "Avenir Next", "Segoe UI", sans-serif;
        font-size: clamp(1rem, 4.5vw, 1.2rem);
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        overflow-wrap: anywhere;
    }

    body.preview-page.preview-audio-page .preview-audio-player {
        width: 100%;
        min-width: 0;
        display: block;
        padding: 0;
        box-sizing: border-box;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-track-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px 44px minmax(0, 1fr);
        grid-template-rows: auto 44px;
        column-gap: 8px;
        row-gap: 12px;
        align-items: center;
        min-width: 0;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-play-toggle {
        grid-column: 2;
        grid-row: 2;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 1.5px solid var(--preview-audio-muted-white);
        border-radius: 50%;
        background: transparent;
        color: var(--preview-audio-muted-white);
        align-self: center;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-reset-start-btn {
        grid-column: 3;
        grid-row: 2;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 1.5px solid var(--preview-audio-muted-white);
        border-radius: 50%;
        background: transparent;
        color: var(--preview-audio-muted-white);
        align-self: center;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-play-toggle:hover,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-play-toggle:focus,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-play-toggle:focus-visible,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-play-toggle:active,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-reset-start-btn:hover,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-reset-start-btn:focus,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-reset-start-btn:focus-visible,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-reset-start-btn:active {
        border: 1.5px solid var(--preview-audio-muted-white) !important;
        background: transparent !important;
        color: var(--preview-audio-muted-white) !important;
        box-shadow: none !important;
        outline-color: var(--preview-audio-muted-white) !important;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-track-main {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-rows: 42px auto;
        gap: 6px;
        transform: none;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform {
        --ncne-waveform-canvas-background: transparent;
        --ncne-waveform-base-color: rgba(255, 255, 255, 0.312);
        --ncne-waveform-progress-color: var(--preview-audio-muted-white);
        width: 100%;
        min-width: 0;
        height: 42px;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: hidden;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform-base,
    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform-progress {
        padding-right: 0;
        padding-left: 0;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform-base {
        opacity: 1;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform-base span {
        background: rgba(255, 255, 255, 0.312);
        opacity: 1;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-waveform-progress span {
        background: var(--preview-audio-muted-white);
    }

    body.preview-page.preview-audio-page .preview-audio-shell .ncne-waveform-canvas {
        filter: none;
        opacity: 1;
    }

    body.preview-page.preview-audio-page .preview-audio-shell .audio-time-row {
        width: 100%;
        max-width: none;
        color: var(--preview-audio-muted-white);
        font-size: 0.88rem;
    }

    body.preview-page.preview-audio-page .preview-audio-footer {
        width: 100%;
        height: 100%;
        min-height: 0;
        flex: 0 0 auto;
        margin: 0;
        padding: max(8px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
        justify-content: center;
        gap: 12px;
        background: #050608;
        box-sizing: border-box;
    }

    body.preview-page.preview-audio-page .preview-audio-footer .preview-expiry-note {
        color: #d9c3a8;
    }

    body.preview-page.preview-audio-page .preview-audio-footer .site-portfolio-footer-logo {
        width: 48px;
        filter: invert(1);
        opacity: 0.32;
        transform: translateY(var(--preview-audio-logo-shift));
    }
}
/* Shared Files mobile header: centered name and permitted controls in natural flow. */
@media screen and (max-width: 768px) {
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .layout {
        margin-top: 0;
        padding-top: 0;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar {
        position: sticky;
        top: 0;
        inset-inline: auto;
        width: 100vw;
        height: auto;
        min-height: 0;
        margin: 0;
        margin-inline: calc(50% - 50vw);
        padding: 26px 24px 24px;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
        column-gap: 0;
        row-gap: 16px;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .site-portfolio-headline {
        grid-row: 1;
        grid-column: 1;
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) :is(.site-portfolio-headline-title, .site-portfolio-headline-name) {
        display: block;
        width: 100%;
        min-width: 0;
        min-height: 0;
        margin: 0;
        font-size: 16px;
        line-height: 24px;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) :is(.site-portfolio-headline-prefix, .site-portfolio-headline-sep) {
        display: none;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar-actions:not(:has(button:not([hidden]), #dropzone)) {
        display: none;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar > .preview-site-topbar-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar-actions-main {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: center;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar [hidden] {
        display: none !important;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar :is(.preview-header-menu-btn, .preview-header-download-btn) {
        height: 44px;
        min-height: 44px;
        min-width: 0;
        padding: 0 8px;
        font-size: clamp(11px, 3.1vw, 14px);
        line-height: 1.15;
        white-space: normal;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar .client-files-dropzone-row--preview {
        position: static;
        inset: auto;
        display: flex;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone.topbar-upload-dropzone {
        display: inline-flex;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 44px;
        min-height: 44px;
        margin: 0;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: transparent;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone:not(.is-inline-upload-active) > p {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone:not(.is-inline-upload-active)::before {
        content: "";
        display: block;
        position: static;
        width: 20px;
        height: 20px;
        margin: auto;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315253a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V9m-4.5 4.5L12 9l4.5 4.5M5 4h14'/%3E%3C/svg%3E");
        pointer-events: none;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone::after {
        content: none;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone:focus-visible {
        outline: 2px solid #223348;
        outline-offset: 3px;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar .client-files-dropzone-row--preview:has(.is-inline-upload-active) {
        flex-basis: 100%;
        width: 100%;
        height: auto;
        order: 2;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone.topbar-upload-dropzone.is-inline-upload-active {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 53px;
        padding: 8px;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone .video-inline-upload {
        width: 100%;
        min-width: 0;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone .video-inline-upload-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone .video-inline-upload-status {
        flex: 1 1 150px;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) #dropzone .video-inline-upload-cancel {
        flex: 0 0 auto;
        min-height: 44px;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar :is(.preview-header-menu-btn, .preview-header-download-btn):is(:hover, :focus, :active) {
        background: transparent;
        background-image: none;
        color: #223348;
        border-color: var(--line);
        box-shadow: none;
    }
    body.review-client.preview-page.files-mode[data-project-mode="files"][data-site-scoped-project-view="0"][data-share-alias]:not([data-share-alias=""]):not(.single-files-goodybag-share):not(.embedded-client-view):not(.dashboard-project-preview):not(.dashboard-quick-preview):not(.client-login-page) .preview-site-topbar #bulk-delete-btn {
        order: 1;
        color: #c44b4b;
    }
}
