
/* =====================================================
   PLAVE ARCHIVE
   ASTERUM — 星際編輯室 × 數位典藏
   01 / 05 基礎設定與整體背景
   ===================================================== */

/* ---------- 色彩與共用變數 ---------- */

:root {
    color-scheme: dark;

    --bg-main: #080f20;
    --bg-deep: #060c19;
    --bg-panel: rgba(15, 29, 55, 0.88);
    --bg-panel-light: rgba(23, 42, 75, 0.78);
    --bg-input: rgba(5, 14, 29, 0.75);

    --text-main: #edf2fc;
    --text-secondary: #b1bfd6;
    --text-muted: #8293b2;
    --text-dim: #667b9e;

    --accent: #a9caff;
    --accent-light: #d1e2ff;
    --accent-dark: #648bc6;

    --border: rgba(157, 187, 232, 0.17);
    --border-strong: rgba(157, 187, 232, 0.32);

    --shadow:
        0 18px 50px rgba(0, 0, 0, 0.24);

    --radius-large: 22px;
    --radius-medium: 15px;
    --radius-small: 10px;

    --font-main:
        "DM Sans",
        "Noto Sans TC",
        sans-serif;

    /* PLAVE 五位成員代表色 */
    --member-yejun: #4A90D9;
    --member-noah: #9270C5;
    --member-bamby: #F18BAF;
    --member-eunho: #E45B68;
    --member-hamin: #85899D;
}


/* ---------- 全站基本設定 ---------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}


/* ---------- 基本元素 ---------- */

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    color: #071020;
    background: #b9d4ff;
}


/* ---------- 共用文字設定 ---------- */

h1,
h2,
h3,
h4,
p {
    overflow-wrap: break-word;
}

p {
    color: var(--text-secondary);
}


/* ---------- 捲動條 ---------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(5, 12, 25, 0.5);
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(125, 157, 207, 0.38);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(155, 188, 240, 0.58);
}


/* ---------- 全站共用面板效果 ---------- */

.search-panel,
.explore-panel,
.search-results {
    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(19, 39, 73, 0.88),
            rgba(9, 22, 45, 0.90)
        );

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* ---------- 減少動態效果的使用者設定 ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* =====================================================
   02 / 05 側邊導覽與首頁主視覺
   ===================================================== */


/* ---------- 網站整體版型 ---------- */

.site-layout {
    width: min(1500px, 100%);
    min-height: 100vh;
    margin: 0 auto;
}


/* ---------- 側邊導覽列 ---------- */

.sidebar {
    position: fixed;
    z-index: 30;

    top: 0;
    bottom: 0;
    left: max(0px, calc((100vw - 1500px) / 2));

    display: flex;
    flex-direction: column;

    width: 258px;
    padding: 31px 22px 24px;

    overflow-y: auto;

    background:
        linear-gradient(
            180deg,
            rgba(6, 15, 32, 0.97),
            rgba(10, 24, 48, 0.95)
        );

    border-right: 1px solid var(--border);

    box-shadow:
        12px 0 45px rgba(0, 0, 0, 0.16);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* ---------- 品牌標誌 ---------- */

.brand,
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    width: fit-content;

    color: #f2f6ff;

    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    border: 1px solid rgba(174, 204, 255, 0.45);
    border-radius: 12px;

    color: #e0ecff;

    background:
        linear-gradient(
            145deg,
            rgba(116, 159, 226, 0.30),
            rgba(42, 70, 122, 0.18)
        );

    box-shadow:
        inset 0 0 18px rgba(148, 186, 255, 0.10),
        0 0 24px rgba(91, 139, 219, 0.12);

    font-size: 19px;
    font-weight: 700;
}

.brand-name strong,
.mobile-brand strong {
    color: var(--accent);
    font-weight: 600;
}


/* ---------- 側欄分類標題 ---------- */

.sidebar-caption {
    margin: 38px 0 12px 3px;

    color: #7f96bb;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.17em;
}


/* ---------- 側欄主要導覽 ---------- */

.sidebar-nav,
.external-nav {
    display: grid;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 42px;
    padding: 8px 12px;

    border: 1px solid transparent;
    border-radius: 11px;

    color: #afbdd5;

    font-size: 16px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #f0f5ff;

    border-color: rgba(143, 183, 245, 0.17);

    background:
        linear-gradient(
            90deg,
            rgba(100, 146, 214, 0.21),
            rgba(100, 146, 214, 0.05)
        );
}

.nav-link.active {
    box-shadow: inset 2px 0 var(--accent);
}

.nav-symbol {
    width: 18px;

    color: #9bb9e8;

    font-size: 17px;
    text-align: center;
}


/* ---------- 側欄分隔線 ---------- */

.sidebar-divider {
    height: 1px;
    margin-top: 23px;

    background: var(--border);
}


/* ---------- 官方平台連結 ---------- */

.external-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 6px 5px;

    color: #a0b0ca;

    font-size: 15px;

    transition: color 0.2s ease;
}

.external-nav a:hover {
    color: #edf4ff;
}

.external-arrow {
    color: #7895bf;
}


/* ---------- 粉絲資料庫連結 ---------- */

.fan-resource {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 10px;

    border: 1px solid rgba(142, 181, 239, 0.18);
    border-radius: 12px;

    background: rgba(76, 112, 171, 0.10);

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.fan-resource:hover {
    border-color: rgba(157, 194, 250, 0.42);
    background: rgba(76, 112, 171, 0.18);
}

.fan-resource-icon {
    display: grid;
    place-items: center;

    width: 32px;
    height: 32px;
    flex-shrink: 0;

    border-radius: 9px;

    color: #c5dcff;
    background: rgba(116, 158, 223, 0.18);
}

.fan-resource strong {
    display: block;

    color: #e0ebff;

    font-size: 15px;
    letter-spacing: 0.04em;
}

.fan-resource small {
    display: block;

    color: #91a4c2;

    font-size: 13px;
}


/* ---------- 側欄底部說明 ---------- */

.sidebar-footnote {
    margin-top: auto;
    padding: 25px 3px 0;

    color: #7d8da9;

    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 0.04em;
}


/* ---------- 主內容區 ---------- */

.main-content {
    width: calc(100% - 258px);
    max-width: 1242px;

    margin-left: 258px;

    padding:
        62px
        clamp(28px, 5.2vw, 76px)
        34px;
}


/* ---------- 首頁主視覺 ---------- */

.page-header {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: 290px;

    padding: 28px 0 45px;
}



/* ---------- 英文眉標 ---------- */

.eyebrow {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 11px;

    color: #9bb7df;

    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.eyebrow-line {
    display: inline-block;

    width: 30px;
    height: 1px;

    background: #8bb0e5;
}


/* ---------- 首頁主標題 ---------- */

.page-header h1 {
    position: relative;
    z-index: 1;

    margin: 18px 0 12px;

    color: #f3f6ff;

    font-size: clamp(48px, 6.4vw, 82px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.page-header h1 span {
    color: #aecbfa;

    font-size: 0.9em;
    letter-spacing: 0.025em;
}


/* ---------- 首頁簡介 ---------- */

.page-intro {
    position: relative;
    z-index: 1;

    margin: 10px 0 0;

    color: #b1bfd6;

    font-size: 18px;
    letter-spacing: 0.04em;
}


/* ---------- 手機版頂部列：先隱藏 ---------- */

.mobile-bar {
    display: none;
}


/* =====================================================
   03 / 05 搜尋區與熱門搜尋
   ===================================================== */


/* ---------- 搜尋面板 ---------- */

.search-panel {
    position: relative;

    padding: 29px 31px 27px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(19, 39, 73, 0.90),
            rgba(9, 22, 45, 0.92)
        );

    box-shadow: var(--shadow);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}


/* ---------- 區塊標題 ---------- */

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 21px;
}

.section-kicker {
    color: #91add8;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.section-heading h2,
.results-topline h2 {
    margin: 5px 0 0;

    color: #edf3ff;

    font-size: 100px;
    font-weight: 600;
    letter-spacing: -0.010em;
}

.section-index {
    color: #7893bc;

    font-family: "DM Sans", sans-serif;
    font-size: 50px;
    letter-spacing: 0.12em;
}


/* ---------- 搜尋輸入框 ---------- */

.search-box {
    display: flex;
    align-items: center;

    min-height: 58px;
    padding: 6px 7px 6px 17px;

    border: 1px solid rgba(158, 190, 239, 0.28);
    border-radius: 14px;

    background: rgba(3, 13, 30, 0.62);

    box-shadow:
        inset 0 2px 12px rgba(0, 0, 0, 0.15);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-box:focus-within {
    border-color: rgba(153, 192, 255, 0.72);

    box-shadow:
        0 0 0 3px rgba(119, 164, 232, 0.11),
        inset 0 2px 12px rgba(0, 0, 0, 0.12);
}


/* ---------- 搜尋圖示 ---------- */

.search-icon {
    flex-shrink: 0;

    margin-right: 11px;

    color: #9bbce9;

    font-size: 24px;
    line-height: 1;
}


/* ---------- 搜尋輸入欄 ---------- */

.search-box input {
    width: 100%;
    min-width: 0;

    padding: 5px 0;

    border: 0;
    outline: 0;

    color: #f0f5ff;
    background: transparent;

    font-size: 14px;
}

.search-box input::placeholder {
    color: #7e90af;
}

.search-box input:focus {
    outline: none;
}


/* ---------- 清除搜尋按鈕 ---------- */

.search-box #clearSearchButton {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;
    flex-shrink: 0;

    border: 0;
    border-radius: 9px;

    color: #91a4c5;
    background: transparent;

    cursor: pointer;

    font-size: 21px;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.search-box #clearSearchButton:hover {
    color: #ffffff;
    background: rgba(148, 179, 228, 0.13);
}


/* ---------- 搜尋按鈕 ---------- */

#searchButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 42px;
    flex-shrink: 0;

    padding: 0 19px;

    border: 1px solid rgba(176, 207, 255, 0.32);
    border-radius: 10px;

    color: #09172e;

    background:
        linear-gradient(
            135deg,
            #c7ddff,
            #91b8f0
        );

    box-shadow:
        0 5px 18px rgba(85, 132, 202, 0.19);

    cursor: pointer;

    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;

    transition:
        transform 0.2s ease,
        filter 0.2s ease,
        box-shadow 0.2s ease;
}

#searchButton:hover {
    transform: translateY(-1px);

    filter: brightness(1.07);

    box-shadow:
        0 8px 22px rgba(85, 132, 202, 0.27);
}

#searchButton:active {
    transform: translateY(0);
}

#searchButton span {
    font-size: 17px;
}


/* ---------- 熱門搜尋區 ---------- */

.popular {
    margin-top: 23px;
}

.subheading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 11px;

    color: #9aafd0;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.subheading span {
    color: #788cae;

    font-weight: 500;
    letter-spacing: 0.04em;
}


/* ---------- 熱門關鍵字容器 ---------- */

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ---------- 熱門關鍵字按鈕 ---------- */

.keyword-list button,
.keyword-list .keyword-button,
.keyword-list .popular-keyword {
    min-height: 31px;

    padding: 5px 12px;

    border: 1px solid rgba(142, 178, 232, 0.23);
    border-radius: 999px;

    color: #bfd0eb;

    background: rgba(101, 143, 203, 0.11);

    cursor: pointer;

    font-size: 16px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.keyword-list button:hover,
.keyword-list .keyword-button:hover,
.keyword-list .popular-keyword:hover {
    transform: translateY(-1px);

    color: #f4f7ff;

    border-color: rgba(167, 202, 255, 0.58);

    background: rgba(112, 159, 226, 0.22);
}

.keyword-list button:active {
    transform: translateY(0);
}


/* ---------- 熱門搜尋載入狀態 ---------- */

.popular-loading {
    padding: 5px 0;

    color: #8799b8;

    font-size: 11px;
}


/* ---------- 搜尋區塊的細節 ---------- */

.search-panel .section-index {
    padding-top: 3px;
}

.search-panel .section-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-panel .section-kicker::before {
    display: inline-block;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #91baff;

    box-shadow:
        0 0 9px rgba(145, 186, 255, 0.7);

    content: "";
}


/* =====================================================
   04 / 05 成員、分類與搜尋結果
   ===================================================== */


/* ---------- 成員與分類雙欄區 ---------- */

.explore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 19px;

    margin-top: 20px;
}


/* ---------- 探索面板 ---------- */

.explore-panel {
    min-width: 0;

    padding: 25px 25px 22px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(19, 39, 73, 0.88),
            rgba(9, 22, 45, 0.90)
        );

    box-shadow: var(--shadow);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* ---------- 探索區標題 ---------- */

.compact-heading {
    margin-bottom: 18px;
}

.compact-heading h2 {
    font-size: 50px;
}


/* ---------- 成員按鈕排列 ---------- */

.member-list,
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ---------- 成員按鈕與分類按鈕 ---------- */

