﻿/* 门户式全站布局：页头 / 页尾 / site-inner */

:root {
    --site-max-width: 1320px;
    --site-gutter: 24px;
    --portal-sticky-top: 72px;

    --brand: #EF3F4A;
    --brand-dark: #D92D3A;
    --brand-light: #FFF1F2;

    --text: #1F2937;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --background: var(--bg);
    --surface: #FFFFFF;
}

html {
    background-color: var(--background);
}

body.portal-layout {
    margin: 0;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.portal-layout > .site-header {
    flex-shrink: 0;
}

body.portal-layout > main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

body.portal-layout > .site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

body.portal-layout .site-main {
    padding: 0;
    max-width: none;
    width: 100%;
    min-height: 0;
    background: transparent;
}

body.portal-layout.home-layout .site-main.site-main-home {
    min-height: 0;
    padding: 0;
}

.site-inner {
    width: min(
        var(--site-max-width),
        calc(100% - var(--site-gutter) * 2)
    );
    margin-left: auto;
    margin-right: auto;
}

/* 页头 */
.site-header {
    --site-logo-height: 36px;
    --site-logo-max-width: 220px;
    --site-nav-font-size: 16px;
    --site-nav-font-weight: 600;
    --site-nav-letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-family-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        backdrop-filter 0.25s ease,
        -webkit-backdrop-filter 0.25s ease;
}

.site-header.is-stuck {
    background: rgba(255, 255, 255, 0.78);
    border-bottom-color: rgba(229, 231, 235, 0.75);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: min(var(--site-logo-max-width), 42vw);
    text-decoration: none;
}

.site-logo:hover,
.site-logo:focus,
.site-logo:focus-visible {
    text-decoration: none;
}

.site-logo__img {
    display: block;
    height: var(--site-logo-height);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.site-logo__text {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand);
    white-space: nowrap;
}

.site-nav {
    display: flex;
    flex: 1;
    justify-content: flex-start;
    align-items: stretch;
    gap: 30px;
    height: 72px;
    min-width: 0;
}

.site-nav a {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 4px;
    color: #4b5563;
    font-size: var(--site-nav-font-size);
    font-weight: var(--site-nav-font-weight);
    letter-spacing: var(--site-nav-letter-spacing);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.site-nav a:hover {
    color: var(--brand);
}

.site-nav a.active {
    color: var(--brand);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
    transform: translateX(-50%);
}

.site-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.site-account__menu {
    position: relative;
    flex-shrink: 0;
}

.site-account__menu.is-open .site-account__dropdown::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.site-account__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 180px;
    padding: 4px 8px 4px 4px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.site-account__trigger:hover,
.site-account__menu.is-open .site-account__trigger,
.site-account__menu:focus-within .site-account__trigger {
    background: #f3f4f6;
}

.site-account__trigger:focus-visible {
    outline: 2px solid rgba(var(--primary-rgb), 0.35);
    outline-offset: 2px;
}

.site-account__user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 140px;
    text-decoration: none;
    color: var(--text);
}

.site-account__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transform-origin: center center;
}

.site-account__avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
    transform-origin: center center;
}

