/* ==========================================
   VANREX Global GOLD
   Responsive Financial Landing Page CSS
   (Refactored & Optimized by VANREX-羅)
   用途：首頁、Dashboard、圖表容器與 Desktop/Tablet/Mobile RWD。
========================================== */

/* ==========================
   1. 全域設定與變數 (Global)
========================== */
:root {
    --bg-dark: #050505;
    --card-bg: #111111;
    --gold-main: #D4AF37;
    --gold-hover: #F3E5AB;
    --text-white: #E0E0E0;
    --text-gray: #A0A0A0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth !important;
    margin-top: 0px !important;
    padding-top: 0px !important;
    height: auto !important;
}

body, p, h1, h2, h3, span, div {
    /* 全域防破版：自動安全斷行 */
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: "Helvetica Neue", Arial, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    line-height: 1.6;
    top: 0px !important;
    position: static !important;
    min-height: 100vh !important;
    
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

iframe {
    width: 100% !important; 
}

/* ==========================
   2. 共用容器與元件 (Components)
========================== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.gold-text { color: var(--gold-main); }
.highlight-gold { color: var(--gold-main); font-weight: bold; }
.highlight-bold { color: #fff; font-weight: bold; border-bottom: 2px solid var(--gold-main); padding-bottom: 2px; }

/* 物理隱形墊片 (防導覽列遮擋錨點) */
section[id]::before {
    content: "";
    display: block;
    height: 120px;
    margin-top: -120px;
    visibility: hidden;
    pointer-events: none;
}

/* 按鈕共用 */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-main);
    color: #000;
    padding: 15px 40px;
    font-weight: bold;
    border-radius: 5px;
    transition: .3s;
    white-space: normal !important;
    text-align: center;
    height: auto !important;
    min-height: max-content;
}

.cta-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

/* ==========================
   3. 導覽列與選單 (Header & Nav)
========================== */
header {
    position: sticky !important; 
    top: 0 !important;           
    z-index: 99999 !important;    
    width: 100% !important;
    background-color: #050505 !important; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important; 
    border-bottom: 1px solid rgba(212,175,55,.25);
    overflow: visible !important; 
}

.header-container {
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    overflow: visible !important;
}

/* Logo 設置 */
.logo { flex-shrink: 0 !important; }
.logo a {
    display: flex;
    align-items: center;  
    gap: 0px;             
    white-space: nowrap; 
}

.logo-img {
    width: 100px !important;         
    height: 100px !important;
    max-height: 100px !important;
    border: none;             
    background: transparent;  
    box-shadow: none;         
    flex-shrink: 0; 
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(243, 198, 35, 0.45));
    transition: all 0.3s ease;
}

.logo-text-group {
    display: flex;
    align-items: center; 
    flex-shrink: 0;
    margin-top: 14px;      
    margin-left: -18px;    
}

.logo-title, .brand-main {
    font-size: 1.55rem;   
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1.5px; 
    white-space: nowrap;
    line-height: 1;        
}

/* 選單結構 */
.nav-menu ul { flex-wrap: wrap; }
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 25px;
}
nav ul li { position: relative; }

/* 統一字體與大小 */
nav ul li a, 
nav ul li .dropbtn {
    font-size: 15px;                  
    font-weight: 700;                 
    color: #ffffff;                   
    white-space: nowrap;              
    transition: .3s;
    height: auto !important;
    min-height: max-content;
}

nav ul li a:hover, 
nav ul li .dropbtn:hover {
    color: #f3c623 !important;        
}

/* 下拉選單 */
.dropdown { position: relative; }
.dropbtn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
}
.dropbtn::after {
    content: "▼";                    
    font-size: 10px;                 
    margin-left: 6px;                
    display: inline-block;
    transition: transform 0.25s ease;
    opacity: 0.8;
}
.dropdown.active .dropbtn::after {
    transform: rotate(180deg);       
    color: #f3c623;                  
    opacity: 1;
}

.dropdown-content {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    min-width: 230px !important;
    padding: 8px 0 !important;
    background: #151515 !important;
    border: 1px solid rgba(212,175,55,.3) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.8) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: .3s;
    z-index: 100000 !important; 
    text-align: left;
}
.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #eee !important;
    text-align: left;
    white-space: normal !important;
    height: auto !important;
    min-height: min-content !important;
    line-height: 1.4 !important;
}
.dropdown-content a:hover {
    background: rgba(212,175,55,.15);
    color: var(--gold-main) !important;
}
.dropdown.active .dropdown-content {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* 隱藏選單也會參與 scrollWidth；最右側選單改靠右展開，避免 1024～1280px 溢出。 */
nav ul > li:nth-child(6) .dropdown-content {
    right: 0 !important;
    left: auto !important;
}

/* ==========================
   4. 語言選擇器 (Language Picker)
========================== */
.language-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    margin-left: 10px;
    flex-shrink: 0;
}
.lang-icon {
    width: 22px;
    height: 22px;
    stroke: #f3c623;
    transition: all 0.3s ease;
}
.language-picker:hover .lang-icon,
.language-picker.active .lang-icon {
    stroke: #ffffff;
    filter: drop-shadow(0 0 8px rgba(243, 198, 35, 0.9));
    transform: scale(1.1);
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 180px;
    max-height: 280px;                              
    overflow-y: auto;                               
    background: #0b1120;                            
    border: 1px solid rgba(243, 198, 35, 0.35);     
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(243, 198, 35, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
}
.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown::-webkit-scrollbar { width: 5px; }
.lang-dropdown::-webkit-scrollbar-track { background: rgba(11, 17, 32, 0.8); border-radius: 10px; }
.lang-dropdown::-webkit-scrollbar-thumb { background: rgba(243, 198, 35, 0.4); border-radius: 10px; }
.lang-dropdown::-webkit-scrollbar-thumb:hover { background: #f3c623; }

.lang-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: rgba(243, 198, 35, 0.15); color: #f3c623; }
.lang-option.active { color: #f3c623; font-weight: 700; }
.lang-option .lang-check { font-size: 12px; color: #f3c623; }

/* 阻擋 Google 翻譯干擾 */
.goog-te-banner-frame, .skiptranslate > iframe, #goog-gt-tt, 
.goog-te-balloon-frame, .goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; box-shadow: none !important; }

/* ==========================
   5. 首屏英雄區 (Hero)
========================== */
.hero-section { padding: 60px 20px; }
.hero-card {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 80px 40px;
    text-align: center;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    border: 1px solid rgba(212,175,55,.3);
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,.8);
    height: auto !important;
    min-height: min-content !important;
}
.badge-newbie {
    display: inline-block;
    background: var(--gold-main);
    color: #000;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: .95rem;
    font-weight: bold;
    margin-bottom: 25px;
}
.hero-card h1 {
    margin: 0 0 20px;
    color: var(--gold-main);
    font-size: clamp(30px,5vw,52px);
    line-height: 1.3;
}
.hero-card p {
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-gray);
    font-size: 1.15rem;
}

/* ============================================================
   Global GOLD 主視覺卡
   僅作用於首頁此區塊，不影響其他內容與共用 hero-card。
============================================================ */
.global-gold-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: clamp(30px, 4vw, 58px);
    width: 100%;
    max-width: 1180px;
    margin: auto;
    padding: clamp(40px, 5vw, 66px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(243,198,35,.12), transparent 31%),
        linear-gradient(135deg, #171717 0%, #0d0d0d 55%, #11100c 100%);
    border: 1px solid rgba(243,198,35,.38);
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.035);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.global-gold-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .24;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(90deg, transparent 20%, #000 70%);
}

.global-gold-showcase:hover {
    transform: translateY(-3px);
    border-color: rgba(243,198,35,.6);
    box-shadow: 0 26px 62px rgba(0,0,0,.52), 0 0 30px rgba(243,198,35,.045), inset 0 1px 0 rgba(255,255,255,.04);
}

/* 左側產品訴求：以清楚的文字層級與重點清單引導主要 CTA。 */
.global-gold-showcase__content {
    position: relative;
    z-index: 1;
    align-self: center;
}

.global-gold-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #e8b928;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .2em;
}

.global-gold-showcase__eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, #e8b928, rgba(232,185,40,.2));
}

.global-gold-showcase__content h1 {
    margin: 0 0 18px;
    color: #f1c843;
    font-size: clamp(2.15rem, 3.45vw, 3.45rem);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.global-gold-showcase__content > p {
    max-width: 590px;
    margin: 0 0 25px;
    color: #b8bcc4;
    font-size: 1.04rem;
    line-height: 1.8;
}

.global-gold-showcase__benefits {
    display: grid;
    gap: 11px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.global-gold-showcase__benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e1e3e7;
    font-size: .95rem;
}

.global-gold-showcase__benefits li::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 1px solid rgba(243,198,35,.92);
    border-radius: 50%;
    background: rgba(243,198,35,.18);
    box-shadow: 0 0 0 4px rgba(243,198,35,.055);
}