.member-button,
.category-button {
    min-height: 40px;

    padding: 8px 12px;

    border: 1px solid rgba(149, 177, 222, 0.22);
    border-radius: 10px;

    color: #c7d3e8;

    background: rgba(5, 17, 36, 0.48);

    cursor: pointer;

    font-size: 17px;

    transition:
        transform 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.member-button:hover,
.category-button:hover {
    transform: translateY(-1px);

    color: #f1f6ff;

    border-color: rgba(166, 197, 248, 0.5);

    background: rgba(87, 127, 190, 0.19);
}


/* ---------- 成員選取狀態 ---------- */

.member-button.active,
.member-button.selected {
    color: #f5f8ff;

    border-color: rgba(169, 202, 255, 0.65);

    background: rgba(104, 150, 218, 0.25);

    box-shadow:
        0 0 0 2px rgba(117, 164, 231, 0.08);
}


/* ---------- 五位成員專屬色彩 ---------- */

/* 藝俊 — 藍色 */

.member-button[data-member="藝俊"].active,
.member-button[data-member="藝俊"].selected {
    border-color: var(--member-yejun);

    background: rgba(74, 144, 217, 0.22);

    box-shadow:
        0 0 12px rgba(74, 144, 217, 0.12);
}


/* 諾亞 — 紫色 */

.member-button[data-member="諾亞"].active,
.member-button[data-member="諾亞"].selected {
    border-color: var(--member-noah);

    background: rgba(146, 112, 197, 0.22);

    box-shadow:
        0 0 12px rgba(146, 112, 197, 0.12);
}


/* 斑比 — 粉色 */

.member-button[data-member="斑比"].active,
.member-button[data-member="斑比"].selected {
    border-color: var(--member-bamby);

    background: rgba(241, 139, 175, 0.19);

    box-shadow:
        0 0 12px rgba(241, 139, 175, 0.10);
}


/* 銀虎 — 紅色 */

.member-button[data-member="銀虎"].active,
.member-button[data-member="銀虎"].selected {
    border-color: var(--member-eunho);

    background: rgba(228, 91, 104, 0.20);

    box-shadow:
        0 0 12px rgba(228, 91, 104, 0.11);
}


/* 河玟 — 深灰色 */

.member-button[data-member="河玟"].active,
.member-button[data-member="河玟"].selected {
    border-color: #a4a8bb;

    background: rgba(130, 137, 157, 0.22);

    box-shadow:
        0 0 12px rgba(164, 168, 187, 0.10);
}


/* ---------- 分類選取狀態 ---------- */

.category-button.active,
.category-button.selected {
    color: #f2f6ff;

    border-color: rgba(165, 200, 255, 0.62);

    background: rgba(105, 151, 219, 0.23);

    box-shadow:
        inset 0 0 12px rgba(142, 182, 243, 0.06);
}


/* ---------- 篩選狀態文字 ---------- */

.selection-status {
    min-height: 22px;

    margin: 14px 0 11px;

    color: #91a2bf;

    font-size: 11px;
}


/* ---------- 篩選操作按鈕 ---------- */

.filter-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}


/* 套用篩選 */

.filter-actions .button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 0 15px;

    border: 1px solid rgba(176, 207, 255, 0.3);
    border-radius: 9px;

    color: #0b1a33;

    background:
        linear-gradient(
            135deg,
            #c1d9ff,
            #8eb6ef
        );

    cursor: pointer;

    font-size: 16px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.filter-actions .button-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}


/* 清除按鈕 */

.button-text {
    padding: 7px 5px;

    border: 0;

    color: #9aacc9;

    background: transparent;

    cursor: pointer;

    font-size: 11px;

    transition: color 0.2s ease;
}

.button-text:hover {
    color: #edf4ff;
}


/* ---------- 年份篩選 ---------- */

.year-filter {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 17px;
}

.year-filter label {
    color: #9aacc9;

    font-size: 11px;
    white-space: nowrap;
}

.year-filter select {
    width: 100%;
    min-height: 36px;

    padding: 5px 11px;

    border: 1px solid rgba(149, 179, 228, 0.25);
    border-radius: 9px;

    color: #dce8fc;

    background: #102344;

    font-size: 15px;

    cursor: pointer;
}

.year-filter select:focus {
    border-color: var(--accent);
    outline: none;
}


/* ---------- 搜尋結果區 ---------- */

.search-results {
    margin-top: 22px;

    padding: 27px 29px 30px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(19, 39, 73, 0.88),
            rgba(9, 22, 45, 0.91)
        );

    box-shadow: var(--shadow);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* ---------- 搜尋結果標題 ---------- */

.results-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}

.results-topline h2 {
    font-size: 22px;
}


/* ---------- 搜尋結果內容 ---------- */

.results-content {
    display: grid;
    gap: 12px;
}


/* ---------- 尚無搜尋結果 ---------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 185px;

    padding: 25px;

    border: 1px dashed rgba(144, 175, 226, 0.23);
    border-radius: 15px;

    color: #93a5c3;

    background: rgba(4, 15, 33, 0.30);

    text-align: center;
}

.empty-mark {
    color: #83a3d2;

    font-family: "DM Sans", sans-serif;
    font-size: 35px;
    font-weight: 600;
    letter-spacing: -0.08em;
}

.empty-state p {
    margin: 8px 0 0;

    color: #9aabc7;

    font-size: 12px;
}


/* ---------- 搜尋結果資料卡片 ---------- */

.result-card {
    padding: 19px 21px;

    border: 1px solid rgba(145, 176, 226, 0.19);
    border-radius: 15px;

    background:
        linear-gradient(
            120deg,
            rgba(20, 43, 81, 0.76),
            rgba(9, 24, 49, 0.75)
        );

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);

    border-color: rgba(160, 194, 249, 0.43);

    background: rgba(23, 48, 88, 0.87);
}


/* ---------- 卡片標題 ---------- */

.result-card h3,
.result-card .result-title {
    margin: 0 0 7px;

    color: #edf3ff;

    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
}


/* ---------- 卡片內文 ---------- */

.result-card p {
    margin: 8px 0;

    color: #b2bfd5;

    font-size: 17.5px;
}


/* ---------- 卡片資料來源資訊 ---------- */

.result-card .result-meta,
.result-meta {
    color: #879bbd;

    font-size: 12px;
}

.result-card a {
    color: #b2cefa;
}

.result-card a:hover {
    text-decoration: underline;
}


/* ---------- 卡片標籤 ---------- */

.result-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 10px;
}

.result-tags span,
.tag-list span {
    padding: 3px 8px;

    border: 1px solid rgba(142, 176, 229, 0.19);
    border-radius: 999px;

    color: #a6bbdc;

    background: rgba(104, 146, 207, 0.09);

    font-size: 10px;
}


/* ---------- 資料載入錯誤 ---------- */

.data-load-error {
    padding: 18px;

    border: 1px solid rgba(237, 139, 151, 0.36);
    border-radius: 12px;

    color: #ffd1d6;

    background: rgba(130, 39, 57, 0.19);

    font-size: 12px;
}


/* ---------- 頁尾 ---------- */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: 31px;
    padding: 19px 3px 8px;

    border-top: 1px solid var(--border);

    color: #8294b1;

    font-size: 10px;
}

.site-footer span:first-child {
    color: #9bb4da;

    font-weight: 700;
    letter-spacing: 0.15em;
}


/* =====================================================
   05 / 05 詳細資料、圖片輪播、燈箱與響應式設計
   ===================================================== */


/* ---------- 詳細資料頁 ---------- */

.detail-page {
    width: 100%;
    max-width: 100%;
}

.detail-header {
    margin-bottom: 25px;
    padding-bottom: 22px;

    border-bottom: 1px solid var(--border);
}

.detail-header h1,
.detail-title {
    margin: 10px 0;

    color: #edf4ff;

    font-size: clamp(25px, 2.6vw, 35px);
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.detail-description {
    color: #aebed8;

    font-size: 15px;
    line-height: 1.9;
}


/* ---------- 返回按鈕 ---------- */

.back-button,
.detail-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 18px;
    padding: 8px 12px;

    border: 1px solid rgba(149, 179, 228, 0.23);
    border-radius: 9px;

    color: #b5c8e6;

    background: rgba(12, 29, 55, 0.72);

    cursor: pointer;

    font-size: 16px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.back-button:hover,
.detail-back-button:hover {
    color: #f0f6ff;

    border-color: rgba(169, 202, 255, 0.55);

    background: rgba(64, 102, 160, 0.22);
}


/* ---------- 詳細資料內容區 ---------- */

.detail-content {
    display: grid;
    gap: 19px;
}

.detail-section {
    padding: 23px 25px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: rgba(12, 28, 53, 0.83);

    box-shadow: var(--shadow);
}

.detail-section h2 {
    margin: 0 0 15px;

    color: #dce9ff;

    font-size: 50px;
    font-weight: 600;
}

.detail-section p {
    color: #b4c2d9;

    font-size: 19px;
    line-height: 2;
}

.detail-section a {
    color: #a9caff;
}


/* ---------- 詳細資料資訊 ---------- */

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;

    margin-top: 15px;

    color: #92a6c7;

    font-size: 11px;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* ---------- 圖片區域 ---------- */

.detail-images,
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin-top: 17px;
}

.detail-images img,
.image-gallery img {
    display: block;

    width: 100%;
    max-width: 100%;

    border: 1px solid rgba(155, 185, 232, 0.22);
    border-radius: 12px;

    object-fit: contain;

    background: rgba(3, 12, 27, 0.65);

    cursor: zoom-in;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.detail-images img:hover,
.image-gallery img:hover {
    transform: translateY(-2px);

    border-color: rgba(170, 205, 255, 0.55);
}


/* ---------- 圖片輪播 ---------- */

.image-carousel,
.carousel-container {
    position: relative;

    width: 100%;
    overflow: hidden;

    margin-top: 17px;

    border: 1px solid rgba(155, 185, 232, 0.23);
    border-radius: 15px;

    background: rgba(3, 12, 27, 0.68);
}

.carousel-track {
    display: flex;

    width: 100%;

    transition: transform 0.35s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.carousel-slide img {
    display: block;

    width: 100%;
    max-height: 580px;

    object-fit: contain;

    cursor: zoom-in;
}

.carousel-button {
    position: absolute;
    top: 50%;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 37px;
    height: 37px;

    border: 1px solid rgba(185, 209, 244, 0.35);
    border-radius: 50%;

    color: #edf4ff;

    background: rgba(7, 19, 40, 0.78);

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.carousel-button:hover {
    border-color: rgba(194, 218, 255, 0.65);

    background: rgba(51, 85, 135, 0.9);
}

.carousel-button.prev {
    left: 12px;
}

.carousel-button.next {
    right: 12px;
}


/* ---------- 輪播頁碼 ---------- */

.carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 13px;
}

.carousel-indicators button {
    width: 6px;
    height: 6px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(158, 183, 222, 0.35);

    cursor: pointer;

    transition:
        width 0.2s ease,
        background 0.2s ease;
}

.carousel-indicators button.active {
    width: 19px;

    border-radius: 999px;

    background: #a8c9fa;
}


/* ---------- 圖片燈箱 ---------- */

.lightbox,
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px;

    background: rgba(2, 7, 17, 0.94);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox img,
.image-lightbox img {
    display: block;

    max-width: 92vw;
    max-height: 88vh;

    border-radius: 8px;

    object-fit: contain;

    box-shadow: 0 15px 70px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border: 1px solid rgba(201, 218, 245, 0.28);
    border-radius: 50%;

    color: #f0f5ff;

    background: rgba(17, 34, 61, 0.85);

    cursor: pointer;

    font-size: 20px;
}


/* ---------- 其他圖片與錯誤狀態 ---------- */

.detail-content img {
    max-width: 100%;
}

.error-message,
.error-state {
    padding: 19px;

    border: 1px solid rgba(237, 139, 151, 0.35);
    border-radius: 12px;

    color: #ffd1d6;

    background: rgba(130, 39, 57, 0.18);

    font-size: 12px;
    line-height: 1.8;
}


/* =====================================================
   平板版
   ===================================================== */

@media (max-width: 1050px) {

    .sidebar {
        width: 225px;
        padding-right: 19px;
        padding-left: 19px;
    }

    .main-content {
        width: calc(100% - 225px);
        margin-left: 225px;

        padding-right: 28px;
        padding-left: 28px;
    }

    .explore-grid {
        gap: 13px;
    }

    .explore-panel {
        padding: 21px 19px;
    }

    .search-results {
        padding: 23px;
    }

}


/* =====================================================
   手機版
   ===================================================== */

@media (max-width: 700px) {

    /* ---------- 手機頂部導覽 ---------- */

    .mobile-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;

        display: flex;
        align-items: center;
        justify-content: space-between;

        height: 60px;

        padding: 0 17px;

        border-bottom: 1px solid rgba(150, 180, 230, 0.19);

        background: rgba(6, 14, 30, 0.94);

        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .mobile-brand {
        color: #e4edff;

        font-family: "DM Sans", sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.12em;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 39px;
        height: 39px;

        border: 1px solid rgba(154, 184, 232, 0.26);
        border-radius: 9px;

        color: #dce9ff;

        background: rgba(28, 52, 88, 0.5);

        cursor: pointer;

        font-size: 19px;
    }


    /* ---------- 手機側邊欄 ---------- */

    .sidebar {
        position: fixed;
        top: 60px;
        bottom: 0;
        left: 0;
        z-index: 999;

        width: min(285px, 82vw);
        height: calc(100dvh - 60px);

        padding: 25px 22px;

        overflow-y: auto;

        border-right: 1px solid var(--border);

        background: rgba(6, 15, 32, 0.98);

        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.25);

        transform: translateX(-105%);

        transition: transform 0.28s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    body.menu-open {
        overflow: hidden;
    }


    /* ---------- 手機主內容 ---------- */

    .site-layout {
        display: block;
    }

    .main-content {
        width: 100%;
        margin-left: 0;

        padding: 83px 17px 25px;
    }


    /* ---------- 手機首頁標題 ---------- */

    .page-header {
    margin-bottom: 14px;
    padding: 0 2px 14px;
}

    .page-header h1 {
        font-size: clamp(27px, 8vw, 36px);
        line-height: 1.2;
    }

    .page-intro {
        max-width: 100%;

        font-size: 12px;
        line-height: 1.8;
    }

    .eyebrow {
        font-size: 9px;
    }


    /* ---------- 手機搜尋區 ---------- */

    .search-panel {
        padding: 20px 16px;
    }

    .section-heading {
        gap: 10px;
    }

    .section-heading h2 {
        font-size: 18px;
    }

    .search-box {
        flex-wrap: wrap;
        gap: 7px;

        padding: 7px;
    }

    #searchInput {
        min-width: 0;
        flex: 1 1 100%;

        min-height: 36px;

        padding: 8px 10px;
    }

    #searchButton {
        flex: 1;

        min-height: 38px;
    }

    #clearSearchButton {
        min-height: 38px;
    }

    .keyword-list {
        gap: 7px;
    }

    .keyword-list button {
        font-size: 17px;
    }


    /* ---------- 手機篩選區 ---------- */

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 13px;

        margin-top: 14px;
    }

    .explore-panel {
        padding: 20px 17px;
    }

    .member-list,
    .category-list {
        gap: 7px;
    }

    .member-button,
    .category-button {
        min-height: 36px;

        padding: 6px 10px;

        font-size: 11px;
    }

    .filter-actions {
        flex-wrap: wrap;
    }


    /* ---------- 手機搜尋結果 ---------- */

    .search-results {
        margin-top: 15px;
        padding: 21px 16px;
    }

    .results-topline {
        align-items: flex-start;
        gap: 10px;
    }

    .results-topline h2 {
        font-size: 19px;
    }

    .result-card {
        padding: 16px;
    }

    .result-card h3,
    .result-card .result-title {
        font-size: 15px;
    }


    /* ---------- 手機詳細資料 ---------- */

    .detail-header h1,
    .detail-title {
        font-size: 26px;
    }

    .detail-section {
        padding: 19px 16px;
    }

    .detail-section h2 {
        font-size: 16px;
    }

    .detail-section p {
        font-size: 12px;
    }

    .detail-images,
    .image-gallery {
        grid-template-columns: 1fr;
    }

    .carousel-slide img {
        max-height: 390px;
    }


    /* ---------- 手機圖片燈箱 ---------- */

    .lightbox,
    .image-lightbox {
        padding: 15px;
    }

    .lightbox img,
    .image-lightbox img {
        max-width: 96vw;
        max-height: 82vh;
    }

    .lightbox-close,
    .image-lightbox-close {
        top: 12px;
        right: 12px;
    }


    /* ---------- 手機頁尾 ---------- */

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;

        margin-top: 23px;
        padding-top: 17px;

        line-height: 1.7;
    }

}


