/* 探索滑卡：仿交友軟體卡片（overflow 放在內層，避免裁切固定底欄） */
body.page-swipe {
    min-height: 100dvh;
    min-height: 100vh;
}

body.page-swipe #g8-page-root[data-page="swipe"] {
    position: relative;
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
}

body.page-swipe #g8-page-root[data-page="swipe"] > .g8-page-panel.is-active {
    position: relative;
    height: 100%;
    min-height: 100%;
}

.swipe-page {
    --swipe-actions-height: 76px;
    --swipe-bottom-gap: 12px;
    --swipe-nav-clearance: 0px;
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    padding: 10px 16px calc(var(--swipe-nav-clearance) + var(--swipe-actions-height) + var(--swipe-bottom-gap));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.swipe-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.swipe-quota {
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(246, 240, 234, 0.72);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(26, 21, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.swipe-quota.is-out {
    color: #fb7185;
    border-color: rgba(251, 113, 133, 0.35);
}

.swipe-btn-yes.is-disabled,
.swipe-btn-yes:disabled {
    opacity: 0.38;
    filter: grayscale(0.4);
}

.swipe-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark-color, #F6F0EA);
}

.swipe-header p {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--muted-color, rgba(246, 240, 234, 0.62));
}

.swipe-filters {
    display: flex;
    gap: 8px;
}

.swipe-filter {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(26, 21, 36, 0.7);
    color: rgba(246, 240, 234, 0.78);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.swipe-filter.is-on {
    background: #fff;
    color: #2a1b3d;
    border-color: transparent;
}

.swipe-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    padding-bottom: calc(var(--swipe-actions-height) + 8px);
    box-sizing: border-box;
}

.swipe-deck {
    position: absolute;
    inset: 0;
}

.swipe-card {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #1A1524;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    touch-action: none;
    user-select: none;
    will-change: transform;
}

.swipe-card img.swipe-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.swipe-card-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 88px 18px 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(14, 11, 20, 0.55) 35%, rgba(14, 11, 20, 0.94) 100%);
    color: #fff;
}

.swipe-card-meta h2 {
    margin: 0 0 4px;
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.swipe-card-line {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.88);
}

.swipe-card-block {
    margin-top: 10px;
}

.swipe-card-label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.62);
}

.swipe-card-bio {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.94);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swipe-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.swipe-card-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(4px);
}

.swipe-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    margin-right: 6px;
}

.swipe-stamp {
    position: absolute;
    top: 28px;
    padding: 6px 12px;
    border: 3px solid;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 1.15rem;
    opacity: 0;
    transform: rotate(-18deg);
}

.swipe-stamp-like {
    left: 18px;
    color: #34d399;
    border-color: #34d399;
}

.swipe-stamp-nope {
    right: 18px;
    color: #fb7185;
    border-color: #fb7185;
    transform: rotate(16deg);
}

.swipe-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
}

.swipe-empty[hidden] {
    display: none !important;
}

.swipe-empty img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 8px;
}

