body.trend-layout .app-body {
    grid-template-columns: 1fr;
}

body.trend-layout {
    --trend-shell-max: min(94vw, 1600px);
    --trend-section-pad: clamp(12px, 1.5vh, 18px);
    --trend-menu-font: clamp(12px, 1.45vh, 14px);
    --trend-btn-font: clamp(12px, 1.5vh, 15px);
    --trend-menu-pad-y: clamp(6px, 1vh, 10px);
    --trend-menu-pad-x: clamp(10px, 1.2vw, 16px);
    --trend-result-h: clamp(260px, calc(100vh - 300px), 760px);
    --trend-main-col: minmax(240px, 340px);
    --trend-main-side-col: minmax(240px, 340px);
    --trend-main-content-col: minmax(0, 1fr);
    --trend-main-gap: clamp(10px, 1.35vh, 16px);
    --trend-main-width: min(1520px, 100%);
    --trend-main-top: clamp(8px, 3vh, 40px);
    --trend-main-btn-h: clamp(40px, 4.9vh, 46px);
    --trend-main-panel-max-h: clamp(220px, calc(100vh - 360px), 520px);
    --trend-detail-media-max-h: clamp(220px, 48vh, 620px);
    --trend-detail-card-pad: clamp(12px, 1.4vh, 18px);
    background-image:
        linear-gradient(180deg, rgba(3, 9, 20, 0.78) 0%, rgba(5, 10, 20, 0.88) 100%),
        url('/bg/trend-desktop-dark.png');
    background-position: center top, center top;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-attachment: fixed, fixed;
}

:root[data-theme="light"] body.trend-layout,
body[data-theme="light"].trend-layout {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(244, 248, 255, 0.72) 100%),
        url('/bg/trend-desktop-light.png');
}

@media (max-width: 900px) {
    body.trend-layout {
        background-image:
            linear-gradient(180deg, rgba(3, 9, 20, 0.8) 0%, rgba(5, 10, 20, 0.9) 100%),
            url('/bg/trend-mobile-dark.png');
        background-attachment: scroll, scroll;
    }

    :root[data-theme="light"] body.trend-layout,
    body[data-theme="light"].trend-layout {
        background-image:
            linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(244, 248, 255, 0.76) 100%),
            url('/bg/trend-mobile-light.png');
    }
}

body.trend-layout .app-shell,
body.trend-layout .header,
body.trend-layout .top-menu,
body.trend-layout .footer-banner {
    max-width: var(--trend-shell-max);
}

body.trend-layout .section {
    padding: var(--trend-section-pad);
}

body.trend-layout .top-menu .menu-btn,
body.trend-layout .submit-btn,
body.trend-layout .ghost-btn {
    font-size: var(--trend-btn-font);
}

body.trend-layout .top-menu .menu-btn {
    font-size: var(--trend-menu-font);
    padding: var(--trend-menu-pad-y) var(--trend-menu-pad-x);
}

body.trend-layout.trend-scale-big {
    --trend-section-pad: clamp(14px, 1.9vh, 24px);
    --trend-menu-font: clamp(13px, 1.7vh, 17px);
    --trend-btn-font: clamp(13px, 1.8vh, 18px);
    --trend-menu-pad-y: clamp(7px, 1.15vh, 12px);
    --trend-result-h: clamp(320px, calc(100vh - 280px), 900px);
    --trend-main-top: clamp(10px, 3.6vh, 56px);
    --trend-main-btn-h: clamp(44px, 5.5vh, 52px);
    --trend-main-panel-max-h: clamp(260px, calc(100vh - 360px), 620px);
    --trend-detail-media-max-h: clamp(260px, 54vh, 700px);
    --trend-detail-card-pad: clamp(14px, 1.7vh, 22px);
}

body.trend-layout.trend-scale-big .trend-main-btn {
    min-height: 48px;
}

