/* ════════════════════════════════════════════════════════════════
   desktop.css — 電腦版適配（內容頁共用，聊天頁另見 chat-desktop.css）

   鐵律：本檔所有規則必須包在 @media (min-width:901px) 內。
   手機永遠命中不了 901px，本檔在行動端是死代碼——雙重保險：
   引用標籤本身也帶 media 屬性：
     <link rel="stylesheet" href="/desktop.css?v=..." media="(min-width:901px)">

   !important 用途說明：age-gate.js / ui-modal.js 的樣式是執行期注入的
   <style>，級聯順序在本檔之後，覆寫它們必須用 !important；
   這些覆寫同樣只在 ≥901px 生效，行動端原樣。
   ════════════════════════════════════════════════════════════════ */

@media (min-width: 901px) {

  /* ── 0. 桌面殼：side-nav 注入後（html.has-dnav）內容區讓出左側欄 ──
     256px：2026-08-02 左中右三區同比放大 +10%，收斂大間隙 */
  html.has-dnav body { padding-left: 280px; }

  /* 行動端底部 tabbar（index / portfolio）桌面隱藏，導航職責移交側欄 */
  .bottom-nav { display: none !important; }

  /* ── 1. 左側導航欄 #dnav（DOM 由 site-nav.js 注入） ── */
  #dnav {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60;
    display: flex; flex-direction: column;
    padding: 26px 16px 20px;
    background: linear-gradient(180deg, rgba(22, 11, 52, .88) 0%, rgba(13, 6, 34, .96) 100%);
    border-right: 1px solid rgba(168, 100, 255, .16);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    font-family: 'Noto Sans TC', 'Outfit', system-ui, sans-serif;
  }
  #dnav .dnav-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 2px 10px 22px; margin-bottom: 10px;
    border-bottom: 1px solid rgba(168, 100, 255, .12);
    cursor: pointer; text-decoration: none;
  }
  #dnav .dnav-brand img { width: 48px; height: 48px; border-radius: 12px; display: block; margin-top: 3px; }
  #dnav .dnav-brand span {
    font-family: 'Outfit', 'Noto Sans TC', sans-serif;
    font-size: 22px; font-weight: 800; letter-spacing: .02em;
    background: linear-gradient(135deg, #fb85c8, #b06af8);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  #dnav .dnav-items { flex: 1; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
  #dnav .dnav-item {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 14px; border-radius: 12px;
    color: rgba(214, 196, 255, .72); text-decoration: none;
    font-size: 15px; font-weight: 700; letter-spacing: .01em;
    border: 1px solid transparent;
    transition: background .18s, color .18s, border-color .18s;
    cursor: pointer;
  }
  #dnav .dnav-item svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #dnav .dnav-item img.dnav-coin { width: 19px; height: 19px; display: block; }
  #dnav .dnav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(244, 61, 138, .22), rgba(176, 106, 248, .16));
    border-color: rgba(244, 61, 138, .35);
    box-shadow: 0 0 22px rgba(244, 61, 138, .12);
  }
  /* 自訂女友：普通項（用戶 2026-08-02：取消常亮，亮=當前頁，不能混） */
  #dnav .dnav-item.dnav-create { margin: 4px 0; }
  #dnav .dnav-foot {
    display: flex; gap: 14px; justify-content: center;
    padding-top: 14px; border-top: 1px solid rgba(168, 100, 255, .12);
  }
  #dnav .dnav-foot a {
    font-size: 11.5px; color: rgba(180, 160, 230, .55); text-decoration: none;
    transition: color .18s;
  }

  /* 901–1100px 窄桌面/半屏視窗：側欄收成純圖示欄 */
  @media (max-width: 1100px) {
    html.has-dnav body { padding-left: 88px; }
    #dnav { width: 88px; padding: 26px 10px 20px; align-items: center; }
    #dnav .dnav-brand { padding: 2px 0 18px; justify-content: center; }
    #dnav .dnav-brand span { display: none; }
    #dnav .dnav-item { justify-content: center; padding: 12px 0; width: 52px; }
    #dnav .dnav-item .dnav-label { display: none; }
    #dnav .dnav-foot { display: none; }
  }

  /* ── 2. 共用彈窗桌面化（覆寫執行期注入樣式，故用 !important） ── */
  /* ui-modal.js：uiConfirm / uiAlert */
  .ui-box   { max-width: 420px !important; padding: 32px 30px 26px !important; border-radius: 24px !important; }
  .ui-icon  { font-size: 40px !important; }
  .ui-title { font-size: 20px !important; }
  .ui-msg   { font-size: 15px !important; }
  .ui-btn   { font-size: 15px !important; }

  /* age-gate.js：年齡門 */
  #agegate .ag-card { max-width: 440px !important; padding: 36px 34px 28px !important; }
  #agegate .ag-badge { width: 58px !important; height: 58px !important; font-size: 21px !important; }
  #agegate h2 { font-size: 23px !important; }
  #agegate p { font-size: 14.5px !important; }
  #agegate .ag-fine { font-size: 12px !important; }
  #agegate button { font-size: 15px !important; padding: 14px !important; }

  /* ══ P2·A — index.html 桌面版型（雙欄儀表盤，用戶 2026-08-01 要求重設計） ══ */

  /* 版心與縮放：zoom:.93 是行動端手調值，桌面歸一（index/edit 都吃這條） */
  .page { zoom: 1; }
  /* 版心不再整塊置中：改用 spacer 欄讓「中區」相對左側欄與右列真正居中
     （用戶 2026-08-01：中區距左菜單與距右列的間距要相等；中區縮回 ~10%） */
  #tab-home.page { max-width: none; padding: 0 36px 0 0; }

  /* 頂欄：品牌已在側欄，這裡只留餘額/語言並右對齊；grid 內 sticky 自然失效，
     側欄常駐導航所以無妨 */
  #tab-home .topbar, #tab-mygf .topbar {
    margin: 0; padding-left: 0; padding-right: 0; justify-content: flex-end;
  }
  #tab-home .topbar .logo, #tab-mygf .topbar .logo { display: none; }

  /* 雙欄儀表盤：左主欄（hero → 當紅模特 → 我的女友）+ 右欄（自訂 CTA + 動態）
     行內 display 由 switchTab 的白名單改動（'' 回落）讓位給這裡的 grid */
  /* 欄結構：spacer | 中區(≤780) | spacer | 右列(360)
     兩個 1fr spacer 恆等 → 中區到側欄、到右列的間距天然相等 */
  #tab-home {
    display: grid;
    grid-template-columns: 1fr minmax(0, 860px) 1fr 396px;
    column-gap: 0;
    align-items: start;
  }
  #tab-home > .topbar { grid-column: 1 / -1; }
  #tab-home > .hero-carousel { grid-column: 2; grid-row: 2; margin-top: 14px; }
  #tab-home > .custom-gf-cta { grid-column: 4; grid-row: 2; }
  #tab-home > #models-section { grid-column: 2; grid-row: 3; }
  #tab-home > #model-list { grid-column: 2; grid-row: 4; }
  #tab-home > .sec-head:not(#models-section):not(#notif-section) { grid-column: 2; grid-row: 5; }
  #tab-home > #gf-list { grid-column: 2; grid-row: 6; }
  /* CTA 縮至 266 後，右列通知上移貼齊 CTA 底部
     （row2 高 = hero 400+14，CTA 266+14 → 差 134px；1379 以下另行覆寫） */
  #tab-home > #notif-section { grid-column: 4; grid-row: 3; margin-top: -110px; }
  #tab-home > .notif-list { grid-column: 4; grid-row: 4 / span 3; align-self: start; margin-top: -110px; }
  /* 輪播指示點是 #tab-home 直屬子元素，不指定會被 grid 自動放置甩飛；
     疊到 hero 底部中央（標準輪播樣式），不佔獨立行 */
  #tab-home > .hero-dots {
    grid-column: 2; grid-row: 2; z-index: 5;
    align-self: end; justify-self: center;
    margin: 0 0 12px; pointer-events: auto;
  }

  /* Hero：228px 行動高度 → 400px（用戶 2026-08-01：主板塊再放大），文案同步放大 */
  #tab-home .hero-slide { height: 400px; }
  #tab-home .hero-slide-body { padding: 40px 44px; }
  #tab-home .hero-slide-title { font-size: 32px; }
  #tab-home .hero-slide-sub { font-size: 15px; }

  /* 當紅模特：兩排橫滑 rail → 4 欄網格（卡片 aspect-ratio 5/7 自持比例） */
  #tab-home .model-grid2 {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-auto-columns: unset;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    margin: 0; padding: 2px 0 10px;
  }

  /* 我的女友：橫滑 rail → 5 欄網格（grid 下 flex-basis 自動失效） */
  #tab-home .gf-scroll {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    margin: 0; padding: 0 0 8px;
  }

  /* 自訂女友 CTA：webm 在左、文字按鈕在右（同行動端橫排）。
     2026-08-02 取消與 banner 等高，高度縮 1/3 → 266px */
  #tab-home .custom-gf-cta {
    gap: 18px; margin: 14px 0 0; padding: 16px;
    align-self: start; height: 266px; box-sizing: border-box;
    align-items: center;
  }
  #tab-home .cgf-portrait { width: 45%; height: 100%; flex: 0 0 auto; }
  /* CTA 影片裁切只裁底部、頂部保留（用戶 2026-08-01：頭不能被切） */
  #tab-home .cgf-portrait .cgf-vid,
  #tab-home .cgf-portrait img { object-position: center top; }

  /* Hero 輪播左右切換鍵（DOM 由 site-nav.js 注入為 #tab-home 直屬子元素，
     與 hero 同格 grid 疊放——不放進滾動容器內，免得跟著內容滾走） */
  .hero-nav-btn {
    grid-column: 2; grid-row: 2; align-self: center; z-index: 5;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(10, 4, 28, .45);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; opacity: .35; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .2s, background .2s;
  }
  .hero-nav-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .hero-nav-btn.prev { justify-self: start; margin-left: 12px; margin-top: 14px; }
  .hero-nav-btn.next { justify-self: end; margin-right: 12px; margin-top: 14px; }
  #tab-home .cgf-title { font-size: 19px; }
  #tab-home .cgf-sub { font-size: 13px; }

  /* 節標題微放大 */
  #tab-home .sec-title { font-size: 17px; }

  /* ── 按鈕全面提檔（用戶 2026-08-02：行動端尺寸在桌面顯小） ── */
  #tab-home .hero-slide-btn { font-size: 15px; padding: 14px 26px; border-radius: 14px; }
  #tab-home .hero-slide-btn svg { width: 18px; height: 18px; }
  #tab-home .cgf-btn { font-size: 15px; padding: 13px 22px; border-radius: 13px; }
  .diamond-chip { padding: 8px 16px; }
  .diamond-chip .diamond-val { font-size: 15px; }
  .lang-toggle { font-size: 14px; padding: 9px 18px; }
  .sec-more { font-size: 14px; }
  .mygf-add-btn { font-size: 14.5px; padding: 11px 20px; border-radius: 12px; }
  .hero-nav-btn { width: 48px; height: 48px; }
  .hero-nav-btn svg { width: 20px; height: 20px; }

  /* 寬屏（≥1724）：中區改以整個畫面為基準居中（用戶 2026-08-02：中區偏左）
     col1 = 50vw − 中區半寬430 − 側欄280 → 中區中心恆等於屏幕中心 */
  @media (min-width: 1724px) {
    #tab-home { grid-template-columns: calc(50vw - 710px) minmax(0, 860px) 1fr 396px; }
  }

  /* 窄桌面（901–1379）：spacer 收成固定小間距，右欄收窄 */
  @media (max-width: 1379px) {
    #tab-home { grid-template-columns: 18px minmax(0, 1fr) 24px 340px; }
    #tab-home .model-grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #tab-home .gf-scroll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #tab-home .hero-slide { height: 340px; }
    #tab-home .custom-gf-cta { height: 240px; }
    #tab-home > #notif-section, #tab-home > .notif-list { margin-top: -76px; }
  }

  /* ── 我的女友 tab：按 08-02 全站標準——頂欄撐滿內容區、內容 1200 置中 ── */
  #tab-mygf { max-width: none; margin: 0; padding: 0 36px 96px 0; }
  #tab-mygf .page { max-width: none; padding: 0; }
  #tab-mygf > :not(.page) { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; }
  #tab-mygf .mygf-header { padding-left: 0; padding-right: 0; }
  /* 「我的女友」標題與 models 的「當紅模特」大標同規格（用戶 2026-08-02） */
  #tab-mygf .mygf-header-title {
    font-size: 26px; font-weight: 900; line-height: 1.2;
    background: linear-gradient(135deg, #f43d8a, #fb85c8, #d124d8);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 18px rgba(244, 61, 138, .3));
  }
  #tab-mygf .gf-tab-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px; padding: 0 0 24px; margin-top: 43px;
  }
  #tab-mygf .bg-picker-section { padding: 0 0 28px; }
  #tab-mygf .bg-picker-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  /* ══ P2·B — models / model / recharge 桌面版型 ══ */

  /* ── 全站標準（2026-08-02 定）：頂欄撐滿內容區對齊 index；
        版心：目錄類 1200 / 結帳類 900 / 詳情類 720 ── */
  .page:has(> .grid), .page:has(.pkg-grid) { max-width: none; padding: 0 36px 0 0; }
  .page:has(> .grid) > .topbar, .page:has(.pkg-grid) > .topbar {
    margin: 0; padding-left: 0; padding-right: 0;
  }
  .page:has(> .grid) > :not(.topbar) {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  }
  .page:has(.pkg-grid) > :not(.topbar) {
    width: 100%; max-width: 1240px; margin-left: auto; margin-right: auto;
  }
  /* 桌面觀看距離遠，行動端的 9-11px 小字全面提檔（用戶 2026-08-02：看不清） */
  .pkg-card { padding: 20px; }
  .pkg-gems { font-size: 28px; }
  .pkg-gems-lbl { font-size: 13px; color: rgba(251, 191, 36, .68); }
  .pkg-bonus { font-size: 13px; padding: 3px 10px; }
  .pkg-price { font-size: 22px; }
  .pkg-price-sub { font-size: 13.5px; color: rgba(190, 160, 255, .65); }
  .pkg-popular-tag { font-size: 11px; }
  .confirm-note { font-size: 13px; color: rgba(180, 150, 255, .6); }
  /* 支付方式放大（用戶 2026-08-02） */
  .pay-method { padding: 18px 10px; gap: 8px; border-radius: 15px; }
  .pay-method svg { width: 28px; height: 28px; }
  .pay-method span { font-size: 14px; }
  /* 訂閱會員：信息放大 + 特性改縱向列表，一眼讀清 */
  .mem-perks { gap: 12px; }
  .mem-perk span { font-size: 15px; }
  .mem-perk-dot svg { width: 13px; height: 13px; }
  .plan-cards { gap: 16px; }
  .plan-card { padding: 24px 22px; }
  .plan-name { font-size: 19px; }
  .plan-saving { font-size: 13px; }
  .plan-recommended-tag { font-size: 11px; }
  .plan-price-row { margin-bottom: 14px; }
  .plan-price { font-size: 34px; }
  .plan-period { font-size: 14.5px; }
  .plan-orig { font-size: 13.5px; }
  .plan-features { flex-direction: column; align-items: stretch; gap: 9px; margin-top: 4px; }
  .plan-feat { font-size: 13.5px; padding: 9px 12px; display: flex; align-items: center; }
  .compare-title { font-size: 16px; }
  .compare-table { font-size: 14px; }
  .compare-table td:first-child { font-size: 14px; }
  /* 儲值 tab 雙膠囊照 900 撐滿太笨重，收成分段控制器寬度 */
  .page:has(.pkg-grid) > .tab-wrap { max-width: 560px; }

  /* ── models.html 模特目錄 ── */
  /* 🔥 SOULO ORIGINALS kicker 桌面撤掉，內容上移（用戶 2026-08-02） */
  .page:has(> .grid) .hero-kicker { display: none; }
  /* 頂欄頁名全站統一不顯示（用戶 2026-08-02） */
  .page:has(> .grid) .top-title { display: none; }
  /* 大標漸變修復：hero-h1 是 block，漸變攤在整行寬上四個字只取到起頭色；
     收斂到字寬後與 mygf 標題漸變一致（用戶 2026-08-02 統一） */
  .page:has(> .grid) .hero-h1 { width: fit-content; }

  .dt-banner-slot {
    height: 240px; margin: 14px -2px 10px;
    border: 1.5px dashed rgba(168, 100, 255, .45); border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
  }
  .dt-banner-slot::after {
    content: 'BANNER 預留位 · 與下方內容同寬（1200 × 240）';
    font-size: 13px; letter-spacing: .14em; color: rgba(180, 150, 255, .45);
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 18px; padding: 24px 0 16px;
  }

  /* ── model.html 模特詳情（.wrap 全站唯一） ──
     此頁 topbar / cta-bar 是 fixed + 視口置中，側欄出現後置中基準要
     讓出側欄寬（256px），否則與內容錯位 */
  .wrap { max-width: 720px; }
  body:has(.wrap) .topbar { max-width: 720px; }
  body:has(.wrap) .cta-bar { max-width: 720px; }
  html.has-dnav body:has(.wrap) .topbar { left: 280px; }
  html.has-dnav body:has(.wrap) .cta-bar { left: 256px; }
  .wrap .cover { height: 340px; }
  .wrap .gallery, .wrap .pv-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }

  /* ── recharge.html 儲值 ── */
  .pkg-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  /* 方案卡直排 → 三欄並排比價（桌面標準式） */
  .plan-cards { flex-direction: row; align-items: stretch; gap: 14px; }
  .plan-cards .plan-card { flex: 1 1 0; min-width: 0; }

  /* ── creat.html：右上導航小字撤掉，左上only回退鍵（用戶 2026-08-02） ── */
  .nav-links { display: none !important; }
  .dt-back {
    position: fixed; top: 76px; left: 18px; z-index: 90;
    width: 44px; height: 36px; border-radius: 12px;
    background: rgba(10, 4, 28, .5);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 100, 255, .28);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none;
  }
  .dt-back::after {
    content: ''; width: 9px; height: 9px; margin-left: 3px;
    border-left: 2.4px solid rgba(255, 255, 255, .85);
    border-bottom: 2.4px solid rgba(255, 255, 255, .85);
    transform: rotate(45deg);
  }
  /* creat 的 nav 殼是行內樣式（1440 置中），桌面改通欄、logo 靠左與全站統一位置 */
  body:has(#root) nav > div { max-width: none !important; padding: 0 36px 0 20px !important; }
  /* logo 尺寸統一側欄品牌規格（行內 54px/20.76px → 48px/22px） */
  body:has(#root) nav img[alt="Soulo"] { height: 48px !important; width: 48px !important; object-fit: contain; }
  body:has(#root) nav img[alt="Soulo"] + span { font-size: 22px !important; }

  /* ══ P3 — portfolio / edit / contact / policy / api（2026-08-02 按全站標準鋪設） ══ */

  /* 頂欄無頁名：全站標準（models 先行，其餘同步；recharge 的「儲值中心」一併收） */
  .topbar-title { display: none; }

  /* 回退鍵不貼死側欄：標準頂欄補左內距（用戶 2026-08-02） */
  .page:has(> .grid) > .topbar, .page:has(.pkg-grid) > .topbar,
  .page:has(.balance-row) > .topbar, .page:has(.form-card) > .topbar,
  body[data-lang] .page > .topbar, .page:has(.cap-grid) > .topbar {
    padding-left: 24px;
  }

  /* ══ 桌面字級提檔（2026-08-02 用戶：排版放大了字沒跟上，全頁掃過） ══ */

  /* — models 目錄 — */
  .page:has(> .grid) .hero-h1 { font-size: 34px; }
  .page:has(> .grid) .hero-p { font-size: 15px; max-width: 720px; }
  .mcard-name { font-size: 18px; }
  .mcard-name .vchk { width: 17px; height: 17px; }
  .mcard-handle { font-size: 12.5px; }
  .mcard-meta { font-size: 12px; margin-top: 6px; }
  .mbadge { font-size: 10.5px; padding: 4px 10px; }
  .mcard-info { padding: 0 14px 14px; }
  .more-hint { font-size: 13.5px; }

  /* — model 詳情 — */
  .wrap .name { font-size: 28px; }
  .wrap .handle { font-size: 14.5px; }
  .wrap .meta-chip { font-size: 13px; padding: 6px 12px; }
  .wrap .stat-val { font-size: 21px; }
  .wrap .stat-lbl { font-size: 12px; }
  .wrap .bio, .wrap .story { font-size: 15px; }
  .wrap .tag { font-size: 12.5px; padding: 6px 13px; }
  .wrap .sec-title { font-size: 15px; }
  .wrap .tab { font-size: 13.5px; padding: 10px 18px; }
  .wrap .tab svg { width: 15px; height: 15px; }
  .wrap .reset-btn { font-size: 13.5px; }
  .wrap .cta-btn { font-size: 17px; padding: 18px; }

  /* — portfolio 個人主頁（含祕祕幣/星光積分卡：icon 與字成比例放大） — */
  .page:has(.balance-row) .bal-icon { width: 48px; height: 48px; border-radius: 14px; }
  .page:has(.balance-row) .bal-icon svg,
  .page:has(.balance-row) .bal-icon img { width: 26px; height: 26px; }
  .page:has(.balance-row) .bal-val { font-size: 36px; }
  .page:has(.balance-row) .bal-lbl { font-size: 13.5px; margin-top: 0; }
  .page:has(.balance-row) .bal-action { font-size: 13.5px; }
  .page:has(.balance-row) .bal-action svg { width: 13px; height: 13px; }
  .page:has(.balance-row) .bal-card { padding: 22px 24px; }
  .page:has(.balance-row) .profile-name { font-size: 24px; }
  .page:has(.balance-row) .profile-id { font-size: 13px; }
  .page:has(.balance-row) .profile-tag { font-size: 12.5px; }
  .page:has(.balance-row) .quick-item-title { font-size: 15.5px; }
  .page:has(.balance-row) .quick-item-sub { font-size: 12.5px; }

  /* — contact — */
  .page:has(.form-card) .hero-title { font-size: 30px; }
  .page:has(.form-card) .hero-sub { font-size: 15px; max-width: 560px; }
  .page:has(.form-card) .hero-badge { font-size: 12.5px; }
  .page:has(.form-card) .form-card-title { font-size: 18px; }
  .page:has(.form-card) .form-card-sub { font-size: 13px; }
  .page:has(.form-card) .field-label { font-size: 13px; }
  .page:has(.form-card) .input,
  .page:has(.form-card) .textarea,
  .page:has(.form-card) .select { font-size: 15px; }
  .page:has(.form-card) .send-btn { font-size: 16px; }
  .page:has(.form-card) .cc-title { font-size: 17px; }
  .page:has(.form-card) .cc-desc { font-size: 13px; }
  .page:has(.form-card) .cc-mail { font-size: 15px; }

  /* — policy — */
  body[data-lang] .hero h1 { font-size: 30px; }
  body[data-lang] .hero .updated { font-size: 13px; }
  body[data-lang] .tabs a { font-size: 13px; }
  body[data-lang] .card > h2.sec-title { font-size: 21px; }
  body[data-lang] .card h3 { font-size: 16px; }
  body[data-lang] .card p, body[data-lang] .card li { font-size: 15px; }
  body[data-lang] .card .sec-sub { font-size: 12.5px; }
  body[data-lang] .note { font-size: 13px; }

  /* — api（2026-08-02 二輪：全面提檔） — */
  .page:has(.cap-grid) .hero-title { font-size: 38px; }
  .page:has(.cap-grid) .hero-sub { font-size: 15.5px; max-width: 640px; }
  .page:has(.cap-grid) .hero-badge { font-size: 12.5px; }
  .page:has(.cap-grid) .hero-cta { font-size: 16px; }
  .page:has(.cap-grid) .sec-kicker { font-size: 13px; }
  .page:has(.cap-grid) .sec-title { font-size: 24px; }
  .page:has(.cap-grid) .cap-icon { width: 52px; height: 52px; }
  .page:has(.cap-grid) .cap-icon svg { width: 26px; height: 26px; }
  .page:has(.cap-grid) .cap-title { font-size: 18px; }
  .page:has(.cap-grid) .cap-desc { font-size: 13.5px; }
  .page:has(.cap-grid) .plan-name { font-size: 20px; }
  .page:has(.cap-grid) .plan-period { font-size: 14px; }
  .page:has(.cap-grid) .plan-meta { font-size: 13px; }
  .page:has(.cap-grid) .plan-feat { font-size: 14px; }
  .page:has(.cap-grid) .compare-table { font-size: 13.5px; }
  .page:has(.cap-grid) .compare-table th { font-size: 13px; }
  .page:has(.cap-grid) .step-title { font-size: 16px; }
  .page:has(.cap-grid) .step-desc { font-size: 13.5px; }
  .page:has(.cap-grid) .foot-cta-title { font-size: 21px; }
  .page:has(.cap-grid) pre, .page:has(.cap-grid) code { font-size: 13.5px; }

  /* — recharge 頂欄餘額章 — */
  .balance-chip span { font-size: 15px; }
  .balance-chip svg { width: 15px; height: 15px; }

  /* ── portfolio 我的主頁（.balance-row 唯一標記）：900 版心 ── */
  .page:has(.balance-row) { max-width: none; padding: 0 36px 0 0; }
  .page:has(.balance-row) > .topbar { margin: 0; padding-left: 24px; padding-right: 0; }
  .page:has(.balance-row) > :not(.topbar) {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  }
  .page:has(.balance-row) .sec-title { font-size: 17px; }
  /* 女友橫滑 rail → 6 欄網格 */
  .page:has(.balance-row) .gf-scroll {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px; overflow: visible; margin: 0 auto; padding: 0 0 8px;
  }
  /* 邀請好友彈窗放大：金色按鈕原本裝不下（行內樣式故用 !important） */
  #invite-modal { max-width: 500px !important; padding: 32px !important; }

  /* 快捷入口 → 雙欄 */
  .page:has(.balance-row) .quick-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }

  /* ── edit 編輯頁（.preview 唯一靜態標記；videos-grid 是 JS 動態生成不可用作 :has） ── */
  .page:has(> .preview) {
    max-width: 1320px; margin: 0 auto; padding: 0 36px;
    display: grid; grid-template-columns: 540px minmax(0, 1fr);
    column-gap: 44px; align-items: start;
  }
  .page:has(> .preview) > .topbar { grid-column: 1 / -1; }
  /* 預覽固定左欄（sticky）；內部 130% 裁切是百分比制，隨盒等比縮放安全 */
  .page:has(> .preview) > .preview {
    grid-column: 1; grid-row: 2 / span 30;
    height: 780px;
  }
  /* edit 字級提檔（用戶 2026-08-02：字和儲存太小） */
  .page:has(> .preview) .back-btn { width: 44px; height: 38px; border-radius: 12px; }
  .page:has(> .preview) .save-btn { font-size: 15px; padding: 11px 24px; border-radius: 12px; }
  .page:has(> .preview) .tab { font-size: 15px; }
  .page:has(> .preview) .attr-label { font-size: 16px; }
  .page:has(> .preview) .attr-sub { font-size: 12.5px; }
  .page:has(> .preview) .name-input { font-size: 16px; padding: 14px 16px; }
  .page:has(> .preview) .chip { font-size: 14px; padding: 10px 16px; }
  .page:has(> .preview) .preview-name { font-size: 19px; }
  .page:has(> .preview) .preview-tag-line { font-size: 13.5px; }
  .page:has(> .preview) .preview-info { padding: 14px 18px 16px; }
  .page:has(> .preview) > :not(.topbar):not(.preview) { grid-column: 2; }
  /* CTA「開始聊天」浮到內容區右下（用戶 2026-08-02：往右、往上） */
  body:has(.page > .preview) .cta-bar {
    position: absolute; top: 779px; bottom: auto;
    left: auto; right: max(36px, calc((100vw - 1320px) / 2 + 36px));
    width: auto; padding: 0;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body:has(.page > .preview) .cta-bar .cta-btn {
    width: 420px; max-width: none; font-size: 17px; padding: 18px;
    border-radius: 16px; box-shadow: 0 12px 44px rgba(244, 61, 138, .45);
  }

  /* ── contact 聯絡（.form-card 唯一標記）：720 版心 ── */
  .page:has(.form-card) { max-width: none; padding: 0 36px 0 0; }
  .page:has(.form-card) > .topbar { margin: 0; padding-left: 24px; padding-right: 0; }
  .page:has(.form-card) > :not(.topbar) {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  }

  /* ── policy 條款（body[data-lang] 唯一標記）：760 閱讀版心 ── */
  body[data-lang] .page { max-width: none; padding: 0 36px 0 0; }
  body[data-lang] .page > .topbar { margin: 0; padding-left: 24px; padding-right: 0; }
  body[data-lang] .page > :not(.topbar) {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  }

  /* ── api 合作（.cap-grid 唯一標記）：900 版心、能力卡 3 欄 ── */
  .page:has(.cap-grid) { max-width: none; padding: 0 36px 0 0; }
  .page:has(.cap-grid) > .topbar { margin: 0; padding-left: 24px; padding-right: 0; }
  .page:has(.cap-grid) > :not(.topbar) {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  }
  .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

}

/* ── hover 專區：只給真滑鼠（觸控筆電的觸控操作不受影響） ── */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  #dnav .dnav-item:hover { background: rgba(168, 100, 255, .10); color: rgba(240, 230, 255, .95); }
  #dnav .dnav-item.active:hover { background: linear-gradient(135deg, rgba(244, 61, 138, .28), rgba(176, 106, 248, .2)); color: #fff; }
  #dnav .dnav-foot a:hover { color: #fb85c8; }
  .hero-nav-btn:hover { opacity: .85; background: rgba(244, 61, 138, .35); }
  .ui-btn.confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(244, 61, 138, .5) !important; }
  .ui-btn.cancel:hover  { border-color: rgba(244, 61, 138, .35) !important; color: rgba(240, 230, 255, .95) !important; }
  /* model.html 原本零 hover（純 :active），桌面補基本回饋 */
  .wrap .gtile { transition: transform .2s, filter .2s; }
  .wrap .gtile:hover { transform: translateY(-2px); filter: brightness(1.08); }
  .wrap .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(244, 61, 138, .45); }
  body:has(.wrap) .icon-btn:hover { background: rgba(244, 61, 138, .25); }
}
