/* LINE 前台：上方 banner + 背景 #E7F4FE；尺寸以 1% 為調整單位（改下面數值即可） */
:root {
    --line-page-bg: #E7F4FE;
    --line-ui-scale: 100;
    --line-banner-width: 100%;
    --line-phone-width: 92%;
    --line-phone-max-height: calc(100dvh - 24px);
    --line-logo-scale: 100;
    /* intel_banner_all.png 960×1704；留白起點略低於「2026 YEAR END DINNER」下緣 (y≈552) */
    --line-intel-banner-content-top: 618;
    --line-intel-banner-width-ref: 960;
    --line-intel-hero-spacer: calc(100% * var(--line-intel-banner-content-top) / var(--line-intel-banner-width-ref) + 0.85rem);
}

body.line-page-body {
    background-color: var(--line-page-bg);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-size: calc(1rem * var(--line-ui-scale) / 100);
}

/* 覆寫 Bootstrap container 左右 gutter（對應 bootstrap 預設 padding 關閉） */
body.line-page-body .container,
body.line-page-body .container-fluid,
body.line-page-body .container-sm,
body.line-page-body .container-md,
body.line-page-body .container-lg,
body.line-page-body .container-xl,
body.line-page-body .container-xxl {
    /* padding-right: var(--bs-gutter-x, .75rem); */
    /* padding-left: var(--bs-gutter-x, .75rem); */
    padding-right: 0;
    padding-left: 0;
}

.line-page-shell {
    background-color: var(--line-page-bg);
    min-height: 100%;
}

.line-page-shell--intel-hero {
    background-color: #0a1628;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;
}

.line-page-shell--intel-hero .login-container {
    max-width: 414px;
}

.line-page-shell--intel-hero .success-container {
    max-width: 600px;
}

.line-page-shell--intel-hero .bind-container {
    max-width: 500px;
}

.line-intel-hero-spacer {
    width: 100%;
    height: 0;
    padding-top: var(--line-intel-hero-spacer);
    flex-shrink: 0;
    pointer-events: none;
}

.line-page-shell--intel-hero .login-container,
.line-page-shell--intel-hero .success-container,
.line-page-shell--intel-hero .bind-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

/* 手機／LIFF：單一可捲動區（避免 body 無法滑動） */
.phone-frame {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.phone-frame .container.line-page-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

@media (max-width: 767.98px) {
    html {
        height: 100%;
    }

    body.line-page-body {
        height: 100%;
        max-height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    body.line-page-body .phone-frame {
        flex: 1 1 auto;
        min-height: 0;
        max-height: 100dvh;
        overflow: hidden;
    }

    body.line-page-body .phone-frame .container.line-page-shell {
        min-height: 0;
    }
}

.line-page-banner {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.line-page-banner img {
    display: block;
    width: var(--line-banner-width);
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* LINE 圓形圖示（前台登入卡） */
.line-brand-icon {
    line-height: 1;
    padding: 0.35em 0 0.15em;
    overflow: visible;
    font-size: calc(3rem * var(--line-logo-scale) / 100);
}

.line-brand-icon .fab.fa-line {
    font-size: 1em !important;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.line-page-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    body.line-page-body.line-page-body--desk {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #1e1e1e;
        padding: 20px;
    }

    body.line-page-body.line-page-body--desk {
        min-height: 100dvh;
        overflow-y: auto;
    }

    .phone-frame {
        width: var(--line-phone-width);
        max-width: 430px;
        height: min(850px, var(--line-phone-max-height));
        max-height: var(--line-phone-max-height);
        min-height: 0;
        background: #000;
        border-radius: 30px;
        padding: 10px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
    }

    .phone-frame::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 4px;
        background: #333;
        border-radius: 2px;
        z-index: 10;
    }

    .phone-frame .container.line-page-shell {
        border-radius: 20px;
        max-width: 100%;
        margin: 0;
        padding: 0;
        scroll-behavior: smooth;
        background-color: var(--line-page-bg);
        min-height: 0;
    }

    .phone-frame .container.line-page-shell--intel-hero {
        background-color: #0a1628;
    }

    .phone-frame .container.line-page-shell::-webkit-scrollbar {
        width: 8px;
    }

    .phone-frame .container.line-page-shell::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 10px;
    }

    .phone-frame .container.line-page-shell::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.25);
        border-radius: 10px;
    }
}