/* =====================================================
   小型手機微調
   ===================================================== */

@media (max-width: 380px) {

    .main-content {
        padding-right: 13px;
        padding-left: 13px;
    }

    .page-header h1 {
        font-size: 27px;
    }

    .search-panel,
    .explore-panel,
    .search-results {
        padding-right: 14px;
        padding-left: 14px;
    }

    .member-button,
    .category-button {
        padding-right: 8px;
        padding-left: 8px;

        font-size: 10px;
    }

}


/* =====================================================
   PHASE 01
   ASTERUM VISUAL REFRESH
   整體視覺與電腦版
   ===================================================== */


/* ---------- 01. 色彩系統 ---------- */

:root {
    --bg-main: #101d39;
    --bg-deep: #0b1630;

    --bg-panel: rgba(24, 43, 78, 0.90);
    --bg-panel-light: rgba(34, 57, 98, 0.86);

    --text-main: #edf3ff;
    --text-secondary: #c0cee5;
    --text-muted: #9eafd0;

    --accent: #a8c9ff;
    --accent-light: #c7dcff;
    --accent-purple: #b8a9ed;

    --border: rgba(164, 194, 242, 0.24);

    --member-yejun: #4A90D9;
    --member-noah: #9270C5;
    --member-bamby: #F18BAF;
    --member-eunho: #E45B68;
    --member-hamin: #85899D;

    --shadow:
        0 12px 35px rgba(2, 10, 27, 0.25);
}


/* ---------- 02. 全站背景 ---------- */

html {
    background-color: #101b36;
}


/* ---------- 03. 全站文字比例 ---------- */

body {
    font-size: 15px;
    line-height: 1.75;
}

p {
    line-height: 1.85;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    font-size: 13px;
}

a {
    color: #b9d4ff;
    transition: color 0.2s ease;
}

a:hover {
    color: #e0eaff;
}


/* ---------- 04. 側邊欄對齊 ---------- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 258px;
    height: 100vh;

    margin: 0;

    padding: 30px 23px;

    box-sizing: border-box;

    border-radius: 0;

    border-top: 0;
    border-left: 0;
    border-bottom: 0;

    border-right: 1px solid rgba(163, 194, 245, 0.23);

    background:
        radial-gradient(
            ellipse at 30% 5%,
            rgba(91, 125, 198, 0.20),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            rgba(19, 37, 72, 0.98),
            rgba(10, 22, 45, 0.98)
        );

    box-shadow:
        8px 0 35px rgba(2, 9, 24, 0.16);
}


/* 側邊欄品牌 */

.brand-name {
    color: #edf4ff;

    letter-spacing: 0.13em;
}

.brand-mark {
    color: #c3d9ff;

    text-shadow:
        0 0 14px rgba(148, 190, 255, 0.45);
}

.sidebar-caption {
    color: #9eafd0;
}


/* 側邊欄導覽文字 */

.nav-link,
.external-nav {
    color: #c2d0e8;

    font-size: 16px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.nav-link:hover,
.external-nav:hover {
    color: #ffffff;

    background: rgba(133, 169, 232, 0.13);
}

.nav-link.active {
    color: #edf4ff;

    border-color: rgba(172, 205, 255, 0.30);

    background: rgba(114, 155, 224, 0.18);
}

.sidebar-divider {
    border-color: rgba(157, 188, 238, 0.18);
}

.sidebar-footnote {
    color: #899dbd;
}


/* ---------- 05. 主內容區 ---------- */

.main-content {
    padding-top: 48px;
    padding-bottom: 45px;
}


/* ---------- 06. 首頁總標題 ---------- */

.page-header {
    margin-bottom: 27px;
}

.page-header h1 {
    color: #edf4ff;

    font-size: clamp(34px, 3.2vw, 43px);

    line-height: 1.25;
    letter-spacing: 0.025em;

    text-shadow:
        0 0 25px rgba(133, 174, 247, 0.18);
}

.page-intro {
    color: #bdcce5;

    font-size: 14px;
    line-height: 1.9;
}

.eyebrow {
    color: #b5c9ed;

    font-size: 11px;
    letter-spacing: 0.19em;
}

.eyebrow-line {
    background: linear-gradient(
        90deg,
        #a7c7ff,
        rgba(167, 199, 255, 0)
    );
}


/* ---------- 07. 區塊標題 ---------- */

.section-heading h2,
.compact-heading h2 {
    color: #e7f0ff;

    font-size: 16px;
    line-height: 1.5;
}

.section-kicker {
    color: #a9bee2;

    font-size: 11px;
    letter-spacing: 0.14em;
}

.section-index {
    color: #a6bce3;
}


/* ---------- 08. 面板統一提亮 ---------- */

.search-panel,
.explore-panel,
.search-results,
.detail-section {
    border-color: rgba(163, 194, 244, 0.25);

    background:
        linear-gradient(
            145deg,
            rgba(32, 55, 96, 0.90),
            rgba(17, 35, 69, 0.92)
        );

    box-shadow:
        0 12px 35px rgba(2, 10, 27, 0.22),
        inset 0 1px 0 rgba(205, 224, 255, 0.045);
}


/* ---------- 09. 電腦版微調 ---------- */

@media (min-width: 701px) {

    .main-content {
        width: calc(100% - 258px);
        margin-left: 258px;

        padding-right: clamp(35px, 5vw, 76px);
        padding-left: clamp(35px, 5vw, 76px);
    }

    .page-header h1 {
        font-size: clamp(35px, 3vw, 42px);
    }

}


/* ---------- 10. 平板版側邊欄 ---------- */

@media (min-width: 701px) and (max-width: 1050px) {

    .sidebar {
        width: 225px;

        padding-right: 19px;
        padding-left: 19px;
    }

    .main-content {
        width: calc(100% - 225px);
        margin-left: 225px;
    }

}


/* ---------- 11. 手機版沿用獨立版面 ---------- */

@media (max-width: 700px) {

    body {
        font-size: 14px;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .page-header h1 {
        font-size: 31px;
    }

}


/* =====================================================
   PHASE 01 - REVISION
   ASTERUM : DEEP SPACE × DREAMY NEBULA
   深邃星際為主，夢幻宇宙為輔
   ===================================================== */


/* ---------- 01. 色彩系統 ---------- */

:root {
    --bg-main: #0c142b;
    --bg-deep: #080f20;

    --bg-panel: rgba(24, 35, 65, 0.90);
    --bg-panel-light: rgba(34, 48, 83, 0.88);

    --text-main: #edf0fa;
    --text-secondary: #c4cce0;
    --text-muted: #9ca9c5;

    --accent: #a8bce8;
    --accent-light: #c8d3f3;
    --accent-purple: #b6a8dc;

    --border: rgba(157, 177, 224, 0.20);

    --shadow:
        0 14px 38px rgba(1, 5, 18, 0.30);
}


/* ---------- 02. 星空背景 ---------- */

html {
    background-color: #0c142b;
}


/* ---------- 03. 面板：星雲深藍 ---------- */

.search-panel,
.explore-panel,
.search-results,
.detail-section {
    border: 1px solid rgba(158, 180, 229, 0.21);

    background:
        linear-gradient(
            145deg,
            rgba(35, 48, 83, 0.91),
            rgba(19, 30, 58, 0.94)
        );

    box-shadow:
        0 12px 35px rgba(2, 7, 22, 0.24),
        inset 0 1px 0 rgba(211, 220, 248, 0.035);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}


/* ---------- 04. 柔和星雲光暈 ---------- */

.page-header {
    position: relative;
}

/* ---------- 05. 首頁標題 ---------- */

.page-header h1 {
    color: #edf1fc;

    font-size: clamp(34px, 3vw, 40px);

    line-height: 1.28;
    letter-spacing: 0.025em;

    text-shadow:
        0 0 24px rgba(151, 172, 231, 0.12);
}

.page-intro {
    color: #bac5dd;

    font-size: 14px;
    line-height: 1.9;
}

.eyebrow {
    color: #b5bce0;

    font-size: 11px;
    letter-spacing: 0.19em;
}

.eyebrow-line {
    background: linear-gradient(
        90deg,
        rgba(173, 184, 231, 0.9),
        rgba(173, 184, 231, 0)
    );
}


/* ---------- 06. 標題與內文比例 ---------- */

.section-heading h2,
.compact-heading h2 {
    color: #e6eafa;

    font-size: 24px;
    line-height: 1.5;
}

.section-kicker,
.section-index {
    color: #aab8d8;

    font-size: 11px;
}

body {
    font-size: 17px;
    line-height: 1.8;
}

p {
    line-height: 1.85;
}


/* ---------- 07. 側邊欄 ---------- */

.sidebar {
    top: 0;
    left: 0;

    height: 100vh;
    margin: 0;

    border-radius: 0;

    border-top: 0;
    border-left: 0;
    border-bottom: 0;

    border-right: 1px solid rgba(158, 180, 229, 0.20);

    background:
        radial-gradient(
            ellipse at 30% 5%,
            rgba(95, 107, 170, 0.14),
            transparent 56%
        ),
        linear-gradient(
            180deg,
            rgba(17, 27, 54, 0.98),
            rgba(9, 16, 34, 0.98)
        );

    box-shadow:
        8px 0 32px rgba(1, 5, 17, 0.18);
}

.brand-name {
    color: #e8edfa;
}

.brand-mark {
    color: #bdc9ec;

    text-shadow:
        0 0 13px rgba(157, 178, 235, 0.25);
}

.sidebar-caption {
    color: #9daac8;
}

.nav-link,
.external-nav {
    color: #c0c9de;

    font-size: 13px;
}

.nav-link:hover,
.external-nav:hover {
    color: #f0f2ff;

    background: rgba(151, 165, 218, 0.10);
}

.nav-link.active {
    color: #f0f2ff;

    border-color: rgba(175, 184, 232, 0.30);

    background: rgba(132, 143, 202, 0.15);
}

.sidebar-divider {
    border-color: rgba(157, 177, 224, 0.16);
}

.sidebar-footnote {
    color: #8f9bb8;
}


/* ---------- 08. 搜尋與操作文字 ---------- */

.subheading {
    color: #aebbd7;

    font-size: 16px;
}

#searchInput {
    color: #eef2fc;
    font-size: 19px;
}

#searchInput::placeholder {
    color: #8492b1;
    opacity: 1;
}