body.trend-layout.trend-scale-small {
    --trend-section-pad: clamp(10px, 1vh, 14px);
    --trend-menu-font: clamp(11px, 1.2vh, 13px);
    --trend-btn-font: clamp(11px, 1.25vh, 13px);
    --trend-menu-pad-y: clamp(5px, 0.8vh, 8px);
    --trend-result-h: clamp(220px, calc(100vh - 260px), 520px);
    --trend-main-gap: clamp(8px, 1vh, 12px);
    --trend-main-top: clamp(4px, 1.4vh, 16px);
    --trend-main-btn-h: clamp(34px, 4.2vh, 40px);
    --trend-main-panel-max-h: clamp(170px, calc(100vh - 320px), 360px);
    --trend-detail-media-max-h: clamp(190px, 44vh, 520px);
    --trend-detail-card-pad: clamp(10px, 1vh, 14px);
}

body.trend-guest-layout .app-body {
    grid-template-columns: 1fr;
}

body.trend-guest-layout .content {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

.trend-main-launch {
    display: grid;
    grid-template-columns: var(--trend-main-col);
    gap: var(--trend-main-gap);
    align-items: start;
    justify-content: center;
    justify-items: center;
    width: var(--trend-main-width);
    margin: var(--trend-main-top) auto 0;
    transition: grid-template-columns 320ms ease, gap 320ms ease;
}

.trend-main-btn {
    margin-top: 0;
    width: min(340px, 100%);
    min-height: var(--trend-main-btn-h);
    font-size: 14px;
    transition: transform 320ms ease, opacity 320ms ease;
}

.trend-main-placeholder {
    min-height: 0;
    border-radius: 14px;
    border: 1px dashed rgba(124, 92, 255, 0);
    background: rgba(124, 92, 255, 0.08);
    padding: 0;
    opacity: 0;
    transform: translateX(34px);
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 340ms ease, transform 340ms ease, max-width 340ms ease, min-height 340ms ease, padding 340ms ease, border-color 340ms ease;
}

.trend-main-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.trend-main-mode-btn {
    width: 100%;
    min-height: clamp(40px, 4.4vh, 46px);
}

.trend-main-mode-btn.is-active {
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.28);
}

.trend-main-launch.is-started {
    grid-template-columns: var(--trend-main-side-col) var(--trend-main-content-col);
    gap: var(--trend-main-gap);
    justify-items: stretch;
    width: 100%;
    margin: 0 auto;
}

.trend-main-launch.is-started #trendStartBtn {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 100%;
    transform: translateX(-10px);
}

.trend-main-launch.is-started #trendMainPlaceholder {
    grid-column: 2;
    grid-row: 1;
}

.trend-main-launch.is-started #trendMusicBotBtn {
    grid-column: 1;
    grid-row: 2;
}

.trend-main-launch.is-started #trendPhotoBotBtn {
    grid-column: 1;
    grid-row: 3;
}

.trend-main-launch.is-started #trendMainPlaceholder {
    min-height: 120px;
    border-style: solid;
    border-color: rgba(124, 92, 255, 0.45);
    padding: clamp(8px, 1.2vh, 14px);
    opacity: 1;
    transform: translateX(0);
    max-width: 100%;
    pointer-events: auto;
}

body.trend-layout #photoMainSection .panel-header {
    display: none;
}

body.trend-layout #photoMainSection .sidebar-panel {
    min-height: clamp(260px, calc(100vh - 260px), 620px);
    display: flex;
    align-items: flex-start;
    justify-content: stretch;
}

body.trend-layout #photoMainSection #trendMainPlaceholder .trend-motion-panel {
    max-height: none;
    overflow: visible;
    padding-right: 4px;
}

body.trend-layout #photoMainSection #trendMainPlaceholder {
    width: 100%;
}

body.trend-layout #photoGenerateSection .photo-generator-body {
    grid-template-columns: minmax(320px, 0.85fr) minmax(520px, 1.15fr);
    gap: clamp(14px, 2.2vw, 26px);
}

body.trend-layout #photoGenerateSection .photo-form {
    width: 100%;
    max-width: min(640px, 100%);
    margin: 0 auto;
}