.swipe-empty strong {
    color: var(--dark-color, #F6F0EA);
    font-size: 1.1rem;
}

.swipe-empty p {
    margin: 0 0 10px;
    color: var(--muted-color, rgba(246, 240, 234, 0.62));
    font-size: 0.9rem;
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 14px 0 4px;
    flex-shrink: 0;
}

.swipe-actions[hidden] {
    display: none !important;
}

@media (max-width: 991.98px) {
    body.page-swipe.has-mobile-nav #g8-page-root[data-page="swipe"],
    body.page-swipe:has(.mobile-bottom-nav) #g8-page-root[data-page="swipe"] {
        height: calc(100dvh - 56px - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 56px - env(safe-area-inset-bottom, 0px));
    }

    body.page-swipe .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        z-index: 1040 !important;
    }

    /* 手機全屏：照片铺满导航列以上区域，其余 UI 叠在上方 */
    body.page-swipe .swipe-page {
        --swipe-nav-clearance: 0px;
        --swipe-bottom-gap: 0px;
        --swipe-actions-height: 76px;
        --swipe-actions-clearance: calc(var(--swipe-actions-height) + 32px);
        max-width: none;
        margin: 0;
        padding: 0;
        position: absolute;
        inset: 0;
        width: 100%;
        height: auto;
        min-height: 100%;
        display: block;
        overflow: hidden;
    }

    body.page-swipe #g8-page-root[data-page="swipe"] > .g8-page-panel.is-active {
        height: 100%;
        min-height: 100%;
    }

    body.page-swipe .site-announcements {
        position: absolute;
        top: env(safe-area-inset-top, 0px);
        left: 0;
        right: 0;
        z-index: 40;
        margin: 0;
        padding: 8px 12px 0;
        pointer-events: none;
    }

    body.page-swipe .site-announcement {
        pointer-events: auto;
    }

    body.page-swipe .swipe-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        margin: 0;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 48px;
        gap: 8px;
        background: linear-gradient(180deg, rgba(14, 11, 20, 0.82) 0%, rgba(14, 11, 20, 0.42) 58%, transparent 100%);
        pointer-events: none;
    }

    body.page-swipe .swipe-header.swipe-header-filters-only {
        padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 28px;
        gap: 0;
        background: linear-gradient(180deg, rgba(14, 11, 20, 0.68) 0%, rgba(14, 11, 20, 0.22) 72%, transparent 100%);
    }

    body.page-swipe .swipe-header > *,
    body.page-swipe .swipe-header .swipe-filters,
    body.page-swipe .swipe-header .swipe-filter,
    body.page-swipe .swipe-header .swipe-quota {
        pointer-events: auto;
    }

    body.page-swipe .swipe-header h1 {
        font-size: 1.2rem;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
    }

    body.page-swipe .swipe-header p {
        font-size: 0.76rem;
        line-height: 1.35;
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
    }

    body.page-swipe .swipe-filter {
        background: rgba(14, 11, 20, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.page-swipe .swipe-filter.is-on {
        background: rgba(255, 255, 255, 0.96);
    }

    body.page-swipe .swipe-quota {
        background: rgba(14, 11, 20, 0.62);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.page-swipe .swipe-stage {
        position: absolute;
        inset: 0;
        padding-bottom: 0;
        z-index: 1;
    }

    body.page-swipe .swipe-card {
        border-radius: 0;
        box-shadow: none;
    }

    /* 整張照片底部统一渐层，避免文字区与按钮区出现两截色差 */
    body.page-swipe .swipe-card::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: min(62vh, 460px);
        background: linear-gradient(
            180deg,
            rgba(14, 11, 20, 0) 0%,
            rgba(14, 11, 20, 0.12) 22%,
            rgba(14, 11, 20, 0.52) 58%,
            rgba(14, 11, 20, 0.82) 100%
        );
        pointer-events: none;
        z-index: 1;
    }

    body.page-swipe .swipe-card-meta {
        bottom: var(--swipe-actions-clearance);
        padding: 48px 18px 10px;
        max-height: calc(100% - var(--swipe-actions-clearance) - 24px);
        overflow: hidden;
        box-sizing: border-box;
        background: none;
        z-index: 2;
    }

    body.page-swipe .swipe-card .swipe-stamp {
        z-index: 3;
    }

    body.page-swipe .swipe-empty {
        background: rgba(14, 11, 20, 0.94);
        z-index: 2;
    }

    body.page-swipe.has-mobile-nav .swipe-page,
    body.page-swipe:has(.mobile-bottom-nav) .swipe-page {
        --swipe-nav-clearance: 0px;
    }

    body.page-swipe.has-mobile-nav .swipe-actions,
    body.page-swipe:has(.mobile-bottom-nav) .swipe-actions {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 10px);
        width: min(100%, 480px);
        z-index: 1035;
        padding: 0 16px;
        margin: 0;
        box-sizing: border-box;
        pointer-events: none;
    }

    body.page-swipe.has-mobile-nav .swipe-actions .swipe-btn,
    body.page-swipe:has(.mobile-bottom-nav) .swipe-actions .swipe-btn {
        pointer-events: auto;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    }

    body.page-swipe.has-mobile-nav .swipe-stage,
    body.page-swipe:has(.mobile-bottom-nav) .swipe-stage {
        padding-bottom: 0;
    }
}

@media (max-width: 991.98px) and (max-height: 700px) {
    body.page-swipe .swipe-page {
        --swipe-actions-height: 64px;
        --swipe-actions-clearance: calc(var(--swipe-actions-height) + 28px);
    }

    body.page-swipe .swipe-header.swipe-header-filters-only {
        padding-bottom: 20px;
    }

    body.page-swipe .swipe-card-meta {
        padding-top: 40px;
        max-height: calc(100% - var(--swipe-actions-clearance) - 16px);
    }

    body.page-swipe .swipe-card-meta h2 {
        font-size: 1.35rem;
    }

    .swipe-btn {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    body.page-swipe.has-mobile-nav .swipe-actions,
    body.page-swipe:has(.mobile-bottom-nav) .swipe-actions {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 6px);
        gap: 22px;
    }
}