.keyword-list button {
    color: #c5cce3;

    border-color: rgba(160, 177, 223, 0.23);

    background: rgba(105, 117, 168, 0.10);
}

.keyword-list button:hover {
    color: #f0f2ff;

    border-color: rgba(181, 185, 236, 0.48);

    background: rgba(131, 130, 195, 0.18);
}


/* ---------- 09. 全站連結與按鈕 ---------- */

a {
    color: #c0cafa;
}

a:hover {
    color: #f0efff;
}

button {
    font-family: inherit;
}

.button-primary {
    color: #111a35;

    background: linear-gradient(
        135deg,
        #d0d7f2,
        #a9b9e3
    );

    border-color: rgba(204, 214, 245, 0.35);
}

.button-primary:hover {
    filter: brightness(1.06);
}

.button-text {
    color: #b4bfd9;
}

.button-text:hover {
    color: #eef0ff;
}


/* ---------- 10. 電腦版主內容 ---------- */

@media (min-width: 701px) {

    .main-content {
        width: calc(100% - 258px);
        margin-left: 258px;

        padding-top: 43px;
        padding-right: clamp(36px, 5vw, 72px);
        padding-left: clamp(36px, 5vw, 72px);
    }

    .page-header h1 {
        font-size: clamp(35px, 2.8vw, 40px);
    }

}


/* ---------- 11. 平板版 ---------- */

@media (min-width: 701px) and (max-width: 1050px) {

    .sidebar {
        width: 225px;
    }

    .main-content {
        width: calc(100% - 225px);
        margin-left: 225px;
    }

}


/* ---------- 12. 手機版 ---------- */

@media (max-width: 700px) {

    body {
        font-size: 14px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .section-heading h2,
    .compact-heading h2 {
        font-size: 18px;
    }

    .page-intro {
        font-size: 13px;
    }

    .sidebar {
        top: 60px;
        height: calc(100dvh - 60px);
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

}


/* =====================================================
   ASTERUM COLOR SYSTEM
   Deep Space × Nebula × Moonlight
   全站配色統一
   ===================================================== */

:root {
    /* 背景 */
    --bg-main: #080E20;
    --bg-deep: #060B18;
    --bg-panel: #111D39;
    --bg-panel-light: #1B294B;

    /* 文字 */
    --text-main: #E8EDF8;
    --text-secondary: #B9C5DA;
    --text-muted: #8999B8;

    /* 點綴 */
    --accent: #A9B9E5;
    --accent-light: #DCE3F2;
    --accent-purple: #A99ACD;

    /* 邊框 */
    --border: rgba(158, 177, 219, 0.20);

    /* 成員色 */
    --member-yejun: #4A90D9;
    --member-noah: #9270C5;
    --member-bamby: #F18BAF;
    --member-eunho: #E45B68;
    --member-hamin: #85899D;
}


/* ---------- 全站文字 ---------- */

body {
    color: var(--text-secondary);
}

h1,
h2,
h3,
h4,
strong,
b {
    color: var(--text-main);
}

p {
    color: var(--text-secondary);
}

small,
.caption,
.sidebar-footnote {
    color: var(--text-muted);
}


/* ---------- 背景 ---------- */

html,
body {
    background-color: var(--bg-main);
}


/* ---------- 各種面板 ---------- */

.search-panel,
.explore-panel,
.search-results,
.detail-section {
    color: var(--text-secondary);

    border-color: var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(27, 41, 75, 0.95),
            rgba(14, 25, 49, 0.97)
        );

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(195, 208, 239, 0.035);
}


/* ---------- 首頁標題 ---------- */

.page-header h1 {
    color: #EDF1FC;
}

.page-intro {
    color: #B9C5DA;
}

.eyebrow {
    color: #A9B9D8;
}

.eyebrow-line {
    background: linear-gradient(
        90deg,
        #A9B9E5,
        rgba(169, 185, 229, 0)
    );
}


/* ---------- 區塊標題 ---------- */

.section-heading h2,
.compact-heading h2,
.results-topline h2 {
    color: #DCE3F2;
}

.section-kicker,
.section-index {
    color: #A3B2D0;
}

.subheading {
    color: #AAB8D0;
}


/* ---------- 側邊欄 ---------- */

.sidebar {
    color: var(--text-secondary);

    border-color: var(--border);

    background:
        linear-gradient(
            180deg,
            #111C37,
            #080F20
        );
}

.brand-name {
    color: #E8EDF8;
}

.brand-mark {
    color: #B9C9EF;
}

.sidebar-caption {
    color: #929FBE;
}

.nav-link,
.external-nav {
    color: #B9C5DA;
}

.nav-link:hover,
.external-nav:hover {
    color: #E8EDF8;
    background: rgba(169, 185, 229, 0.10);
}

.nav-link.active {
    color: #E8EDF8;
    background: rgba(169, 185, 229, 0.15);
    border-color: rgba(169, 185, 229, 0.28);
}

.sidebar-divider {
    border-color: var(--border);
}


/* ---------- 搜尋框 ---------- */

#searchInput {
    color: #E8EDF8;
    background: rgba(6, 13, 29, 0.70);
}

#searchInput::placeholder {
    color: #8291AE;
}

.search-box {
    border-color: rgba(158, 177, 219, 0.28);
    background: rgba(6, 13, 29, 0.60);
}

.search-icon {
    color: #A9B9E5;
}


/* ---------- 熱門搜尋與關鍵字 ---------- */

.keyword-list button {
    color: #C4CEE3;

    border-color: rgba(158, 177, 219, 0.24);

    background: rgba(116, 133, 182, 0.10);
}

.keyword-list button:hover {
    color: #E8EDF8;

    border-color: rgba(169, 185, 229, 0.55);

    background: rgba(116, 133, 182, 0.20);
}


/* ---------- 成員與分類按鈕 ---------- */

.member-button,
.category-button {
    color: #C4CEE3;

    border-color: rgba(158, 177, 219, 0.23);

    background: rgba(7, 15, 33, 0.48);
}

.member-button:hover,
.category-button:hover {
    color: #F0F3FC;

    border-color: rgba(169, 185, 229, 0.45);

    background: rgba(116, 133, 182, 0.16);
}

.category-button.active,
.category-button.selected {
    color: #E8EDF8;

    border-color: #A9B9E5;

    background: rgba(169, 185, 229, 0.17);
}


/* ---------- 篩選狀態 ---------- */

.selection-status,
.year-filter label {
    color: #A3B2D0;
}

.year-filter select {
    color: #DCE3F2;

    border-color: var(--border);

    background: #111D39;
}


/* ---------- 按鈕 ---------- */

.button-primary {
    color: #101A32;

    border-color: rgba(195, 207, 239, 0.40);

    background: linear-gradient(
        135deg,
        #C4CDEA,
        #9DADD8
    );
}

.button-primary:hover {
    background: linear-gradient(
        135deg,
        #DCE3F2,
        #B5C2E7
    );
}

.button-text {
    color: #A9B9D8;
}

.button-text:hover {
    color: #D5CCF1;
}


/* ---------- 搜尋結果文字 ---------- */

.result-card,
.result-card p {
    color: #B9C5DA;
}

.result-card h3,
.result-card .result-title {
    color: #E8EDF8;
}

.result-meta {
    color: #8999B8;
}

.result-card a {
    color: #B8C9F0;
}


/* ---------- 詳細資料 ---------- */

.detail-header h1,
.detail-title {
    color: #E8EDF8;
}

.detail-section h2 {
    color: #DCE3F2;
}

.detail-section p {
    color: #B9C5DA;
}

.detail-meta {
    color: #9CAAC5;
}


/* ---------- 詳細資料操作連結 ---------- */

.back-button,
.detail-back-button {
    color: #C4CEE3;

    border-color: var(--border);

    background: #111D39;
}

.back-button:hover,
.detail-back-button:hover {
    color: #E8EDF8;

    border-color: #A9B9E5;

    background: #1B294B;
}


/* ---------- 相關關鍵字 ---------- */

.detail-section a,
.result-card a {
    color: #B8C9F0;
}

.detail-section a:hover,
.result-card a:hover {
    color: #D5CCF1;
}


/* ---------- 空白與錯誤狀態 ---------- */

.empty-state {
    color: #B9C5DA;

    border-color: rgba(158, 177, 219, 0.25);

    background: rgba(6, 13, 29, 0.35);
}

.empty-mark {
    color: #A9B9E5;
}

.error-message,
.error-state,
.data-load-error {
    color: #F0C3D0;

    border-color: rgba(228, 130, 155, 0.30);

    background: rgba(100, 35, 59, 0.20);
}


/* ---------- 頁尾 ---------- */

.site-footer {
    color: #8999B8;

    border-color: var(--border);
}

.site-footer span:first-child {
    color: #B9C9EF;
}


/* ---------- 圖片輪播外框 ---------- */

.image-carousel,
.carousel-container {
    border-color: var(--border);
    background: #080F20;
}

.carousel-button {
    color: #E8EDF8;

    border-color: rgba(169, 185, 229, 0.35);

    background: rgba(8, 14, 32, 0.88);
}

.carousel-button:hover {
    border-color: #A9B9E5;
    background: #1B294B;
}

.carousel-indicators button.active {
    background: #B8C9F0;
}


/* ========================================
   ASTERUM — DEEP SPACE COLOR SYSTEM
   深邃星際為主・夢幻宇宙為輔
   ======================================== */

:root {
  /* 01. 背景色 */
  --bg-main: #070B17;
  --bg-deep: #050914;
  --bg-panel: #111B33;
  --bg-panel-light: #182541;
  --bg-hover: #202D4A;

  /* 02. 文字色 */
  --text-main: #DCE3F2;
  --text-secondary: #A6B2CA;
  --text-muted: #7585A5;
  --text-inverse: #070B17;

  /* 03. 星際裝飾色 */
  --accent: #879BC8;
  --accent-light: #B5C2E2;
  --accent-purple: #8E82B8;
  --accent-purple-light: #B3A5D5;

  /* 04. 邊框與分隔線 */
  --border: rgba(137, 157, 198, 0.18);
  --border-strong: rgba(137, 157, 198, 0.32);

  /* 05. 陰影與光暈 */
  --shadow-deep: 0 12px 36px rgba(0, 0, 0, 0.28);
  --glow-blue: rgba(100, 126, 190, 0.12);
  --glow-purple: rgba(142, 130, 184, 0.10);

  /* 06. PLAVE 成員代表色：保留原設定 */
  --member-yejun: #4A90D9;
  --member-noah: #9270C5;
  --member-bamby: #F18BAF;
  --member-eunho: #E45B68;
  --member-hamin: #85899D;
}

/* ===== 全站背景 ===== */

html {
  background: var(--bg-deep);
}


/* ===== 全站文字 ===== */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
}

p {
  color: var(--text-secondary);
}

small, .muted, .text-muted {
  color: var(--text-muted);
}

a {
  color: var(--accent-light);
}

a:hover {
  color: var(--accent-purple-light);
}

/* ===== 側邊欄 ===== */

.sidebar {
  background: rgba(5, 10, 23, 0.97);
  border-color: var(--border);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.16);
}

.brand-name {
  color: var(--text-main);
}

.sidebar-caption,
.sidebar-footnote {
  color: var(--text-muted);
}

.nav-link {
  color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: rgba(111, 133, 190, 0.13);
}

.sidebar-divider {
  border-color: var(--border);
}

/* ===== 頁面標題 ===== */

.page-header {
  color: var(--text-main);
}

.eyebrow {
  color: var(--accent-purple-light);
}

.eyebrow-line {
  background: var(--accent-purple);
}

.page-intro {
  color: var(--text-secondary);
}

/* ===== 主要面板 ===== */

.search-panel,
.explore-panel {
  color: var(--text-main);
  background:
    linear-gradient(
      145deg,
      rgba(23, 36, 64, 0.94),
      rgba(12, 21, 41, 0.96)
    );
  border: 1px solid var(--border);
  box-shadow: var(--shadow-deep);
}

.section-heading h2 {
  color: var(--text-main);
}

.section-kicker,
.section-index {
  color: var(--text-muted);
}

/* ===== 搜尋欄 ===== */

.search-box {
  background: rgba(5, 10, 23, 0.72);
  border: 1px solid var(--border-strong);
}