@keyframes site-account-avatar-cw {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes site-account-avatar-ccw {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

.site-account__avatar.is-rotating-cw,
.site-account__avatar--placeholder.is-rotating-cw {
    animation: site-account-avatar-cw 0.36s ease;
}

.site-account__avatar.is-rotating-ccw,
.site-account__avatar--placeholder.is-rotating-ccw {
    animation: site-account-avatar-ccw 0.36s ease;
}

.site-account__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #374151;
}

.site-account__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #9ca3af;
    flex-shrink: 0;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.site-account__menu.is-open .site-account__caret {
    transform: rotate(180deg);
}

.site-account__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 120;
    min-width: 188px;
    padding: 12px 0 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.site-account__menu.is-open .site-account__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.site-account__dropdown[hidden] {
    display: block;
}

.site-account__dropdown-greet {
    padding: 0 16px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.site-account__dropdown-divider {
    height: 1px;
    margin: 0 12px 6px;
    background: linear-gradient(90deg, transparent, #e5e7eb 12%, #e5e7eb 88%, transparent);
}

.site-account__dropdown-divider--tail {
    margin: 4px 12px 6px;
}

.site-account__dropdown-list {
    padding: 0 8px;
}

.site-account__dropdown-item {
    position: relative;
    display: block;
    margin: 2px 0;
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.site-account__dropdown a.site-account__dropdown-item:hover,
.site-account__dropdown a.site-account__dropdown-item:focus,
.site-account__dropdown a.site-account__dropdown-item:focus-visible,
.site-account__dropdown a.site-account__dropdown-item:active {
    text-decoration: none;
}

.site-account__dropdown-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: var(--brand);
    transform: translateY(-50%);
    transition: height 0.15s ease;
}

.site-account__dropdown-item:hover,
.site-account__dropdown-item:focus,
.site-account__dropdown-item:focus-visible {
    background: #f3f4f6;
    color: #111827;
    outline: none;
    text-decoration: none;
}

.site-account__dropdown-item:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.28);
}

.site-account__dropdown-item.is-active {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--brand);
    font-weight: 600;
}

.site-account__dropdown-item.is-active::before {
    height: 16px;
}

.site-account__dropdown-item.is-active:hover,
.site-account__dropdown-item.is-active:focus,
.site-account__dropdown-item.is-active:focus-visible {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--brand);
    text-decoration: none;
}

.site-account__dropdown-item--logout {
    margin: 0 8px;
    color: #6b7280;
}