body.trend-layout #photoGenerateSection .photo-result-panel {
    min-height: 0;
    height: var(--trend-result-h);
    overflow: hidden;
}

body.trend-layout #photoGenerateSection .photo-result-panel .photo-result {
    min-height: 0;
    overflow: hidden;
}

body.trend-layout #photoGenerateSection .photo-result-panel .photo-result .song-cover.trend-result-video-cover {
    min-height: 0 !important;
    max-height: 100% !important;
    height: 100% !important;
}

body.trend-layout #photoGenerateSection .photo-result-panel .photo-result .song-cover .trend-result-video {
    object-fit: contain;
    width: 100%;
    height: auto !important;
    max-height: 100%;
}

body.trend-layout #photoGenerateSection .photo-result-panel .photo-result .song-card.trend-result-video-card {
    height: 100% !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
}

body.trend-layout #photoDetailSection #photoDetailContent {
    display: grid;
    gap: clamp(10px, 1.3vh, 16px);
}

body.trend-layout #photoDetailSection .detail-card--clean {
    padding: var(--trend-detail-card-pad);
    border-radius: 14px;
}

body.trend-layout #photoDetailSection .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px 12px;
    font-size: clamp(11px, 1.25vh, 13px);
}

body.trend-layout #photoDetailSection .detail-desc {
    font-size: clamp(12px, 1.35vh, 14px);
    line-height: 1.45;
}

body.trend-layout #photoDetailSection .song-grid {
    grid-template-columns: 1fr;
}

body.trend-layout #photoDetailSection .song-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.trend-layout #photoDetailSection .trend-detail-download-wrap {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

body.trend-layout #photoDetailSection .trend-detail-download-btn {
    border: 1px solid rgba(98, 110, 255, 0.5);
    background: linear-gradient(135deg, rgba(103, 87, 255, 0.95), rgba(67, 201, 218, 0.92));
    color: #f8fafc;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(89, 102, 255, 0.32);
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

body.trend-layout #photoDetailSection .trend-detail-download-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 14px 30px rgba(89, 102, 255, 0.38);
}

body.trend-layout #photoDetailSection .trend-detail-download-btn:active {
    transform: translateY(0);
}

body.trend-layout #photoDetailSection .song-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: min(var(--trend-detail-media-max-h), calc(100vh - 340px));
    min-height: clamp(180px, 38vh, 420px);
    max-height: var(--trend-detail-media-max-h);
    border-radius: 12px;
}

body.trend-layout #photoDetailSection .song-cover img,
body.trend-layout #photoDetailSection .song-cover video {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

body.trend-layout #photoDetailSection .song-cover .trend-detail-video-player {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #0b0f15;
}

@media (max-width: 900px) {
    body.trend-layout .header {
        align-items: flex-start;
    }
    body.trend-layout .brand {
        width: 100%;
        min-width: 0;
    }
    body.trend-layout .brand-title {
        min-width: 0;
        flex-wrap: wrap;
        gap: 8px;
    }
    body.trend-layout .brand-title .theme-toggle-btn {
        max-width: 100%;
    }
    body.trend-layout .brand-title h1 {
        font-size: clamp(24px, 4.4vw, 30px);
        line-height: 1.1;
    }
    .trend-main-launch {
        grid-template-columns: minmax(260px, 1fr);
        margin-top: 12px;
    }
    .trend-main-launch.is-started {
        grid-template-columns: minmax(260px, 1fr);
    }
    .trend-main-launch.is-started #trendStartBtn,
    .trend-main-launch.is-started #trendMainPlaceholder,
    .trend-main-launch.is-started #trendMusicBotBtn,
    .trend-main-launch.is-started #trendPhotoBotBtn {
        grid-column: 1;
    }
    .trend-main-launch.is-started #trendStartBtn {
        transform: none;
    }
    .trend-main-launch.is-started #trendMainPlaceholder {
        grid-row: 2;
        min-height: 120px;
    }
    .trend-main-launch.is-started #trendMusicBotBtn {
        grid-row: 3;
    }
    .trend-main-launch.is-started #trendPhotoBotBtn {
        grid-row: 4;
    }
    .trend-main-mode-switch {
        grid-template-columns: 1fr;
    }
}