.search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--glow-purple);
}

.search-icon {
  color: var(--text-muted);
}

#searchInput {
  color: var(--text-main);
  background: transparent;
}

#searchInput::placeholder {
  color: var(--text-muted);
}

#clearSearchButton {
  color: var(--text-muted);
}

#clearSearchButton:hover {
  color: var(--text-main);
}

/* ===== 按鈕 ===== */

#searchButton,
.button-primary {
  color: #E8ECF6;
  background: linear-gradient(
    135deg,
    #52668F,
    #3B4C70
  );
  border: 1px solid rgba(157, 176, 218, 0.24);
}

#searchButton:hover,
.button-primary:hover {
  background: linear-gradient(
    135deg,
    #6479A4,
    #4B5D83
  );
}

.button-text {
  color: var(--text-secondary);
  background: transparent;
  border-color: var(--border);
}

.button-text:hover {
  color: var(--accent-light);
  background: rgba(142, 130, 184, 0.09);
  border-color: var(--accent-purple);
}

/* ===== 熱門搜尋 ===== */

.subheading,
.popular {
  color: var(--text-muted);
}

.keyword-list button {
  color: var(--text-secondary);
  background: rgba(116, 135, 180, 0.09);
  border: 1px solid var(--border);
}

.keyword-list button:hover {
  color: var(--accent-light);
  background: rgba(142, 130, 184, 0.12);
  border-color: rgba(142, 130, 184, 0.45);
}

/* ===== 成員與分類篩選 ===== */

.member-button,
.category-button {
  color: var(--text-secondary);
  background: rgba(6, 12, 26, 0.48);
  border: 1px solid var(--border);
}

.member-button:hover,
.category-button:hover {
  color: var(--text-main);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.member-button.active,
.category-button.active,
.member-button.selected,
.category-button.selected {
  color: var(--text-main);
  background: rgba(111, 133, 190, 0.16);
  border-color: var(--accent);
}

#selectedMembers,
#selectedFilters {
  color: var(--text-muted);
}

.year-filter select,
#yearFilter {
  color: var(--text-main);
  background: var(--bg-panel);
  border-color: var(--border);
}

.year-filter option,
#yearFilter option {
  color: var(--text-main);
  background: var(--bg-deep);
}

/* ===== 搜尋結果 ===== */

.search-results {
  color: var(--text-main);
}

.results-topline {
  color: var(--text-muted);
  border-color: var(--border);
}

.result-card {
  color: var(--text-main);
  background: rgba(15, 25, 47, 0.78);
  border-color: var(--border);
}

.result-card h3 {
  color: var(--text-main);
}

.result-card p {
  color: var(--text-secondary);
}

.result-card a {
  color: var(--accent-light);
}

.result-card a:hover {
  color: var(--accent-purple-light);
}

/* ===== 詳細資料 ===== */

.detail-page {
  color: var(--text-main);
}

.detail-title {
  color: var(--text-main);
}

.detail-section {
  color: var(--text-secondary);
  background: rgba(16, 27, 51, 0.82);
  border-color: var(--border);
}

.detail-section h2,
.detail-section h3 {
  color: var(--text-main);
}

.detail-section p {
  color: var(--text-secondary);
}

.detail-section a {
  color: var(--accent-light);
}

.detail-section a:hover {
  color: var(--accent-purple-light);
}

/* ===== 標籤與相關關鍵字 ===== */

.tag,
.tag-list a,
.related-keyword,
.related-keywords a {
  color: var(--accent-light);
  background: rgba(113, 132, 182, 0.10);
  border: 1px solid var(--border);
}

.tag:hover,
.tag-list a:hover,
.related-keyword:hover,
.related-keywords a:hover {
  color: #E3DDF2;
  background: rgba(142, 130, 184, 0.16);
  border-color: var(--accent-purple);
}

/* ===== 圖片輪播與影片區 ===== */

.image-carousel,
.carousel-container {
  background: rgba(5, 10, 23, 0.55);
  border-color: var(--border);
}

.carousel-button {
  color: var(--text-main);
  background: rgba(8, 14, 29, 0.85);
  border-color: var(--border);
}

.carousel-button:hover {
  background: var(--bg-hover);
  border-color: var(--accent-purple);
}

.carousel-indicators button {
  background: var(--text-muted);
}

.carousel-indicators button.active {
  background: var(--accent-purple-light);
}

/* ===== 空狀態與錯誤提示 ===== */

.empty-state {
  color: var(--text-secondary);
  background: rgba(15, 25, 47, 0.52);
  border-color: var(--border);
}

.empty-mark {
  color: var(--accent-purple);
}

/* ===== 頁尾 ===== */

.site-footer {
  color: var(--text-muted);
  border-color: var(--border);
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--accent-purple-light);
}

/* ===== 手機導覽 ===== */

.mobile-bar {
  background: rgba(5, 10, 23, 0.97);
  border-color: var(--border);
}

.mobile-brand {
  color: var(--text-main);
}

.menu-toggle {
  color: var(--text-secondary);
  background: rgba(111, 133, 190, 0.12);
  border-color: var(--border);
}


/* ==================================================
   ASTERUM — PHASE 02
   SEARCH RESULTS & DETAIL PAGE
   搜尋結果與詳細資料頁
   ================================================== */


/* ==================================================
   01. 搜尋結果區：卡片改為整頁式區塊
   ================================================== */

/* 取消整個搜尋結果區的卡片外觀 */
#archiveResults {
  width: 100%;
  max-width: none;
  margin: 32px 0 0;
  padding: 0;

  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 搜尋結果標題區 */
#archiveResults .results-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 0 18px;
  margin: 0;

  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

/* 搜尋結果內容區 */
#archiveResults .results-content {
  width: 100%;
  padding: 24px 0;
  margin: 0;

  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 搜尋結果內部不額外建立外框 */
#searchResults {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 搜尋結果空狀態 */
#archiveResults .empty-state {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
  margin-top: 20px;
}


/* ==================================================
   02. 詳細資料頁：整體寬度與區塊間距
   ================================================== */

.detail-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* 詳細資料各區塊 */
.detail-section {
  margin: 0 0 32px;
  padding: 28px 30px;

  border-radius: 14px;
}

/* 區塊標題 */
.detail-section h2,
.detail-section h3 {
  margin-bottom: 18px;
}

/* 內文段落 */
.detail-section p {
  margin-bottom: 14px;
  line-height: 1.9;
}

.detail-section p:last-child {
  margin-bottom: 0;
}

/* 區塊內清單 */
.detail-section ul,
.detail-section ol {
  margin-top: 12px;
  margin-bottom: 16px;
  padding-left: 24px;
}

.detail-section li {
  margin-bottom: 9px;
  line-height: 1.8;
}


/* ==================================================
   03. 詳細資料頁：按鈕與連結
   ================================================== */

/* 返回、次要操作按鈕 */
.detail-page .button-text {
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.detail-page .button-text:hover {
  color: var(--accent-light);
  background: rgba(142, 130, 184, 0.08);
  border-color: var(--accent-purple);
}

/* 詳細資料頁內的普通連結 */
.detail-page a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.detail-page a:hover {
  color: var(--accent-purple-light);
}


/* ==================================================
   04. 詳細資料頁：標籤與相關關鍵字
   ================================================== */

.detail-page .tag,
.detail-page .tag-list a,
.detail-page .related-keyword,
.detail-page .related-keywords a {
  display: inline-flex;
  align-items: center;

  color: var(--text-secondary);
  background: rgba(116, 135, 180, 0.09);
  border: 1px solid var(--border);
  border-radius: 6px;

  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.detail-page .tag:hover,
.detail-page .tag-list a:hover,
.detail-page .related-keyword:hover,
.detail-page .related-keywords a:hover {
  color: var(--accent-purple-light);
  background: rgba(142, 130, 184, 0.12);
  border-color: var(--accent-purple);
}


/* ==================================================
   05. 詳細資料頁：平板與手機留白
   不調整字體大小
   ================================================== */

@media (max-width: 1050px) {
  .detail-page {
    max-width: 100%;
  }

  .detail-section {
    padding: 24px;
    margin-bottom: 24px;
  }
}

@media (max-width: 700px) {
  #archiveResults {
    margin-top: 24px;
  }

  #archiveResults .results-topline {
    padding-bottom: 14px;
  }

  #archiveResults .results-content {
    padding: 18px 0;
  }

  .detail-section {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
  }

  .detail-section h2,
  .detail-section h3 {
    margin-bottom: 14px;
  }

  .detail-section p {
    line-height: 1.8;
  }
}


/* ==================================================
   ASTERUM — PHASE 03
   IMAGE CAROUSEL & EXTENDED VIDEOS
   圖片輪播與延伸影片
   ================================================== */


/* ==================================================
   01. 圖片輪播外層
   ================================================== */

.image-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 24px 0;
  padding: 16px;

  overflow: hidden;
  box-sizing: border-box;

  background: rgba(5, 10, 23, 0.42);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* 輪播視窗 */
.carousel-container {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
}

/* 輪播軌道 */
.carousel-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;

  transition: transform 0.35s ease;
  will-change: transform;
}

/* 每張圖片的容器 */
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  box-sizing: border-box;
}

/* 輪播圖片 */
.carousel-slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 620px;

  object-fit: contain;
  object-position: center;

  margin: 0 auto;
}

/* ==================================================
   02. 輪播左右切換按鈕
   ================================================== */

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  padding: 0;

  color: var(--text-main);
  background: rgba(5, 10, 23, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 50%;

  cursor: pointer;
  transform: translateY(-50%);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.carousel-button:hover {
  background: rgba(27, 41, 72, 0.95);
  border-color: var(--accent-purple);
}

.carousel-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-button.prev,
.carousel-button.previous {
  left: 12px;
}

.carousel-button.next {
  right: 12px;
}


/* ==================================================
   03. 輪播頁面指示點
   ================================================== */

.carousel-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;

  width: 100%;
  margin: 16px 0 0;
}

.carousel-indicators button {
  width: 7px;
  height: 7px;
  min-width: 7px;
  padding: 0;

  background: var(--text-muted);
  border: 0;
  border-radius: 50%;

  cursor: pointer;
  opacity: 0.55;

  transition:
    background 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.carousel-indicators button.active {
  background: var(--accent-purple-light);
  opacity: 1;
  transform: scale(1.25);
}


/* ==================================================
   04. 圖片燈箱 Lightbox
   ================================================== */

.lightbox,
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 32px;
  box-sizing: border-box;

  background: rgba(3, 6, 15, 0.94);
  backdrop-filter: blur(10px);
}

.lightbox img,
.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;
}

/* 燈箱中的關閉按鈕 */
.lightbox button,
.image-lightbox button {
  color: var(--text-main);
  background: rgba(17, 27, 51, 0.92);
  border: 1px solid var(--border-strong);
}

.lightbox button:hover,
.image-lightbox button:hover {
  background: var(--bg-hover);
  border-color: var(--accent-purple);
}


/* ==================================================
   05. 延伸影片連結
   將不同影片連結視覺上分開
   ================================================== */

