@charset "utf-8";
/* =============================================================
   dg-chrome.css — 全站共用的頁首／底部導覽列
   -------------------------------------------------------------
   從 dg-app.css 抽出「外殼」相關規則，供舊 shell 的 53 個頁面使用。

   刻意「不」包含 dg-app.css 的這兩段:
     1. 基本重置(* box-sizing / body 樣式) —— 會影響既有版面
     2. 相容層(.btn / .container / .row / .form-control …)
        —— 那是為了取代 bootstrap 而寫的，舊頁面同時載入 bootstrap，
           一起吃到會整個跑版。
   所以這裡只留 .dg- 開頭的規則，對既有樣式零干擾。

   還原方式:拿掉 head.php 裡的那一行 <link> 即可。
   ============================================================= */

/* ---------- 2. 設計 token(色票取自 dg66.net 首頁實測) ---------- */
:root {
    --dg-gold: #c0983e;
    --dg-gold-d: #7d611f;
    --dg-gold-hi: #d4af37;
    --dg-cream: #efe6cf;

    --dg-page-bg: #f4f6f8;
    --dg-surface: #ffffff;
    --dg-border: #e3dccc;
    --dg-border-soft: #f0ece0;

    --dg-text-main: #334155;
    --dg-text-strong: #1e293b;
    --dg-text-muted: #94a3b8;

    --dg-danger: #c0392b;
    --dg-success: #2e7d32;

    --dg-shell-dark: rgba(22, 20, 17, .97);

    --dg-radius: 14px;
    --dg-radius-sm: 12px;

    --dg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

/* ---------- 3. 版面容器 ---------- */
.dg-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
.dg-page { padding-bottom: 90px; }           /* 讓開手機底部固定導覽列 */
@media (min-width: 768px) {
    .dg-container { padding: 0 32px; }
    .dg-page { padding-bottom: 40px; }
}
@media (min-width: 1200px) {
    .dg-container { padding: 0 40px; }
}

/* 工具類:.d-none 由頁面已載入的 bootstrap 提供，這裡不重複定義 */
.dg-hide { display: none !important; }

/* ---------- 4. 頁首 ---------- */
.dg-marquee-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #ece6da;
    font-size: 13px;
    color: #6b6459;
}
.dg-marquee-inner { display: flex; align-items: center; gap: 12px; height: 40px; }
.dg-marquee-label { flex: 0 0 auto; font-weight: 700; color: var(--dg-gold-d); }
/* 公告文字要跟「公告」標籤同一條水平中線。外層自己也要 flex 置中 ——
   原本只有 inline-flex 的 ul，會貼著行框基線、比標籤高 7px(Owner 2026-09-12「公告沒置中」)。*/
.dg-marquee { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
/* 清單輸出兩份，track 位移 -50% 剛好接回第一份，看起來就是無縫循環 */
.dg-marquee-track {
    display: flex; white-space: nowrap;
    animation: dg-marquee-scroll 32s linear infinite;
    will-change: transform;
}
.dg-marquee-bar:hover .dg-marquee-track { animation-play-state: paused; }
.dg-marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.dg-marquee li { flex: 0 0 auto; padding-right: 48px; }
.dg-marquee a { color: #6b6459; }
@keyframes dg-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .dg-marquee-track { animation: none; } }

.dg-header {
    background: var(--dg-surface);
    box-shadow: 0 2px 16px rgba(40, 30, 10, .05);
    position: relative;
    z-index: 50;
}
.dg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}
.dg-logo { display: flex; align-items: center; flex-shrink: 0; }
.dg-logo img { display: block; height: 40px; width: auto; }