.global-gold-showcase__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.global-gold-showcase__button {
    display: inline-flex;
    min-height: 46px;
    padding: 12px 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: .92rem;
    font-weight: 800;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.global-gold-showcase__button:hover { transform: translateY(-2px); }
.global-gold-showcase__button--primary { color: #080808; background: linear-gradient(135deg, #f3c623, #d9a916); }
.global-gold-showcase__button--primary:hover { background: linear-gradient(135deg, #ffda4d, #e8b928); }
.global-gold-showcase__button--secondary { color: #e8b928; border-color: rgba(243,198,35,.45); background: rgba(255,255,255,.025); }
.global-gold-showcase__button--secondary:hover { border-color: rgba(243,198,35,.75); background: rgba(243,198,35,.06); }

/* ============================================================
   XAUUSD 黃金市場監控視覺
   純 HTML/CSS 呈現抽象 K 線、趨勢與掃描狀態，不包含虛構行情數字。
============================================================ */
.global-gold-showcase__visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.global-gold-showcase__visual::before {
    content: "";
    position: absolute;
    width: 78%;
    aspect-ratio: 1;
    left: 11%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243,198,35,.12), transparent 66%);
    filter: blur(8px);
}

.global-gold-market-panel {
    position: relative;
    width: 100%;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(243,198,35,.34);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(29,29,27,.94), rgba(7,7,7,.92));
    box-shadow: 0 24px 50px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.04);
}

.global-gold-market-panel__header,
.global-gold-market-panel__metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.global-gold-market-panel__header strong { display: block; color: #f1c843; font-size: 1.12rem; letter-spacing: .08em; }
.global-gold-market-panel__header div span { color: #7f858e; font-size: .68rem; }
.global-gold-market-panel__status { padding: 6px 9px; color: #dcb540; font-size: .6rem; letter-spacing: .14em; border: 1px solid rgba(243,198,35,.3); border-radius: 20px; background: rgba(243,198,35,.055); }

.global-gold-market-panel__chart {
    position: relative;
    height: 220px;
    margin: 18px 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 44px 44px;
}

.global-gold-market-panel__scan {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: 56%;
    width: 1px;
    background: linear-gradient(transparent, rgba(243,198,35,.8), transparent);
    box-shadow: 0 0 20px rgba(243,198,35,.22);
}

.global-gold-market-panel__trend {
    position: absolute;
    z-index: 2;
    left: 7%;
    bottom: 25%;
    width: 86%;
    height: 2px;
    transform: rotate(-14deg);
    transform-origin: left center;
    background: linear-gradient(90deg, transparent, #cfa733 15%, #f6d65e 70%, transparent);
    box-shadow: 0 0 14px rgba(243,198,35,.18);
}

.global-gold-market-panel__candle {
    position: absolute;
    bottom: var(--bottom);
    left: var(--left);
    width: 9px;
    height: var(--height);
    border: 1px solid rgba(234,194,63,.75);
    background: rgba(234,194,63,.15);
}

.global-gold-market-panel__candle::before {
    content: "";
    position: absolute;
    top: -13px;
    bottom: -13px;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: rgba(234,194,63,.48);
}

.global-gold-market-panel__candle--1 { --left: 12%; --bottom: 23%; --height: 31px; }
.global-gold-market-panel__candle--2 { --left: 23%; --bottom: 35%; --height: 46px; }
.global-gold-market-panel__candle--3 { --left: 35%; --bottom: 31%; --height: 36px; border-color: rgba(165,168,173,.6); background: rgba(165,168,173,.1); }
.global-gold-market-panel__candle--4 { --left: 48%; --bottom: 45%; --height: 52px; }
.global-gold-market-panel__candle--5 { --left: 61%; --bottom: 51%; --height: 38px; }
.global-gold-market-panel__candle--6 { --left: 74%; --bottom: 58%; --height: 57px; border-color: rgba(165,168,173,.6); background: rgba(165,168,173,.1); }
.global-gold-market-panel__candle--7 { --left: 86%; --bottom: 66%; --height: 43px; }

.global-gold-market-panel__signal {
    position: absolute;
    z-index: 4;
    width: 8px;
    height: 8px;
    border: 2px solid #f3c623;
    border-radius: 50%;
    background: #15130c;
    box-shadow: 0 0 0 5px rgba(243,198,35,.08);
}

.global-gold-market-panel__signal--1 { left: 25%; bottom: 42%; }
.global-gold-market-panel__signal--2 { left: 51%; bottom: 55%; }
.global-gold-market-panel__signal--3 { right: 11%; top: 22%; }

.global-gold-market-panel__metrics span { flex: 1; min-width: 0; padding: 9px 8px; border-left: 1px solid rgba(243,198,35,.18); }
.global-gold-market-panel__metrics span:first-child { border-left: 0; }
.global-gold-market-panel__metrics small,
.global-gold-market-panel__metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.global-gold-market-panel__metrics small { margin-bottom: 4px; color: #7c8189; font-size: .56rem; letter-spacing: .11em; }
.global-gold-market-panel__metrics strong { color: #d6d8dc; font-size: .7rem; font-weight: 600; }

/* Tablet 與 Mobile：保持內容優先，視覺面板移至下方且禁止水平溢出。 */
@media (max-width: 960px) {
    .global-gold-showcase { grid-template-columns: minmax(0, 1fr) minmax(300px, .95fr); gap: 24px; padding: 38px 30px; }
    .global-gold-showcase__content h1 { font-size: clamp(2rem, 4.8vw, 2.8rem); }
    .global-gold-market-panel__chart { height: 190px; }
}

@media (max-width: 720px) {
    .global-gold-showcase { grid-template-columns: minmax(0, 1fr); padding: 32px 22px; }
    .global-gold-showcase__content h1 { font-size: clamp(1.9rem, 8vw, 2.45rem); }
    .global-gold-showcase__content > p { font-size: .96rem; }
    .global-gold-showcase__visual { width: 100%; }
}

@media (max-width: 420px) {
    .global-gold-showcase { padding: 27px 18px; border-radius: 14px; }
    .global-gold-showcase__actions { display: grid; grid-template-columns: 1fr; }
    .global-gold-showcase__button { width: 100%; }
    .global-gold-market-panel { padding: 15px; }
    .global-gold-market-panel__chart { height: 178px; }
    .global-gold-market-panel__metrics { gap: 3px; }
    .global-gold-market-panel__metrics span { padding-inline: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .global-gold-showcase,
    .global-gold-showcase__button { transition: none; }
    .global-gold-showcase:hover,
    .global-gold-showcase__button:hover { transform: none; }
}

/* ============================================================
   K 線情境圖手機版橫向捲動
   卡片與文字說明維持正常寬度，只有 SVG 圖表區可左右滑動
============================================================ */
.trading-chart-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-gutter: stable;
}

.trading-chart-scroll__inner {
    display: block;
    width: max(100%, 720px) !important;
    min-width: 720px !important;
    max-width: none !important;
    height: auto !important;
}

.trading-chart-scroll-hint {
    display: none;
    margin: 0 0 8px;
    color: #94a3b8;
    font-size: .78rem;
    letter-spacing: .03em;
    text-align: center;
}

.trading-chart-scroll:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 3px;
}

/* Tablet / Mobile 顯示操作提示；圖表維持原始閱讀寬度，不硬縮到裝置寬度。 */
@media (max-width: 960px) {
    .trading-chart-scroll-hint {
        display: block;
    }
}

/* ============================================================
   VANREX 品牌與外匯業務主視覺
   僅作用於首頁 .vanrex-intro-showcase，不影響其他區塊與共用元件。
============================================================ */
.vanrex-intro-showcase {
    position: relative;
    display: grid;
    /* Desktop 小幅增加左側文字欄，讓品牌主標維持完整單行。 */
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr);
    gap: clamp(32px, 3vw, 42px);
    width: 100%;
    max-width: 1180px;
    margin: auto;
    padding: clamp(42px, 5vw, 68px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 26%, rgba(232,185,40,.13), transparent 33%),
        radial-gradient(circle at 8% 100%, rgba(138,101,20,.07), transparent 34%),
        linear-gradient(135deg, #171717 0%, #0b0b0b 58%, #11100c 100%);
    border: 1px solid rgba(243,198,35,.36);
    border-radius: 18px;
    box-shadow: 0 22px 56px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.035);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.vanrex-intro-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, transparent 14%, #000 76%);
}

.vanrex-intro-showcase:hover {
    transform: translateY(-3px);
    border-color: rgba(243,198,35,.58);
    box-shadow: 0 27px 64px rgba(0,0,0,.52), 0 0 32px rgba(243,198,35,.045), inset 0 1px 0 rgba(255,255,255,.04);
}

/* 左側品牌定位：依序說明 VANREX、服務重點與內容入口。 */
.vanrex-intro-showcase__content {
    position: relative;
    z-index: 2;
    align-self: center;
    min-width: 0;
}

.vanrex-intro-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    color: #e8b928;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .21em;
}

.vanrex-intro-showcase__eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, #e8b928, rgba(232,185,40,.18));
}

.vanrex-intro-showcase__content h1 {
    /* Desktop 主標保持單行；Tablet／Mobile 由下方斷點恢復自然換行。 */
    max-width: none;
    margin: 0 0 19px;
    color: #f1c843;
    /* 寬螢幕限制字級上限，避免單行主標延伸到右側 FX 視覺。 */
    font-size: clamp(1.5rem, 2.05vw, 2rem);
    line-height: 1.08;
    letter-spacing: -.025em;
    white-space: nowrap;
}

/* ========================================================================== 
   VANREX compact Header + navigation drawer (mobile and tablet, <= 1024px)
   Desktop >= 1025px deliberately keeps the established navigation unchanged.
============================================================================ */
.vanrex-nav-toggle,
.vanrex-nav-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    header nav > ul > li.dropdown > .dropbtn {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    html,
    body {
        overflow-x: clip !important;
    }

    body.vanrex-nav-open {
        overflow: hidden !important;
    }

    header .header-container {
        width: 100% !important;
        max-width: none !important;
        min-height: 66px;
        padding: 9px 14px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        text-align: left !important;
        box-sizing: border-box;
    }

    header .logo {
        min-width: 0;
        margin-right: auto;
    }

    header .logo a {
        min-width: 0;
        min-height: 46px;
        gap: 6px !important;
    }

    header .logo-img {
        width: 44px !important;
        height: 44px !important;
        max-height: 44px !important;
    }

    header .logo-text-group {
        min-width: 0;
        margin: 7px 0 0 -6px !important;
    }

    header .logo-title,
    header .brand-main {
        max-width: 100%;
        font-size: 1.05rem !important;
        letter-spacing: 1px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

    header nav {
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 100002;
        width: min(88vw, 380px) !important;
        max-width: calc(100vw - 36px) !important;
        padding: 84px 18px 28px !important;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: linear-gradient(155deg, #17140c 0%, #090909 32%, #030303 100%);
        border-left: 1px solid rgba(243, 198, 35, .42);
        box-shadow: -18px 0 48px rgba(0, 0, 0, .75);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
        box-sizing: border-box;
    }

    body.vanrex-nav-open header nav {
        transform: translateX(0);
        visibility: visible;
        transition: transform .28s ease;
    }

    header nav > ul {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 7px !important;
    }

    header nav > ul > li {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    header nav > ul > li > a,
    header nav > ul > li.dropdown > .dropbtn {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        color: #f6f2e8 !important;
        font-size: .96rem !important;
        line-height: 1.45 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        background: rgba(255, 255, 255, .035);
        border: 1px solid rgba(255, 255, 255, .07);
        border-radius: 8px;
        box-sizing: border-box !important;
    }

    header nav > ul > li.dropdown > .dropbtn::after {
        margin-left: auto;
        padding-left: 12px;
    }

    header .dropdown.active > .dropbtn::after {
        transform: rotate(180deg);
        color: #f3c623;
    }

    header .dropdown-content,
    header nav > ul > li:nth-child(n) .dropdown-content {
        position: static !important;
        width: calc(100% - 12px) !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: none !important;
        margin: 5px 0 3px 12px !important;
        padding: 6px !important;
        display: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        background: rgba(243, 198, 35, .055) !important;
        border: 1px solid rgba(243, 198, 35, .2) !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        box-sizing: border-box;
    }

    header .dropdown.active > .dropdown-content {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
    }

    header .dropdown-content a {
        width: 100%;
        min-height: 42px !important;
        padding: 10px 12px !important;
        display: flex !important;
        align-items: center;
        color: #dedbd2 !important;
        font-size: .88rem !important;
        line-height: 1.45 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        border: 0 !important;
        border-radius: 6px;
        box-sizing: border-box;
    }

    header .language-picker {
        position: absolute !important;
        top: 11px;
        right: 66px;
        z-index: 100004;
        width: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 10px !important;
        display: flex !important;
        visibility: visible !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(243, 198, 35, .08);
        border: 1px solid rgba(243, 198, 35, .3);
        border-radius: 8px;
        box-sizing: border-box;
    }

    header .lang-dropdown {
        position: fixed !important;
        top: 62px !important;
        right: 62px !important;
        left: auto !important;
        width: min(286px, calc(100vw - 28px)) !important;
        max-height: calc(100dvh - 78px);
        overflow-y: auto;
        transform: none !important;
        z-index: 100006 !important;
    }

    .vanrex-nav-toggle {
        position: relative;
        z-index: 100005;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        padding: 10px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #f3c623;
        background: rgba(243, 198, 35, .08);
        border: 1px solid rgba(243, 198, 35, .42);
        border-radius: 8px;
        cursor: pointer;
        box-sizing: border-box;
    }

    .vanrex-nav-toggle span {
        width: 21px;
        height: 2px;
        display: block;
        background: currentColor;
        border-radius: 2px;
        transform-origin: center;
        transition: transform .22s ease, opacity .18s ease;
    }

    body.vanrex-nav-open .vanrex-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.vanrex-nav-open .vanrex-nav-toggle span:nth-child(2) { opacity: 0; }
    body.vanrex-nav-open .vanrex-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .vanrex-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 99998;
        width: 100%;
        height: 100%;
        padding: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(0, 0, 0, .66);
        border: 0;
        backdrop-filter: none;
        transition: opacity .25s ease, visibility 0s linear .25s;
    }

    body.vanrex-nav-open .vanrex-nav-backdrop {
        visibility: visible;
        opacity: 1;
        transition: opacity .25s ease;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    header .header-container {
        min-height: 76px;
        padding: 10px 22px !important;
    }

    header .logo-img {
        width: 52px !important;
        height: 52px !important;
        max-height: 52px !important;
    }

    header .logo-title,
    header .brand-main {
        font-size: 1.22rem !important;
    }

    header nav {
        width: min(58vw, 480px) !important;
        max-width: calc(100vw - 72px) !important;
        padding: 96px 26px 34px !important;
    }

    header nav > ul {
        gap: 9px !important;
    }

    header nav > ul > li > a,
    header nav > ul > li.dropdown > .dropbtn {
        min-height: 54px !important;
        padding: 14px 16px !important;
        font-size: 1.04rem !important;
    }

    header .dropdown-content a {
        min-height: 46px !important;
        padding: 11px 14px !important;
        font-size: .94rem !important;
    }

    header .language-picker {
        top: 16px;
        right: 78px;
    }

    header .lang-dropdown {
        top: 68px !important;
        right: 72px !important;
        width: 310px !important;
    }
}

@media (max-width: 430px) {
    header .header-container {
        min-height: 62px;
        padding: 8px 10px !important;
        gap: 7px !important;
    }

    header .logo-img {
        width: 38px !important;
        height: 38px !important;
        max-height: 38px !important;
    }

    header .logo-title,
    header .brand-main {
        font-size: .93rem !important;
        letter-spacing: .7px !important;
    }

    header .language-picker {
        top: 9px;
        right: 59px;
    }

    header .lang-dropdown {
        top: 58px !important;
        right: 8px !important;
    }

    .vanrex-nav-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    header nav {
        width: min(91vw, 350px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 76px 14px 22px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    header nav,
    .vanrex-nav-toggle span,
    .vanrex-nav-backdrop {
        transition-duration: .01ms !important;
    }
}

/* 僅保護標題末段詞組，整句仍可依裝置寬度自然換行。 */
.vanrex-intro-showcase__title-nowrap {
    white-space: nowrap;
}

.vanrex-intro-showcase__content > p {
    /* 副標僅調整文字寬度與行高，不改文案內容。 */
    max-width: 760px;
    margin: 0 0 26px;
    color: #b9bdc5;
    font-size: 1.03rem;
    line-height: 1.7;
}

.vanrex-intro-showcase__points {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vanrex-intro-showcase__points li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e1e3e7;
    font-size: .95rem;
}

.vanrex-intro-showcase__points li::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 1px solid rgba(243,198,35,.9);
    border-radius: 50%;
    background: rgba(243,198,35,.16);
    box-shadow: 0 0 0 4px rgba(243,198,35,.05);
}

/* ============================================================
   全球外匯市場視覺
   以 VANREX 為中心連接主要市場、交易平台、券商資訊與績效內容。
============================================================ */
.vanrex-intro-showcase__visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.vanrex-intro-showcase__visual::before {
    content: "";
    position: absolute;
    left: 8%;
    width: 84%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243,198,35,.13), transparent 65%);
    filter: blur(8px);
}

.vanrex-fx-visual {
    position: relative;
    width: 100%;
    padding: 19px;
    overflow: hidden;
    border: 1px solid rgba(243,198,35,.32);
    border-radius: 15px;
    background: linear-gradient(150deg, rgba(28,28,26,.94), rgba(6,6,6,.93));
    box-shadow: 0 25px 52px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.04);
}

.vanrex-fx-visual__canvas {
    position: relative;
    height: calc(299px + 1.216rem); /* Preserve the card height; the chart fills the removed heading row. */
    overflow: hidden;
    background-image:
        linear-gradient(rgba(255,255,255,.038) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.038) 1px, transparent 1px);
    background-size: 40px 40px;
}

.vanrex-fx-visual__orbit {
    position: absolute;
    left: 50%;
    top: 48%;
    border: 1px solid rgba(243,198,35,.18);
    border-radius: 50%;
    transform: translate(-50%,-50%);
}

.vanrex-fx-visual__orbit--outer { width: 270px; height: 180px; transform: translate(-50%,-50%) rotate(-10deg); }
.vanrex-fx-visual__orbit--inner { width: 205px; height: 128px; transform: translate(-50%,-50%) rotate(18deg); border-color: rgba(255,255,255,.09); }

.vanrex-fx-visual__route {
    position: absolute;
    left: 11%;
    width: 78%;
    height: 1px;
    transform-origin: center;
    background: linear-gradient(90deg, transparent, rgba(243,198,35,.36), transparent);
}

.vanrex-fx-visual__route::after {
    content: "";
    position: absolute;
    left: 72%;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dcb540;
    box-shadow: 0 0 12px rgba(243,198,35,.45);
}

.vanrex-fx-visual__route--one { top: 43%; transform: rotate(-20deg); }
.vanrex-fx-visual__route--two { top: 54%; transform: rotate(17deg); }

.vanrex-fx-visual__brand {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 46%;
    width: 178px;
    padding: 12px 14px;
    transform: translate(-50%,-50%);
    text-align: center;
    border: 1px solid rgba(243,198,35,.42);
    background: linear-gradient(145deg, rgba(28,27,22,.96), rgba(8,8,8,.95));
    box-shadow: 0 17px 35px rgba(0,0,0,.48), 0 0 30px rgba(243,198,35,.07), inset 0 1px 0 rgba(255,255,255,.035);
}

.vanrex-fx-visual__brand span { display: block; color: #747983; font-size: .54rem; letter-spacing: .11em; }
.vanrex-fx-visual__brand strong { display: block; margin: 0 0 4px; color: #f1c843; font-size: 1.45rem; letter-spacing: .1em; }

.vanrex-fx-visual__pair {
    position: absolute;
    z-index: 4;
    padding: 6px 9px;
    color: #c8cbd0;
    font-size: .61rem;
    letter-spacing: .06em;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(10,10,10,.88);
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
}

.vanrex-fx-visual__pair--eur { left: 5%; top: 16%; }
.vanrex-fx-visual__pair--gbp { right: 5%; top: 20%; }
.vanrex-fx-visual__pair--xau { left: 7%; bottom: 18%; color: #e8b928; border-color: rgba(243,198,35,.24); }
.vanrex-fx-visual__pair--jpy { right: 6%; bottom: 20%; }

.vanrex-fx-visual__chart {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 8px;
    height: 55px;
    opacity: .55;
}

.vanrex-fx-visual__curve {
    position: absolute;
    left: 0;
    bottom: 15px;
    width: 100%;
    height: 2px;
    transform: rotate(-6deg);
    background: linear-gradient(90deg, transparent, #cfa733 18%, #f2cd50 72%, transparent);
    box-shadow: 0 0 12px rgba(243,198,35,.15);
}

.vanrex-fx-visual__candle {
    position: absolute;
    bottom: var(--bottom);
    left: var(--left);
    width: 7px;
    height: var(--height);
    border: 1px solid rgba(232,185,40,.7);
    background: rgba(232,185,40,.13);
}

.vanrex-fx-visual__candle::before {
    content: "";
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: 50%;
    width: 1px;
    background: rgba(232,185,40,.43);
}

.vanrex-fx-visual__candle--1 { --left: 8%; --bottom: 5px; --height: 19px; }
.vanrex-fx-visual__candle--2 { --left: 28%; --bottom: 10px; --height: 26px; }
.vanrex-fx-visual__candle--3 { --left: 50%; --bottom: 15px; --height: 21px; }
.vanrex-fx-visual__candle--4 { --left: 71%; --bottom: 19px; --height: 29px; }
.vanrex-fx-visual__candle--5 { --left: 91%; --bottom: 25px; --height: 22px; }

.vanrex-fx-visual__services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 1px;
    border-top: 1px solid rgba(255,255,255,.055);
    background: rgba(255,255,255,.045);
}

.vanrex-fx-visual__services span {
    min-width: 0;
    padding: 11px 5px;
    overflow: hidden;
    color: #969ba3;
    font-size: .56rem;
    letter-spacing: .08em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #0d0d0d;
}

/* Tablet 與 Mobile：平板保留雙欄，手機改為品牌文字在上、全球市場視覺在下。 */
@media (max-width: 960px) {
    .vanrex-intro-showcase { grid-template-columns: minmax(0,1fr) minmax(310px,.96fr); gap: 24px; padding: 38px 30px; }
    .vanrex-intro-showcase__content h1 { font-size: clamp(2rem,4.7vw,2.75rem); white-space: normal; }
    .vanrex-fx-visual__canvas { height: calc(272px + 1.216rem); }
    /* 平板縮小服務列字距，避免 PERFORMANCE 被固定四欄裁切。 */
    .vanrex-fx-visual__services span { font-size: .44rem; letter-spacing: .01em; }
}

@media (max-width: 720px) {
    .vanrex-intro-showcase { grid-template-columns: minmax(0,1fr); padding: 32px 22px; }
    .vanrex-intro-showcase__content h1 { font-size: clamp(1.9rem,8vw,2.45rem); }
    .vanrex-intro-showcase__content > p { font-size: .96rem; }
    .vanrex-intro-showcase__visual { width: 100%; }
}

@media (max-width: 420px) {
    .vanrex-intro-showcase { padding: 27px 18px; border-radius: 14px; }
    .vanrex-fx-visual { padding: 14px; }
    .vanrex-fx-visual__canvas { height: calc(258px + 1.216rem); }
    .vanrex-fx-visual__brand { width: 152px; padding: 10px; }
    .vanrex-fx-visual__orbit--outer { width: 235px; height: 158px; }
    .vanrex-fx-visual__orbit--inner { width: 174px; height: 112px; }
    .vanrex-fx-visual__services span { font-size: .44rem; letter-spacing: .01em; }
}

@media (prefers-reduced-motion: reduce) {
    .vanrex-intro-showcase { transition: none; }
    .vanrex-intro-showcase:hover { transform: none; }
}

/* ==========================
   6. 區塊標題與卡片網格 (Grid & Cards)
========================== */
.features-section, .brokers-section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--text-gray); margin-bottom: 50px; }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch; 
    margin: 0 auto;
    width: 100%;
}
.card {
    background: #111;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(212,175,55,.2);
    display: flex;
    flex-direction: column;
    height: 100% !important; 
    min-height: min-content !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: normal !important;
    line-height: 1.4 !important;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: rgba(212,175,55,.5);
}
.card .broker-btn { margin-top: auto; }

/* ============================================================
   Ultima Markets 官方戰略合作券商品牌亮點卡
   僅作用於首頁左側券商卡，維持與右側影片卡相近高度。
============================================================ */
.ultima-broker-card__intro h3 {
    margin: 0 0 4px;
    color: #f3c623;
    font-size: 1.35rem;
    letter-spacing: .08em;
}

.ultima-broker-card__tagline {
    margin: 0 0 7px;
    color: #f8fafc;
    font-size: .82rem;
    font-weight: 700;
}

.ultima-broker-card__description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #aeb4be;
    font-size: .78rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ultima-broker-card__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0 15px;
}

.ultima-broker-card__feature {
    min-width: 0;
    padding: 9px 6px 8px;
    text-align: center;
    border: 1px solid rgba(243,198,35,.16);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(243,198,35,.055), rgba(255,255,255,.012));
}

.ultima-broker-card__feature strong,
.ultima-broker-card__feature small {
    display: block;
}

.ultima-broker-card__feature strong {
    margin-top: 5px;
    color: #f4d56a;
    font-size: .72rem;
    line-height: 1.25;
    white-space: nowrap;
}

.ultima-broker-card__feature small {
    margin-top: 3px;
    overflow: visible;
    color: #8f96a2;
    font-size: .62rem;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: break-word;
}

.ultima-broker-card__icon {
    position: relative;
    display: block;
    width: 20px;
    height: 16px;
    margin: 0 auto;
    color: #f3c623;
}

.ultima-broker-card__icon--platform {
    border: 1px solid currentColor;
    border-radius: 2px;
}

.ultima-broker-card__icon--platform::after {
    position: absolute;
    right: -3px;
    bottom: -2px;
    width: 6px;
    height: 10px;
    content: "";
    border: 1px solid currentColor;
    border-radius: 1px;
    background: #111;
}

.ultima-broker-card__icon--markets {
    border: 1px solid currentColor;
    border-radius: 50%;
}

.ultima-broker-card__icon--markets::before,
.ultima-broker-card__icon--markets::after {
    position: absolute;
    content: "";
    border: 1px solid currentColor;
    border-radius: 50%;
}

.ultima-broker-card__icon--markets::before { inset: 3px 6px; }
.ultima-broker-card__icon--markets::after { inset: 6px 2px; border-left: 0; border-right: 0; border-radius: 0; }

.ultima-broker-card__icon--regulation {
    width: 17px;
    height: 18px;
    border: 1px solid currentColor;
    clip-path: polygon(50% 0, 100% 18%, 86% 75%, 50% 100%, 14% 75%, 0 18%);
}

/* Mobile：特色模組改為三列，避免窄螢幕文字被裁切。 */
@media (max-width: 560px) {
    .ultima-broker-card__features {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .ultima-broker-card__feature {
        display: grid;
        grid-template-columns: 26px max-content minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        padding: 8px 10px;
        text-align: left;
    }

    .ultima-broker-card__icon { margin: 0 auto; }
    .ultima-broker-card__feature strong,
    .ultima-broker-card__feature small { margin-top: 0; }
    .ultima-broker-card__feature small { text-align: right; }
}

/* ==========================
   7. 績效數據面板 (Dashboard)
========================== */
.performance-dashboard-section { background-color: #050505 !important; padding: 80px 0; overflow-x: hidden; }
#vanrex-myfxbook-dashboard { 
    background-color: #0f1423; border: 1px solid #1e293b; border-radius: 12px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.8); padding: 30px; width: 100%; max-width: 1100px; margin: 0 auto; 
}
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 20px; margin-bottom: 25px; gap: 20px; }
.verification-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.badge-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid #22c55e; padding: 3px 10px; border-radius: 4px; font-size: 0.75em; font-weight: bold; }
.dash-strategy-title { color: #f8fafc; font-size: 1.6em; margin: 0 0 5px 0; font-weight: 800; }
.dash-strategy-sub { color: #64748b; font-size: 0.9em; margin: 0; }
.myfxbook-btn { font-size: 0.9em; padding: 10px 20px; white-space: nowrap; border-radius: 6px; }
/* Align the desktop action with the strategy title below the verification badges. */
@media (min-width: 1025px) {
    #vanrex-myfxbook-dashboard .dash-title-right { margin-top: 38px; }
}
.dash-body { display: flex; gap: 30px; align-items: stretch; }
.dash-stats-panel { flex: 0 0 35%; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; height: auto !important; min-height: min-content !important; white-space: normal !important;}
.main-gain-box { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.main-gain-box .gain-label { color: #94a3b8; font-size: 1.1em; font-weight: bold; }
.main-gain-box .gain-value { color: #f59e0b; font-size: 2.2em; font-weight: 900; }
.abs-gain-box { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 15px; margin-bottom: 15px; }
.abs-gain-box .abs-label { color: #64748b; font-size: 0.85em; }
.abs-gain-box .abs-value { color: #cbd5e1; font-weight: bold; font-size: 0.95em; }
.stats-grid-2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 12px; flex-grow: 1; }
.stat-item { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.08); padding-bottom: 5px; font-size: 0.85em; }
.stat-item .s-label { color: #64748b; }
.stat-item .s-value { color: #f8fafc; font-weight: bold; }
.stat-list-item { height: auto !important; min-height: min-content !important; white-space: normal !important; line-height: 1.4 !important; }
/* ==========================================
   數據儀表板：單個數據項目的排版優化
========================================== */
.stat-item {
    display: flex;
    justify-content: space-between; /* 🎯 關鍵 1：讓標籤靠最左、數值推到最右 */
    align-items: center;            /* 讓左右兩邊在垂直方向置中對齊 */
    white-space: nowrap;            /* 🛑 關鍵 2：強制絕對不准換行！ */
    padding: 6px 0;                 /* 稍微增加上下間距，讓數據呼吸 */
    font-size: 0.9em;               /* 微調字體大小，避免撐爆兩欄式版面 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* (加分項) 加上極淡的底線，增加閱讀引導感 */
}

/* 確保最後一個項目不需要底線 */
.stat-item:last-child {
    border-bottom: none;
}

/* 確保標籤與數值文字不會互相擠壓 */
.s-label {
    color: #94a3b8;
    margin-right: 15px; /* 在標籤跟數值中間預留安全距離 */
}

.s-value {
    font-weight: bold;
    text-align: right;
}
.update-time { text-align: right; font-size: 0.75em; color: #475569; margin-top: 15px; }
.dash-chart-panel { flex: 1; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.chart-tabs { display: flex; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 10px; margin-bottom: 15px; }
.chart-tabs .tab { color: #64748b; font-size: 0.85em; font-weight: bold; cursor: pointer; }
.chart-tabs .tab.active { color: #f8fafc; border-bottom: 2px solid #f59e0b; padding-bottom: 9px; }
.canvas-wrapper { position: relative; flex-grow: 1; min-height: 280px; width: 100%; }

/* ==========================
   8. MT5 教學區塊 (Tutorial)
========================== */
.tutorial-section {
    padding: 80px 0 120px;
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, var(--bg-dark) 60%); 
    width: 100%;
}
.tutorial-header { text-align: center; margin-bottom: 60px; }
.tutorial-title { font-size: clamp(30px, 5vw, 45px); color: var(--gold-main); margin: 0 0 15px 0; }
.tutorial-subtitle { color: var(--text-gray); font-size: 1.15rem; max-width: 600px; margin: 0 auto; }

.step-grid {
    display: flex;
    flex-direction: column;
    gap: 70px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}
.rwd-card {
    background: linear-gradient(145deg, #111111, #050505);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 50px 40px;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;      
    justify-content: center;  
    gap: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.rwd-card:nth-child(even) { flex-direction: row-reverse; }
.rwd-card:hover {
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 1), 0 0 30px rgba(212, 175, 55, 0.15);
}

.step-number {
    position: absolute;
    top: -25px;
    left: 25px; 
    background: linear-gradient(135deg, #f3e5ab, #d4af37, #b8860b); 
    color: #000;
    font-size: 1.4rem;
    font-weight: 900;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid #050505;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    z-index: 10;
}
.rwd-card:nth-child(even) .step-number { left: auto; right: 25px; }

.step-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.step-content h3 { color: var(--gold-main); margin: 0 0 15px 0; font-size: 1.8rem; line-height: 1.3; }
.step-desc {
    color: #cbd5e1;
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

/* 下載按鈕組 */
.download-buttons { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; }
.app-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 10px 22px; background: linear-gradient(145deg, #151515, #000000);
    border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 12px;
    color: #fff; transition: all 0.3s ease;
}
.app-btn:hover {
    background: linear-gradient(145deg, #1c1c1c, #050505);
    border-color: var(--gold-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}
.app-btn .btn-sub { font-size: 0.65rem; color: #94a3b8; display: block; text-transform: uppercase; }
.app-btn .btn-main { font-size: 1.1rem; font-weight: bold; display: block; }

/* 展示圖片區域 */
.step-visual { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; }
.phone-mockup {
    width: 100%; max-width: 260px; position: relative; background: #000;
    border-radius: 35px; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4), 0 20px 40px rgba(0,0,0,0.9);
}
.phone-mockup::before {
    content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 35%; height: 20px; background: #050505; border-radius: 0 0 12px 12px;
}
.screen-img { width: 100%; height: auto; border-radius: 25px; display: block; aspect-ratio: 9/19; object-fit: cover; }

.simple-frame {
    width: 100%; max-width: 260px; background: #000; border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px; padding: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.15);
    margin: 0 auto; transition: all 0.3s ease;
}
.simple-frame:hover { border-color: var(--gold-main); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.3); transform: translateY(-3px); }
.framed-img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* 多圖展示 */
.multi-visual { display: flex; gap: 12px; justify-content: center; align-items: center; width: 100%; }
.small-mockup {
    flex: 1 1 30%; max-width: 140px; padding: 6px; border-radius: 20px; background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4), 0 15px 30px rgba(0,0,0,0.9);
}
.small-mockup::before { height: 12px; top: 6px; }
.small-mockup .screen-img { border-radius: 15px; }

.mockup-badge {
    position: absolute; top: -12px; left: -12px;
    background: linear-gradient(135deg, #f3e5ab, #d4af37); color: #000;
    font-size: 1rem; font-weight: 900; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 3px solid #000; box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    z-index: 15; transition: all 0.3s ease;
}
.small-mockup:hover .mockup-badge { transform: scale(1.15) rotate(-5deg); box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6); }

/* 步驟 2 專屬優化 */
.step-card:nth-child(2) .step-content { flex: 0.8; }
.step-card:nth-child(2) .step-visual { flex: 1.4; }
.step-card:nth-child(2) .step-content h3 { font-size: 1.5rem; margin-bottom: 10px; }
.step-card:nth-child(2) .step-desc { font-size: 0.95rem; line-height: 1.6; color: #94a3b8; margin-bottom: 0; }
.step-card:nth-child(2) .small-mockup { max-width: 160px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.step-card:nth-child(2) .small-mockup:hover { transform: translateY(-6px) scale(1.04); border-color: var(--gold-main); box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3); }

/* 步驟 3 專屬優化 */
.step-card:nth-child(3) .step-content { flex: 0.8; }
.step-card:nth-child(3) .step-visual { flex: 1.4; }
.step-card:nth-child(3) .step-content h3 { font-size: 1.5rem; margin-bottom: 10px; }
.step-card:nth-child(3) .step-desc { font-size: 0.95rem; line-height: 1.6; color: #94a3b8; margin-bottom: 0; }
.dual-visual { display: flex; gap: 28px !important; justify-content: center; align-items: center; width: 100%; }
.step-card:nth-child(3) .small-mockup { max-width: 160px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.step-card:nth-child(3) .small-mockup:hover { transform: translateY(-6px) scale(1.04); border-color: var(--gold-main); box-shadow: 0 12px 28px rgba(212, 175, 55, 0.3); }

/* 步驟 4：左右並排強制鎖定 */
.step-04-card {
    display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
    align-items: flex-start !important; justify-content: space-between !important;
    gap: 30px !important; width: 100% !important;
}
.step-04-card .step-content { flex: 0 0 50% !important; width: 50% !important; max-width: 50% !important; }
.step-04-card .step-visual { flex: 0 0 45% !important; width: 45% !important; max-width: 45% !important; display: flex !important; justify-content: center !important; }
.step-04-card .dual-visual { display: flex !important; flex-direction: row !important; gap: 15px !important; width: 100% !important; justify-content: center !important; }
.step-04-card .phone-mockup { flex: 1 !important; max-width: 180px !important; }
.step-04-card .screen-img { width: 100% !important; height: auto !important; display: block !important; border-radius: 12px !important; }
.step-04-card .step-desc { font-size: 0.95rem !important; line-height: 1.6 !important; color: #94a3b8 !important; letter-spacing: normal !important; margin-bottom: 0 !important; }
.stacked-visual { display: flex; flex-direction: column; gap: 20px; align-items: center; width: 100%; }

/* ==========================
   9. 頁尾區塊 (Footer) - 羅的滿版進化版
========================== */
footer {
    background-color: #020305; 
    padding: 60px 20px 40px; 
    border-top: 1px solid #1a202c;
    
    /* 全站 Overflow 修正：使用容器寬度，不把瀏覽器捲軸寬度計入 Footer。 */
    width: 100% !important;
    position: relative;
    left: auto;
    right: auto;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.footer-container { 
    width: 100%;
    /* 💡 羅的排版提示：
       1200px 是讓文字維持在中間最舒服的閱讀寬度。
       如果你希望「文字本身」也要跟著貼齊螢幕最左與最右邊，請把這行改成 max-width: 100%; 
    */
    max-width: 1200px; 
    margin: 0 auto;
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    gap: 50px; 
}

.footer-contact, .footer-disclaimer { flex: 1; }
.footer-contact h4, .footer-disclaimer h4 { color: var(--gold-main); font-size: 1.2em; margin-top: 0; margin-bottom: 20px; }
.footer-contact ul { list-style: none; padding: 0; margin: 0; }
.footer-contact ul li { margin-bottom: 12px; color: var(--text-gray); line-height: 1.6; }
.footer-contact ul li a { color: var(--text-gray); text-decoration: none; transition: 0.3s; }
.footer-contact ul li a:hover { color: var(--gold-main); }
.footer-disclaimer p { color: #64748b; font-size: 0.9em; line-height: 1.8; margin: 0; }

/* ==========================================================================
   🚀 VANREX-羅 終極防爆版 RWD (統一斷點管理)
========================================================================== */

/* 💻 筆電/大螢幕自適應 (1200px 以下) */
@media (max-width: 1200px) {
    .logo-img { width: 50px !important; height: 50px !important; max-height: 50px !important; }
    .logo-text-group { margin-top: 12px; margin-left: -6px; } 
    .logo-title, .brand-main { font-size: 1.35rem !important; }
    .logo-subtitle, .brand-sub { font-size: 0.7rem !important; }
}

/* 📱 平板/中型螢幕 (992px 以下) */
@media (max-width: 992px) {
    .header-container { flex-direction: column !important; gap: 15px; text-align: center; }
    .logo-img { width: 42px !important; height: 42px !important; max-height: 42px !important; }
    .logo-text-group { margin-top: 10px; margin-left: -5px; }
    .logo-title, .brand-main { font-size: 1.15rem !important; }
    .logo-subtitle, .brand-sub { font-size: 0.62rem !important; }
    nav ul { flex-wrap: wrap !important; justify-content: center !important; gap: 10px !important; }
    nav ul li a, nav ul li .dropbtn { min-height: 44px; font-size: 14px; padding: 8px 12px !important; display: inline-flex; align-items: center; justify-content: center; }
    .language-picker { min-width: 44px; min-height: 44px; }
    .logo a { min-height: 44px; }
    .range-btn { min-width: 44px; min-height: 44px; }
    .footer-contact a { min-height: 44px; display: inline-flex; align-items: center; }
    
    .dash-body { flex-direction: column; }
    .dash-stats-panel { flex: none; width: 100%; }
    .canvas-wrapper { height: 300px; }
    
    .rwd-card, .rwd-card:nth-child(even) { flex-direction: column !important; padding: 50px 20px 30px; }
    .step-number { top: -20px; left: -10px; width: 50px; height: 50px; font-size: 1.2rem; border-width: 3px; }
    .rwd-card:nth-child(even) .step-number { left: -10px; right: auto; }
    .app-btn { width: 100%; }
    
    .multi-visual { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 15px; scroll-snap-type: x mandatory; }
    .small-mockup { flex: 0 0 150px; scroll-snap-align: center; }
    .multi-visual::-webkit-scrollbar { height: 5px; }
    .multi-visual::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
    .multi-visual::-webkit-scrollbar-thumb { background: var(--gold-main); border-radius: 10px; }
}

/* 📱 桌機特定佈局 (大於 768px) */
@media (min-width: 769px) {
    .step-01-card {
        display: grid !important; grid-template-columns: auto 1fr 1fr;
        grid-template-areas: "num content visual" "num buttons visual";
        gap: 15px 30px !important; align-items: start !important;
    }
    .step-01-card .step-number { grid-area: num; }
    .step-01-card .step-content { grid-area: content; }
    .step-01-card .step-visual { grid-area: visual; }
    .step-01-card .download-buttons { grid-area: buttons; }
}
/* =========================================
   📱 手機版下拉選單點擊展開支援
========================================= */
@media (max-width: 768px) {
    /* 預設先隱藏子選單，並取消純 CSS 的 hover 依賴 */
    .dropdown-content {
        display: none;
        position: static; /* 確保展開時把下方內容往下推 */
        opacity: 1;
        transform: none;
        box-shadow: none;
        padding-left: 20px; /* 讓子選單往內縮，層次更分明 */
    }

    /* 當 JS 加入 .active 類別時，顯示選單 */
    .dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column;
    }

    /* 箭頭旋轉小細節 (若你的箭頭有獨立 class) */
    .dropdown.active .dropbtn .arrow {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }
}

/* 📱 手機版專屬優化核心防護網 (768px 以下) */
@media (max-width: 768px) {
    body, html { overflow-x: hidden !important; width: 100% !important; margin: 0; padding: 0; }
    .container, .hero { width: 100% !important; max-width: 100vw !important; padding-left: 15px !important; padding-right: 15px !important; box-sizing: border-box !important; }
    .hero { padding: 50px 10px !important; }
    .hero h1 { font-size: 2em !important; line-height: 1.3 !important; }
    .hero p { font-size: 1em !important; }
    
    img, iframe, canvas { max-width: 100% !important; width: 100% !important; height: auto !important; object-fit: contain !important; min-width: 0 !important; }
    #performance div, div[style*="max-width"], div[style*="width"] { max-width: 100% !important; width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
    
    /* Logo 與選單 */
    .header-container { padding: 10px 12px !important; }
    .logo a { gap: 8px; } 
    .logo-img { width: 34px !important; height: 34px !important; max-height: 34px !important; }
    .logo-text-group { margin-top: 8px; margin-left: -4px; }
    .logo-title, .brand-main { font-size: 0.95rem !important; letter-spacing: 1px !important; }
    .logo-subtitle, .brand-sub { font-size: 0.55rem !important; letter-spacing: 1px !important; }
    nav ul li a, nav ul li .dropbtn { font-size: 13px; }
    .dropdown { position: relative !important; }
    .dropdown-content {
        position: absolute !important; top: 100% !important; left: 50% !important;
        transform: translateX(-50%) !important; width: 250px !important; z-index: 100000 !important;
        box-shadow: 0px 10px 30px rgba(0,0,0,0.9) !important; background: rgba(15, 20, 35, 0.98) !important;
        border: 1px solid rgba(243, 198, 35, 0.3) !important; margin-top: 5px !important;
    }

    /* 網格與 Footer */
    .grid-cards, .features-grid, .report-grid, .brokers-grid { display: flex !important; flex-direction: column !important; gap: 20px !important; }
    .card, .report-card { width: 100% !important; margin-bottom: 0 !important; box-sizing: border-box !important; }
    .footer-container { flex-direction: column !important; text-align: left !important; gap: 40px !important; }
    .card, .report-card, .footer-contact, .footer-disclaimer { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box !important; }
    
    .tradingview-widget-container, .tradingview-widget-container > div, .tradingview-widget-container iframe, #tradingview_xauusd {
        width: 100% !important; max-width: 100vw !important; margin-left: 0 !important; margin-right: 0 !important;
        padding: 0 !important; box-sizing: border-box !important; overflow: hidden !important; 
    }
    .tradingview-widget-container iframe { height: 380px !important; }

    /* 其他區塊修復 */
    .partnership-showcase { flex-direction: column; gap: 10px; }
    .link-icon .plus { transform: rotate(90deg); margin: 10px 0; }
    .alliance-main-title { font-size: 1.8em !important; }
    .partnership-benefits, .trust-grid, .premium-suite-wrapper { grid-template-columns: 1fr; flex-direction: column !important; gap: 20px !important; }
    .fintech-card { width: 100% !important; max-width: 100vw !important; padding: 30px 20px 25px !important; box-sizing: border-box !important; }
    .card-pill { position: relative !important; top: 0 !important; right: 0 !important; align-self: flex-start !important; margin-bottom: 12px !important; }

    /* MT5 Tutorial 區塊 */
    .step-grid { padding: 0 15px !important; }
    .rwd-card, .rwd-card:nth-child(even) { text-align: center; align-items: center; padding: 45px 20px 30px; }
    .step-number, .rwd-card:nth-child(even) .step-number { top: -20px; left: 50% !important; transform: translateX(-50%); right: auto !important; width: 48px; height: 48px; font-size: 1.2rem; }
    .download-buttons { justify-content: center; width: 100%; }
    .app-btn { width: 100%; max-width: 280px; margin: 0 auto; }
    .mockup-badge { width: 28px; height: 28px; font-size: 0.85rem; top: -8px; left: -8px; border-width: 2px; }
    .multi-visual { width: 100%; }
    .small-mockup { flex: 0 0 140px; }
    .dual-visual { gap: 16px !important; justify-content: center; }

    /* 步驟 1 改寫排序 */
    .step-01-card { display: flex !important; flex-direction: column !important; gap: 20px !important; }
    .step-01-card .step-number { order: 1; }
    .step-01-card .step-content { order: 2; }
    .step-01-card .step-visual { order: 3; }
    .step-01-card .download-buttons { order: 4 !important; width: 100% !important; display: flex !important; flex-direction: column !important; gap: 12px !important; margin-top: 10px !important; }

    /* 步驟 2/3/4 特定微調 */
    .step-card:nth-child(2) .step-content, .step-card:nth-child(3) .step-content { flex: auto; }
    .step-card:nth-child(2) .step-desc, .step-card:nth-child(3) .step-desc, .step-04-card .step-desc { font-size: 0.9rem !important; line-height: 1.6 !important; }
    .step-card:nth-child(2) .small-mockup { max-width: 140px; }
    .step-card:nth-child(3) .small-mockup { max-width: 135px; }
    .step-04-card { flex-direction: column !important; }
    .step-04-card .step-content, .step-04-card .step-visual { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }
}

/* 📱 極小手機螢幕 (390px 以下 - iPhone SE 等) */
@media (max-width: 390px) {
    .logo a { gap: 6px; }
    .logo-img { width: 28px !important; height: 28px !important; max-height: 28px !important; }
    .logo-text-group { margin-top: 6px; margin-left: -3px; }
    .logo-title, .brand-main { font-size: 0.85rem !important; letter-spacing: 0.5px !important; }
}
/* ==========================================
   手機版響應式調整 (小於 768px 時)
========================================== */
@media (max-width: 768px) {
    .stats-grid-2col {
        display: grid;
        grid-template-columns: 1fr; /* 🎯 關鍵：手機版直接變成「單欄」，給文字 100% 的寬度伸展 */
        gap: 8px;
    }
}
/* ==========================================================================
   🎯 頁尾聯絡資訊 & 版權宣告：極致左對齊與平行排版
   ========================================================================== */
.footer-contact {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    flex: 1;
}

.footer-contact h4,
.footer-disclaimer h4 {
    color: var(--gold-main);
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    text-align: left !important;
}

.footer-contact p,
.footer-disclaimer p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: left !important;
}

.footer-contact .contact-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
}

.footer-contact .contact-list li {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 !important;
    text-align: left !important;
}

/* Footer 聯絡資訊：固定 Label 欄寬，移除圖示後仍維持五行整齊對齊。 */
.footer-contact .contact-list .label {
    flex: 0 0 86px;
    min-width: 86px;
    flex-shrink: 0;
}

.footer-contact .contact-list li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: 0.3s;
}

.footer-contact .contact-list li a:hover {
    color: var(--gold-main);
}

/* 版權宣告區塊左對齊 */
.footer-bottom {
    width: 100% !important;
    max-width: 1200px;
    margin: 40px auto 0 !important;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left !important;
}

.footer-bottom .copyright {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 !important;
    padding: 0;
    text-align: left !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* ==========================================================================
   📱 手機端 RWD 防爆版
   ========================================================================== */
@media (max-width: 768px) {
    .footer-contact { align-items: flex-start !important; }
    .footer-bottom { margin-top: 30px !important; padding-top: 15px; }
    .footer-bottom .copyright { font-size: 0.78rem !important; }
}
/* ============================================================
   手機版 Dashboard 標題與 Footer 聯絡資訊
   僅調整窄螢幕排版，不影響桌機與平板既有視覺
============================================================ */
@media (max-width: 640px) {
    .performance-dashboard-section .dash-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .performance-dashboard-section .dash-title-left,
    .performance-dashboard-section .dash-title-right {
        width: 100%;
        min-width: 0;
    }

    .performance-dashboard-section .dash-strategy-title {
        max-width: 100%;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    .performance-dashboard-section .dash-strategy-brand,
    .performance-dashboard-section .dash-strategy-name {
        display: block;
    }

    .footer-contact .contact-list li {
        display: grid !important;
        grid-template-columns: 88px minmax(0, 1fr);
        column-gap: 6px !important;
        align-items: start !important;
    }

    .footer-contact .contact-list .label {
        min-width: 0;
    }

    .footer-contact .contact-list li a {
        min-height: 0;
        display: inline;
        align-items: initial;
    }
    /* Instagram 帳號在手機版維持單行；只微調此列，不縮小其他聯絡資訊。 */
    .footer-contact .contact-list li:nth-child(4) {
        white-space: nowrap;
        font-size: 0.9rem;
        letter-spacing: -0.01em;
    }

    .footer-contact .contact-list li:nth-child(4) .label {
        font-size: 0.95rem;
        letter-spacing: normal;
    }
}

/* ==========================================================================
   🎯 資金安全頁面專屬擴充：警示卡片 (Warning Card)
   ========================================================================== */
.warning-card {
    border: 1px solid rgba(239, 68, 68, 0.4) !important; /* 紅色警戒邊框 */
    background: linear-gradient(135deg, rgba(20, 5, 5, 0.9), rgba(10, 10, 10, 1)) !important;
}

.warning-card:hover {
    border-color: rgba(239, 68, 68, 0.8) !important;
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.15) !important; /* 紅色光暈 */
}

/* ==========================================================================
   📱 VANREX-羅：終極全語系防裁切 Grid 網格版 (已整合框框自動貼合)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. 導覽列網格容器 */
    nav ul {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px 2px !important;
        padding: 8px 3px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2. 統一項目高寬 */
    nav ul > li {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 44px !important;
        position: relative !important; /* 確保子選單能依據父元素定位 */
    }

    /* 3. 頂部按鈕：開啟動態響應式字體與全域隨處斷字 */
    nav ul > li > a,
    nav ul > li.dropdown .dropbtn {
        font-size: clamp(0.58rem, 2.5vw, 0.7rem) !important; /* 🌟 根據手機螢幕寬度自動微縮 */
        line-height: 1.15 !important;
        padding: 2px 1px !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;  /* 🌟 核心：遇到超長單字自動斷開，絕不撐破格子 */
        hyphens: auto !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
        width: 100% !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    /* 4. 多語言選擇器：獨佔底部整排 */
    nav ul > li.language-picker {
        grid-column: span 3 !important;
        margin-top: 4px !important;
    }

    /* =========================================
       5. 下拉選單彈出框防跑版與內容防裁切 (框框自動貼合瘦身)
    ========================================= */
    .dropdown-content {
        position: absolute !important;
        top: 100% !important;
        z-index: 9999 !important;
        
        /* 🌟 核心修復：文字少時自動收縮，文字多時防裁切 */
        min-width: 110px !important;    /* 讓字少的選單可以縮到極小 */
        width: max-content !important;  /* 寬度完全根據文字長度自動伸縮！ */
        max-width: 85vw !important;     /* 遇到超長外文時的保險絲，超過螢幕 85% 就強制換行 */

        max-height: 50vh !important;
        overflow-y: auto !important;
        background-color: rgba(15, 20, 35, 0.98) !important;
        border-radius: 6px !important;
        padding: 6px 0 !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85) !important;
        border: 1px solid rgba(255, 215, 0, 0.2) !important;
    }

    /* 下拉選單內部的選項文字：強制允許折行，絕不裁切 */
    .dropdown-content a {
        display: block !important;
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;      /* 🌟 允許長外語自然換行 */
        word-break: break-word !important;   /* 長單字自動換行 */
        overflow-wrap: anywhere !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown-content a:last-child {
        border-bottom: none;
    }

    /* 左邊選單 (最佳外匯經紀商)：靠左對齊 */
    nav ul > li:nth-child(4) .dropdown-content {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }

    /* 中間選單 (何謂保證金)：水平置中對齊 */
    nav ul > li:nth-child(5) .dropdown-content {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }

    /* 右邊選單 (使用指南)：靠右對齊，防止超出螢幕右側 */
    nav ul > li:nth-child(6) .dropdown-content {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
    }
}

/* ============================================================
   Touch 與鍵盤操作安全網
   Touch 裝置不依賴 hover；focus-visible 提供清楚但不干擾滑鼠的焦點提示。
============================================================ */
@media (hover: none), (pointer: coarse) {
    .dropdown.active .dropdown-content {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .card:hover,
    .rwd-card:hover,
    .simple-frame:hover,
    .small-mockup:hover,
    .vanrex-intro-showcase:hover { transform: none !important; }
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 2px solid var(--gold-main);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
.growth-range-tabs {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.range-btn {
    background: #111827;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.range-btn:hover {
    color: #ffffff;
    border-color: #ffb000;
}

.range-btn.active {
    background: #ffb000;
    color: #111827;
    border-color: #ffb000;
    font-weight: 700;
}

.chart-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dashboard 真實資料擴充：Balance/Equity 圖表、空資料狀態與 Daily/Monthly 卡片 */
.secondary-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 10px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.secondary-chart-header .tab {
    color: #f8fafc;
    font-size: 0.85em;
    font-weight: 700;
}

.chart-unit {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.75em;
    white-space: nowrap;
}

.secondary-canvas-wrapper {
    min-height: 230px;
    flex-grow: 0;
}

.chart-empty-state {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    background: rgba(15,20,35,0.82);
    border: 1px dashed rgba(148,163,184,0.2);
    border-radius: 8px;
}

.chart-empty-state[hidden] {
    display: none;
}

.period-performance-grid {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.period-performance-card {
    min-width: 0;
    padding: 18px 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
}

.period-performance-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    margin-bottom: 5px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.period-performance-title small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 400;
    text-align: right;
}

.period-performance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}

.period-performance-row:last-child {
    border-bottom: 0;
}

.period-performance-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.period-performance-label strong {
    color: #cbd5e1;
    font-size: 0.82rem;
}

.period-performance-label small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.period-performance-value {
    flex: 0 0 auto;
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: 800;
}

.period-performance-empty {
    padding: 22px 0;
    color: #64748b;
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 768px) {
    #vanrex-myfxbook-dashboard {
        padding: 20px 14px;
    }

    .stats-grid-2col,
    .period-performance-grid {
        grid-template-columns: 1fr;
    }

    .chart-tabs {
        align-items: flex-start;
        flex-direction: column;
    }

    .growth-range-tabs {
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .canvas-wrapper,
    .secondary-canvas-wrapper {
        min-height: 240px;
        height: 240px;
    }

    .period-performance-title,
    .period-performance-row {
        align-items: flex-start;
    }

    /* Dashboard Daily / Monthly：日期與數值固定雙欄，避免日期繼承全站斷字後直向排列。 */
    .period-performance-row {
        display: grid;
        grid-template-columns: minmax(110px, 1fr) auto;
        gap: 12px;
        align-items: start !important;
    }

    .period-performance-label {
        min-width: 110px;
        overflow: hidden;
    }

    .period-performance-label strong {
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }

    .period-performance-value {
        white-space: nowrap;
        text-align: right;
    }
}

/* ============================================================
   Dashboard 極窄螢幕數值防裁切
   僅在 340px 以下收緊內距與欄位間距，不隱藏任何內容
============================================================ */
@media (max-width: 340px) {
    #vanrex-myfxbook-dashboard {
        padding-left: 8px;
        padding-right: 8px;
    }

    .performance-dashboard-section .dash-stats-panel {
        padding-left: 12px;
        padding-right: 12px;
        min-width: 0;
    }

    .performance-dashboard-section .stat-item {
        min-width: 0;
        gap: 6px;
        font-size: 0.78em;
    }

    .performance-dashboard-section .s-label {
        min-width: 0;
        margin-right: 0;
    }

    .performance-dashboard-section .s-value {
        flex: 0 1 auto;
        font-size: 0.92em;
    }
}

/* 窄手機將來源說明移到標題下方，避免技術名稱或中文逐字斷行。 */
@media (max-width: 420px) {
    .period-performance-title {
        display: block;
    }

    .period-performance-title small {
        display: block;
        margin-top: 4px;
        text-align: left;
        white-space: nowrap;
    }
}

/* ============================================================
   手機版 Footer 精準雙欄對齊
   所有 Value 使用一致 wrapper，清除連結觸控高度對文字基準的干擾
============================================================ */
@media (max-width: 640px) {
    .footer-contact .contact-list li {
        display: grid !important;
        grid-template-columns: 88px minmax(0, 1fr);
        column-gap: 6px !important;
        row-gap: 0 !important;
        align-items: start !important;
        min-height: 0 !important;
        padding: 0 !important;
        line-height: 1.5 !important;
    }

    .footer-contact .contact-list .label,
    .footer-contact .contact-list .contact-value {
        min-width: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.5 !important;
        align-self: start !important;
    }

    .footer-contact .contact-list .label { grid-column: 1; white-space: nowrap !important; }
    .footer-contact .contact-list .contact-value { grid-column: 2; display: block !important; }

    .footer-contact .contact-list .contact-value a {
        display: inline !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: inherit !important;
        vertical-align: baseline !important;
    }

    .footer-contact .contact-list .contact-value--instagram {
        white-space: nowrap;
        font-size: 0.88rem;
        letter-spacing: -0.015em;
    }
}

/* ============================================================
   VANREX 多語系 RWD Phase 1
   長語言導覽、首頁品牌卡、狀態標籤與圖表範圍控制專用
============================================================ */
header nav {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

header nav > ul {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
}

header nav > ul > li {
    min-width: 0;
    max-width: 100%;
}

/* 1024～1440px：收緊導覽間距，長語言必要時自然換行。 */
@media (min-width: 993px) and (max-width: 1440px) {
    .header-container {
        gap: 10px;
    }

    header nav > ul {
        gap: 10px;
    }

    header nav > ul > li > a,
    header nav > ul > li > .dropbtn {
        padding-inline: 5px;
        font-size: clamp(13px, 1vw, 15px);
    }
}

/* Ultima 合作卡：翻譯後完整顯示，不以兩行 clamp 隱藏內容。 */
.ultima-broker-card__description {
    display: block;
    overflow: visible;
    white-space: normal;
    overflow-wrap: break-word;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
}

/* 首頁市場狀態列：允許長語言換行，不以 ellipsis 隱藏文字。 */
.vanrex-fx-visual__services span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

@media (max-width: 430px) {
    .vanrex-fx-visual__services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vanrex-fx-visual__services span {
        display: flex;
        min-height: 36px;
        align-items: center;
        justify-content: center;
        padding: 7px 4px;
        word-break: normal;
    }
}

/* Dashboard 範圍控制：Mobile 使用兩欄彈性網格並保留觸控高度。 */
@media (max-width: 768px) {
    .growth-range-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        overflow: visible;
    }

    .range-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.2;
    }
}

/* 多語系 Header 提早雙列：1024～1440px 長語言保留完整文字，不以裁切或極小字硬塞。 */
@media (min-width: 993px) and (max-width: 1440px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    header nav {
        width: 100%;
    }

    header nav > ul {
        justify-content: center;
    }
}

/* 多語系非中文主標與右側下拉：避免翻譯後長字串及隱藏選單擴張頁寬。 */
@media (min-width: 993px) and (max-width: 1440px) {
    html[lang]:not([lang="zh-TW"]):not([lang="zh-CN"]) .vanrex-intro-showcase__content h1 {
        white-space: normal;
    }

    header nav > ul > li:nth-last-child(-n + 3) .dropdown-content {
        right: 0 !important;
        left: auto !important;
    }
}

/* 多語系 Tablet 隱藏選單幾何隔離：關閉時不佔 scrollWidth，開啟時恢復。 */
@media (max-width: 992px) {
    header .dropdown:not(.active) .dropdown-content {
        display: none !important;
    }

    header .dropdown.active .dropdown-content {
        display: block !important;
    }
}


/* ============================================================
   Multilingual Phase 2B Post-Fix：Desktop 導覽依實際幾何決定是否降級
   nav-needs-stack 僅由 site-quality.js 在內容確實放不下時加入。
============================================================ */
@media (min-width: 993px) {
    header .header-container {
        width: calc(100% - 32px);
        max-width: 1680px;
    }

    header .header-container:not(.nav-needs-stack) {
        flex-direction: row;
        text-align: initial;
    }

    header .header-container:not(.nav-needs-stack) nav {
        width: auto;
    }

    header .header-container:not(.nav-needs-stack) nav > ul {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    header .header-container.nav-needs-stack {
        flex-direction: column;
        text-align: center;
    }

    header .header-container.nav-needs-stack nav {
        width: 100%;
    }

    header .header-container.nav-needs-stack nav > ul {
        justify-content: center;
    }
}

.monthly-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; color: #94a3b8; font-size: 12px; }
.monthly-pagination button { border: 1px solid #334155; border-radius: 5px; background: #111827; color: #f3c623; padding: 7px 10px; cursor: pointer; }
.monthly-pagination button:disabled { opacity: .4; cursor: default; }

/* ============================================================
   Multilingual Visual Post-Fix：首頁與 Dashboard 長語言防裁切
   僅解除資訊隱藏並讓欄位依可用寬度自然換行。
============================================================ */
.vanrex-intro-showcase h1 {
    max-width: 100%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

/* 窄螢幕縮小主標，維持整句單行且不超出容器。 */
@media (max-width: 960px) {
    .vanrex-intro-showcase__content h1 {
        font-size: clamp(.95rem, 2.1vw, 1.2rem);
    }
}

.period-performance-label {
    min-width: 0;
    overflow: visible;
}

.period-performance-label small {
    display: block;
    max-height: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .growth-range-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        margin-left: 0;
        overflow: visible;
    }

    .range-btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 430px) {
    .stats-grid-2col {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-item {
        min-width: 0;
        gap: 8px;
        align-items: flex-start;
        white-space: normal;
    }

    .stat-item .s-label {
        min-width: 0;
        flex: 1 1 auto;
        margin-right: 0;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .stat-item .s-value {
        min-width: 0;
        max-width: 100%;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .footer-contact .contact-list li {
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
        column-gap: 8px !important;
    }

    .footer-contact .contact-list .label,
    .footer-contact .contact-list .contact-value {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .footer-contact .contact-list .contact-value--instagram,
    .footer-contact .contact-list li:nth-child(4) {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    .footer-contact .contact-list li {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2px;
    }

    .footer-contact .contact-list .label,
    .footer-contact .contact-list .contact-value {
        grid-column: 1;
    }
}
/* Header dropdown sizing/alignment: content-fit on desktop, title-aligned in drawers. */
@media (min-width: 1025px) {
    header nav {
        margin-right: 28px;
    }

    header nav > ul > li.dropdown > .dropdown-content {
        left: 0 !important;
        right: auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: min(320px, calc(100vw - 24px)) !important;
        padding: 3px 0 !important;
        transform: translateY(8px) !important;
    }

    header nav > ul > li.dropdown.active > .dropdown-content {
        transform: translateY(0) !important;
    }

    header nav > ul > li.dropdown > .dropdown-content > a {
        min-height: 38px !important;
        padding: 7px 10px !important;
        display: flex !important;
        align-items: center !important;
        line-height: 20px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        box-sizing: border-box;
    }
}

@media (max-width: 1024px) {
    header nav > ul > li.dropdown > .dropbtn {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    header nav > ul > li.dropdown > .dropdown-content {
        left: auto !important;
        right: auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 15px) !important;
        margin: 5px 0 3px 15px !important;
        padding: 3px 0 !important;
        transform: none !important;
    }

    header nav > ul > li.dropdown > .dropdown-content > a {
        min-height: 38px !important;
        padding: 7px 10px !important;
        display: flex !important;
        align-items: center !important;
        line-height: 20px !important;
    }
}

/* Home-only vertical rhythm; card contents and shared page styles stay intact. */
body.vanrex-home > .hero-section { padding-block: 40px; }
body.vanrex-home .vanrex-intro-showcase { padding-block: 48px; }
body.vanrex-home > :is(.features-section, .brokers-section, .performance-dashboard-section) {
    padding-block: 56px;
}
body.vanrex-home > section > .container > .section-title { margin-block-start: 0; }
body.vanrex-home > section > .container > .section-subtitle { margin-block-end: 32px; }
body.vanrex-home > footer { padding-block: 20px 16px; }

@media (max-width: 1024px) {
    body.vanrex-home > .hero-section { padding-block: 28px; }
    body.vanrex-home .vanrex-intro-showcase { padding-block: 34px; }
    body.vanrex-home > :is(.features-section, .brokers-section, .performance-dashboard-section) {
        padding-block: 44px;
    }
    body.vanrex-home > section > .container > .section-subtitle { margin-block-end: 28px; }
    body.vanrex-home > footer { padding-block: 16px; }
}
@media (max-width: 720px) {
    body.vanrex-home > .hero-section { padding-block: 24px; }
    body.vanrex-home .vanrex-intro-showcase { padding-block: 27px; }
    body.vanrex-home > :is(.features-section, .brokers-section, .performance-dashboard-section) {
        padding-block: 36px;
    }
    body.vanrex-home > section > .container > .section-subtitle { margin-block-end: 24px; }
    body.vanrex-home > footer { padding-block: 12px 16px; }
}

/* Match the 5px title inset in the compact desktop navigation. */
@media (min-width: 1025px) and (max-width: 1440px) {
    header nav > ul > li.dropdown > .dropdown-content {
        left: 5px !important;
    }
}

/* Compact shared desktop header; responsive drawer behavior is unchanged. */
@media (min-width: 1025px) {
    header .header-container {
        max-width: 1240px;
        padding-block: 8px;
        padding-inline: clamp(16px, 1.5vw, 28px);
        gap: clamp(24px, 4vw, 64px);
        align-items: center;
        justify-content: space-between;
    }
    header .logo-img {
        width: 68px !important;
        height: 68px !important;
        max-height: 68px !important;
    }
    header .logo-text-group { margin-block: 0; }
    header .header-container:not(.nav-needs-stack) > nav {
        display: flex;
        align-items: center;
        padding-block: 0;
        margin-inline-end: 0;
    }
    header .header-container:not(.nav-needs-stack) > nav > ul {
        width: 100%;
        gap: clamp(14px, 1.3vw, 24px);
    }
}
/* Translated titles must wrap at every viewport; preserve Chinese typography. */
html[lang]:not([lang^="zh"]) .vanrex-intro-showcase__content h1,
html[lang]:not([lang^="zh"]) .vanrex-intro-showcase__title-nowrap {
    white-space: normal;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}
html[lang]:not([lang^="zh"]) .main-gain-box {
    gap: 12px;
}
html[lang]:not([lang^="zh"]) .main-gain-box .gain-label {
    min-width: 0;
    flex: 1 1 auto;
}
html[lang]:not([lang^="zh"]) .main-gain-box .gain-value {
    flex: 0 0 auto;
    white-space: nowrap;
}
/* Translation inserts inline font nodes; keep sentences in normal text flow. */
html[lang]:not([lang^="zh"]) .checkout-list li { display: block; }
html[lang]:not([lang^="zh"]) .checkout-list .status-dot { margin-right: 8px; }
@media (max-width: 560px) {
    html[lang]:not([lang^="zh"]) .matrix-grid { grid-template-columns: minmax(0, 1fr); }
    html[lang]:not([lang^="zh"]) .step-pipeline { flex-direction: column !important; }
    html[lang]:not([lang^="zh"]) .step-pipeline .step-box {
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 1 auto !important;
    }
    html[lang]:not([lang^="zh"]) .step-pipeline .step-arrow { transform: rotate(90deg); }
}
@media (min-width: 1025px) {
    html[lang]:not([lang^="zh"]) header nav > ul > li.dropdown:last-of-type > .dropdown-content,
    html[lang]:not([lang^="zh"]) header nav > ul > li.dropdown:nth-last-child(2) > .dropdown-content {
        left: auto !important;
        right: 0 !important;
    }
}
html[lang]:not([lang^="zh"]) header .dropbtn { white-space: normal !important; }

/* Track B M15: maintain layout while exposing a native language control. */
.vanrex-language-trigger { display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.vanrex-language-trigger:focus-visible { outline:2px solid #f3c623; outline-offset:4px; border-radius:3px; }
#vanrex-myfxbook-dashboard .dash-strategy-sub,
#vanrex-myfxbook-dashboard .abs-label,
#vanrex-myfxbook-dashboard .s-label,
#vanrex-myfxbook-dashboard .update-time,
#vanrex-myfxbook-dashboard .chart-tabs .tab:not(.active) { color:#94a3b8; }


/* VANREX RWD hotfix 2026-11-09; CSS only. */
/* VANREX tablet navigation, safe portrait/landscape split */
@media (min-width: 900px) and (max-width: 1024px) and (orientation:landscape) {
 html body > header .header-container {
   display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
   align-items:center!important;justify-content:space-between!important;
   gap:8px!important;padding:8px 14px!important;max-width:100%!important;
 }
 html body > header .logo{flex:0 0 auto!important;margin-right:0!important}
 html body > header .logo-img{width:44px!important;height:44px!important;max-height:44px!important}
 html body > header .logo-text-group{margin-top:0!important}
 html body > header nav{
   position:static!important;display:flex!important;visibility:visible!important;
   transform:none!important;opacity:1!important;flex:1 1 auto!important;
   width:auto!important;max-width:none!important;height:auto!important;
   min-height:0!important;padding:0!important;margin:0!important;overflow:visible!important;
   border:0!important;box-shadow:none!important;background:transparent!important;
 }
 html body > header nav > ul{
   display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
   justify-content:flex-end!important;gap:4px!important;width:100%!important;
   margin:0!important;padding:0!important;overflow:visible!important;
 }
 html body > header nav > ul > li{display:list-item!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;position:relative!important}
 html body > header nav > ul > li > a,
 html body > header nav > ul > li > .dropbtn{
   display:inline-flex!important;align-items:center!important;justify-content:center!important;
   font-size:clamp(11px,1.22vw,13px)!important;line-height:1.25!important;
   padding:8px 4px!important;min-height:40px!important;
   white-space:nowrap!important;width:auto!important;
 }
 html body > header .vanrex-nav-toggle,
 html body > .vanrex-nav-backdrop{display:none!important}
}
@media (min-width: 900px) and (max-width: 1280px) {
 html body .gc-hero .gc-hero-copy{
  max-width:56%!important;flex:0 1 56%!important;min-width:0!important;
  padding-right:clamp(18px,3vw,42px)!important;box-sizing:border-box!important;
 }
 html body .gc-hero .gc-hero-copy .gc-hero-sub,
 html body .gc-hero .gc-hero-copy .gc-muted{
  max-width:100%!important;white-space:normal!important;
  overflow-wrap:normal!important;word-break:keep-all!important;
 }
 html body .gc-hero .gc-art{flex:0 1 44%!important;min-width:0!important}
}
/* VANREX mobile-only visual quality patch: 2026-11-09. Desktop/header/footer untouched. */
@media (max-width: 650px) {
  #v4-hero.v4-scene {
    min-height: 0 !important;
    padding-top: 16px !important;
    padding-bottom: 34px !important;
  }
  #v4-hero .v4-hero-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }
  #v4-hero .v4-hero-display {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: clamp(260px, 78vw, 340px) !important;
    min-height: 0 !important;
    max-height: 340px !important;
    margin: 0 auto !important;
  }
  #v4-hero .v4-hero-copy {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 8px auto 0 !important;
    padding: 0 4px 12px !important;
    text-align: center !important;
  }
  #v4-hero .v4-kicker {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    width: 100% !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    letter-spacing: 0.015em !important;
    line-height: 1.5 !important;
    margin: 6px 0 20px !important;
  }
  #v4-hero #v4-hero-title {
    max-width: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    font-size: clamp(25px, 7vw, 30px) !important;
    line-height: 1.28 !important;
    gap: 0 .28em !important;
    white-space: normal !important;
  }
  #v4-hero #v4-hero-title > span {
    display: inline !important;
    white-space: nowrap !important;
  }
  #v4-hero .v4-hero-text { margin: 14px auto 15px !important; line-height: 1.65 !important; }
  #v4-hero .v4-primary-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    min-height: 52px !important;
    margin-inline: auto !important;
  }
  /* Draw the arrow in CSS: prevent iOS from substituting a blue emoji glyph. */
  #v4-hero .v4-primary-btn b {
    position: relative !important;
    display: inline-block !important;
    width: 17px !important;
    height: 17px !important;
    font-size: 0 !important;
    line-height: 0 !important;
    flex: 0 0 17px !important;
  }
  #v4-hero .v4-primary-btn b::before {
    content: "" !important;
    position: absolute !important;
    left: 1px !important;
    bottom: 3px !important;
    width: 17px !important;
    border-top: 1.7px solid currentColor !important;
    transform: rotate(-45deg) !important;
    transform-origin: center !important;
  }
  #v4-hero .v4-primary-btn b::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 9px !important;
    height: 9px !important;
    border-top: 1.7px solid currentColor !important;
    border-right: 1.7px solid currentColor !important;
  }
  #v4-hero .v4-hero-keywords { margin-top: 22px !important; }
}

/* VANREX mobile-only refinement for market.html, 2026-11-09. */
@media (max-width: 760px) {
  .market-redesign .hero-shell .hero {
    min-height: 0 !important;
    height: clamp(440px, 68svh, 535px) !important;
    background-position: 61% center !important;
  }
  .market-redesign .hero-shell .hero-copy {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding: 30px 20px 36px !important;
  }
  .market-redesign .hero-shell .hero-copy h1 {
    font-size: clamp(25px, 6.9vw, 32px) !important;
    line-height: 1.24 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 14px !important;
  }
  .market-redesign .hero-shell .hero-copy h1 .accent.nowrap { display: block !important; white-space: normal !important; }
  .market-redesign .hero-shell .hero-copy p {
    font-size: 14px !important;
    line-height: 1.65 !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
  .market-redesign #chart .chart-panel.tradingview-panel {
    min-height: 0 !important;
    height: 290px !important;
    padding: 5px !important;
    overflow: hidden !important;
  }
  .market-redesign #chart .tradingview-embed {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 12px !important;
  }
}

/* Market information hero: restrict the copy to the left and keep the right artwork visible. */
@media (min-width:761px) and (max-width:1280px){
 html body .market-redesign .hero-shell .hero-copy{
   box-sizing:border-box!important;width:calc(100% - 64px)!important;max-width:100%!important;
   padding-left:8px!important;padding-right:43%!important;
 }
 html body .market-redesign .hero-shell .hero-copy h1{
   font-size:clamp(28px,3.6vw,44px)!important;
   line-height:1.23!important;max-width:100%!important;white-space:normal!important;
 }
 html body .market-redesign .hero-shell .hero-copy p{
   max-width:100%!important;white-space:normal!important;font-size:clamp(14px,1.35vw,17px)!important;
   line-height:1.65!important;
 }
}
/* V2 — fixed mobile heading from 390px field test. */
@media (max-width:760px) {
 .market-redesign .hero-shell .hero-copy { display:flex!important; flex-direction:column!important; justify-content:flex-end!important; align-items:flex-start!important; padding:24px 18px 30px!important; }
 .market-redesign .hero-shell .hero-copy h1 { display:block!important; max-width:100%!important; width:100%!important; white-space:normal!important; font-size:clamp(25px,6.7vw,32px)!important; line-height:1.35!important; }
 .market-redesign .hero-shell .hero-copy h1 .accent.nowrap {display:block!important;white-space:normal!important}
 .market-redesign .hero-shell .hero-copy p { width:100%!important;max-width:100%!important; font-size:14px!important; line-height:1.65!important; overflow-wrap:break-word!important}
 .market-redesign #chart .chart-panel.tradingview-panel {height:300px!important;min-height:300px!important;max-height:300px!important;padding:5px!important}
 .market-redesign #chart .tradingview-embed {height:100%!important;min-height:0!important;display:block!important}
 .market-redesign #chart .section-head h2 {max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:clamp(24px,6.1vw,30px)!important}
}
/* V2.1: stable desktop-mode tablet globe inside nav, no overlay on final menu item. */
@media (min-width:900px) and (max-width:1024px) and (orientation:landscape){
 html body > header nav > ul > li.language-picker,
 html body > header .language-picker,
 html body > header .vr-phone-picker{
  position:relative!important;inset:auto!important;top:auto!important;right:auto!important;
  left:auto!important;bottom:auto!important;flex:0 0 42px!important;
  width:42px!important;min-width:42px!important;max-width:42px!important;
  height:42px!important;margin:0!important;padding:0!important;
 }
 html body > header nav > ul > li.language-picker{display:flex!important;align-items:center!important;justify-content:center!important}
 html body > header nav > ul{gap:2px!important}
 html body > header nav > ul > li > a,
 html body > header nav > ul > li > .dropbtn{font-size:11px!important;padding:7px 3px!important}
}
/* V2.1: prevent mobile content clipping at the section-head grid/flex boundary. */
@media (max-width:760px){
 .market-redesign .hero-shell .hero-copy p{
  box-sizing:border-box!important;max-inline-size:calc(100vw - 36px)!important;
  white-space:normal!important;word-break:break-word!important;overflow-wrap:anywhere!important;
 }
 .market-redesign #chart .section-head{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
 }
 .market-redesign #chart .section-head>div{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
 }
 .market-redesign #chart .section-head h2,
 .market-redesign #chart .section-head p{
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
  white-space:normal!important;word-break:break-word!important;overflow-wrap:anywhere!important;
 }
}

/* RWD V3 targeted 768-899px landscape tablet navigation correction.
   Existing portrait drawer and wider landscape remain unchanged. */
@media (min-width:768px) and (max-width:899px) and (orientation:landscape) {
 html body > header .header-container {
  display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
  justify-content:space-between!important;gap:6px!important;padding:6px 10px!important;
  max-width:100%!important;min-height:0!important;
 }
 html body > header .logo {flex:0 0 auto!important;margin-right:0!important}
 html body > header .logo-img {width:39px!important;height:39px!important;max-height:39px!important}
 html body > header nav {
  position:static!important;display:flex!important;visibility:visible!important;
  transform:none!important;opacity:1!important;flex:1 1 auto!important;
  width:auto!important;max-width:none!important;height:auto!important;
  min-height:0!important;padding:0!important;margin:0!important;overflow:visible!important;
  border:0!important;box-shadow:none!important;background:transparent!important;
 }
 html body > header nav > ul {
  display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
  justify-content:flex-end!important;gap:2px!important;width:100%!important;
  margin:0!important;padding:0!important;overflow:visible!important;
 }
 html body > header nav > ul > li {display:list-item!important;flex:0 1 auto!important;min-width:0!important;width:auto!important}
 html body > header nav > ul > li > a,
 html body > header nav > ul > li > .dropbtn {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  white-space:nowrap!important;font-size:clamp(10px,1.13vw,11px)!important;
  line-height:1.2!important;min-height:36px!important;padding:6px 2px!important;
 }
 html body > header nav > ul > li.language-picker,
 html body > header .language-picker,
 html body > header .vr-phone-picker {
  position:relative!important;inset:auto!important;flex:0 0 38px!important;
  min-width:38px!important;width:38px!important;max-width:38px!important;
  height:38px!important;margin:0!important;padding:0!important;
 }
 html body > header .vanrex-nav-toggle,
 html body > .vanrex-nav-backdrop {display:none!important}
}
/* Homepage uses a separate nav controller. Prevent the portrait drawer from
   remaining off-canvas during its legacy transform transition. */
@media (max-width:899px) and (orientation:portrait) {
 html body.vanrex-home.vanrex-nav-open header .header-container nav {
  display:block!important;visibility:visible!important;opacity:1!important;
  position:fixed!important;top:76px!important;left:auto!important;right:0!important;
  transform:none!important;transition:none!important;animation:none!important;
  width:min(440px,100vw)!important;max-width:100vw!important;
  height:calc(100dvh - 76px)!important;max-height:none!important;
  overflow-y:auto!important;z-index:999999!important;
  background:#050608!important;box-sizing:border-box!important;padding:14px!important;
 }
 html body.vanrex-home.vanrex-nav-open header .header-container nav>ul {
  display:flex!important;flex-flow:column nowrap!important;
  align-items:stretch!important;gap:8px!important;width:100%!important;max-width:100%!important;
 }
 html body.vanrex-home.vanrex-nav-open header .header-container nav>ul>li,
 html body.vanrex-home.vanrex-nav-open header .header-container nav>ul>li>a,
 html body.vanrex-home.vanrex-nav-open header .header-container nav>ul>li>.dropbtn {
  visibility:visible!important;opacity:1!important;
  transition:none!important;animation:none!important;
 }
 html body.vanrex-home.vanrex-nav-open header .header-container nav>ul>li{
  display:block!important;width:100%!important;
 }
}
/* VANREX TEMPORARY NAV ABOUT HIDE */
header nav > ul > li:has(> [data-vr-about]),
nav.vr-phone-nav > ul > li:has(> [data-vr-about]) {
    display: none !important;
}
/* END VANREX TEMPORARY NAV ABOUT HIDE */

/* VANREX_NAV_ABOUT_PRIORITY_FIX_V2 */
/* Only hide the About item in the primary navigation */
html body.vanrex-home.vanrex-nav-open header .header-container nav > ul > li:has(> a[data-vr-about]),
html body.vanrex-home header .header-container nav > ul > li:has(> a[data-vr-about]),
html body.vr-phone header .header-container nav > ul > li:has(> a[data-vr-about]),
html body header .header-container nav > ul > li:has(> a[data-vr-about]),
html body nav.vr-phone-nav > ul > li:has(> a[data-vr-about]) {
    display: none !important;
}
/* END VANREX_NAV_ABOUT_PRIORITY_FIX_V2 */

/* VANREX_I18N_MOBILE_WRAP_V1 */
@media (max-width: 1024px) {
  html[lang]:not([lang="zh-TW"]) body main h1,
  html[lang]:not([lang="zh-TW"]) body main h2,
  html[lang]:not([lang="zh-TW"]) body main h3,
  html[lang]:not([lang="zh-TW"]) body main p {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-overflow: clip !important;
  }

  html[lang]:not([lang="zh-TW"])
  body.vanrex-home .vx-approach__intro h2,
  html[lang]:not([lang="zh-TW"])
  body.vanrex-home .vx-approach__intro p {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    max-width: 100% !important;
  }
}
/* END VANREX_I18N_MOBILE_WRAP_V1 */