/* 常見影片平台連結 */
.detail-page a[href*="youtube.com"],
.detail-page a[href*="youtu.be"],
.detail-page a[href*="vlive.tv"],
.detail-page a[href*="weverse.io"],
.detail-page a[href*="bilibili.com"],
.detail-page a[href*="youtu.be"] {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;

  max-width: 100%;
  margin: 4px 8px 8px 0;
  padding: 8px 12px;

  color: var(--text-secondary);
  background: rgba(116, 135, 180, 0.09);
  border: 1px solid var(--border);
  border-radius: 7px;

  text-decoration: none;
  overflow-wrap: anywhere;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.detail-page a[href*="youtube.com"]:hover,
.detail-page a[href*="youtu.be"]:hover,
.detail-page a[href*="vlive.tv"]:hover,
.detail-page a[href*="weverse.io"]:hover,
.detail-page a[href*="bilibili.com"]:hover {
  color: var(--accent-purple-light);
  background: rgba(142, 130, 184, 0.12);
  border-color: var(--accent-purple);
}


/* ==================================================
   ASTERUM — IMAGE CAROUSEL FIX
   依照實際 script.js 結構定位
   ================================================== */

/* 輪播整體容器 */
.image-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  margin: 24px 0;
  padding: 16px;

  background: rgba(5, 10, 23, 0.42);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* 圖片 */
.image-carousel .source-image {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 620px;

  object-fit: contain;
  object-position: center;

  margin: 0 auto;

  cursor: zoom-in;
}

/* 左右箭頭共用樣式 */
.image-carousel .image-prev,
.image-carousel .image-next {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  padding: 0;

  color: var(--text-main);
  background: rgba(5, 10, 23, 0.82);
  border: 1px solid var(--border);
  border-radius: 50%;

  font-size: 26px;
  line-height: 1;

  cursor: pointer;

  transform: translateY(-50%);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

/* 左箭頭：圖片左側中央 */
.image-carousel .image-prev {
  left: 12px;
  right: auto;
}

/* 右箭頭：圖片右側中央 */
.image-carousel .image-next {
  right: 12px;
  left: auto;
}

/* 箭頭滑鼠效果 */
.image-carousel .image-prev:hover,
.image-carousel .image-next:hover {
  background: rgba(27, 41, 72, 0.96);
  border-color: var(--accent-purple);
}

/* 張數：圖片正下方置中 */
.image-carousel .image-counter {
  position: static;

  display: block;
  width: 100%;

  margin: 14px 0 0;
  padding: 0;

  color: var(--text-secondary);
  text-align: center;
}

/* 圖片載入失敗提示 */
.image-carousel .image-load-error {
  width: 100%;
  margin: 14px 0 0;

  color: var(--text-secondary);
  text-align: center;
}

/* ==================================================
   手機版
   ================================================== */

@media (max-width: 700px) {

  .image-carousel {
    margin: 18px 0;
    padding: 8px;
    border-radius: 10px;
  }

  .image-carousel .source-image {
    max-height: 420px;
  }

  .image-carousel .image-prev,
  .image-carousel .image-next {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .image-carousel .image-prev {
    left: 7px;
  }

  .image-carousel .image-next {
    right: 7px;
  }

  .image-carousel .image-counter {
    margin-top: 12px;
  }
}

.image-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 10001;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: var(--text-main);
    background: rgba(5, 10, 23, 0.85);
    border: 1px solid var(--border);
    border-radius: 50%;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
    pointer-events: auto;
}


/* ==================================================
   LIGHTBOX — 顯示與關閉狀態修正
   ================================================== */

/* 預設隱藏放大圖片 */
#imageLightbox.image-lightbox {
    display: none;
}

/* 只有開啟時才顯示 */
#imageLightbox.image-lightbox.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;

    align-items: center;
    justify-content: center;

    padding: 32px;
    box-sizing: border-box;

    background: rgba(3, 6, 15, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* X 關閉按鈕 */
#imageLightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 23px;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    color: var(--text-main);
    background: rgba(17, 27, 51, 0.92);
    border: 1px solid var(--border-strong);
    border-radius: 50%;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
    pointer-events: auto;
}

/* X 按鈕滑鼠效果 */
#imageLightbox .lightbox-close:hover {
    background: var(--bg-hover);
    border-color: var(--accent-purple);
}

/* 放大圖片 */
#imageLightbox .lightbox-image {
    display: block;

    max-width: 92vw;
    max-height: 88vh;

    width: auto;
    height: auto;

    object-fit: contain;
    border-radius: 8px;
}

/* 手機版 */
@media (max-width: 700px) {
    #imageLightbox.image-lightbox.is-open {
        padding: 15px;
    }

    #imageLightbox .lightbox-image {
        max-width: 96vw;
        max-height: 82vh;
    }

    #imageLightbox .lightbox-close {
        top: 12px;
        right: 12px;
    }
}


/* ==================================================
   DETAIL PAGE — 間距與卡片密度調整
   不調整任何字體大小
   ================================================== */

/* 詳細資料頁整體 */
.detail-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* 標題與簡介 */
.detail-page > h2 {
    margin: 0 0 12px;
}

.detail-page > p {
    margin: 0 0 18px;
}

/* ==================================================
   資料片段截圖：與前後內容拉開適當距離
   ================================================== */

.detail-video-section {
    margin: 24px 0 22px;
    padding: 0;
}

/* 輪播容器不再額外增加上下距離 */
.detail-video-section .image-carousel {
    margin: 0;
}

/* ==================================================
   詳細資料卡片
   ================================================== */

.detail-section {
    margin: 0 0 17px;
    padding: 19px 22px;

    border-radius: 14px;
    box-sizing: border-box;
}

/* 卡片標題 */
.detail-section h2,
.detail-section h3 {
    margin: 0 0 11px;
}

/* 卡片內文 */
.detail-section p {
    margin: 0 0 10px;
    line-height: 1.85;
}

.detail-section p:last-child {
    margin-bottom: 0;
}

/* 卡片內清單 */
.detail-section ul,
.detail-section ol {
    margin-top: 8px;
    margin-bottom: 10px;
    padding-left: 22px;
}

.detail-section li {
    margin-bottom: 6px;
    line-height: 1.8;
}

/* ==================================================
   延伸影片：手機版排列
   保留桌面版原有設計
   ================================================== */


/* 手機版延伸影片：維持按鈕框框排列 */
@media (max-width: 700px) {

    .related-video-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 9px;

        width: 100%;
        box-sizing: border-box;
    }

    .related-video-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: auto;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;

        padding: 9px 12px;

        overflow-wrap: anywhere;
        word-break: break-word;
    }

}


/* ==================================================
   手機版詳細資料間距
   ================================================== */

@media (max-width: 700px) {

    .detail-page > h2 {
        margin-bottom: 10px;
    }

    .detail-page > p {
        margin-bottom: 14px;
    }

    .detail-video-section {
        margin: 20px 0 18px;
    }

    .detail-section {
        margin-bottom: 13px;
        padding: 15px 16px;

        border-radius: 12px;
    }

    .detail-section h2,
    .detail-section h3 {
        margin-bottom: 9px;
    }

    .detail-section p {
        margin-bottom: 8px;
        line-height: 1.8;
    }

}

/* ===== ASTERUM：詳細資料連結與關鍵字統一 ===== */

/* 詳細資料內的文字連結 */
.detail-section a {
    color: var(--accent-light);
    text-decoration-color: rgba(181, 194, 226, 0.45);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.detail-section a:hover {
    color: var(--accent-purple-light);
    text-decoration-color: var(--accent-purple-light);
}

/* 標籤與相關關鍵字 */
.tag,
.tag-list a,
.related-keyword,
.related-keywords a,
.detail-page .tag,
.detail-page .tag-list a,
.detail-page .related-keyword,
.detail-page .related-keywords a {
    color: var(--accent-light);
    background: rgba(116, 135, 180, 0.12);
    border: 1px solid var(--border-strong);
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

/* 滑鼠移過 */
.tag:hover,
.tag-list a:hover,
.related-keyword:hover,
.related-keywords a:hover,
.detail-page .tag:hover,
.detail-page .tag-list a:hover,
.detail-page .related-keyword:hover,
.detail-page .related-keywords a:hover {
    color: var(--accent-purple-light);
    background: rgba(142, 130, 184, 0.18);
    border-color: var(--accent-purple);
}

/* ===== ASTERUM：查看詳細資料按鈕 ===== */

.detail-button {
    color: var(--accent-light);
    background: rgba(116, 135, 180, 0.13);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.detail-button:hover {
    color: #E3DDF2;
    background: rgba(142, 130, 184, 0.2);
    border-color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(142, 130, 184, 0.12);
}

/* ===== ASTERUM：詳細資料頁相關關鍵字 ===== */

.detail-page .related-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.detail-page .related-term-button {
    color: var(--accent-light);
    background: rgba(116, 135, 180, 0.12);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.detail-page .related-term-button:hover {
    color: #E3DDF2;
    background: rgba(142, 130, 184, 0.2);
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(142, 130, 184, 0.12);
}

.detail-page .related-term-button:focus-visible {
    outline: 2px solid var(--accent-purple-light);
    outline-offset: 3px;
}

/* ===== ASTERUM：搜尋結果排序選單 ===== */

.sort-area {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sort-area label {
    color: var(--text-secondary);
}

.sort-area #sortSelect {
    color: var(--accent-light);
    background-color: #111B33;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 9px 34px 9px 12px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.sort-area #sortSelect:hover {
    border-color: var(--accent-purple);
    background-color: #182541;
}

.sort-area #sortSelect:focus {
    outline: none;
    border-color: var(--accent-purple-light);
    box-shadow: 0 0 0 3px rgba(142, 130, 184, 0.15);
}

.sort-area #sortSelect option {
    color: var(--text-main);
    background-color: #111B33;
}

/* ===== ASTERUM：搜尋結果區細節整理 ===== */

/* 搜尋結果外層維持整頁式 */
#archiveResults {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* 標題與排序區 */
#archiveResults .results-topline {
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom-color: var(--border-strong);
}

/* 排序選單區 */
#archiveResults .sort-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 搜尋結果內容 */
#archiveResults .results-content {
    padding-top: 22px;
    padding-bottom: 28px;
}

/* 搜尋結果清單 */
#searchResults {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* 空搜尋結果 */
#archiveResults .empty-state {
    background: rgba(17, 27, 51, 0.45);
    border-color: var(--border);
}

@media (max-width: 700px) {
    #archiveResults .results-topline {
        gap: 12px;
        padding-bottom: 16px;
    }

    #archiveResults .results-content {
        padding-top: 18px;
        padding-bottom: 22px;
    }
}

/* ===== ASTERUM：搜尋結果整頁式排列（試行版） */

/* 搜尋結果清單 */
#resultsList {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* 每筆搜尋資料：取消卡片外觀 */
#resultsList .result-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 24px 8px;

    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
}

/* 第一筆資料增加上方分隔 */
#resultsList .result-card:first-of-type {
    border-top: 1px solid var(--border);
}

/* 資料標題 */
#resultsList .result-card h3 {
    color: var(--text-main);
    margin-top: 0;
}

/* 資料描述 */
#resultsList .result-card > p {
    color: var(--text-secondary);
}

/* 資料資訊 */
#resultsList .result-info {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    color: var(--text-secondary);
}

/* 查看詳細資料按鈕 */
#resultsList .detail-button {
    margin-top: 14px;
}

/* 滑鼠移過整筆資料 */
#resultsList .result-card:hover {
    background: rgba(116, 135, 180, 0.055);
    box-shadow: none;
}

@media (max-width: 700px) {
    #resultsList .result-card {
        padding: 19px 5px;
    }

    #resultsList .result-info {
        gap: 8px 12px;
    }
}

/* ===== ASTERUM：整頁式搜尋結果辨識度加強 ===== */

#resultsList .result-card {
    position: relative;
    padding: 25px 18px 25px 22px;

    background: rgba(74, 100, 155, 0.075);
    border: none;
    border-bottom: 1px solid rgba(137, 157, 198, 0.28);
    border-radius: 0;
    box-shadow: none;

    transition: background 0.25s ease;
}

/* 左側識別線 */
#resultsList .result-card::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 0;
    width: 2px;

    background: linear-gradient(
        180deg,
        rgba(135, 155, 200, 0.25),
        rgba(142, 130, 184, 0.65),
        rgba(135, 155, 200, 0.25)
    );
}

/* 第一筆資料的上方分隔線 */
#resultsList .result-card:first-of-type {
    border-top: 1px solid rgba(137, 157, 198, 0.28);
}

/* 滑鼠移過時微微提亮 */
#resultsList .result-card:hover {
    background: rgba(116, 135, 180, 0.13);
    box-shadow: none;
}

/* ===== ASTERUM：移除搜尋結果左側裝飾線 ===== */

#resultsList .result-card::before {
    display: none;
}

/* 保留淡淡的區塊底色與分隔線 */
#resultsList .result-card {
    padding: 25px 18px;
    background: rgba(74, 100, 155, 0.075);
    border-bottom: 1px solid rgba(137, 157, 198, 0.28);
}

#resultsList .result-card:hover {
    background: rgba(116, 135, 180, 0.13);
}

@media (max-width: 700px) {
    #resultsList .result-card {
        padding: 20px 12px;
    }
}

/* ===== ASTERUM：電腦版側邊欄比例調整 ===== */

@media (min-width: 1051px) {
    .sidebar {
        width: 280px;
        box-sizing: border-box;
    }

    .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
        box-sizing: border-box;
    }
}

/* ASTERUM：手機版搜尋欄排版 */
@media (max-width: 700px) {
    .search-box {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr) 36px;
        align-items: center;
        gap: 8px;
        padding: 12px;
    }

    .search-box .search-icon {
        grid-column: 1;
        grid-row: 1;
    }

    .search-box #searchInput {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .search-box #clearSearchButton {
        grid-column: 3;
        grid-row: 1;
    }

    .search-box #searchButton {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: center;
    }
}

/* ASTERUM：搜尋按鈕色彩統一 */
#searchButton {
    color: var(--accent-light);
    background: rgba(116, 135, 180, 0.13);
    border: 1px solid var(--border-strong);
    transition: background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

#searchButton:hover {
    color: #E3DDF2;
    background: rgba(142, 130, 184, 0.2);
    border-color: var(--accent-purple);
}

/* ASTERUM：手機搜尋按鈕觸控回饋 */
@media (hover: none) {
    #searchButton:hover {
        color: var(--accent-light);
        background: rgba(116, 135, 180, 0.13);
        border-color: var(--border-strong);
    }

    #searchButton:active {
        color: #E3DDF2;
        background: rgba(142, 130, 184, 0.3);
        border-color: var(--accent-purple);
        transform: scale(0.98);
    }
}

@media (max-width: 700px) {
    .main-content .page-header {
        margin-bottom: 0 !important;
        padding-bottom: 3px !important;
    }
}

@media (max-width: 700px) {
    .main-content .search-panel {
        margin-top: -15px;
    }
}