.dg-nav { display: none; }
.dg-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.dg-nav a {
    display: inline-flex; align-items: center;
    min-height: 44px; padding: 0 14px;
    font-size: 15px; font-weight: 700; color: #4a4436;
    border-radius: 10px;
}
.dg-nav a:hover { color: var(--dg-gold-d); background: #faf6ec; }
.dg-nav .dg-user { font-size: 14px; font-weight: 700; color: var(--dg-gold-d); padding: 0 10px; }

/* 登入／註冊：跟其他導覽文字連結區分開，避免長得一樣分不出主副 */
/* 配色與 WP 端前台相同(Owner 2026-09-12「樣式要跟 WP 的一樣」):
   登入 = 透明底 + 金框金字;註冊 = 金色漸層 + 深棕字。原本註冊是紅色，兩邊長得不一樣。*/
.dg-nav a.dg-cta-login { color: var(--dg-gold-d); border: 1px solid var(--dg-gold); border-radius: 9px; }
.dg-nav a.dg-cta-login:hover { background: #faf6ec; }
.dg-nav a.dg-cta-register {
    color: #3a2c0a; font-weight: 700; border-radius: 9px;
    background: linear-gradient(180deg, #e7c987 0%, #c0983e 100%);
}
.dg-nav a.dg-cta-register:hover { color: #3a2c0a; filter: brightness(1.05); }
@media (min-width: 992px) {
    .dg-nav { display: block; }
    .dg-menu-toggle { display: none; }
}


/* 手機右上角的登入／註冊(header 的 .dg-head-cta)。≥992px 隱藏，交給上面的導覽列。
   高度 44 是觸控目標下限(天條 34),WP 端是 43。*/
.dg-head-cta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dg-head-cta a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 13px; border-radius: 9px;
    font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.dg-head-cta a.dg-cta-login { color: var(--dg-gold-d); border: 1px solid var(--dg-gold); }
.dg-head-cta a.dg-cta-register {
    color: #3a2c0a;
    background: linear-gradient(180deg, #e7c987 0%, #c0983e 100%);
}
@media (min-width: 992px) { .dg-head-cta { display: none; } }
/* 多了兩顆按鈕，手機的 LOGO 與間距要收一點才排得下(360px 也不擠) */
@media (max-width: 991px) {
    .dg-header-inner { gap: 10px; }
    .dg-logo img { height: 34px; }
}

.dg-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border: 1px solid var(--dg-border);
    background: #fff; border-radius: 10px; color: #4a4436;
}
.dg-menu-toggle span {
    display: block; width: 20px; height: 2px; background: currentColor;
    position: relative;
}
.dg-menu-toggle span::before,
.dg-menu-toggle span::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
}
.dg-menu-toggle span::before { top: -6px; }
.dg-menu-toggle span::after { top: 6px; }
/* 這條必須寫在 .dg-menu-toggle 基本樣式「之後」。原本的
   @media (min-width:992px){ .dg-menu-toggle{display:none} } 寫在基本樣式前面，
   兩者特異性一樣(0,1,0)就由後面的贏 —— 所以電腦版一直看得到漢堡按鈕(線上現況如此，
   WP 端沒有)。2026-09-12 補。*/
@media (min-width: 992px) { .dg-menu-toggle { display: none; } }

/* 手機側滑選單 */
.dg-drawer {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(20, 18, 14, .5);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.dg-drawer.is-open { opacity: 1; visibility: visible; }
.dg-drawer-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(80%, 320px);
    background: #fff;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    transform: translateX(100%);
    transition: transform .22s ease;
    overflow-y: auto;
}
.dg-drawer.is-open .dg-drawer-panel { transform: translateX(0); }
.dg-drawer-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto;
    border: none; background: none; font-size: 26px; line-height: 1; color: #6b6459;
}
.dg-drawer-panel ul { list-style: none; margin-top: 8px; }
.dg-drawer-panel a {
    display: flex; align-items: center; min-height: 48px;
    padding: 0 6px; font-size: 16px; font-weight: 700; color: #4a4436;
    border-bottom: 1px solid var(--dg-border-soft);
}
.dg-drawer-panel a.dg-cta-login { color: var(--dg-gold-d); }
.dg-drawer-panel a.dg-cta-register { color: var(--dg-gold-d); }

/* ---------- 9. 底部固定導覽列(手機) ---------- */
.dg-bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: var(--dg-shell-dark);
    border-top: 1px solid rgba(192, 152, 62, .32);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, .28);
    padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
}

/* 輸入框取得焦點(鍵盤彈出)時暫時收起，滑走時把它藏起來，避免
   iOS Safari 對 position:fixed 元素在鍵盤開合時的已知渲染錯位
   (畫面上會出現導覽列浮在中間、跟系統自動填入工具列疊在一起的亂象)。
   打字時本來也用不到底部導覽列，收起來還多留一點畫面給表單。 */
