:root {
    --portal-ink: #ffffff;
    --portal-muted: rgba(255, 255, 255, 0.82);
    --portal-gold: #c9a227;
    --portal-red: #e11d2e;
    --portal-panel: rgba(72, 76, 84, 0.55);
    --portal-panel-border: rgba(255, 255, 255, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.portal-page {
    min-height: 100vh;
    color: var(--portal-ink);
    background: #0a0c10;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.portal-stage {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.portal-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #0b0e14;
}

.portal-bg__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    /* 背景層：不額外壓暗，交給遮罩層保證文字清晰 */
    filter: none;
    transform: none;
    z-index: 0;
}

.portal-bg__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* 字與按鈕下方的半透明遮罩 */
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.62) 100%),
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42) 78%);
    pointer-events: none;
}

.portal-bg__shade--solo {
    background:
        radial-gradient(ellipse 80% 60% at 70% 30%, rgba(80, 90, 110, 0.28), transparent 55%),
        radial-gradient(ellipse 55% 45% at 20% 80%, rgba(201, 162, 39, 0.08), transparent 50%),
        linear-gradient(165deg, #12161f 0%, #0b0e14 45%, #080a0f 100%);
}

.portal-logo {
    position: absolute;
    z-index: 2;
    top: 28px;
    left: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: transparent;
}

.portal-logo__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.portal-logo__name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1;
    color: #fff;
}

.portal-hero {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 36%;
    transform: translate(-50%, -50%);
    width: min(860px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.portal-title {
    margin: 0;
    font-size: clamp(40px, 5.6vw, 58px);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.28;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.portal-en {
    margin: 10px 0 0;
    font-family: Roboto, "Noto Sans TC", sans-serif;
    font-size: clamp(18px, 2.1vw, 22px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.portal-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    padding: 6px 18px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.3;
    color: #fff;
    background: rgba(0, 0, 0, 0.14);
}

.portal-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 4px;
    margin: 14px 0 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.96);
}

.portal-features span {
    white-space: nowrap;
}

.portal-features span + span::before {
    content: "·";
    margin-right: 4px;
    opacity: 0.7;
    letter-spacing: 0;
}

.portal-slogan {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
}

.portal-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: center;
    margin-top: 30px;
}

.portal-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 168px;
    height: 50px;
    padding: 0 22px 0 12px;
    border-radius: 6px;
    background: var(--portal-panel);
    border: 1px solid var(--portal-panel-border);
    backdrop-filter: blur(8px);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.portal-action:hover {
    background: rgba(90, 94, 102, 0.72);
    border-color: rgba(255, 255, 255, 0.38);
    transform: translateY(-1px);
}

.portal-action__ico {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-action__ico--plus {
    background: var(--portal-red);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    padding-bottom: 1px;
}

.portal-action__ico--user {
    background: #1a1a1a;
}

.portal-action__txt {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.portal-nav {
    position: absolute;
    z-index: 2;
    left: 40px;
    bottom: 88px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.portal-nav a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
}

.portal-nav a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.portal-brands {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 48px));
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.portal-brands::-webkit-scrollbar {
    display: none;
}

.portal-brand {
    height: 34px;
    padding: 4px 8px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 2px;
}

.portal-brand img {
    display: block;
    max-height: 24px;
    max-width: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
}

body.portal-page--detail {
    background: #10131a;
}

.detail-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 18px 40px;
    min-height: 100vh;
}

.detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.detail-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.detail-top__right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.detail-link--solid {
    background: var(--portal-red);
    border-color: transparent;
    color: #fff;
}

.detail-card {
    background: rgba(255, 255, 255, 0.96);
    color: #1a2b4a;
    border-radius: 18px;
    padding: 28px 24px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.detail-title {
    margin: 0 0 18px;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.detail-cover {
    margin-bottom: 18px;
    border-radius: 12px;
    overflow: hidden;
}

.detail-cover img {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.detail-content {
    font-size: 15px;
    line-height: 1.85;
    color: #334155;
}

.detail-content p {
    margin: 0 0 1em;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
    color: #1a2b4a;
    margin: 1.2em 0 0.5em;
}

.detail-content a {
    color: #c8332b;
}

.detail-cta {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5e8ee;
}

.detail-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: #c8332b;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
}

.detail-foot {
    margin-top: 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}

.detail-foot p {
    margin: 0;
}

@media (max-width: 960px) {
    .portal-title {
        letter-spacing: 0.08em;
    }

    .portal-nav {
        bottom: 78px;
        left: 24px;
    }
}

@media (max-width: 720px) {
    .portal-logo {
        top: 16px;
        left: 16px;
        height: 36px;
        padding: 0 10px 0 6px;
    }

    .portal-logo__name {
        font-size: 15px;
        letter-spacing: 0.12em;
    }

    .portal-hero {
        top: 34%;
        width: calc(100% - 28px);
    }

    .portal-title {
        font-size: 30px;
        letter-spacing: 0.06em;
        line-height: 1.35;
    }

    .portal-en {
        margin-top: 8px;
        font-size: 15px;
    }

    .portal-pill {
        margin-top: 16px;
        padding: 5px 14px;
        font-size: 13px;
        letter-spacing: 0.12em;
    }

    .portal-features {
        margin-top: 12px;
        font-size: 14px;
        letter-spacing: 0.1em;
    }

    .portal-slogan {
        margin-top: 6px;
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .portal-actions {
        margin-top: 24px;
        gap: 12px;
        width: 100%;
        max-width: 340px;
    }

    .portal-action {
        flex: 1;
        width: auto;
        min-width: 0;
        height: 48px;
        padding: 0 12px 0 8px;
        gap: 8px;
    }

    .portal-action__txt {
        font-size: 15px;
        letter-spacing: 0.06em;
    }

    .portal-action__ico {
        width: 26px;
        height: 26px;
    }

    .portal-nav {
        left: 16px;
        bottom: 70px;
        gap: 10px;
    }

    .portal-nav a {
        font-size: 12px;
        letter-spacing: 0.08em;
    }

    .portal-brands {
        bottom: 12px;
        width: calc(100% - 24px);
        gap: 8px;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .portal-brand {
        height: 28px;
        padding: 3px 6px;
    }

    .portal-brand img {
        max-height: 18px;
        max-width: 68px;
    }

    .detail-card {
        padding: 22px 16px 26px;
    }
}

@media (max-height: 700px) and (min-width: 721px) {
    .portal-hero {
        top: 34%;
    }

    .portal-title {
        font-size: clamp(34px, 5.5vh, 48px);
    }

    .portal-en {
        font-size: clamp(16px, 2.2vh, 20px);
    }

    .portal-pill {
        margin-top: 14px;
    }

    .portal-features {
        margin-top: 8px;
    }

    .portal-actions {
        margin-top: 20px;
    }

    .portal-action {
        height: 44px;
    }

    .portal-nav {
        bottom: 72px;
    }
}