/* ASTERUM：手機選單按鈕改為純漢堡圖示 */
@media (max-width: 700px) {
    .menu-toggle {
        width: 42px;
        height: 42px;
        padding: 0;
    }

    .menu-label {
        display: none;
    }

    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 20px;
        height: 20px;
    }

    .menu-icon i {
        display: block;
        width: 16px;
        height: 1px;
        border-radius: 1px;
        background: currentColor;
    }
}


/* ASTERUM：統一側邊欄線條圖示 */
.nav-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #9bb9e8;
}

.nav-symbol svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.7;
}


/* ASTERUM：詳細資料文字換行 */
.detail-page p {
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
}


/* ASTERUM：搜尋結果卡片文字換行 */
#resultsList .result-card p {
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
}


/* =====================================================
   最終整合調整
   ===================================================== */

/* 手機版使用專屬背景圖；桌面仍沿用 background.jpg */
@media (max-width: 700px) {
    body {
        background-image:
    linear-gradient(
        120deg,
        rgba(5, 12, 27, 0.88),
        rgba(8, 20, 43, 0.78),
        rgba(7, 15, 32, 0.90)
    ),
    url("background-phone.jpg");

        background-color: var(--bg-main);
        background-position: center top;
        background-size: 100% auto;
        background-attachment: scroll;
        background-repeat: repeat-y;
    }
}

/* 側欄目前頁面：保留辨識度，降低亮度與對比 */
.nav-link.active {
    color: #c5d0e4;
    border-color: rgba(157, 187, 232, 0.13);
    background: rgba(116, 135, 180, 0.075);
    box-shadow: inset 2px 0 rgba(169, 202, 255, 0.48);
}


/* 手機版：搜尋結果初始提示不使用卡片外觀 */
@media (max-width: 700px) {
    #archiveResults .empty-state {
        min-height: 0;
        margin-top: 0;
        padding: 20px 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
}


/* =====================================================
   ASTERUM HOMEPAGE HEADER · ARCHIVE EDITION
   原有標題結構 × 星際典藏識別 × 柔和星雲氛圍
   ===================================================== */

.page-header {
    position: relative;
    isolation: isolate;
    padding-top: 24px;
    padding-bottom: 42px;
}

/* 藍紫星雲、遠方星塵與柔和光帶 */
.page-header::before {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;

    /* 延伸到視窗外，避免裝飾背景在頁首右側留下垂直切線 */
    inset: -150px -100vw -180px;
    -webkit-mask-image: none;
mask-image: none;

    background:
        /* 局部藍紫星雲 */
        radial-gradient(
            ellipse at 76% 25%,
            rgba(92, 119, 198, 0.12),
            transparent 32%
        ),
        radial-gradient(
            ellipse at 24% 68%,
            rgba(104, 83, 174, 0.09),
            transparent 30%
        ),
        radial-gradient(
            ellipse at 48% 5%,
            rgba(110, 143, 204, 0.07),
            transparent 35%
        ),

        /* 稀疏星點 */
        radial-gradient(circle at 8% 22%, rgba(225, 235, 255, 0.8) 0 1px, transparent 2px),
        radial-gradient(circle at 19% 61%, rgba(190, 210, 255, 0.65) 0 1px, transparent 2px),
        radial-gradient(circle at 35% 15%, rgba(225, 235, 255, 0.75) 0 1px, transparent 2px),
        radial-gradient(circle at 54% 72%, rgba(210, 220, 255, 0.65) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 12%, rgba(225, 235, 255, 0.8) 0 1px, transparent 2px),
        radial-gradient(circle at 91% 53%, rgba(190, 210, 255, 0.75) 0 1px, transparent 2px);

    opacity: 1;
}

/* 原有星雲光暈加強，仍維持在背景層 */

.page-header-topline {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 2px;
}

.page-header .eyebrow {
    gap: 11px;
    color: #C0C9EC;
    text-shadow: 0 0 16px rgba(151, 174, 246, 0.25);
}

.page-header .eyebrow-line {
    width: 34px;
    background: linear-gradient(90deg, #B9C9F4, rgba(185, 201, 244, 0.12));
    box-shadow: 0 0 9px rgba(160, 184, 255, 0.32);
}

.archive-coordinate {
    color: #AEBBE0;
    font-size: 10px;
    letter-spacing: 0.17em;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(138, 160, 224, 0.22);
}

.archive-coordinate i {
    color: #D0BCEB;
    font-style: normal;
    padding: 0 3px;
}

.page-header h1 {
    text-shadow:
        0 0 18px rgba(150, 174, 255, 0.24),
        0 0 46px rgba(115, 125, 211, 0.22);
}

.page-header h1 span {
    text-shadow:
        0 0 18px rgba(172, 185, 255, 0.25),
        0 0 38px rgba(137, 126, 207, 0.20);
}

.page-header .page-intro {
    position: relative;
    z-index: 1;
    max-width: 620px;
    color: #C4CDE2;
}

.page-header-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 11px;
    margin-top: 25px;
    padding-top: 13px;
    border-top: 1px solid rgba(156, 177, 229, 0.22);
    color: #A9B8D9;
}

.page-header-meta .meta-label {
    color: #8295BE;
    font-size: 9px;
    letter-spacing: 0.16em;
}

.page-header-meta .meta-value {
    color: #C0CBE7;
    font-size: 10px;
    letter-spacing: 0.09em;
}

.page-header-meta .meta-divider {
    width: 1px;
    height: 12px;
    margin: 0 5px;
    background: rgba(160, 178, 225, 0.32);
}

@media (max-width: 700px) {
    .page-header {
        padding-top: 15px;
        padding-bottom: 37px;
    }

    .page-header::before {
        inset: -8px -16px 8px;
        border-radius: 16px;
        background:
            radial-gradient(ellipse at 78% 32%, rgba(107, 132, 211, 0.20), transparent 48%),
            radial-gradient(ellipse at 18% 70%, rgba(104, 91, 174, 0.15), transparent 45%),
            radial-gradient(circle at 12% 20%, rgba(221, 231, 255, 0.75) 0 1px, transparent 2px),
            radial-gradient(circle at 84% 58%, rgba(201, 214, 255, 0.75) 0 1px, transparent 2px);
    }

    .page-header-topline {
        align-items: flex-start;
        gap: 8px;
    }

    .page-header .eyebrow {
        font-size: 9px;
        letter-spacing: 0.13em;
    }

    .page-header .page-intro {
    font-size: 11px;
    }

    .archive-coordinate {
        font-size: 8px;
        letter-spacing: 0.10em;
    }

    .page-header-meta {
        gap: 6px 8px;
        margin-top: 18px;
        padding-top: 10px;
    }

    .page-header-meta .meta-label {
        font-size: 8px;
    }

    .page-header-meta .meta-value {
        font-size: 9px;
    }

    .page-header-meta .meta-divider {
        margin: 0 2px;
    }
}

.archive-status {
    font-size: 9.5px;
}

body {
    min-width: 320px;
    margin: 0;

    color: var(--text-main);
    background-color: var(--bg-main);

    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.75;

    background-image:
        linear-gradient(
            120deg,
            rgba(5, 12, 27, 0.88),
            rgba(8, 20, 43, 0.78),
            rgba(7, 15, 32, 0.90)
        ),
        url("background.jpg"),
        radial-gradient(
            circle at 75% 5%,
            rgba(74, 112, 183, 0.22),
            transparent 42%
        );

    background-position:
        center,
        center center,
        center;

    background-size:
        cover,
        cover,
        auto;

    background-attachment: fixed;
}

/* =====================================================
   ASTERUM — FOOTER, WELCOME & INFORMATION PAGES
   ===================================================== */

/* 桌機版面寬度保護：避免子元素意外撐開整個頁面 */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.site-layout {
    min-width: 0;
    overflow-x: visible;
}

.main-content {
    min-width: 0;
}

/* 頁尾 */
.site-footer {
    position: relative;
    display: block;
    margin-top: 54px;
    padding: 27px 0 0;
    border-top: 1px solid rgba(157, 187, 232, 0.20);
    background: transparent;
    font-size: 11px;
    line-height: 1.8;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 28px;
    row-gap: 10px;
}

.footer-brand {
    grid-column: 1;
    grid-row: 1;
}

.footer-disclaimer {
    grid-column: 1;
    grid-row: 2;
}

.footer-links {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 19px;
    align-items: center;
}

.footer-credit {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

/* 首次進站歡迎視窗 */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(3, 8, 20, 0.82);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.welcome-overlay.is-visible {
    display: flex;
}

body.welcome-open {
    overflow: hidden;
}

.welcome-dialog {
    position: relative;
    width: min(620px, 100%);
    max-height: min(86vh, 760px);
    overflow-y: auto;
    padding: 38px 42px 34px;
    border: 1px solid rgba(169, 198, 245, 0.28);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(25, 43, 78, 0.98), rgba(9, 19, 41, 0.99));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(220, 233, 255, 0.06);
}

.welcome-close {
    position: absolute;
    top: 13px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(169, 198, 245, 0.18);
    border-radius: 50%;
    color: #b8c9e5;
    background: rgba(145, 170, 220, 0.08);
    font-size: 21px;
    cursor: pointer;
}

.welcome-kicker {
    margin-bottom: 12px;
    color: #9eb9e8;
    font-size: 10px;
    letter-spacing: 0.18em;
}

.welcome-dialog h2 {
    margin: 0 0 16px;
    color: #eef4ff;
    font-size: 23px;
    line-height: 1.5;
}

.welcome-dialog h2 span {
    color: #c6d9ff;
}

.welcome-intro,
.welcome-thanks {
    color: #c0cee5;
    font-size: 13px;
    line-height: 1.9;
}

.welcome-notes {
    margin-top: 21px;
    padding: 17px 19px;
    border: 1px solid rgba(157, 187, 232, 0.16);
    border-radius: 12px;
    background: rgba(5, 13, 30, 0.32);
}

.welcome-notes h3 {
    margin: 0 0 9px;
    color: #dbe7fb;
    font-size: 13px;
}

.welcome-notes ul {
    margin: 0;
    padding-left: 19px;
}

.welcome-notes li {
    margin: 7px 0;
    color: #aebed8;
    font-size: 11px;
    line-height: 1.85;
}

.welcome-thanks {
    margin: 17px 0 20px;
    font-size: 12px;
}

.welcome-start {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 11px 19px;
    border: 1px solid rgba(188, 211, 255, 0.38);
    border-radius: 8px;
    color: #f1f5ff;
    background: linear-gradient(120deg, rgba(107, 139, 197, 0.48), rgba(126, 112, 174, 0.40));
    cursor: pointer;
    font-size: 12px;
}

.welcome-start:hover {
    filter: brightness(1.12);
}

/* 關於本站／使用指南共用頁面 */
.info-page {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 70px 0 45px;
}

.info-back {
    display: inline-block;
    margin-bottom: 28px;
    color: #b8cbea;
    font-size: 12px;
}

.info-kicker {
    color: #9eb9e8;
    font-size: 10px;
    letter-spacing: 0.17em;
}

.info-page h1 {
    margin: 8px 0 12px;
    color: #edf4ff;
    font-size: clamp(28px, 4vw, 38px);
}

.info-lead {
    margin-bottom: 35px;
    color: #b9c9e2;
    font-size: 13px;
    line-height: 1.9;
}

.info-section {
    margin: 0 0 22px;
    padding: 23px 25px;
    border: 1px solid rgba(157, 187, 232, 0.18);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(27, 41, 75, 0.78), rgba(14, 25, 49, 0.82));
}

.info-section h2 {
    margin: 0 0 12px;
    color: #e2ecff;
    font-size: 16px;
}

.info-section p,
.info-section li {
    color: #b6c5de;
    font-size: 12px;
    line-height: 1.9;
}

.info-section p:last-child { margin-bottom: 0; }
.info-section ul, .info-section ol { margin: 8px 0 0; padding-left: 22px; }
.info-section li { margin: 5px 0; }
.info-page .site-footer {
    margin-top: 48px;
}

@media (min-width: 701px) and (max-width: 900px) {
    .footer-main { grid-template-columns: minmax(0, 1fr); }
    .footer-links { grid-column: 1; grid-row: auto; justify-content: flex-start; }
    .footer-disclaimer { grid-column: 1; grid-row: auto; }
    .footer-credit { grid-column: 1; grid-row: auto; justify-self: start; }
}

@media (max-width: 700px) {
    .site-footer { margin-top: 38px; padding-top: 22px; }
    .footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 28px;
    row-gap: 10px;
}
.footer-links {
    justify-content: flex-start;
    gap: 9px 15px;
}

.footer-credit {
    align-self: flex-start;
}

.footer-disclaimer {
    max-width: 100%;
}

.welcome-overlay {
    align-items: flex-start;
    padding: 14px;
}

.welcome-dialog {
    max-height: calc(100dvh - 28px);
    padding: 34px 21px 25px;
    border-radius: 14px;
}

.welcome-dialog h2 {
    font-size: 20px;
}

.welcome-intro {
    font-size: 12px;
}

.welcome-notes {
    padding: 14px;
}