.dg-bnav {
    transition: transform .18s ease;
}
.dg-bnav.is-kb-hidden {
    transform: translateY(100%);
}
.dg-bnav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 6px 2px; min-height: 44px;
    color: var(--dg-cream); font-size: 12px; font-weight: 700;
}
.dg-bnav a i { font-size: 24px; color: var(--dg-cream); font-style: normal; }
.dg-bnav a:hover,
.dg-bnav a:active { color: var(--dg-gold-hi); }
.dg-bnav a:hover i,
.dg-bnav a:active i { color: var(--dg-gold-hi); }
@media (min-width: 768px) {
    .dg-bnav { display: none; }
}

/* ---------- 10. 客服浮動按鈕(電腦) ---------- */
.dg-cs {
    position: fixed; right: 18px; bottom: 24px; z-index: 130;
    display: none; flex-direction: column; gap: 8px;
}
.dg-cs a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 16px;
    background: var(--dg-shell-dark); color: var(--dg-cream);
    border: 1px solid rgba(192, 152, 62, .35); border-radius: 999px;
    font-size: 13px; font-weight: 700;
}
.dg-cs a:hover { color: var(--dg-gold-hi); }
@media (min-width: 768px) {
    .dg-cs { display: flex; }
}

/* ---------- 讓開底部固定導覽列 ----------
   導覽列是 fixed，不佔文件流;沒有這段的話捲到最底時
   最後的內容會整片被蓋住(實測導覽列高 79px)。
   可見頁尾移除後更明顯 —— 原本頁尾多少擋著一些。
   導覽列只在手機顯示，所以 768px 以上不留。
   2026-08-27:訪客版原本只留 20px 緩衝，登入後首頁最後一排卡片
   會被切到，小幅加大安全間距(100px→115px)避免緩衝被吃光；
   140px 那版留白太多，已收回。 */