.trend-motion-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.trend-motion-panel-head h3 {
    margin: 0;
    font-size: 18px;
}

.trend-motion-panel-hint {
    color: var(--muted);
    font-size: 12px;
}

.trend-motion-template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.trend-photoshoot-card {
    position: relative;
    min-height: 0;
    aspect-ratio: var(--trend-photoshoot-card-aspect, 9 / 16);
    align-content: stretch;
    cursor: pointer;
    background: #0b0f15;
    background:
        linear-gradient(180deg, rgba(20, 24, 38, 0.72) 0%, rgba(13, 18, 31, 0.96) 100%),
        radial-gradient(circle at top left, rgba(124, 92, 255, 0.28), transparent 48%);
}

.trend-photoshoot-card:hover {
    transform: translateY(-1px);
}

.trend-photoshoot-card-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #0b0f15;
}

.trend-photoshoot-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, 0.02) 0%, rgba(8, 10, 16, 0.08) 100%);
}

.trend-photoshoot-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(124, 92, 255, 0.34);
    background: rgba(124, 92, 255, 0.14);
    color: #dcd7ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.trend-motion-template-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 16, 26, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.trend-photoshoot-card .trend-motion-template-card-title,
.trend-photoshoot-card .trend-motion-template-card-meta {
    position: relative;
    z-index: 1;
}

.trend-motion-template-card:hover {
    border-color: rgba(124, 92, 255, 0.65);
    transform: translateY(-1px);
}

.trend-motion-template-card.is-selected {
    border-color: rgba(124, 92, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.3);
}

.trend-motion-template-card video {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center;
    background: #0b0f15;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.trend-motion-template-name {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--muted);
}

.trend-motion-selected {
    font-size: 13px;
    color: var(--text);
}

.trend-motion-studio {
    display: grid;
    gap: 12px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto 14px;
    justify-items: center;
    text-align: center;
    margin-bottom: 14px;
}

.trend-motion-studio-title {
    font-weight: 600;
    font-size: 16px;
    width: 100%;
}

.trend-motion-variant-picker {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.trend-motion-variant-btn {
    border: 1px solid rgba(124, 92, 255, 0.38);
    background: rgba(124, 92, 255, 0.09);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.trend-motion-variant-btn:hover {
    border-color: rgba(124, 92, 255, 0.75);
    background: rgba(124, 92, 255, 0.2);
    transform: translateY(-1px);
}

.trend-motion-variant-btn.is-active {
    border-color: rgba(124, 92, 255, 0.95);
    background: rgba(124, 92, 255, 0.32);
}

.trend-motion-upload {
    border: 1px dashed rgba(124, 92, 255, 0.45);
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.08);
    color: var(--text);
    padding: 12px;
    display: grid;
    gap: 10px;
    justify-items: center;
    width: 100%;
    cursor: pointer;
}

.trend-motion-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.trend-motion-upload span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(124, 92, 255, 0.5);
    background: linear-gradient(135deg, rgba(112, 88, 255, 0.2), rgba(55, 201, 198, 0.16));
    color: #e6ecff;
    font-weight: 600;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}

.trend-motion-upload:hover span {
    transform: translateY(-1px);
    border-color: rgba(124, 92, 255, 0.8);
    box-shadow: 0 10px 22px rgba(62, 90, 255, 0.18);
}

.trend-motion-upload-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(10, 16, 26, 0.6);
    width: min(280px, 100%);
    margin: 0 auto;
    justify-self: center;
}

.trend-motion-upload-preview::before {
    content: '✓';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 159, 120, 0.92);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    display: grid;
    place-items: center;
    z-index: 2;
    box-shadow: 0 6px 14px rgba(15, 159, 120, 0.35);
}