.site-account__dropdown-item--logout:hover,
.site-account__dropdown-item--logout:focus,
.site-account__dropdown-item--logout:focus-visible {
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.site-account__link {
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.site-account__link:hover,
.site-account__link:focus,
.site-account__link:focus-visible {
    color: var(--brand);
    text-decoration: none;
}

.site-account__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-account__btn:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* 页尾（仅 PC 展示；总高度约 ≤ 页头 72px × 3 = 216px） */
.site-footer {
    width: 100%;
    margin-top: 0;
    background: linear-gradient(180deg, #1a2332 0%, #151c24 100%);
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    max-height: 216px;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand, #e11d48) 20%, transparent 80%);
    opacity: 0.65;
}

.site-footer__main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 24px 32px;
    padding: 16px 0 12px;
}

.site-footer__brand {
    flex: 0 1 200px;
    min-width: 0;
    max-width: 220px;
    align-self: center;
}

.site-footer__nav {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 24px 32px;
    min-width: 0;
}

.site-footer__col {
    flex: 0 0 auto;
    min-width: 88px;
    align-self: flex-start;
}

.site-footer__mp {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    text-align: left;
    align-self: center;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 4px;
}

.site-footer__logo img {
    display: block;
    height: 24px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.site-footer__name {
    display: inline-block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.site-footer__name:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer__intro {
    margin: 0;
    max-width: 220px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-footer__col-title {
    margin: 0 0 6px;
    min-height: 16px;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}

.site-footer__links a {
    display: block;
    min-height: 16px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-footer__links a:hover {
    color: #fff;
}

.site-footer__mp-card {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin: 0;
    padding: 6px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.site-footer__mp-qr {
    display: block;
    width: 108px;
    height: 108px;
    object-fit: contain;
    border-radius: 6px;
}

.site-footer__mp-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 700;
}

.site-footer__mp-text {
    min-width: 0;
    max-width: 180px;
}

.site-footer__mp-title {
    margin: 0 0 2px;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.site-footer__mp-desc {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.site-footer__bottom-copy {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-footer__bottom-sep {
    margin: 0 5px;
    opacity: 0.6;
}

.site-footer__bottom-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 12px;
    flex-shrink: 0;
}

.site-footer__bottom-meta a {
    color: #64748b;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-footer__bottom-meta a:hover {
    color: #cbd5e1;
}

@media (max-width: 1100px) {
    .site-footer__main {
        flex-wrap: wrap;
        align-items: flex-start;
        max-height: none;
    }

    .site-footer {
        max-height: none;
    }

    .site-footer__mp {
        margin-left: 0;
    }
}
.mobile-nav-fab {
    display: none;
    position: fixed;
    left: auto;
    right: 0;
    top: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0));
    z-index: 1100;
    transform: none;
    pointer-events: none;
    touch-action: none;
    --mobile-nav-fab-item-w: 118px;
    --mobile-nav-fab-item-h: 44px;
    --mobile-nav-fab-glass: rgba(255, 255, 255, 0.82);
    --mobile-nav-fab-brand-light: #ff6b73;
    --mobile-nav-fab-brand: #ef3f4a;
    --mobile-nav-fab-brand-dark: #d92d3a;
}

@keyframes mobile-nav-fab-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 16px rgba(var(--primary-rgb), 0.3),
            0 0 0 0 rgba(var(--primary-rgb), 0.42);
    }

    50% {
        transform: scale(1.09);
        box-shadow:
            0 12px 36px rgba(var(--primary-rgb), 0.48),
            0 0 0 14px rgba(var(--primary-rgb), 0);
    }
}

.mobile-nav-fab.is-positioned {
    bottom: auto;
}

.mobile-nav-fab__panel {
    pointer-events: auto;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 10px;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-fab.is-dragging .mobile-nav-fab__panel {
    transition: none;
}

.mobile-nav-fab.is-collapsed .mobile-nav-fab__menu {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-fab.is-collapsed .mobile-nav-fab__panel,
.mobile-nav-fab.is-expanded .mobile-nav-fab__panel {
    transform: none;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__menu {
    visibility: visible;
    position: static;
    height: auto;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-fab.is-dock-left .mobile-nav-fab__panel,
.mobile-nav-fab.is-dock-left .mobile-nav-fab__menu {
    align-items: flex-start;
}

.mobile-nav-fab__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: linear-gradient(
        145deg,
        var(--mobile-nav-fab-brand-light) 0%,
        var(--mobile-nav-fab-brand) 52%,
        var(--mobile-nav-fab-brand-dark) 100%
    );
    color: #fff;
    cursor: grab;
    box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.32);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-nav-fab.is-collapsed:not(.is-dragging) .mobile-nav-fab__toggle {
    animation: mobile-nav-fab-breathe 2.2s ease-in-out infinite;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__toggle,
.mobile-nav-fab.is-dragging .mobile-nav-fab__toggle {
    animation: none;
    background: linear-gradient(
        145deg,
        var(--mobile-nav-fab-brand-light) 0%,
        var(--mobile-nav-fab-brand) 50%,
        var(--mobile-nav-fab-brand-dark) 100%
    );
}

.mobile-nav-fab.is-dragging .mobile-nav-fab__toggle {
    cursor: grabbing;
    transform: scale(1.04);
    box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.38);
    animation: none;
}

.mobile-nav-fab:not(.is-dragging) .mobile-nav-fab__toggle:active {
    animation: none;
    transform: scale(0.96);
}

.mobile-nav-fab__toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-fab__toggle-icon--close {
    display: none;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__toggle-icon--menu {
    display: none;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__toggle-icon--close {
    display: flex;
}

.mobile-nav-fab__menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 0;
    width: var(--mobile-nav-fab-item-w);
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
}

.mobile-nav-fab__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    height: var(--mobile-nav-fab-item-h);
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 999px 0 0 999px;
    background: var(--mobile-nav-fab-glass);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(12px);
    pointer-events: none;
    transition:
        opacity 0.24s ease,
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.mobile-nav-fab.is-dock-left .mobile-nav-fab__item {
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 0 999px 999px 0;
    transform: translateX(-12px);
}

.mobile-nav-fab__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    transition: color 0.15s ease;
}

.mobile-nav-fab__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-nav-fab.is-dock-right .mobile-nav-fab__toggle {
    align-self: flex-end;
}

.mobile-nav-fab.is-dock-left .mobile-nav-fab__toggle {
    align-self: flex-start;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__item {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__item:nth-child(1) {
    transition-delay: 0.04s;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__item:nth-child(2) {
    transition-delay: 0.08s;
}

.mobile-nav-fab.is-expanded .mobile-nav-fab__item:nth-child(3) {
    transition-delay: 0.12s;
}

.mobile-nav-fab__item.is-active,
.mobile-nav-fab__item:hover,
.mobile-nav-fab__item:focus-visible {
    color: var(--brand);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.14);
    text-decoration: none;
}

.mobile-nav-fab__item.is-active .mobile-nav-fab__icon,
.mobile-nav-fab__item:hover .mobile-nav-fab__icon,
.mobile-nav-fab__item:focus-visible .mobile-nav-fab__icon {
    color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-fab.is-collapsed:not(.is-dragging) .mobile-nav-fab__toggle {
        animation: none;
    }
}

/* 旧版底部 Tab 栏（已由悬浮球替代） */
.portal-layout .mobile-tabbar {
    display: none !important;
}

/* 业务页：门户布局下去掉旧版居中白卡片壳 */
body.portal-layout.cinema-layout,
body.portal-layout.schedule-layout,
body.portal-layout.seat-layout,
body.portal-layout.order-layout,
body.portal-layout.order-detail-layout,
body.portal-layout.order-confirm-layout,
body.portal-layout.pay-layout,
body.portal-layout.user-layout,
body.portal-layout.invite-layout,
body.portal-layout.auth-layout,
body.portal-layout.dispute-apply-layout,
body.portal-layout.dispute-chat-layout {
    background: var(--background);
}

body.portal-layout.cs-layout {
    background: var(--background);
}

body.portal-layout .site-main,
body.portal-layout .site-main-home,
body.portal-layout .site-main-cinema,
body.portal-layout .site-main-schedule,
body.portal-layout .site-main-seat,
body.portal-layout .site-main-order,
body.portal-layout .site-main-order-detail,
body.portal-layout .site-main-order-confirm,
body.portal-layout .site-main-pay,
body.portal-layout .site-main-app,
body.portal-layout .site-main-invite,
body.portal-layout .site-main-auth,
body.portal-layout .site-main-dispute-apply,
body.portal-layout .site-main-dispute-chat,
body.portal-layout .site-main-cs {
    min-height: 0;
    padding: 0;
    background: transparent;
}

body.portal-layout .page-shell,
body.portal-layout .home-shell,
body.portal-layout .order-shell,
body.portal-layout .oc-page,
body.portal-layout .od-page,
body.portal-layout .pay-page,
body.portal-layout .cinema-page,
body.portal-layout .schedule-page,
body.portal-layout .seat-page,
body.portal-layout .order-list-page,
body.portal-layout .user-page,
body.portal-layout .invite-home-page,
body.portal-layout .invite-withdraw-page,
body.portal-layout .auth-page,
body.portal-layout .dispute-apply-page,
body.portal-layout .dispute-chat-page,
body.portal-layout .cs-page,
body.portal-layout .app-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

body.portal-layout .page-container,
body.portal-layout .container {
    width: min(
        var(--site-max-width),
        calc(100% - var(--site-gutter) * 2)
    );
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

body.portal-layout .flow-desktop-bar {
    display: none !important;
}

@media (max-width: 768px) {
    /* 手机端：与 PC 统一白底，避免灰底 + 白卡片分层感 */
    html {
        background-color: #fff;
    }

    body.portal-layout {
        --bg: #FFFFFF;
        --background: #FFFFFF;
        --color-bg: #FFFFFF;
        --page-bg: #FFFFFF;
        --color-bg-elevated: #FFFFFF;
        --order-surface-shadow: none;
        --pay-surface-shadow: none;
        background: #fff;
    }

    body.portal-layout.cinema-layout,
    body.portal-layout.schedule-layout,
    body.portal-layout.seat-layout,
    body.portal-layout.order-layout,
    body.portal-layout.order-detail-layout,
    body.portal-layout.order-confirm-layout,
    body.portal-layout.pay-layout,
    body.portal-layout.user-layout,
    body.portal-layout.invite-layout,
    body.portal-layout.auth-layout,
    body.portal-layout.dispute-apply-layout,
    body.portal-layout.dispute-chat-layout,
    body.portal-layout.home-layout {
        background: #fff;
    }

    body.portal-layout .order-list-page,
    body.portal-layout .order-list-body,
    body.portal-layout .oc-page,
    body.portal-layout .od-page,
    body.portal-layout .schedule-page,
    body.portal-layout .seat-page,
    body.portal-layout .user-page,
    body.portal-layout .invite-home-page,
    body.portal-layout .invite-withdraw-page,
    body.portal-layout .auth-page,
    body.portal-layout .home-content-section {
        background: #fff;
    }

    /* 弱化卡片浮层阴影，保留细边框区分区块 */
    body.portal-layout .movie-row,
    body.portal-layout .cinema-card,
    body.portal-layout .order-card,
    body.portal-layout .order-search-wrap,
    body.portal-layout .order-tabs,
    body.portal-layout .order-list-body .empty-tip,
    body.portal-layout .order-list-body .order-loading,
    body.portal-layout .pay-page .oc-movie-card,
    body.portal-layout .pay-page .pay-checkout-card,
    body.portal-layout .oc-page .oc-movie-card,
    body.portal-layout .oc-page .oc-card:not(.oc-bottom-bar),
    body.portal-layout .od-page .od-card,
    body.portal-layout .da-page .da-card,
    body.portal-layout .da-page .da-main,
    body.portal-layout .dispute-chat-page .dc-main,
    body.portal-layout .dispute-chat-page .od-card,
    body.portal-layout .user-shortcut,
    body.portal-layout .user-panel,
    body.portal-layout .user-support-btn,
    body.portal-layout .user-hero,
    body.portal-layout .auth-main,
    body.portal-layout .auth-split,
    body.portal-layout .cinema-filters-card,
    body.portal-layout .cinema-search {
        box-shadow: none;
    }

    /* 手机端统一隐藏 PC 页脚，悬浮球导航替代底部 Tab（仅 body 直下页脚，不含列表内嵌页脚） */
    body.portal-layout > .site-footer {
        display: none;
    }

    .mobile-nav-fab {
        display: block !important;
        pointer-events: none;
    }

    body.portal-layout.has-tabbar > main {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* 手机端：主体与页头同宽满屏，统一 12px 内边距 */
    body.portal-layout .site-inner {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    body.portal-layout .page-container,
    body.portal-layout .container {
        width: 100%;
        max-width: none !important;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 769px) {
    .mobile-nav-fab {
        display: none !important;
    }

    body.portal-layout .mobile-tabbar {
        display: none !important;
    }

    /* PC：主体区域与导航 .site-inner 同宽，清除额外内边距 */
    body.portal-layout > main,
    body.portal-layout .site-main,
    body.portal-layout .site-main-home,
    body.portal-layout .site-main-cinema,
    body.portal-layout .site-main-schedule,
    body.portal-layout .site-main-seat,
    body.portal-layout .site-main-order,
    body.portal-layout .site-main-order-detail,
    body.portal-layout .site-main-order-confirm,
    body.portal-layout .site-main-pay,
    body.portal-layout .site-main-app,
    body.portal-layout .site-main-invite,
    body.portal-layout .site-main-auth,
    body.portal-layout .site-main-dispute-apply,
    body.portal-layout .site-main-dispute-chat {
        padding: 0 !important;
    }

    body.portal-layout .page-shell,
    body.portal-layout .home-shell,
    body.portal-layout .order-shell,
    body.portal-layout .oc-page,
    body.portal-layout .od-page,
    body.portal-layout .pay-page,
    body.portal-layout .cinema-page,
    body.portal-layout .schedule-page,
    body.portal-layout .seat-page,
    body.portal-layout .order-list-page,
    body.portal-layout .user-page,
    body.portal-layout .invite-home-page,
    body.portal-layout .invite-withdraw-page,
    body.portal-layout .auth-page,
    body.portal-layout .dispute-apply-page,
    body.portal-layout .dispute-chat-page,
    body.portal-layout .app-shell {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    body.portal-layout .page-container,
    body.portal-layout .container,
    body.portal-layout .page-shell .page-container,
    body.portal-layout .order-list-page .page-container,
    body.portal-layout .oc-page .page-container,
    body.portal-layout .od-page .page-container,
    body.portal-layout .pay-page .page-container,
    body.portal-layout .schedule-page .page-container,
    body.portal-layout .seat-page .page-container,
    body.portal-layout .user-page .page-container,
    body.portal-layout .invite-home-page .page-container,
    body.portal-layout .invite-withdraw-page .page-container,
    body.portal-layout .auth-page .page-container,
    body.portal-layout .dispute-apply-page .page-container,
    body.portal-layout .dispute-chat-page .page-container {
        width: min(
            var(--site-max-width),
            calc(100% - var(--site-gutter) * 2)
        );
        max-width: none !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    body.portal-layout .site-inner {
        width: min(
            var(--site-max-width),
            calc(100% - var(--site-gutter) * 2)
        );
        margin-left: auto;
        margin-right: auto;
    }

    body.portal-layout .flow-card,
    body.portal-layout .app-card {
        margin-left: 0;
        margin-right: 0;
    }

    body.portal-layout .order-main-col,
    body.portal-layout .order-search-block,
    body.portal-layout .user-body,
    body.portal-layout .invite-body,
    body.portal-layout .order-list-body {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 1100px) {
    .site-header__inner {
        flex-wrap: wrap;
        align-items: center;
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 0;
        gap: 12px 20px;
    }

    .site-logo {
        order: 1;
    }

    .site-account {
        order: 2;
        margin-left: auto;
    }

    .site-nav {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        height: auto;
        min-height: 48px;
        justify-content: flex-start;
        gap: 18px;
        overflow-x: auto;
        padding: 0 0 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        --site-nav-font-size: 15px;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a.active::after {
        bottom: -4px;
    }
}

@media (max-width: 640px) {
    .site-account__name {
        display: none;
    }

    .site-account__trigger {
        max-width: none;
        padding-right: 6px;
    }

    .site-account__link:not(.site-account__btn) {
        display: none;
    }

    body.auth-layout .site-account__link,
    body.auth-layout .site-account__btn {
        display: inline-flex;
    }
}

/* ========== 门户粘底布局：页头 + 弹性 main + 页尾 = 一屏 ========== */
/*
 * 子页面 CSS（flow / order / user 等）常给 main 写 min-height:100dvh，
 * 会与页头高度叠加，产生「滑一点就出现页脚但并未滚到底」的虚假滚动。
 * 门户下由 body flex 分配高度，禁止 main 单独占满视口。
 */
body.portal-layout > main,
body.portal-layout > main[class*="site-main"] {
    flex: 1 1 auto;
    min-height: 0 !important;
    height: auto;
    display: flex;
    flex-direction: column;
}

/* 短内容页：不足一屏时撑满 main，页脚贴底 */
body.portal-layout > main > .page-shell,
body.portal-layout > main > .home-shell,
body.portal-layout > main > .user-page,
body.portal-layout > main > .invite-home-page,
body.portal-layout > main > .invite-withdraw-page,
body.portal-layout > main > .auth-page,
body.portal-layout > main > .dispute-apply-page,
body.portal-layout > main > .dispute-chat-page,
body.portal-layout > main > .cs-page,
body.portal-layout > main > .app-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
}

/* PC：长列表页随文档增高，页脚在内容滚完后再出现 */
@media (min-width: 769px) {
    body.portal-layout > main > .home-page,
    body.portal-layout > main > .invite-home-page,
    body.portal-layout > main > .invite-withdraw-page,
    body.portal-layout > main > .cinema-page,
    body.portal-layout > main > .schedule-page,
    body.portal-layout > main > .seat-page,
    body.portal-layout > main > .order-shell:not(.order-list-page),
    body.portal-layout > main > .oc-page,
    body.portal-layout > main > .od-page,
    body.portal-layout > main > .pay-page {
        flex: 0 1 auto;
        min-height: auto !important;
    }
}