body { padding-bottom: calc(115px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
    body { padding-bottom: 0; }
}

/* 首頁這段預留空間目前是 body 自己的底色(白)，跟大廳版型的米色
   區塊(--lb-bg #f6f2ea)在交界處顏色斷開，看起來像背景沒做滿版。
   只在首頁(body.dg-lobby)補上同色，其他頁面不受影響。 */
body.dg-lobby { background: #f6f2ea; }


/* ============================================================
   8. 手機頁首重排(2026-09-15,Owner:「這裡排的不理想」)
   LOGO / 登入 / 註冊 / 漢堡 四樣擠在 390px 裡,原本登入註冊兩顆都是 44px 高的實心框,
   視覺上跟 LOGO 打架。改法:登入退成文字連結(點擊區仍 44px),註冊留一顆金色膠囊,
   漢堡縮到 40px,LOGO 回到 36px;整列 60px 高。≥992px 不受影響(那組本來就隱藏)。
   ============================================================ */
@media (max-width: 991px) {
    .dg-header-inner { min-height: 60px; gap: 8px; }
    .dg-logo img { height: 36px; }
    .dg-head-cta { gap: 6px; margin-left: auto; }
    .dg-head-cta a { min-height: 0; padding: 9px 18px; line-height: 25px; font-size: 13.5px; border-radius: 9px; }   /* 2026-09-15 Owner:手機也用電腦版那款(圓角 9、43px 高),不用膠囊 */
    .dg-head-cta a.dg-cta-login { line-height: 23px; color: var(--dg-gold-d); border: 1px solid var(--dg-gold); background: #fff; }   /* Owner:登入也要是按鈕 → 金框膠囊,跟註冊同高 */
    .dg-head-cta a.dg-cta-login:active { background: #faf6ec; }
    .dg-head-cta a.dg-cta-register { box-shadow: 0 4px 14px rgba(192,152,62,.28); }
    .dg-menu-toggle { width: 40px; height: 40px; border-radius: 9px; }
}
@media (max-width: 359px) {
    .dg-logo img { height: 32px; }
    .dg-head-cta a { padding: 9px 13px; font-size: 13px; }
    .dg-head-cta a.dg-cta-register { padding: 9px 13px; }
}

/* ============================================================
   9. 剛註冊完的「綁定快速登入」彈窗(includes/bind_prompt_v2.php)
   id 沿用 #imagemodal2(公告排隊靠它),內容全用 .dg-bind-* 新 class;
   head.php 舊的 #imagemodal2 .modal-content{border-top} 在這裡歸零。
   ============================================================ */
#imagemodal2.dg-bind .modal-content { border-top: 0; }
.dg-bind .dg-bind-dialog { max-width: 360px; margin: 24px auto; padding: 0 14px; }
.dg-bind .dg-bind-card {
    position: relative;
    border: 0; border-radius: 20px;
    background: var(--dg-surface);
    box-shadow: 0 24px 60px rgba(30, 22, 6, .28);
    padding: 26px 22px 18px;
    overflow: hidden;
}
.dg-bind .dg-bind-card::before {           /* 頂端一道金,呼應站上按鈕的漸層 */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
    background: linear-gradient(90deg, #e7c987 0%, #c0983e 100%);
}
.dg-bind .dg-bind-close {
    position: absolute; top: 10px; right: 10px;
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: transparent; color: #9a917f; font-size: 26px; line-height: 1;
}
.dg-bind .dg-bind-close:hover { background: #f4efe2; color: #4a4436; }
.dg-bind .dg-bind-head { text-align: center; padding: 0 20px; }
.dg-bind .dg-bind-eyebrow {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    background: #fbf5e4; color: var(--dg-gold-d);
    font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
.dg-bind .dg-bind-title {
    margin: 12px 0 6px; font-size: 22px; font-weight: 800; color: var(--dg-text-strong); line-height: 1.3;
}
.dg-bind .dg-bind-sub { margin: 0; font-size: 14px; line-height: 1.6; color: #6b6459; }
.dg-bind .dg-bind-actions { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 6px; }
.dg-bind .dg-bind-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; border-radius: 14px;
    font-size: 15.5px; font-weight: 700; text-decoration: none !important;
    transition: filter .15s ease, transform .15s ease;
}
.dg-bind .dg-bind-btn:active { transform: scale(.985); }
.dg-bind .dg-bind-btn img { width: 22px; height: 22px; display: block; }
.dg-bind .dg-bind-btn.is-google {
    background: #fff; color: #2a2419 !important;
    border: 1.5px solid var(--dg-border);
}
.dg-bind .dg-bind-btn.is-google:hover { background: #faf6ec; border-color: var(--dg-gold); }
.dg-bind .dg-bind-btn.is-line { background: #06c755; color: #fff !important; border: 1.5px solid #06c755; }
.dg-bind .dg-bind-btn.is-line:hover { filter: brightness(1.06); }
.dg-bind .dg-bind-btn.is-line img { width: 26px; height: 26px; padding: 2px; background: #fff; border-radius: 7px; }   /* 綠底上放白框,LINE 綠方塊圖示才看得見 */
.dg-bind .dg-bind-later {
    display: block; width: 100%; min-height: 44px;
    border: 0; background: transparent;
    font-size: 13.5px; color: #8a8170; text-decoration: underline; text-underline-offset: 3px;
}
.dg-bind .dg-bind-later:hover { color: var(--dg-gold-d); }
@media (min-width: 768px) {
    .dg-bind .dg-bind-dialog { max-width: 400px; }
    .dg-bind .dg-bind-card { padding: 32px 30px 20px; }
    .dg-bind .dg-bind-title { font-size: 24px; }
}


/* ============================================================
   10. 頁首照 WP 首頁抄(2026-09-15 Owner:「圖片跟按鈕都要一樣、高度比例都要一樣」)
   數字全部是 WP 首頁(dg66.net)線上實測值,不是設計稿:
   桌機 頁首 72px+1px 底線、LOGO 44px、導覽字 15px/400/#1a1a1a 間距 22、登入註冊 13.5px 9×18 圓角 9、註冊陰影 0 4 14;
   手機 頁首 60px、LOGO 36px、登入註冊 44px 膠囊(第 8 節已對齊)、漢堡三條線不加框;跑馬燈 36px。
   LOGO 圖兩邊本來就是同一張(400×109)。
   ============================================================ */
.dg-marquee-inner { height: 35px; }   /* +1px 底線 = WP 的 36 */
.dg-marquee-bar { font-size: 12.5px; }
.dg-header { border-bottom: 1px solid #ece6da; }
@media (max-width: 991px) {
    .dg-menu-toggle { border: 0; background: transparent; color: #1a1a1a; }
}
@media (min-width: 992px) {
    .dg-header-inner { min-height: 72px; gap: 24px; }
    .dg-logo img { height: 44px; }
    .dg-nav ul { gap: 22px; }
    .dg-nav a {
        min-height: 0; padding: 4px 0; border-radius: 0;
        font-size: 15px; font-weight: 400; color: #1a1a1a;
        position: relative;
    }
    .dg-nav a::after {                     /* WP 的 hover 底線:從左長到右 */
        content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
        background: linear-gradient(180deg, #e7c987, #c0983e); transition: right .28s ease;
    }
    .dg-nav a:hover { color: var(--dg-gold-d); background: none; }
    .dg-nav a:hover::after { right: 0; }
    .dg-nav .dg-user { font-size: 14px; }
    .dg-nav a.dg-cta-login, .dg-nav a.dg-cta-register {
        min-height: 0; padding: 9px 18px; line-height: 25px;
        font-size: 13.5px; font-weight: 700; border-radius: 9px;
    }
    .dg-nav a.dg-cta-login::after, .dg-nav a.dg-cta-register::after { display: none; }
    .dg-nav a.dg-cta-login { border: 1px solid var(--dg-gold); color: var(--dg-gold-d); line-height: 23px; }   /* 含 1px 框 = WP 的 43 */
    .dg-nav a.dg-cta-login:hover { background: var(--dg-gold); color: #fff; }
    .dg-nav a.dg-cta-register { margin-left: -12px; box-shadow: 0 4px 14px rgba(192,152,62,.28); }   /* WP 登入與註冊間距 10,導覽間距 22 → 收 12 */
    .dg-nav a.dg-cta-register:hover { color: #3a2c0a; filter: brightness(1.05); transform: translateY(-1px); }
}


/* ============================================================
   11. 登入後的頁首(2026-09-15 Owner:「登入後顯示帳號與餘額＋儲值鈕」)
   手機:右上角 [帳號 / 點數] + 金色「儲值」鈕 + 漢堡(登入前那組 .dg-head-cta 換成這組);
   電腦:導覽列右側 [帳號 / 點數] + 金色「儲值」+ 金框「登出」,會員中心維持文字連結。
   帳號與點數整塊可點,進會員中心。點數用等寬數字,帳號太長就省略號。
   ============================================================ */
a.dg-head-acct {   /* 用 a. 抬到 0,1,1 才壓得過 .dg-nav a / .dg-head-cta a(同權重、這節在最後面贏) */
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    min-height: 44px; padding: 0; line-height: 1.15; text-decoration: none !important; border-radius: 0;
}
a.dg-head-acct .id { font-size: 12px; color: #6b6459; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.dg-head-acct .pts { font-size: 14.5px; font-weight: 700; color: var(--dg-gold-d); font-variant-numeric: tabular-nums; white-space: nowrap; }
a.dg-head-acct .pts small { font-size: 11px; font-weight: 400; margin-left: 2px; }
@media (max-width: 991px) {
    .dg-head-cta.dg-head-user { gap: 8px; }
    .dg-head-cta.dg-head-user a.dg-cta-register { padding: 9px 16px; }
}
@media (max-width: 359px) {
    .dg-head-acct .id { max-width: 72px; }
    .dg-head-acct .pts { font-size: 13.5px; }
}
@media (min-width: 992px) {
    .dg-nav li.dg-nav-user { margin-left: 6px; }
    .dg-nav li.dg-nav-user a { padding: 0; }
    .dg-nav li.dg-nav-user a::after { display: none; }
    .dg-nav li.dg-nav-user a:hover .pts { text-decoration: underline; text-underline-offset: 3px; }
    .dg-nav a.dg-cta-logout { margin-left: -12px; }   /* 儲值與登出間距 10,同登入/註冊 */
}