.trend-motion-upload-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.trend-motion-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(4, 8, 15, 0.72);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}

.trend-motion-upload-remove:hover {
    background: rgba(220, 79, 79, 0.9);
    border-color: rgba(255, 255, 255, 0.75);
}

.trend-motion-status {
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
    width: 100%;
    text-align: center;
}

.trend-motion-reference {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 0;
    background: rgba(10, 16, 26, 0.65);
    overflow: hidden;
}

.trend-motion-reference-title {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 0;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(6, 10, 18, 0.55);
}

.trend-motion-reference video {
    width: 100%;
    height: clamp(280px, 52vh, 620px);
    max-height: none;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    background: #0b0f15;
}

.trend-photoshoot-reference-card {
    position: relative;
    min-height: 0;
    aspect-ratio: var(--trend-photoshoot-reference-aspect, 9 / 16);
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 0;
    text-align: center;
    overflow: hidden;
    background: #0b0f15;
    background:
        linear-gradient(180deg, rgba(14, 18, 30, 0.9) 0%, rgba(10, 14, 24, 0.96) 100%),
        radial-gradient(circle at top center, rgba(124, 92, 255, 0.18), transparent 48%);
}

.trend-photoshoot-reference-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 0;
    background: #0b0f15;
}

.trend-photoshoot-reference-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, 0.04) 0%, rgba(8, 10, 16, 0.14) 100%);
    z-index: 0;
}

.trend-photoshoot-reference-badge {
    position: relative;
    z-index: 1;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(124, 92, 255, 0.34);
    background: rgba(124, 92, 255, 0.14);
    color: #dcd7ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.trend-photoshoot-reference-name {
    position: relative;
    z-index: 1;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
}

.trend-photoshoot-reference-hint {
    position: relative;
    z-index: 1;
    max-width: 420px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

#trendPhotoshootReference .trend-motion-reference-title,
#trendPhotoshootReferenceBadge,
#trendPhotoshootReferenceName,
#trendPhotoshootReferenceHint {
    display: none !important;
}