.welcome-notes li {
    font-size: 10.5px;
}

.info-page {
    padding: 82px 0 30px;
}

.info-section {
    padding: 19px 17px;
}.info-section {
    padding: 19px 17px;
}

}

/* 桌機版主欄寬度明確依側邊欄計算，避免重複規則造成橫向溢出 */
@media (min-width: 701px) {
    .main-content {
        width: calc(100% - 280px);
        max-width: none;
        margin-left: 280px;
        box-sizing: border-box;
    }
}

@media (min-width: 701px) and (max-width: 1050px) {
    .main-content {
        width: calc(100% - 225px);
        margin-left: 225px;
    }
}

/* 關於本站、使用指南：獨立資訊頁版面 */
.main-content.info-page {
    width: min(1080px, calc(100% - 40px));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.detail-contributor {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: right;
}


/* =====================================================
   2026-11 typography + responsive refinements
   ===================================================== */

/* 桌面版：提升導覽、標題與操作文字的層級 */
@media (min-width: 701px) {
    .sidebar-caption { font-size: 13px; }
    .nav-link, .external-nav, .external-nav a { font-size: 17px; }
    .brand-name, .brand, .mobile-brand { font-size: 25px; }

    .page-header h1 { font-size: clamp(42px, 4.2vw, 48px); }
    .section-heading h2,
    .compact-heading h2 { font-size: 22px; }

    #searchButton { font-size: 19px; min-height: 48px; padding: 11px 24px; }
    .selection-status, .year-filter label,
    .filter-clear, .clear-button { font-size: 14px; }

    #archiveResults .results-topline h2 { font-size: 22px; }
    #resultsList .result-card h3 { font-size: 28px; }
    #resultsList .result-card > p { font-size: 17px; line-height: 1.8; }
    #resultsList .detail-button { font-size: 17px; padding: 11px 18px; }

    .detail-page > h2 { font-size: clamp(36px, 3.4vw, 46px); }
    .detail-page > p { font-size: 20px; line-height: 1.9; }
    .detail-section h2, .detail-section h3 { font-size: 23px; }
    .detail-section p { font-size: 18px; line-height: 1.9; }

    .site-footer { font-size: 14px; line-height: 1.85; }
    .footer-brand strong { font-size: 18px; }
    .footer-brand span { font-size: 13px; }
    .footer-disclaimer, .footer-links, .footer-credit, .footer-bottom { font-size: 14px; }
}

/* 延伸資料的每個連結都使用一致的卡片框線，不限 YouTube 網址 */
.related-video-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.related-video-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: rgba(116, 135, 180, 0.12);
    color: var(--accent-light);
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-decoration: none;
    box-sizing: border-box;
}
.related-video-link:hover {
    border-color: rgba(181, 194, 226, 0.55);
    background: rgba(116, 135, 180, 0.20);
}

/* 手機版：收斂搜尋區，讓主要資料按鈕仍清楚可點 */
@media (max-width: 700px) {
    .search-box { gap: 6px; padding: 9px 10px; }
    .search-box #searchInput { font-size: 14px; min-height: 38px; }
    .search-box #searchButton { min-height: 39px; padding: 8px 12px; font-size: 14px; }

    .popular-heading, .popular-title, #popularSearches h2 { font-size: 14px; }
    #popularKeywords button, .popular-keyword, .popular-search-button { font-size: 12px; padding: 6px 9px; }

    .filter-heading, .filter-title { font-size: 14px; }
    .filter-actions button, .filter-actions .button-primary,
    #applyFilters, .apply-filter-button { font-size: 12px; padding: 7px 10px; min-height: 34px; }

    .member-button, .category-button { font-size: 13px; padding: 7px 10px; }
    .selection-status, .year-filter label { font-size: 12px; }

    #resultsList .result-card h3 { font-size: 20px; }
    #resultsList .result-card > p { font-size: 13px; line-height: 1.7; }
    #resultsList .result-info { font-size: 11px; line-height: 1.65; gap: 6px 10px; }
    #resultsList .detail-button { font-size: 13px; padding: 8px 12px; }

    .detail-page > h2 { font-size: 27px; }
    .detail-page > p { font-size: 15px; line-height: 1.8; }
    .detail-section h2, .detail-section h3 { font-size: inherit; }
    .detail-section p { font-size: 15px; line-height: 1.85; }
    .related-video-link { font-size: 12px; padding: 7px 10px; }

    #backButton, .back-button, .detail-back-button { font-size: 12px; padding: 7px 10px; }
    #sortSelect, .sort-select, .sort-control { font-size: 12px; }

    /* 側欄官方網站連結與主導覽同級；粉絲製作註記略小 */
    .sidebar .external-nav, .sidebar .external-nav a { font-size: 13px; }
    .sidebar .sidebar-footnote { font-size: 9px; }

    /* 修正頁尾原本 1fr + auto 雙欄擠壓造成逐字換行 */
    .site-footer { font-size: 12px; line-height: 1.75; }
    .footer-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        column-gap: 0;
        row-gap: 12px;
        width: 100%;
        min-width: 0;
    }
    .footer-brand,
    .footer-disclaimer,
    .footer-links,
    .footer-credit {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
        min-width: 0;
        justify-self: stretch;
        box-sizing: border-box;
    }
    .footer-brand strong,
    .footer-brand span,
    .footer-disclaimer,
    .footer-credit,
    .footer-bottom {
        overflow-wrap: normal;
        word-break: normal;
        white-space: normal;
    }
    .footer-brand strong { display: block; font-size: 16px; }
    .footer-brand span { display: block; font-size: 11px; }
    .footer-disclaimer { margin: 0; font-size: 12px; }
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 14px;
        font-size: 12px;
    }
    .footer-credit { justify-self: start; font-size: 12px; }
    .footer-bottom { margin-top: 12px; font-size: 10px; }

    /* 手機背景圖只顯示一次，避免 repeat-y 造成圖案重複而誤以為放大 */
    body {
        background-image:
            linear-gradient(
                120deg,
                rgba(5, 12, 27, 0.82),
                rgba(8, 20, 43, 0.72),
                rgba(7, 15, 32, 0.84)
            ),
            url("background-phone.jpg");
        background-position: center top;
        background-size: 100vw auto;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
}

/* 極窄螢幕仍允許頁尾連結自然換行，不壓縮品牌欄 */
@media (max-width: 380px) {
    .footer-links { column-gap: 11px; }
    .footer-brand strong { font-size: 15px; }
}


/* =====================================================
   2026-11 follow-up refinements
   ===================================================== */
.welcome-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
}
.welcome-guide {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: #c6d9ff;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid rgba(188, 211, 255, 0.32);
}
.welcome-guide:hover { color: #fff; }

/* 電腦版：細部提升資訊頁與詳細資料的可讀性 */
@media (min-width: 701px) {
    .detail-section p,
    .detail-section li { font-size: 19px; }
    .detail-section a,
    .related-video-link { font-size: 16px; }
    .related-term-button { font-size: 17px; padding: 9px 14px; }

    .info-page .info-lead { font-size: 16px; line-height: 1.95; }
    .info-page .info-section h2 { font-size: 19px; }
    .info-page .info-section p,
    .info-page .info-section li { font-size: 15px; line-height: 1.95; }
    .info-page .info-back { font-size: 15px; }
}

@media (max-width: 700px) {
    /* 手機背景延伸整頁：以垂直重複補足頁面高度 */
    body {
        background-size: 100% auto;
        background-position: center top;
        background-repeat: repeat-y;
        background-attachment: scroll;
    }

    /* 五位成員固定同一排 */
    .member-list {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
        width: 100%;
    }
    .member-list .member-button {
        min-width: 0;
        width: 100%;
        padding: 7px 2px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* 手機版指定微調 */
    .year-filter label,
    .year-filter select { font-size: 10px; }
    #resultsList > h2 { font-size: 15px; }
    .detail-section p,
    .detail-section li { font-size: 13px; line-height: 1.8; }
    .sidebar .sidebar-footnote { font-size: 8px; }
    .search-box #searchButton { font-size: 12px; min-height: 37px; }
    .detail-section a,
    .related-video-link { font-size: 12px; }
    .related-term-button { font-size: 13px; padding: 7px 10px; }

    .welcome-actions { align-items: flex-start; gap: 9px 14px; }
    .welcome-guide { min-height: 39px; font-size: 12px; }
}


/* =====================================================
   2026-11 final readability refinements
   ===================================================== */
@media (min-width: 701px) {
    /* 關於本站／使用指南：標題與卡片內文同步提升 */
    .info-page .info-lead { font-size: 18px; }
    .info-page .info-section h2 { font-size: 21px; }
    .info-page .info-section p,
    .info-page .info-section li { font-size: 17px; }

    /* 搜尋欄與篩選區的清除文字 */
    #clearSearchButton,
    #clearAllFiltersButton,
    .filter-clear,
    .clear-button,
    .filter-actions .button-text { font-size: 16px; }

    /* 搜尋結果卡片內文 */
    #resultsList .result-card p,
    .result-card p { font-size: 18.5px; }
}

@media (max-width: 700px) {
    /* 背景保留藍色遮罩，並沿頁面高度重複背景圖 */
    body {
        background-image:
            linear-gradient(
             120deg,
             rgba(7, 19, 43, 0.88),
             rgba(10, 29, 60, 0.84),
             rgba(5, 16, 38, 0.90)
             ),
            url("background-phone.jpg");
        background-position: center top;
        background-size: 100% auto;
        background-repeat: repeat-y;
        background-attachment: scroll;
    }

    /* 粉絲資料庫連結縮小，避免在側欄中特別搶眼 */
    .fan-resource {
        gap: 7px;
        padding: 8px 7px;
        border-radius: 9px;
    }
    .fan-resource-icon {
        width: 25px;
        height: 25px;
        border-radius: 7px;
        font-size: 12px;
    }
    .fan-resource strong { font-size: 12px; }
    .fan-resource small { font-size: 9px; }

    /* 熱門搜尋標題再收斂一級 */
    .popular-heading,
    .popular-title,
    #popularSearches h2 { font-size: 11px; }

    /* 資料年份略為放大，仍維持輔助資訊的層級 */
    .year-filter label,
    .year-filter select { font-size: 12px; }

    /* 搜尋結果卡片內文增加 1px */
    #resultsList .result-card p,
    .result-card p { font-size: 14px; }

    /* 詳細頁卡片標題與內文均增加 1px */
    .detail-section h2,
    .detail-section h3 { font-size: 16px; }
    .detail-section p,
    .detail-section li { font-size: 14px; }

    /* 關於本站／使用指南卡片文字增加 1px */
    .info-page .info-lead { font-size: 17px; }
    .info-page .info-section h2 { font-size: 20px; }
    .info-page .info-section p,
    .info-page .info-section li { font-size: 16px; }
}


/* =====================================================
   2026-11 final micro-adjustments (v4)
   ===================================================== */

/* 搜尋結果資訊列：桌面與手機各增加 1px */
@media (min-width: 701px) {
    #resultsList .result-info {
        font-size: 16px;
    }
}

@media (max-width: 700px) {
    /* 資訊頁卡片文字微幅縮小，回到較舒適的手機閱讀比例 */
    .info-page .info-lead { font-size: 15px; }
    .info-page .info-section h2 { font-size: 18px; }
    .info-page .info-section p,
    .info-page .info-section li { font-size: 14px; }

    /* 熱門搜尋標題：比 12px 的關鍵字按鈕略大一點 */
    .popular .subheading { font-size: 13px; }

    /* 搜尋結果資訊列增加 1px */
    #resultsList .result-info { font-size: 12px; }
}

/* =====================================================
   2026-11 requested micro-adjustments
   ===================================================== */

/* 電腦版：首頁瀏覽提醒放大 2px；詳細資料主標題縮小約 3–4px */
@media (min-width: 701px) {
    .page-header .page-intro {
        font-size: 16px;
    }

    /* 實際詳細資料標題由 script.js 輸出為 .detail-page 的直屬 h2 */
    .detail-page > h2 {
        font-size: clamp(32px, 3.1vw, 42px);
    }
}

/* 手機版：只微調輪播頁碼與數字下方的留白 */
@media (max-width: 700px) {
    .image-carousel {
        padding-bottom: 4px;
    }

    .image-carousel .image-counter {
        font-size: 12px;
    }
}


/* =====================================================
   2026-12 carousel spacing + detail title correction
   ===================================================== */

/* 電腦版：詳細資料主標題再縮小約 3px */
@media (min-width: 701px) {
    .detail-page > h2 {
        font-size: clamp(29px, 2.9vw, 39px);
    }
}

/* 電腦與手機：進一步縮小輪播頁碼下方至外框底部的留白 */
.image-carousel {
    padding-bottom: 8px;
}

@media (max-width: 700px) {
    .image-carousel {
        padding-bottom: 0;
    }
}

/* =====================================================
   2026-12 desktop overall scale adjustment
   電腦版整體縮小約 15%，手機版維持原樣
   ===================================================== */
@media (min-width: 701px) {
    body {
        zoom: 0.85;
        width: 117.647%;
    }
}