.swipe-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(26, 21, 36, 0.92);
    color: #fff;
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.swipe-btn-no {
    color: #fb7185;
}

.swipe-btn-yes {
    color: #fff;
    background: linear-gradient(135deg, #e879a9, #c084fc);
    border: none;
}

.swipe-match {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(14, 11, 20, 0.72);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.swipe-match[hidden] {
    display: none !important;
}

.swipe-match-card {
    width: min(100%, 380px);
    background: var(--card-bg, #1A1524);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px 22px 22px;
    text-align: center;
    color: var(--dark-color, #F6F0EA);
}

.swipe-match-kicker {
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #E8B4D4;
    margin-bottom: 14px;
}

.swipe-match-faces {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.swipe-match-faces img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.swipe-match-heart {
    color: #e879a9;
    font-size: 1.4rem;
}

.swipe-match-card h2 {
    font-size: 1.25rem;
    margin: 0 0 6px;
}

.swipe-match-card p {
    color: var(--muted-color, rgba(246, 240, 234, 0.62));
    margin-bottom: 16px;
}

.swipe-match-card .btn {
    width: 100%;
    margin-bottom: 8px;
}

.swipe-media-card {
    text-align: left;
}

.swipe-media-card h2 {
    text-align: center;
}

.swipe-media-copy {
    font-size: 0.9rem;
    line-height: 1.55;
}

.swipe-media-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.swipe-media-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted-color, rgba(246, 240, 234, 0.78));
}

.swipe-media-list i {
    color: #E8B4D4;
    font-size: 1rem;
}

html.display-light .swipe-media-list li {
    color: #5c5268 !important;
}

html.display-light .swipe-header h1,
html.display-light .swipe-empty strong,
html.display-light .swipe-match-card h2 {
    color: #2a1b3d !important;
}

html.display-light .swipe-quota {
    background: #fff;
    color: #5c5268;
    border-color: rgba(42, 27, 61, 0.16);
}

html.display-light .swipe-quota.is-out {
    color: #be123c;
    border-color: rgba(190, 18, 60, 0.28);
}

html.display-light .swipe-header p,
html.display-light .swipe-empty p,
html.display-light .swipe-match-card p {
    color: #5c5268 !important;
}

html.display-light .swipe-filter {
    background: #fff;
    color: #5c5268;
    border-color: rgba(42, 27, 61, 0.16);
}

html.display-light .swipe-filter.is-on {
    background: #2a1b3d;
    color: #fff;
}

html.display-light .swipe-btn {
    background: #fff;
    border-color: rgba(42, 27, 61, 0.12);
}

html.display-light .swipe-btn-yes {
    background: linear-gradient(135deg, #e879a9, #c084fc);
    color: #fff;
}

html.display-light .swipe-match-card {
    background: #fff;
    color: #2a1b3d;
}

html.display-light .swipe-match-card .btn-outline-light {
    color: #2a1b3d;
    border-color: rgba(42, 27, 61, 0.2);
}

html.display-light .swipe-card-meta,
html.display-light .swipe-card-meta h2,
html.display-light .swipe-card-meta .swipe-card-line,
html.display-light .swipe-card-meta .swipe-card-label,
html.display-light .swipe-card-meta .swipe-card-bio,
html.display-light .swipe-card-meta .swipe-card-tag {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

html.display-light .swipe-card-meta .swipe-card-label {
    color: rgba(255, 255, 255, 0.68) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.68) !important;
}

html.display-light .swipe-card-meta .swipe-card-line,
html.display-light .swipe-card-meta .swipe-card-bio {
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
}

/* 保留鏡頭串流給 iOS；僅探索頁內的隱藏 hold，不影響右下角 pip */
.swipe-page .swipe-media-hold,
.swipe-page #swipe-media-hold:not(.g8-pip-video) {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 3px;
    height: 3px;
    opacity: 0.02;
    pointer-events: none;
    z-index: 2147483646;
    object-fit: cover;
    background: transparent;
}

@media (min-width: 992px) {
    .swipe-page {
        --swipe-nav-clearance: 0px;
        padding-top: 24px;
        padding-bottom: 32px;
        min-height: 100dvh;
    }

    .swipe-stage {
        min-height: 560px;
        padding-bottom: 0;
    }
}