.trend-motion-result-placeholder {
    min-height: 320px;
    border: 1px dashed rgba(124, 92, 255, 0.45);
    border-radius: 14px;
    background: rgba(124, 92, 255, 0.06);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

.trend-motion-result-placeholder-icon {
    font-size: 30px;
}

.trend-motion-result-placeholder-title {
    color: var(--text);
    font-weight: 600;
}

.trend-motion-result-placeholder-hint {
    font-size: 13px;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-generator-header,
body.trend-layout.trend-motion-focus #photoGenerateSection .photo-form > .settings-label,
body.trend-layout.trend-motion-focus #photoGenerateSection #photoPrompt,
body.trend-layout.trend-motion-focus #photoGenerateSection #photoPromptEditorBtn,
body.trend-layout.trend-motion-focus #photoGenerateSection .photo-form-row,
body.trend-layout.trend-motion-focus #photoGenerateSection #photoModelInputs,
body.trend-layout.trend-motion-focus #photoGenerateSection #photoGenerateBtn,
body.trend-layout.trend-motion-focus #photoGenerateSection #photoGeneratePriceHint {
    display: none !important;
}

body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionStudio {
    display: grid !important;
}

body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionStudio.has-image .trend-motion-upload {
    display: none !important;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-title {
    display: none !important;
}

body.trend-layout.trend-motion-focus.photo-show-result #photoGenerateSection .photo-result-title {
    display: flex !important;
    justify-content: flex-end;
    padding: 8px 10px 0;
    margin-bottom: 10px;
}

body.trend-layout.trend-motion-focus.photo-show-result #photoGenerateSection .photo-result-title > span {
    display: none;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel {
    min-height: 0;
    height: var(--trend-result-h);
    padding: 0;
    overflow: hidden;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result {
    margin-top: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result.hidden {
    display: none !important;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-card,
body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover {
    height: 100%;
    min-height: 0;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover img,
body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover video {
    object-fit: cover;
    width: auto;
    max-width: 100%;
    height: 100%;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover.trend-result-video-cover {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    align-items: center;
    justify-content: center;
    background: #0b0f15;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-card.trend-result-video-card {
    height: 100% !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover .trend-result-video {
    object-fit: contain;
    width: 100%;
    height: auto !important;
    max-height: 100%;
    background: #0b0f15;
}

body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReference {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
}

body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReferenceVideo {
    width: 100%;
    height: 100%;
    min-height: inherit;
    border-radius: 0;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #0b0f15;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-generator-header,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-form > .settings-label,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection #photoPrompt,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection #photoPromptEditorBtn,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-form-row,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection #photoModelInputs,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection #photoGenerateBtn,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection #photoGeneratePriceHint {
    display: none !important;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection #trendPhotoshootStudio {
    display: grid !important;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection #trendPhotoshootStudio.has-image .trend-motion-upload {
    display: none !important;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-title {
    display: none !important;
}

body.trend-layout.trend-photoshoot-focus.photo-show-result #photoGenerateSection .photo-result-title {
    display: flex !important;
    justify-content: flex-end;
    padding: 8px 10px 0;
    margin-bottom: 10px;
}

body.trend-layout.trend-photoshoot-focus.photo-show-result #photoGenerateSection .photo-result-title > span {
    display: none;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel {
    min-height: 0;
    height: var(--trend-result-h);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result {
    margin-top: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result.hidden {
    display: none !important;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-card,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover {
    height: 100%;
    min-height: 0;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover img,
body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover video {
    object-fit: contain;
    width: auto;
    max-width: 100%;
    height: 100%;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover.trend-result-video-cover {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    align-items: center;
    justify-content: center;
    background: #0b0f15;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-card.trend-result-video-card {
    height: 100% !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel .photo-result .song-cover .trend-result-video {
    object-fit: contain;
    width: 100%;
    height: auto !important;
    max-height: 100%;
    background: #0b0f15;
}

body.trend-layout.trend-photoshoot-focus #photoGenerateSection #trendPhotoshootReference {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1280px) {
    .trend-main-launch.is-started {
        grid-template-columns: minmax(240px, 320px) minmax(320px, 1fr);
        width: min(940px, 100%);
    }
    .trend-main-mode-switch {
        grid-template-columns: 1fr;
    }
    .trend-motion-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.trend-layout #photoGenerateSection .photo-generator-body {
        grid-template-columns: minmax(300px, 0.9fr) minmax(400px, 1.1fr);
    }
}

@media (max-width: 1080px) {
    body.trend-layout #photoGenerateSection .photo-generator-body {
        grid-template-columns: 1fr;
    }
    body.trend-layout #photoGenerateSection .photo-form {
        max-width: min(620px, 100%);
    }
    body.trend-layout #photoGenerateSection .photo-result-panel {
        height: min(var(--trend-result-h), clamp(240px, calc(100vh - 300px), 620px));
    }
    body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReference,
    body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReferenceVideo {
        min-height: 0;
        height: 100%;
    }
    body.trend-layout.trend-photoshoot-focus #photoGenerateSection #trendPhotoshootReference,
    body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel {
        min-height: 0;
        height: 100%;
    }
    body.trend-layout #photoDetailSection .song-cover {
        height: min(var(--trend-detail-media-max-h), calc(100vh - 300px));
    }
}

@media (max-width: 760px) {
    .trend-main-launch,
    .trend-main-launch.is-started {
        width: 100%;
        gap: 10px;
    }
    .trend-main-btn {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        min-height: 40px;
    }
    .trend-motion-template-grid {
        grid-template-columns: 1fr;
    }
    .trend-motion-panel-head h3 {
        font-size: 16px;
    }
    .trend-motion-variant-picker {
        gap: 6px;
    }
    .trend-motion-variant-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    body.trend-layout #photoGenerateSection .photo-result-panel {
        height: min(var(--trend-result-h), clamp(220px, calc(100vh - 260px), 480px));
    }
    body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReference,
    body.trend-layout.trend-motion-focus #photoGenerateSection #trendMotionReferenceVideo {
        min-height: 0;
        height: 100%;
    }
    body.trend-layout.trend-photoshoot-focus #photoGenerateSection #trendPhotoshootReference,
    body.trend-layout.trend-photoshoot-focus #photoGenerateSection .photo-result-panel {
        min-height: 0;
        height: 100%;
    }
    body.trend-layout #photoDetailSection .detail-grid {
        grid-template-columns: 1fr;
    }
    body.trend-layout #photoDetailSection .song-cover {
        height: min(var(--trend-detail-media-max-h), calc(100vh - 320px));
    }
}

@media (max-height: 920px) {
    body.trend-layout {
        padding: 14px;
    }
    body.trend-layout .header {
        margin-bottom: 12px;
        padding: 12px 16px;
    }
    body.trend-layout .top-menu {
        margin-bottom: 12px;
        padding: 10px 12px;
    }
    body.trend-layout .section {
        padding: 12px;
    }
    body.trend-layout #photoGenerateSection .photo-result-panel,
    body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel {
        height: clamp(220px, calc(100vh - 280px), 560px);
    }
    body.trend-layout #photoDetailSection .song-cover {
        height: min(var(--trend-detail-media-max-h), calc(100vh - 300px));
    }
}

@media (max-height: 820px) {
    .trend-main-launch.is-started {
        grid-template-columns: 1fr;
    }
    .trend-main-launch.is-started #trendStartBtn,
    .trend-main-launch.is-started #trendMainPlaceholder,
    .trend-main-launch.is-started #trendMusicBotBtn,
    .trend-main-launch.is-started #trendPhotoBotBtn {
        grid-column: 1;
    }
    .trend-main-launch.is-started #trendMainPlaceholder {
        grid-row: 2;
    }
    .trend-main-launch.is-started #trendMusicBotBtn {
        grid-row: 3;
    }
    .trend-main-launch.is-started #trendPhotoBotBtn {
        grid-row: 4;
    }
    body.trend-layout #photoGenerateSection .photo-generator-body {
        grid-template-columns: 1fr;
    }
    body.trend-layout #photoGenerateSection .photo-form {
        max-width: min(620px, 100%);
    }
    body.trend-layout #photoGenerateSection .photo-result-panel,
    body.trend-layout.trend-motion-focus #photoGenerateSection .photo-result-panel {
        height: clamp(200px, calc(100vh - 260px), 460px);
    }
    body.trend-layout #photoDetailSection .song-cover {
        height: min(var(--trend-detail-media-max-h), calc(100vh - 280px));
    }
}

body[data-theme="light"] .trend-motion-template-card {
    background: #ffffff;
}

body[data-theme="light"] .trend-motion-upload {
    background: #eef2ff;
}

body[data-theme="light"] .trend-motion-upload span {
    color: #1f2a5c;
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #dbe8ff, #d8f6f2);
}

body[data-theme="light"] .trend-motion-variant-btn {
    background: #eef2ff;
    border-color: rgba(99, 102, 241, 0.45);
}

body[data-theme="light"] .trend-motion-variant-btn.is-active {
    background: #dbe6ff;
    border-color: rgba(79, 70, 229, 0.75);
}

body[data-theme="light"] .trend-motion-reference {
    background: #ffffff;
}

body[data-theme="light"] .trend-photoshoot-reference-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 247, 255, 0.98) 100%),
        radial-gradient(circle at top center, rgba(124, 92, 255, 0.12), transparent 48%);
}

body[data-theme="light"] .trend-photoshoot-card-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(22, 30, 54, 0.08) 100%);
}

body[data-theme="light"] .trend-photoshoot-reference-card::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(22, 30, 54, 0.08) 100%);
}

body[data-theme="light"] .trend-motion-result-placeholder {
    background: #f8faff;
}
