/* ════════════════════════════════════════════════════════════════
   Fans88 · 色票切換層 (palette.css)
   ────────────────────────────────────────────────────────────────
   :root           = editorial 酒紅版（= 抽自 new_app.css 原硬碼）
   body.theme-neon = 電音霓虹版（桃紅 / 電光藍 / 霓虹紫）

   切換：
     URL  → 任意頁加 ?theme=neon 或 ?theme=editorial
     永久 → templates/layout_new/_bootstrap.php 改 THEME_VARIANT 常數

   new_app.css 使用方式：
     color/background/border 等吃 var(--primary) / var(--text)
     primary tint 半透明吃 rgba(var(--primary-rgb), .x)
     白色中性 alpha rgba(255,255,255,.x) 保留不換（兩色票通用）
   ════════════════════════════════════════════════════════════════ */

:root {
  /* 底色 / 背景 */
  --bg:           #0B0810;            /* body 主背景 */
  --bg-alt:       #13091F;            /* 次背景 */
  --surface:      rgba(12,8,24,.5);   /* 卡片底（半透） */
  --surface-dark: #0C0818;            /* 深面板 / footer */
  --surface-light:#FBFAF7;            /* 中性紙白底（input/toggle 永遠淺底，不參與切換） */

  /* 文字 */
  --text:         #F6F3FB;            /* 主文字 */
  --text-dim:     rgba(246,243,251,.62);
  --text-faint:   rgba(246,243,251,.40);
  --text-invert:  #FBFAF7;            /* 反白（按鈕內字） */

  /* 主色 / 強調 */
  --primary:      #8B2942;            /* 酒紅 */
  --primary-deep: #5C1A2C;            /* hover 加深 */
  --accent:       #B8536A;            /* 玫瑰（保留變數，目前未用） */
  --accent-soft:  #D89BAA;            /* 粉（hover link/highlight） */

  /* RGB 通道（給 rgba alpha 使用） */
  --primary-rgb:      139,41,66;
  --primary-deep-rgb: 92,26,44;
  --accent-soft-rgb:  216,155,170;
  --bg-rgb:           11,8,16;

  /* 線條 / 邊框 */
  --rule:   rgba(255,255,255,.06);
  --border: rgba(255,255,255,.10);

  /* 發光（雜誌系不發光） */
  --glow-primary: none;
  --glow-accent:  none;

  /* 語意色 */
  --success: #3F7A52;
  --error:   #B23A3A;
}

body.theme-neon {
  /* 底色 / 背景 */
  --bg:           #08060F;
  --bg-alt:       #0E0920;
  --surface:      rgba(12,8,24,.5);
  --surface-dark: #0C0818;

  /* 文字 */
  --text:         #EDE7FA;
  --text-dim:     rgba(237,231,250,.62);
  --text-faint:   rgba(237,231,250,.40);
  --text-invert:  #13000A;

  /* 主色 / 強調 */
  --primary:      #FF2E8A;            /* 桃紅 */
  --primary-deep: #FF3D9A;            /* 亮桃 */
  --accent:       #2BE6FF;            /* 電光藍 */
  --accent-soft:  #9B3FFF;            /* 霓虹紫 */

  /* RGB 通道 */
  --primary-rgb:      255,46,138;
  --primary-deep-rgb: 255,61,154;
  --accent-soft-rgb:  155,63,255;
  --bg-rgb:           8,6,15;

  /* 線條 / 邊框 */
  --rule:   rgba(155,63,255,.22);
  --border: rgba(155,63,255,.40);

  /* 發光（霓虹重點） */
  --glow-primary: 0 0 10px var(--primary), 0 0 24px rgba(var(--primary-rgb),.6);
  --glow-accent:  0 0 10px var(--accent),  0 0 24px rgba(43,230,255,.6);

  /* 語意色 */
  --success: #2BE6A0;
  --error:   #FF3D6B;
}

body.theme-electro {
  /* electronic music 色票（Adobe Color · 2026-05-31）
     5 色：#C229FF 亮紫 / #FF57FA 桃粉紫 / #703AFF 深紫藍 / #741BF2 深紫 / #60F4F8 電光藍綠
     底色沿用 neon 黑紫底 */

  /* 底色 / 背景 */
  --bg:           #08060F;
  --bg-alt:       #0E0920;
  --surface:      rgba(12,8,24,.5);
  --surface-dark: #0C0818;

  /* 文字 */
  --text:         #EDE7FA;
  --text-dim:     rgba(237,231,250,.62);
  --text-faint:   rgba(237,231,250,.40);
  --text-invert:  #13000A;

  /* 主色 / 強調 */
  --primary:      #C229FF;            /* 亮紫 */
  --primary-deep: #741BF2;            /* 深紫（hover 加深） */
  --accent:       #60F4F8;            /* 電光藍綠 */
  --accent-soft:  #FF57FA;            /* 桃粉紫（柔強調 link/highlight） */

  /* RGB 通道 */
  --primary-rgb:      194,41,255;
  --primary-deep-rgb: 116,27,242;
  --accent-soft-rgb:  255,87,250;
  --bg-rgb:           8,6,15;

  /* 線條 / 邊框 */
  --rule:   rgba(194,41,255,.22);
  --border: rgba(194,41,255,.40);

  /* 發光 */
  --glow-primary: 0 0 10px var(--primary), 0 0 24px rgba(var(--primary-rgb),.6);
  --glow-accent:  0 0 10px var(--accent),  0 0 24px rgba(96,244,248,.6);

  /* 語意色 */
  --success: #2BE6A0;
  --error:   #FF3D6B;
}

body.is-dark {
  /* 霓虹海報風 v3（03.png 「深入快熱」招牌風加強版）
     差異化重點：
       - 桃紅 #FF0055 純紅桃紅（v2 #FF1F6B → v3 #FF0055，更純更紅）
       - 鈷藍 #1FB5FF 取代 cyan（02 是 #2BE6FF 青藍）
       - 橘紅暖光 #FF6B1A 取代紫色 soft（最強差異化點，跟 02 完全不同維度）
       - 底色 #050008 純黑紫（02 是 #08060F）
       - glow 四層光暈 + 散射半徑大幅放大（模擬真實霓虹招牌強光擴散） */

  /* 底色 / 背景 */
  --bg:           #050008;
  --bg-alt:       #100018;
  --surface:      rgba(16,0,24,.6);
  --surface-dark: #030005;

  /* 文字 */
  --text:         #FFE6F0;
  --text-dim:     rgba(255,230,240,.65);
  --text-faint:   rgba(255,230,240,.40);
  --text-invert:  #1A0008;

  /* 主色 / 強調 */
  --primary:      #FF0055;            /* 純紅桃紅（v3 強化） */
  --primary-deep: #A00033;            /* 深紅桃紅 hover（跟著 primary 加深） */
  --accent:       #1FB5FF;            /* 鈷藍（招牌藍邊光） */
  --accent-soft:  #FF6B1A;            /* 橘紅暖光（差異化關鍵） */

  /* RGB 通道 */
  --primary-rgb:      255,0,85;
  --primary-deep-rgb: 160,0,51;
  --accent-soft-rgb:  255,107,26;
  --bg-rgb:           5,0,8;

  /* 卡片半透底（給 inline style 用 var(--surface-card, fallback) 切換）
     01/02/03 不定義此變數 → 走 fallback；04 poster 走深紫半透 */
  --surface-card: rgba(var(--bg-rgb), 0.65);

  /* 線條 / 邊框 */
  --rule:   rgba(255,0,85,.25);
  --border: rgba(255,0,85,.45);

  /* 發光（四層光暈：模擬霓虹招牌真實強光擴散，散射半徑大幅放大） */
  --glow-primary: 0 0 8px var(--primary), 0 0 24px rgba(var(--primary-rgb),.9), 0 0 56px rgba(var(--primary-rgb),.6), 0 0 100px rgba(var(--primary-rgb),.35);
  --glow-accent:  0 0 8px var(--accent),  0 0 24px rgba(31,181,255,.9),  0 0 56px rgba(31,181,255,.6),  0 0 100px rgba(31,181,255,.35);

  /* 語意色 */
  --success: #2BE6A0;
  --error:   #FF3D6B;
}

/* ───── 變體 05：pink — 淡粉系 light variant（非深底，沿用 theme-warm cascade） ───── */
body.theme-pink {
  --bg:           #FFF5F8;            /* 淡粉米白主底 */
  --bg-alt:       #FCE7EE;            /* 淡粉 panel */
  --text:         #3A1426;            /* 深酒紅近黑（高對比） */
  --text-faint:   rgba(58,20,38,.6);
  --text-invert:  #FFFFFF;

  --primary:      #E91E63;            /* Material 桃紅（中等飽和） */
  --primary-deep: #B11854;            /* hover 加深 */
  --accent:       #FFB088;            /* 蜜桃橘暖光 */
  --accent-soft:  #D4748A;            /* 玫瑰金 chip 中間粉 */

  --primary-rgb:      233,30,99;
  --primary-deep-rgb: 177,24,84;
  --accent-soft-rgb:  212,116,138;
  --bg-rgb:           255,245,248;
  --text-rgb:         58,20,38;

  --surface-card:  rgba(255,255,255,.88);
  --surface-light: rgba(255,245,248,.95);
  --rule:   rgba(233,30,99,.20);
  --border: rgba(233,30,99,.32);
}

/* pink (05) — 淡粉米白主底 + 雙角光暈（桃紅 + 蜜桃橘）接管 theme-warm 米白底 */
body.theme-pink,
body.theme-warm.theme-pink {
  background:
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(233,30,99,.10) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 85%, rgba(255,176,136,.14) 0%, transparent 55%),
    linear-gradient(180deg, #FFF5F8 0%, #FFEAF1 100%) !important;
  color: var(--text) !important;
}

/* poster 強制接管 theme-warm 米白底（theme_warm.css 寫死 #FFFFFF，要 !important 才能蓋）
   背景用 radial-gradient 疊三色光暈（桃紅 + 鈷藍 + 紫光）模擬 03.png 招牌底色 */
body.theme-poster,
body.theme-warm.theme-poster {
  background:
    radial-gradient(ellipse 70% 50% at 15% 15%, rgba(255,0,85,.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 25%, rgba(31,181,255,.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 90%, rgba(127,0,170,.20) 0%, transparent 55%),
    var(--bg) !important;
  color: var(--text) !important;
}

/* neon (02) — 夜店霓虹招牌：左上桃紅 + 右下紫 spotlight + 底部 pink 反射 */
body.theme-neon,
body.theme-warm.theme-neon {
  background:
    radial-gradient(ellipse 50% 65% at 20% 25%, rgba(var(--primary-rgb),.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 65% at 80% 70%, rgba(var(--accent-soft-rgb),.30) 0%, transparent 55%),
    radial-gradient(ellipse 120% 40% at 50% 105%, rgba(var(--primary-rgb),.20) 0%, transparent 60%),
    var(--bg) !important;
  color: var(--text) !important;
}

/* electro (03) — 電子音樂封面風：中央亮紫 flood + 雙底角粉紫/深紫，底色帶紫 */
body.theme-electro,
body.theme-warm.theme-electro {
  background:
    radial-gradient(ellipse 60% 70% at 50% 25%, rgba(var(--primary-rgb),.38) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 15% 85%, rgba(var(--accent-soft-rgb),.28) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(116,27,242,.25) 0%, transparent 55%),
    linear-gradient(180deg, #100828 0%, var(--bg) 60%) !important;
  color: var(--text) !important;
}

/* theme-warm 系列把 main / section / card / footer 也設成米白底，poster 模式下要透明掉讓底色露出 */
body.is-dark main,
body.is-dark .dash-wrap,
body.is-dark section,
body.is-dark .profile-card,
body.is-dark .container,
body.is-dark main,
body.is-dark .dash-wrap,
body.is-dark section,
body.is-dark .profile-card,
body.is-dark .container {
  background: transparent !important;
  color: var(--text) !important;
}

/* nav 在 theme-warm 下是米白半透，poster 模式改深色半透 */
body.is-dark nav,
body.is-dark nav {
  background: rgba(var(--bg-rgb),.85) !important;
  border-bottom: 1px solid rgba(var(--primary-rgb),.18) !important;
  backdrop-filter: blur(18px) saturate(1.4);
}
body.is-dark nav.scrolled,
body.is-dark nav.scrolled {
  background: rgba(var(--bg-rgb),.95) !important;
}

/* footer 也要 dark */
body.is-dark footer,
body.is-dark footer {
  background: var(--surface-dark) !important;
  color: rgba(255,255,255,.7) !important;
}

/* nav 內所有文字（logo/links）在 theme-warm 下硬碼墨字色，poster 深底要轉成淺字 */
body.is-dark .nav-logo,
body.is-dark .nav-logo b,
body.is-dark .nav-links a,
body.is-dark .nav-logo,
body.is-dark .nav-logo b,
body.is-dark .nav-links a {
  color: var(--text) !important;
}
body.is-dark .nav-logo em,
body.is-dark .nav-logo em {
  color: var(--primary) !important;
}
body.is-dark .nav-links a:hover,
body.is-dark .nav-links a:hover {
  color: var(--accent-soft) !important;
}

/* hamburger 按 5 theme 調色（手機版 ≤900px 才出現）
   - editorial (default, 深底)：new_app.css 白 bar 已正確，不動
   - neon/electro/poster (is-dark)：theme_warm.css 寫死的暗 bar 會在深底不可見 → 改回亮 bar
   - pink (淡粉米白底)：new_app.css 白 bar 在淡底不可見 → 改深酒紅 bar
   - editorial + theme-warm 米白頁 (login/register 等)：theme_warm.css 暗 bar 已正確 */
body.is-dark .hamburger {
  border-color: rgba(var(--primary-rgb),.28) !important;
  background: rgba(255,255,255,.04) !important;
}
body.is-dark .hamburger:hover {
  background: rgba(var(--primary-rgb),.12) !important;
  border-color: rgba(var(--primary-rgb),.5) !important;
}
body.is-dark .hamburger span { background: var(--text) !important; }
body.is-dark .hamburger.open span:nth-child(1),
body.is-dark .hamburger.open span:nth-child(3) { background: var(--primary) !important; }

body.theme-pink .hamburger {
  border-color: rgba(var(--text-rgb),.14) !important;
  background: rgba(var(--text-rgb),.04) !important;
}
body.theme-pink .hamburger:hover {
  background: rgba(var(--primary-rgb),.10) !important;
  border-color: rgba(var(--primary-rgb),.35) !important;
}
body.theme-pink .hamburger span { background: rgba(var(--text-rgb),.85) !important; }
body.theme-pink .hamburger.open span:nth-child(1),
body.theme-pink .hamburger.open span:nth-child(3) { background: var(--primary) !important; }

/* poster catch-all：所有 theme-warm 寫死的 ink 墨字色強制轉淺字
   只動 color，不動 background/border，所以對 button 形狀沒影響 */
body.is-dark *:not(em):not(.field-lb):not([class*="btn-publish"]):not([class*="btn-solid"]):not([class*="btn-hero-primary"]):not([class*="dd-logout"]):not([class*="text-white"]),
body.is-dark *:not(em):not(.field-lb):not([class*="btn-publish"]):not([class*="btn-solid"]):not([class*="btn-hero-primary"]):not([class*="dd-logout"]):not([class*="text-white"]) {
  color: var(--text);
}

/* 例外：主色字（em 強調、field label 等）保留桃紅 */
body.is-dark em,
body.is-dark .field-lb,
body.is-dark em,
body.is-dark .field-lb {
  color: var(--primary) !important;
}

/* 例外：按鈕反白字（桃紅/酒紅 gradient bg 上的白字） */
body.is-dark .btn-publish,
body.is-dark .btn-solid-sm,
body.is-dark .btn-hero-primary,
body.is-dark .btn-publish,
body.is-dark .btn-solid-sm,
body.is-dark .btn-hero-primary {
  color: #fff !important;
}

/* 例外：登出 hover 仍是警告紅 */
body.is-dark .dd-logout:hover,
body.is-dark .dd-logout:hover svg,
body.is-dark .dd-logout:hover,
body.is-dark .dd-logout:hover svg {
  color: var(--error) !important;
}

/* 弱對比 helper：灰字（rgb(120,113,108) 等）在 poster 深底下，提升為 text-dim 偏白 */
body.is-dark .text-stone-500,
body.is-dark .text-stone-600,
body.is-dark .text-gray-500,
body.is-dark .text-gray-600,
body.is-dark .crt-tab,
body.is-dark .f-company-info,
body.is-dark .text-stone-500,
body.is-dark .text-stone-600,
body.is-dark .text-gray-500,
body.is-dark .text-gray-600,
body.is-dark .crt-tab,
body.is-dark .f-company-info {
  color: var(--text-dim) !important;
}

/* poster 模式下，dropdown / panel / tab / button-ghost 等寫死米白 bg 的容器，
   bg 改成深底半透讓淺字看得到。只動 04 模式 */
body.is-dark .dd-menu,
body.is-dark .nav-lang-menu,
body.is-dark .drawer,
body.is-dark .ag-modal,
body.is-dark .crt-tab,
body.is-dark .np-tool,
body.is-dark .vw-btn,
body.is-dark .vw-btn-ghost,
body.is-dark .vw-btn-outline,
body.is-dark .field-row,
body.is-dark .profile-card,
body.is-dark .dash-card,
body.is-dark .panel,
body.is-dark .modal,
body.is-dark .dd-menu,
body.is-dark .nav-lang-menu,
body.is-dark .drawer,
body.is-dark .ag-modal,
body.is-dark .crt-tab,
body.is-dark .np-tool,
body.is-dark .vw-btn,
body.is-dark .vw-btn-ghost,
body.is-dark .vw-btn-outline,
body.is-dark .field-row,
body.is-dark .profile-card,
body.is-dark .dash-card,
body.is-dark .panel,
body.is-dark .modal {
  background-color: rgba(var(--bg-rgb), 0.7) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}

/* active state 改桃紅 alpha 高亮 */
body.is-dark .nav-lang-menu a.active,
body.is-dark .crt-tab.active,
body.is-dark .nav-lang-menu a.active,
body.is-dark .crt-tab.active {
  background-color: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--primary) !important;
}

/* poster 最終 sweep：theme_warm.css 寫死 #FFFFFF 的容器全部改深底
   (nav-dropdown / nav-lang-menu / how / form-side / post / share-modal 等) */
body.is-dark .nav-dropdown,
body.is-dark .nav-lang-menu,
body.is-dark .how,
body.is-dark .form-side,
body.is-dark .post,
body.is-dark .post-head .avatar,
body.is-dark .share-modal .dialog,
body.is-dark.search-page,
body.is-dark.legal-page {
  background-color: rgba(var(--bg-rgb), 0.92) !important;
  border-color: rgba(var(--primary-rgb), 0.2) !important;
}

/* new_app.css 內 .toggle / .field-sel / .field-num 用 --surface-light 紙白 bg，
   04 模式下要深底，但 surface-light 是「中性永不切換」設計，這裡 override 限 poster */
body.is-dark .toggle,
body.is-dark .toggle.on,
body.is-dark .field-sel,
body.is-dark .field-num,
body.is-dark .toggle,
body.is-dark .toggle.on,
body.is-dark .field-sel,
body.is-dark .field-num {
  background: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text) !important;
}

/* toggle 內子文字（.tt 標題 / .ss 副標）強制淺字 */
body.is-dark .toggle .tt,
body.is-dark .toggle .ss,
body.is-dark .toggle .tt,
body.is-dark .toggle .ss {
  color: var(--text) !important;
}
body.is-dark .toggle .ss,
body.is-dark .toggle .ss {
  color: var(--text-dim) !important;
}

/* dd-logout default 也要淺字（hover 才變紅）— 修上一輪 catch-all exception 把它排除掉的 bug */
body.is-dark .dd-logout,
body.is-dark .drawer-item.dd-logout,
body.is-dark .dd-logout,
body.is-dark .drawer-item.dd-logout {
  color: var(--text-faint) !important;
}

/* ptab (view.php 下方動態 filter tab — 全部/方案/訂閱/單篇/免費/排程/下架)
   HTML 用 .ptab.on（非 .active），view_self.css:370 寫死 background:#1A1815 黑塊
   dark theme (02/03/04) 整片變黑塊脫離主色；pink (05) 也撞淡粉底
   → 用主色 alpha 蓋；toolbar 容器 .vw-post-tools / search input 一起 sweep */
body.is-dark .vw-post-tools {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}
body.is-dark .ptab {
  color: var(--text-faint) !important;
  background: transparent !important;
}
body.is-dark .ptab:hover {
  color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.10) !important;
}
body.is-dark .ptab.on {
  background: rgba(var(--primary-rgb), 0.22) !important;
  color: var(--accent-soft) !important;
}
body.is-dark .vw-search-row input {
  background: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text) !important;
}

/* pink (05) — light variant 也要避開 #1A1815 黑塊，用桃紅漸層 */
body.theme-pink .vw-post-tools {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
}
body.theme-pink .ptab:hover {
  color: var(--primary-deep) !important;
  background: rgba(var(--primary-rgb), 0.08) !important;
}
body.theme-pink .ptab.on {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)) !important;
  color: #FFFFFF !important;
}
body.theme-pink .vw-search-row input {
  background: rgba(255,245,248,.95) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
}

/* poster 各頁特有 panel sweep（myincome / not-found / feed eyebrow / tab active / Tailwind text-[#1A1815]） */

/* myincome 收益卡片：.inc-card 容器 + .inc-stat-card 4 卡 + 內 label/value 文字 */
body.is-dark .inc-card,
body.is-dark .inc-stat-card,
body.is-dark .inc-table-wrap,
body.is-dark .inc-card,
body.is-dark .inc-stat-card,
body.is-dark .inc-table-wrap {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}
body.is-dark .inc-stat-label,
body.is-dark .inc-stat-value,
body.is-dark .inc-stat-label,
body.is-dark .inc-stat-value {
  color: var(--text) !important;
}

/* not-found overlay 卡（donation / 各 fallback 404 panel） */
body.is-dark .nf-card,
body.is-dark .nf-card {
  background-color: rgba(var(--bg-rgb), 0.88) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
}
body.is-dark .nf-title,
body.is-dark .nf-sub,
body.is-dark .nf-title,
body.is-dark .nf-sub {
  color: var(--text) !important;
}

/* eyebrow 標題裝飾色（feed/section/profile）原本是 primary-deep，深底對比偏低 → 換 primary 桃紅 */
body.is-dark .eyebrow,
body.is-dark .feed-head .eyebrow,
body.is-dark .section-eyebrow,
body.is-dark .section-h .eyebrow,
body.is-dark .eyebrow,
body.is-dark .feed-head .eyebrow,
body.is-dark .section-eyebrow,
body.is-dark .section-h .eyebrow {
  color: var(--primary) !important;
}

/* tab-item.active 在 theme-warm 寫死 #1A1815 墨字（tabs-underline 系列）— poster 改淺字
   active vs inactive 要有對比 + 加靜態 underline（不依賴 initTabs JS 的 .tabs-indicator） */
body.is-dark .tabs-underline .tab-item,
body.is-dark .tabs-underline .tab-item {
  color: rgba(255,255,255,.45) !important;
}
body.is-dark .tabs-underline .tab-item.active,
body.is-dark .tabs-underline .tab-item.active {
  color: var(--text) !important;
  font-weight: 700 !important;
  box-shadow: inset 0 -2px 0 0 var(--primary) !important;
}

/* Tailwind 任意值 text-[#1A1815] 寫死墨字 — 用 attribute selector 抓 substring */
body.is-dark [class*="text-[#1A1815]"],
body.is-dark [class*="text-[#1A1815]"] {
  color: var(--text) !important;
}

/* .lbl 通用標籤（追蹤者數字 label 等）— theme-warm 寫死墨字 */
body.is-dark .lbl,
body.is-dark .lbl {
  color: var(--text-dim) !important;
}

/* .tab 通用 tab（方案/區塊 tab）— theme-warm 寫死墨字 */
body.is-dark .tab,
body.is-dark .tab {
  color: var(--text) !important;
}

/* 最後 4 處：creator_profile hero-body / tabs-pill / myincome filter-toggle / Tailwind text-[#1A1815] */

/* creator_profile hero-body 米白容器 */
body.is-dark .hero-body,
body.is-dark .hero-body {
  background-color: transparent !important;
}

/* tabs-pill 容器米白 */
body.is-dark .tabs-pill,
body.is-dark .tabs-pill {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}

/* myincome filter toggle 按鈕米白 */
body.is-dark .inc-filter-toggle-btn,
body.is-dark .inc-filter-toggle-btn {
  background-color: rgba(var(--bg-rgb), 0.6) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}

/* Tailwind 任意值 .text-[#1A1815]（escape special 字元，attribute selector 因 ] 提早結束沒生效，改 CSS class selector） */
body.is-dark .text-\[\#1A1815\],
body.is-dark .text-\[\#1A1815\] {
  color: var(--text) !important;
}

/* Tailwind .bg-white / .bg-stone-50 / .bg-gray-50 panel bg → 04 模式改深底半透
   （post_detail / search 等頁面用 Tailwind class 寫死米白 card bg） */
body.is-dark .bg-white,
body.is-dark .bg-stone-50,
body.is-dark .bg-gray-50,
body.is-dark .bg-white,
body.is-dark .bg-stone-50,
body.is-dark .bg-gray-50 {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
}

/* view.php 編輯區 share buttons (vw-url-btn 寫死 #fff 米白 + 灰字 → 看似 disabled)
   poster 模式改桃紅 outline + 桃紅文字，明確「可點」感 */
body.is-dark .vw-url-btn,
body.is-dark .vw-url-btn {
  background-color: rgba(var(--primary-rgb), 0.12) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
  color: var(--primary) !important;
}
body.is-dark .vw-url-btn:hover,
body.is-dark .vw-url-btn:hover {
  background-color: rgba(var(--primary-rgb), 0.28) !important;
  color: var(--text) !important;
}

/* view.php IG / 社群帳號區塊 (vw-social 寫死 #FBFAF7 紙白) → 深底 + .platform 灰字升 text-dim */
body.is-dark .vw-social,
body.is-dark .vw-social {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text) !important;
}
body.is-dark .vw-social .platform,
body.is-dark .vw-social .platform {
  color: var(--text-dim) !important;
}

/* view_category 探索卡片 (.grid-card 寫死 #FFFFFF) → 深底，內文字 catch-all 已轉淺字 */
body.is-dark .grid-card,
body.is-dark .grid-card {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}
body.is-dark .grid-card:hover,
body.is-dark .grid-card:hover {
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}

/* 灰色 ghost / outline 按鈕統一改桃紅 outline（避免 user 誤以為 disabled）
   涵蓋 .vw-btn-ghost / .vw-btn-outline / .btn-ghost / .btn-outline 等 */
body.is-dark .vw-btn-ghost,
body.is-dark .vw-btn-outline,
body.is-dark .btn-ghost,
body.is-dark .vw-btn-ghost,
body.is-dark .vw-btn-outline,
body.is-dark .btn-ghost {
  color: var(--primary) !important;
  border-color: rgba(var(--primary-rgb), 0.45) !important;
  background-color: rgba(var(--primary-rgb), 0.08) !important;
}
body.is-dark .vw-btn-ghost:hover,
body.is-dark .vw-btn-outline:hover,
body.is-dark .btn-ghost:hover,
body.is-dark .vw-btn-ghost:hover,
body.is-dark .vw-btn-outline:hover,
body.is-dark .btn-ghost:hover {
  background-color: rgba(var(--primary-rgb), 0.22) !important;
  color: var(--text) !important;
}

/* disabled state 保留灰色（這才是真正不可點） */
body.is-dark [disabled],
body.is-dark button:disabled,
body.is-dark [disabled],
body.is-dark button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   全站 04 sweep（剩餘 76 處 panel/form/button selector 集中 override）
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* (1) 各頁專有 panel/card 寫死米白 bg → 深底半透
   register_pre_creator (.rpc-card) / password_change (.pw-card) / invoicesetting (.inv-card)
   payment_result (.r-card) / offline (.stall-card) / myticket (.tk-card) 等 */
body.is-dark .rpc-card,
body.is-dark .pw-card,
body.is-dark .inv-card,
body.is-dark .tk-card,
body.is-dark .r-card,
body.is-dark .stall-card,
body.is-dark .form-card,
body.is-dark .form-side,
body.is-dark .kyc-disclosure,
body.is-dark table,
body.is-dark .privacy-table,
body.is-dark .rpc-card,
body.is-dark .pw-card,
body.is-dark .inv-card,
body.is-dark .tk-card,
body.is-dark .r-card,
body.is-dark .stall-card,
body.is-dark .form-card,
body.is-dark .form-side,
body.is-dark .kyc-disclosure,
body.is-dark table,
body.is-dark .privacy-table {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}

/* (2) form 內小元素文字 → 淺字
   .hint .ico .pw-eye .rpc-section-title 等寫死 ink */
body.is-dark .hint,
body.is-dark .ico,
body.is-dark .pw-eye,
body.is-dark .rpc-section-title,
body.is-dark .rpc-section-subtitle,
body.is-dark .rpc-fieldset-title,
body.is-dark .inv-label,
body.is-dark .stall-id-label,
body.is-dark .stall-id-value,
body.is-dark .r-kicker,
body.is-dark .r-sub,
body.is-dark .tk-empty-text,
body.is-dark .tk-empty-hint,
body.is-dark .hint,
body.is-dark .ico,
body.is-dark .pw-eye,
body.is-dark .rpc-section-title,
body.is-dark .rpc-section-subtitle,
body.is-dark .rpc-fieldset-title,
body.is-dark .inv-label,
body.is-dark .stall-id-label,
body.is-dark .stall-id-value,
body.is-dark .r-kicker,
body.is-dark .r-sub,
body.is-dark .tk-empty-text,
body.is-dark .tk-empty-hint {
  color: var(--text) !important;
}

/* (3) table th/td 統一淺字（privacy cookie 表格） */
body.is-dark table th,
body.is-dark table td,
body.is-dark table th,
body.is-dark table td {
  color: var(--text) !important;
  background-color: transparent !important;
}

/* (4) .btn-hero-secondary（index hero secondary CTA）→ 桃紅 outline */
body.is-dark .btn-hero-secondary {
  background-color: rgba(var(--primary-rgb), 0.12) !important;
  color: var(--primary) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}
body.is-dark .btn-hero-secondary:hover {
  background-color: rgba(var(--primary-rgb), 0.28) !important;
  color: var(--text) !important;
}

/* .btn-gold 是「私訊」primary action — 不能用 outline 樣式；改實底桃紅漸層 + 白字 + glow */
body.is-dark .btn-gold {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--primary) 50%, var(--primary-deep) 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px -6px rgba(var(--primary-rgb), 0.55) !important;
}
body.is-dark .btn-gold:hover {
  filter: brightness(1.08) !important;
}

/* (5) HOT badge bg 太淺 → 改朱紅 (accent-soft) 高對比 */
body.is-dark .gal-badge.gal-hot,
body.is-dark .mc-badge.mb-hot,
body.is-dark .gal-badge.gal-hot,
body.is-dark .mc-badge.mb-hot {
  background-color: var(--primary) !important;
  color: #fff !important;
}

/* (6) profile.php Tailwind text-[#44403C] (.桌面通知 stone-700 灰) */
body.is-dark .text-\[\#44403C\],
body.is-dark .text-\[\#44403C\] {
  color: var(--text) !important;
}

/* (7) 補各頁專有 panel 父層 — payment_result 的 .card / register_pre_creator 的 .rpc-wrap form input 框 */
body.is-dark .card,
body.is-dark .rpc-wrap,
body.is-dark .card,
body.is-dark .rpc-wrap {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}
body.is-dark .rpc-wrap:focus-within,
body.is-dark .rpc-wrap:focus-within {
  border-color: var(--primary) !important;
  background-color: rgba(var(--bg-rgb), 0.7) !important;
}

/* (8) 最後尾端 panel：
   .rpc-upload-preview (身分證上傳框) / .pw-wrap (密碼欄位 wrap) / .kyc-disclosure (警示框) */
body.is-dark .rpc-upload-preview,
body.is-dark .pw-wrap,
body.is-dark .rpc-upload-preview,
body.is-dark .pw-wrap {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}

/* kyc-disclosure 警示框（米黃底咖啡字 #FFF7ED + #7A3E11）→ 改橘暖光 tint 警示
   文字用 #FFB077 亮橘（var(--accent-soft) #FF6B1A 在深底 ratio 2.85 偏弱，亮橘 ratio ~7+） */
body.is-dark .kyc-disclosure,
body.is-dark .kyc-disclosure {
  background-color: rgba(var(--accent-soft-rgb), 0.15) !important;
  border-color: rgba(var(--accent-soft-rgb), 0.55) !important;
  color: #FFB077 !important;
  --kyc-warn-color: #FFB077;
}

/* (9) 最後 sub-stat-card (subctrl) / tk-empty (myticket) / stall-id-chip (offline) */
body.is-dark .sub-stat-card,
body.is-dark .tk-empty,
body.is-dark .stall-id-chip,
body.is-dark .sub-stat-card,
body.is-dark .tk-empty,
body.is-dark .stall-id-chip {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}

/* (10) privacy legal-page td bg — theme_warm.css 的 body.theme-warm.legal-page td 特異度高，
   用同樣 selector 套桃紅深底（specificity 0,3,1） */
body.is-dark.legal-page table th,
body.is-dark.legal-page table td {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb), 0.18) !important;
}

/* (11) view.php 編輯區 panel（.np-form / .np-textarea / .vw-post-tools 寫死 #FFF / 紙白）
   → 04 模式改深紫半透，textarea/input 也跟著走 */
body.is-dark .np-form,
body.is-dark .vw-post-tools,
body.is-dark .np-form,
body.is-dark .vw-post-tools {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}
body.is-dark .np-textarea,
body.is-dark .np-form input[type=text],
body.is-dark .np-form input[type=number],
body.is-dark .np-textarea,
body.is-dark .np-form input[type=text],
body.is-dark .np-form input[type=number] {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text) !important;
}
body.is-dark .np-textarea::placeholder,
body.is-dark .np-textarea::placeholder {
  color: var(--text-faint) !important;
}

/* (12) my_orders 篩選列 / 搜尋輸入 / 下拉 filter（mo-pill / mo-select / mo-input 用 ink 微透,
   在深底上偏淡） → 改桃紅 alpha tint */
body.is-dark .mo-pill,
body.is-dark .mo-pill.status-pill,
body.is-dark .mo-select,
body.is-dark .mo-input,
body.is-dark .mo-loading,
body.is-dark .mo-pill,
body.is-dark .mo-pill.status-pill,
body.is-dark .mo-select,
body.is-dark .mo-input,
body.is-dark .mo-loading {
  background-color: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  color: var(--text) !important;
}
body.is-dark .mo-pill.is-active,
body.is-dark .mo-pill.is-active {
  background-color: rgba(var(--primary-rgb), 0.22) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* (13) 通用 ink 微透 button/input/select (rgba(26,24,21,.03~.08))
   theme-warm 寫死，在 poster 深底上偏淡 → 改桃紅 alpha tint */
body.is-dark .nav-icon-btn,
body.is-dark .nav-avatar,
body.is-dark .nav-icon-btn,
body.is-dark .nav-avatar {
  background-color: rgba(var(--primary-rgb), 0.06) !important;
  border-color: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--text) !important;
}

/* (14) user 實際看到的漏網 panel/卡片（screenshot audit 抓到）：
   subctrl 訂閱卡片 .sub-row（白底 95%）+ view.php .crt-tabs 標籤列 + .plan-edit 方案編輯區
   + .pe-input 方案輸入框 + .grid-card-cover 卡片圖片 placeholder */
body.is-dark .sub-row,
body.is-dark .crt-tabs,
body.is-dark .plan-edit,
body.is-dark .pe-input,
body.is-dark .grid-card-cover,
body.is-dark .sub-row,
body.is-dark .crt-tabs,
body.is-dark .plan-edit,
body.is-dark .pe-input,
body.is-dark .grid-card-cover {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.2) !important;
  color: var(--text) !important;
}

/* sub-row 內部結構（金額/日期/按鈕）強制淺字 */
body.is-dark .sub-row *,
body.is-dark .sub-row * {
  color: var(--text) !important;
}
body.is-dark .sub-row [class*=btn],
body.is-dark .sub-row button,
body.is-dark .sub-row [class*=btn],
body.is-dark .sub-row button {
  color: var(--primary) !important;
  background-color: rgba(var(--primary-rgb), 0.12) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}

/* 通用 form 元素（textarea / input / select）在 04 模式統一深底淺字 */
body.is-dark textarea,
body.is-dark input[type=text],
body.is-dark input[type=email],
body.is-dark input[type=number],
body.is-dark input[type=search],
body.is-dark input[type=tel],
body.is-dark input[type=url],
body.is-dark input[type=password],
body.is-dark select,
body.is-dark textarea,
body.is-dark input[type=text],
body.is-dark input[type=email],
body.is-dark input[type=number],
body.is-dark input[type=search],
body.is-dark input[type=tel],
body.is-dark input[type=url],
body.is-dark input[type=password],
body.is-dark select {
  background-color: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text) !important;
}
body.is-dark textarea::placeholder,
body.is-dark input::placeholder,
body.is-dark textarea::placeholder,
body.is-dark input::placeholder {
  color: var(--text-faint) !important;
}

/* (15) 通用 -webkit-text-fill-color 統一跟著 color 走（修 theme_warm.css L909 .follower-title
   等寫死 -webkit-text-fill-color: #1A1815 比 color 優先級高的問題 — color 已被 catch-all
   override 為 var(--text) 但 fill-color 還是墨字 → 把 fill 強制 currentColor 讓它跟著 color
   注意：theme_warm.css 載入順序在 palette.css 之後，同 specificity 輸 → 加 !important） */
body.is-dark *,
body.is-dark * {
  -webkit-text-fill-color: currentColor !important;
}

/* (16) creator_invite 「我推薦的人」.ref-list-card panel (theme_warm.css 寫死白半透) */
body.is-dark .ref-list-card,
body.is-dark .ref-list-card {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}

/* (17) inbox 訊息卡片 .ibx-row 純白底 */
body.is-dark .ibx-row,
body.is-dark .ibx-row {
  background-color: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
}
body.is-dark .ibx-row:hover,
body.is-dark .ibx-row:hover {
  background-color: rgba(var(--bg-rgb), 0.7) !important;
  border-color: rgba(var(--primary-rgb), 0.4) !important;
}

/* (18) myincome 銀行欄位 label disabled 狀態 (.inc-label.pointer-locked 墨字) */
body.is-dark .inc-label,
body.is-dark .inc-label.pointer-locked,
body.is-dark .inc-label,
body.is-dark .inc-label.pointer-locked {
  color: var(--text) !important;
}

/* (19) native <option> 在 04 模式：用 color-scheme: dark 讓 native dropdown 跟 OS dark
   （CSS 對 option bg 限制多，最廣相容的就是 color-scheme）*/
body.is-dark select,
body.is-dark select {
  color-scheme: dark;
}
body.is-dark option,
body.is-dark option {
  background-color: var(--bg-alt) !important;
  color: var(--text) !important;
}

/* (20) 表格 td 內容（購買人/品項 等）字體加 font-weight 提升視覺辨識 */
body.is-dark .inc-table td,
body.is-dark .mo-table td,
body.is-dark .inc-table td,
body.is-dark .mo-table td {
  color: var(--text) !important;
  font-weight: 500;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   body.is-dark 通用 sweep（neon / electro / poster 共用）
   — 未來新增 dark variant 不用再重複寫一輪 selector sweep
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* (21) chatroom 訊息室（白底元素全 sweep） */
body.is-dark .cr-header,
body.is-dark .cr-input-inner,
body.is-dark .cr-msg-input,
body.is-dark .cr-input {
  background-color: rgba(var(--bg-rgb), 0.6) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
  color: var(--text) !important;
}
body.is-dark .cr-msg-input::placeholder {
  color: var(--text-faint) !important;
}

/* (22) creatorrule / legal hero 區塊（米白半透 + 內文字隱形） */
body.is-dark .legal-hero,
body.is-dark.legal-page .legal-hero {
  background: rgba(var(--bg-rgb), 0.6) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}
body.is-dark .legal-hero .legal-title,
body.is-dark .legal-hero .legal-intro,
body.is-dark.legal-page .legal-hero .legal-title,
body.is-dark.legal-page .legal-hero .legal-intro {
  color: var(--text) !important;
}

/* (23) my_orders 「選取」狀態 mo-pill.is-active 桃紅 on 桃紅 alpha 對比偏低
   → 改實底桃紅 + 白字 */
body.is-dark .mo-pill.is-active,
body.is-dark .mo-pill.status-pill.is-active {
  background-color: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* (24) age-gate 成人同意彈窗 — is-dark 還原 new_app.css 原本的深底配色
   theme_warm.css 把 .age-gate-card 改成白底奶油色，poster/is-dark 下要切回深底
   (2026-06-03 修：原本寫成 .ag-card/.ag-modal/.ag-overlay 是不存在的 ghost class，沒生效) */
body.is-dark .age-gate-bg {
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(var(--primary-rgb),.6) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 75% 75%, rgba(var(--accent-soft-rgb),.32) 0%, transparent 60%),
    rgba(6, 4, 10, .88) !important;
}
body.is-dark .age-gate-card {
  background: linear-gradient(165deg, #2A1219 0%, #14070C 100%) !important;
  border: 1px solid rgba(var(--primary-rgb), .4) !important;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(var(--primary-rgb),.12) !important;
}
body.is-dark .ag-eyebrow {
  background: rgba(var(--primary-rgb),.18) !important;
  border: 1px solid rgba(var(--primary-rgb),.5) !important;
  color: var(--accent-soft) !important;
}
body.is-dark .ag-logo,
body.is-dark .ag-title { color: #fff !important; }
body.is-dark .ag-logo em,
body.is-dark .ag-title em { color: var(--primary) !important; }
body.is-dark .ag-desc { color: rgba(255,255,255,.7) !important; }
body.is-dark .ag-rules {
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
}
body.is-dark .ag-rules li { color: rgba(255,255,255,.78) !important; }
body.is-dark .ag-rules li svg { color: var(--primary) !important; }
body.is-dark .ag-foot { color: rgba(255,255,255,.45) !important; }
body.is-dark .ag-foot a { color: var(--primary) !important; }
body.is-dark .ag-foot a:hover { color: var(--accent-soft) !important; }
/* (24b) ageUnderBlock eyebrow 例外 — inline style 是警告紅 #B12615，會被 (24) 蓋成橘色 accent-soft，
   這個 modal 是「未滿 18 阻擋」，eyebrow 必須維持紅色語意 → 提亮到 #FF4A3A 改善 dark bg 對比 */
body.is-dark #ageUnderBlock .ag-eyebrow {
  color: #FF4A3A !important;
  background: rgba(255, 74, 58, .12) !important;
  border-color: rgba(255, 74, 58, .4) !important;
}

/* (24c) dashboard / component modals — base CSS 在 inline <style> 寫死白底但沒接 theme 系統
   dark 主題下白底深字不可讀 → 補 6 個 modal 的 is-dark override（2026-06-03 修）
   涵蓋：report-modal / sub-modal / mo-modal / ibx-modal / cc-modal / inc-modal
   準則：card 用 rgba(--bg-rgb, .9) + primary 半透 border；text 走 white alpha；
        primary gradient / warning 紅按鈕保留原樣（本身已是高對比） */

/* (1) report-modal — 任何頁面點檢舉 */
body.is-dark .report-modal-panel {
  background: rgba(var(--bg-rgb), .9) !important;
  border: 1px solid rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .report-modal-title { color: var(--text) !important; }
body.is-dark .report-modal-sub { color: rgba(255,255,255,.55) !important; }
body.is-dark .report-label { color: rgba(255,255,255,.7) !important; }
body.is-dark .report-reason-row {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .22) !important;
  color: var(--text) !important;
}
body.is-dark .report-reason-row:hover { background: rgba(255,255,255,.07) !important; }
body.is-dark .report-textarea {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .22) !important;
  color: var(--text) !important;
}
body.is-dark .report-textarea:focus { background: rgba(255,255,255,.07) !important; }
body.is-dark .report-btn-cancel {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
  color: rgba(255,255,255,.7) !important;
}
body.is-dark .report-btn-cancel:hover {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(var(--primary-rgb), .5) !important;
}

/* (2) sub-modal — 訂閱管理 → 取消訂閱確認 */
body.is-dark .sub-modal-box {
  background: rgba(var(--bg-rgb), .9) !important;
  border-color: rgba(var(--primary-rgb), .35) !important;
}
body.is-dark .sub-modal-text { color: var(--text) !important; }
body.is-dark .sub-modal-btn-back:hover { color: var(--text) !important; }

/* (3) mo-modal — 我的訂單 → 訂單明細 */
body.is-dark .mo-modal {
  background: rgba(var(--bg-rgb), .9) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .mo-modal-label,
body.is-dark .mo-modal-value.is-mono,
body.is-dark .iv-status-hint { color: rgba(255,255,255,.55) !important; }
body.is-dark .mo-modal-value { color: var(--text) !important; }
body.is-dark .mo-modal-close-btn {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .mo-modal-close-btn:hover {
  background: rgba(var(--primary-rgb), .14) !important;
  color: var(--text) !important;
}

/* (4) ibx-modal — 收件夾彈窗（新私訊 / 廣播） */
body.is-dark .ibx-modal-card {
  background: rgba(var(--bg-rgb), .9) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .ibx-modal-title { color: var(--text) !important; }
body.is-dark .ibx-radios {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .22) !important;
}
body.is-dark .ibx-radios label { color: rgba(255,255,255,.6) !important; }
body.is-dark .ibx-textarea {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(var(--primary-rgb), .22) !important;
  color: var(--text) !important;
}
body.is-dark .ibx-textarea::placeholder { color: rgba(255,255,255,.4) !important; }
body.is-dark .ibx-count { color: rgba(255,255,255,.4) !important; }
body.is-dark .ibx-btn-cancel {
  border-color: rgba(255,255,255,.3) !important;
  color: rgba(255,255,255,.65) !important;
}
body.is-dark .ibx-btn-cancel:hover {
  background: rgba(255,255,255,.08) !important;
  color: var(--text) !important;
}

/* (5) cc-modal — 共同創作者邀請 */
body.is-dark .cc-modal-card {
  background: rgba(var(--bg-rgb), .9) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .cc-modal-close { color: rgba(255,255,255,.6) !important; }
body.is-dark .cc-modal-title { color: var(--text) !important; }
body.is-dark .cc-form-label { color: rgba(255,255,255,.55) !important; }
body.is-dark .cc-form-value { color: var(--text) !important; }
body.is-dark .cc-radio-row label { color: var(--text) !important; }
body.is-dark .cc-confirm-btn:disabled {
  background: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.35) !important;
}

/* (6) inc-modal — 我的收入 → 訂單明細 / 共作明細 */
body.is-dark .inc-modal-box {
  background: rgba(var(--bg-rgb), .9) !important;
  border-color: rgba(var(--primary-rgb), .3) !important;
}
body.is-dark .inc-modal-close:hover { color: var(--text) !important; }
body.is-dark .inc-modal-row label { color: rgba(255,255,255,.55) !important; }
body.is-dark .inc-modal-row .val { color: var(--text) !important; }
body.is-dark .inc-modal-row .val a:hover { color: var(--text) !important; }
body.is-dark .inc-modal-footer-btn {
  color: rgba(255,255,255,.55) !important;
  border-color: rgba(var(--primary-rgb), .35) !important;
}
body.is-dark .inc-modal-footer-btn:hover { color: var(--text) !important; }

/* (25) subctrl 訂閱卡片小標籤 .sub-badge-on / .sub-badge-off 與 .sub-expire 等補強 */
body.is-dark .sub-row .sub-name,
body.is-dark .sub-row .sub-amount,
body.is-dark .sub-row .sub-next-charge {
  color: var(--text) !important;
  font-weight: 500;
}
body.is-dark .sub-row .sub-expire,
body.is-dark .sub-row .sub-period {
  color: var(--text-dim) !important;
}

/* (26) myincome 表格購買人 td 加深字 + 桃紅 hover */
body.is-dark .inc-table .td-buyer,
body.is-dark .inc-table .td-center {
  color: var(--text) !important;
  font-weight: 500;
}

/* (27a) is-dark 下 override --surface-light 變數本身（最徹底解）：
   原本 surface-light 是「中性紙白 form 底」(#FBFAF7) 永不切換，
   但 dark variant 下要深底 → 任何用 var(--surface-light) 或 Tailwind 任意值
   bg-[var(--surface-light)] 的元素都自動跟著切深底，不用再列 selector */
body.is-dark {
  --surface-light: rgba(var(--bg-rgb), 0.55);
}

/* (27) 通用 dark 安全網：所有 body.is-dark 下任何寫死 #FFFFFF / #FFF 純白 bg 的元素
   降到深底半透（最後保險）— 用 specificity 0,2,0 蓋過 theme_warm.css 0,1,1 */
body.is-dark [style*="background:#FFFFFF"],
body.is-dark [style*="background: #FFFFFF"],
body.is-dark [style*="background:#fff"],
body.is-dark [style*="background: #fff"],
body.is-dark [style*="background:#FBFAF7"],
body.is-dark [style*="background: #FBFAF7"],
body.is-dark [style*="background:#FAFAF9"],
body.is-dark [style*="background: #FAFAF9"] {
  background-color: rgba(var(--bg-rgb), 0.6) !important;
}

/* (27b) 通用 inline style color: #墨色 attribute selector override
   — 修 profile.php #pushStatusText 等 inline style="color:#1A1815" 寫死 */
body.is-dark [style*="color:#1A1815"],
body.is-dark [style*="color: #1A1815"],
body.is-dark [style*="color:#0B0810"],
body.is-dark [style*="color: #0B0810"] {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

/* (28) Tailwind 任意值 .bg-stone-50 / .bg-stone-100 / .bg-neutral-50 等淺底 utility class */
body.is-dark .bg-stone-50,
body.is-dark .bg-stone-100,
body.is-dark .bg-neutral-50,
body.is-dark .bg-neutral-100,
body.is-dark .bg-zinc-50,
body.is-dark .bg-zinc-100 {
  background-color: rgba(var(--bg-rgb), 0.6) !important;
}

/* (29) Tailwind 任意值 text-[#XX] 通用 escape — 用具體幾種已知 hex（profile.php 桌面通知用 text-[#xxxxxx]）*/
body.is-dark .text-\[\#1A1815\],
body.is-dark .text-\[\#44403C\],
body.is-dark .text-\[\#78716C\],
body.is-dark .text-\[\#57534E\] {
  color: var(--text) !important;
}

/* (30) profile.php / 通用 表單 wrap 寫 Tailwind class 內含 #FBFAF7 fallback：
   抓 inline style 內任何 #FBFAF7 + 大尺寸 panel — 用 .relative.w-full / .mb-6 等通用 wrap 直接抓 bg */
body.is-dark .rounded-\[10px\][class*="border"],
body.is-dark .rounded-2xl[class*="border"],
body.is-dark .rounded-xl[class*="border"] {
  background-color: rgba(var(--bg-rgb), 0.55);
}

/* (31) 全站 avatar placeholder / fallback 統一桃紅 alpha gradient — dark variant 下
   避免「白圓圈 + 墨字 icon」突兀，改成跟整體 04 一致的桃紅圓圈。
   涵蓋 subctrl/inbox/chatroom/dashboard nav-dropdown/explore grid card / search / follower 各頁 selector
   ── 31.1 父層圓圈容器（有 width/height/border-radius） ───── */
body.is-dark .sub-avatar-ph,
body.is-dark .ibx-avatar,
body.is-dark .cr-avatar,
body.is-dark .dd-ava,
body.is-dark .du-ava,
body.is-dark .grid-card-avatar,
body.is-dark .sc-avatar,
body.is-dark .fr-avatar,
body.is-dark .ref-avatar,
body.is-dark [class*="avatar-ph"] {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.08)) !important;
  border-color: rgba(var(--primary-rgb), 0.45) !important;
  color: var(--text) !important;
}

/* ── 31.2 inner fallback span（只給字色，不給 bg；避免在圓內畫出小方塊 inline bg） ───── */
body.is-dark .sub-avatar-ph svg,
body.is-dark .ibx-avatar span,
body.is-dark .cr-avatar span,
body.is-dark .grid-card-avatar span,
body.is-dark .grid-card-avatar-fallback,
body.is-dark .dd-ava span,
body.is-dark .du-ava span,
body.is-dark .sc-avatar span,
body.is-dark .fr-avatar span,
body.is-dark .ref-avatar span,
body.is-dark [class*="avatar-fallback"] {
  color: var(--text) !important;
  fill: currentColor;
  background: transparent !important;
  border: none !important;
}

/* (32) 全站 filter-bar / dropdown panel + 內部 input 全 sweep
   — myincome 「篩選 ▼」展開的 panel + 全站類似命名的 filter wrap */
body.is-dark .inc-filter-bar,
body.is-dark .mo-filter-bar,
body.is-dark [class*="filter-bar"],
body.is-dark [class*="filter-panel"],
body.is-dark [class*="filter-dropdown"],
body.is-dark [class*="filter-sheet"],
body.is-dark [class*="filter-wrap"] {
  background-color: rgba(var(--bg-rgb), 0.75) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
  box-shadow: 0 12px 28px -16px rgba(0,0,0,.5) !important;
}

/* filter-bar 內部 input/select 桃紅 alpha + 淺字 + datepicker color-scheme dark */
body.is-dark .inc-filter-field select,
body.is-dark .inc-filter-field input,
body.is-dark [class*="filter-bar"] select,
body.is-dark [class*="filter-bar"] input,
body.is-dark [class*="filter-panel"] select,
body.is-dark [class*="filter-panel"] input {
  background-color: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  color: var(--text) !important;
  color-scheme: dark;
}
body.is-dark .inc-filter-field input::placeholder,
body.is-dark [class*="filter-bar"] input::placeholder,
body.is-dark [class*="filter-panel"] input::placeholder {
  color: var(--text-faint) !important;
}

/* (33) 全站 datepicker / date input — color-scheme dark 讓 native picker icon 變淺色 */
body.is-dark input[type="date"],
body.is-dark input[type="datetime-local"],
body.is-dark input[type="time"],
body.is-dark input[type="month"],
body.is-dark input[type="week"] {
  color-scheme: dark;
  background-color: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  color: var(--text) !important;
}

/* (34) creator_profile.php (body.creator-profile-v3) dark sweep
   — hero cover 預設白漸層、.btn-glass 白底贊助鈕、.plan-empty 白條紋空狀態 */
body.is-dark.creator-profile-v3 .hero {
  background:
    radial-gradient(60% 80% at 15% 20%, rgba(var(--primary-rgb),.22) 0%, transparent 55%),
    radial-gradient(70% 90% at 85% 80%, rgba(var(--accent-soft-rgb),.20) 0%, transparent 60%),
    linear-gradient(135deg, rgba(var(--bg-rgb),.85) 0%, rgba(var(--bg-rgb),.92) 50%, rgba(var(--bg-rgb),.85) 100%) !important;
}
body.is-dark .btn-glass {
  background: rgba(255,255,255,.06) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb),.32) !important;
}
body.is-dark .btn-glass:hover {
  background: rgba(var(--primary-rgb),.18) !important;
}
body.is-dark .plan-empty {
  background:
    repeating-linear-gradient(135deg, rgba(var(--primary-rgb),.10) 0 8px, transparent 8px 16px),
    rgba(var(--bg-rgb),.55) !important;
  border-color: rgba(var(--primary-rgb),.35) !important;
}
body.is-dark .plan-empty .plan-empty-ttl {
  color: var(--text) !important;
}
body.is-dark .plan-empty .plan-empty-sub {
  color: var(--text-faint) !important;
}
body.is-dark .plan-empty .plan-empty-icon {
  background: rgba(var(--primary-rgb),.22) !important;
  color: var(--accent-soft) !important;
}

/* (35) co_creator.php (.cc-row / .cc-avatar / .cc-name / .cc-status) dark sweep
   — 白卡片列表（邀請我的創作者 / 我邀請的創作者）轉深底桃紅 alpha */
body.is-dark .cc-row {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .cc-row:hover {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}
body.is-dark .cc-avatar {
  background: rgba(var(--primary-rgb), 0.12) !important;
}
body.is-dark .cc-name {
  color: var(--text) !important;
}
body.is-dark .cc-status {
  color: var(--text-faint) !important;
}
body.is-dark .cc-status.is-accepted {
  color: rgba(134, 239, 172, .95) !important;
}
body.is-dark .cc-title {
  color: var(--text) !important;
}
body.is-dark .cc-empty {
  color: var(--text-faint) !important;
}

/* (36) creator_profile.php 訂閱方案卡片 .plan 一般狀態 dark sweep
   — .plan.featured/.plan.subscribed 保留原語意（深酒紅/綠），只動 default 白底 */
body.is-dark .plan:not(.featured):not(.subscribed) {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed):hover {
  border-color: rgba(var(--primary-rgb), 0.55) !important;
  box-shadow: 0 12px 28px -16px rgba(var(--primary-rgb), .35) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-title {
  color: var(--text) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-price {
  color: var(--primary) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-dur,
body.is-dark .plan:not(.featured):not(.subscribed) .plan-per,
body.is-dark .plan:not(.featured):not(.subscribed) .plan-orig {
  color: var(--text-faint) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-list {
  color: var(--text) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-list li::before {
  color: var(--primary) !important;
}
body.is-dark .plan:not(.featured):not(.subscribed) .plan-save {
  background: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--accent-soft) !important;
}

/* (37) Locked-card fallback（無 blur 圖時）淡奶油漸層
   — buildLockedCard() 在 post_detail.php / creator_profile.php / buy.php 都用
     'linear-gradient(135deg, #FBFAF7 0%, #F4E5E8 50%, #FBFAF7 100%)' inline style
   — is-dark 模式覆蓋成深底 + 桃紅暈光（純文字 / 無 blur 圖時可見） */
body.is-dark [style*="linear-gradient(135deg, #FBFAF7 0%, #F4E5E8 50%, #FBFAF7 100%)"] {
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(var(--accent-soft-rgb),.22) 0%, transparent 60%),
    radial-gradient(60% 80% at 70% 80%, rgba(var(--primary-rgb),.20) 0%, transparent 60%),
    linear-gradient(135deg, rgba(var(--bg-rgb),.85) 0%, rgba(var(--bg-rgb),.92) 50%, rgba(var(--bg-rgb),.85) 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}

/* (38) chatroom.php 訊息輸入列 is-dark sweep（v1.0.205 加強對比）
   — .cr-input-inner 深度 + 強邊 + 桃紅 glow；icon 切桃紅；placeholder 提亮 */
body.is-dark .cr-input-bar {
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0) 0%, rgba(var(--bg-rgb),.92) 35%) !important;
}
body.is-dark .cr-input-inner {
  background: rgba(var(--bg-rgb), 0.85) !important;
  border: 1.5px solid rgba(var(--primary-rgb), 0.5) !important;
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.15), 0 8px 24px -12px rgba(var(--primary-rgb), 0.4) !important;
}
body.is-dark .cr-input-inner:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.35), 0 8px 28px -10px rgba(var(--primary-rgb), 0.55) !important;
}
body.is-dark .cr-input {
  color: var(--text) !important;
}
body.is-dark .cr-input::placeholder {
  color: rgba(var(--text-rgb, 255, 230, 240), 0.55) !important;
}
body.is-dark .cr-img-btn {
  color: var(--accent-soft) !important;
}
body.is-dark .cr-img-btn:hover {
  color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.18) !important;
}
body.is-dark .cr-send-btn {
  color: rgba(var(--text-rgb, 255, 230, 240), 0.6) !important;
}
body.is-dark .cr-send-btn.active,
body.is-dark .cr-send-btn:not(:disabled) {
  color: var(--accent-soft) !important;
}

/* (39) creator_profile.php .plan.subscribed 白底 dark sweep
   — 保留綠 ribbon 語意，bg 切綠 alpha；字色全淺 */
body.is-dark .plan.subscribed {
  background: rgba(22, 163, 74, 0.10) !important;
  border-color: rgba(22, 163, 74, 0.42) !important;
}
body.is-dark .plan.subscribed .plan-title,
body.is-dark .plan.subscribed .plan-price,
body.is-dark .plan.subscribed .plan-dur,
body.is-dark .plan.subscribed .plan-per {
  color: var(--text) !important;
}
body.is-dark .plan.subscribed .plan-list {
  color: rgba(255,255,255,.85) !important;
}
body.is-dark .plan.subscribed .plan-cta {
  background: rgba(var(--bg-rgb), 0.75) !important;
  color: rgba(134, 239, 172, .95) !important;
  border-color: rgba(22, 163, 74, 0.55) !important;
}

/* (40) mini-post 卡 is-dark sweep — 共同創作者卡 + 動態貼文卡
   — .mini-post 白卡 → 深桃紅 alpha；.mini-title / .mini-sub 字色淺 */
body.is-dark .mini-post {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .mini-post:hover {
  border-color: rgba(var(--primary-rgb), 0.5) !important;
  box-shadow: 0 10px 24px -18px rgba(var(--primary-rgb), .4) !important;
}
body.is-dark .mini-title {
  color: var(--text) !important;
}
body.is-dark .mini-meta .mini-sub,
body.is-dark .mini-sub {
  color: var(--text-faint) !important;
}

/* (41) login.php inline <style> dark sweep
   — .brand-side / .form-side 白底 + .inp 灰底 + .check input 白勾 + .g-btn Google 白底 + .reg-line 淡桃紅 */
body.is-dark .brand-side {
  background:
    radial-gradient(70% 80% at 12% 10%, rgba(var(--primary-rgb),.18) 0%, transparent 55%),
    radial-gradient(85% 85% at 90% 90%, rgba(var(--accent-soft-rgb),.20) 0%, transparent 60%),
    linear-gradient(155deg, rgba(var(--bg-rgb),.92) 0%, rgba(var(--bg-rgb),.85) 100%) !important;
  color: var(--text) !important;
}
body.is-dark .form-side {
  background: rgba(var(--bg-rgb), 0.55) !important;
  color: var(--text) !important;
}
body.is-dark .inp {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
}
body.is-dark .inp:focus-within {
  background: rgba(var(--primary-rgb), 0.12) !important;
  border-color: var(--primary) !important;
}
body.is-dark .inp input {
  color: var(--text) !important;
}
body.is-dark .inp input::placeholder {
  color: var(--text-faint) !important;
}
body.is-dark .check input {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: var(--accent-soft) !important;
}
body.is-dark .g-btn {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.4) !important;
  color: var(--text) !important;
}
body.is-dark .g-btn:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
  border-color: rgba(var(--primary-rgb), 0.55) !important;
}
body.is-dark .reg-line {
  background: rgba(var(--primary-rgb), 0.06) !important;
  color: var(--text) !important;
}
body.is-dark .reg-line a {
  background: var(--primary) !important;
  color: #fff !important;
}
body.is-dark .age-chip {
  background: rgba(var(--bg-rgb), 0.55) !important;
}
/* err-banner（#login-error）在 dark 主題下原本吃 inline 淡粉底 + catch-all 淺字 → 不可讀
   改成「暗紅半透底 + 亮警告紅文字」，與整體深底一致 */
body.is-dark .err-banner {
  background: linear-gradient(180deg, rgba(217,54,32,.14), rgba(217,54,32,.22)) !important;
  border-color: rgba(217,54,32,.55) !important;
  color: #FECACA !important;
}
body.is-dark .err-banner b {
  color: #FECACA !important;
}
body.is-dark .err-banner code {
  background: rgba(0,0,0,.35) !important;
  color: #FECACA !important;
}

/* (42) creator_profile.php 共同協作創作者卡 .rec-card 白底 dark sweep */
body.is-dark.creator-profile-v3 .rec-card,
body.is-dark .rec-card {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
  color: var(--text) !important;
}
body.is-dark.creator-profile-v3 .rec-card:hover,
body.is-dark .rec-card:hover {
  border-color: rgba(var(--primary-rgb), 0.5) !important;
  box-shadow: 0 14px 30px -18px rgba(var(--primary-rgb), .4) !important;
}
body.is-dark .rec-card .av {
  border-color: rgba(var(--primary-rgb), 0.45) !important;
}
body.is-dark .rec-card .name {
  color: var(--text) !important;
}
body.is-dark .rec-card .meta {
  color: var(--text-faint) !important;
}

/* (43) payment_result.php inline <style> 白底 dark sweep
   — .card / .result-hero.success/pending/failed/loading / .btn-ghost */
body.is-dark .card {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
  color: var(--text) !important;
}
body.is-dark .result-hero.success {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.18) 0%, rgba(var(--bg-rgb), 0.85) 100%) !important;
}
body.is-dark .result-hero.pending {
  background: linear-gradient(180deg, rgba(var(--accent-soft-rgb), 0.18) 0%, rgba(var(--bg-rgb), 0.85) 100%) !important;
}
body.is-dark .result-hero.failed {
  background: linear-gradient(180deg, rgba(229, 115, 115, 0.18) 0%, rgba(var(--bg-rgb), 0.85) 100%) !important;
}
body.is-dark .result-hero.loading {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.10) 0%, rgba(var(--bg-rgb), 0.85) 100%) !important;
}
body.is-dark .btn-ghost {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.35) !important;
  color: var(--text) !important;
}

/* (44) consumption.php 空狀態 SVG rect 硬寫 fill="white"
   — 用 fill 屬性選擇器把白填充改成深底淺字 alpha */
body.is-dark svg rect[fill="white"] {
  fill: rgba(var(--primary-rgb), 0.18) !important;
}

/* ═══════════════════════════════════════════════════════════════
   (45) 第 6 輪：CSS 靜態掃 background:#fff / 淡奶油 selector 一次包乾
   — grep new_app.css + theme_warm.css 找出白底 selector，比對 is-dark
     未覆蓋者集中於此；按高頻 / 大面積優先
   ═══════════════════════════════════════════════════════════════ */

/* 45.1 全站「已追隨」按鈕 .btn-followed */
body.is-dark .btn-followed {
  background: rgba(var(--primary-rgb), 0.10) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb), 0.45) !important;
}
body.is-dark .btn-followed:hover {
  background: rgba(229, 115, 115, 0.18) !important;
  color: rgba(240, 160, 160, 1) !important;
  border-color: rgba(229, 115, 115, 0.55) !important;
}

/* 45.2 探索頁主卡 .grid-card */
body.is-dark .grid-card {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
}
body.is-dark .grid-card:hover {
  border-color: rgba(var(--primary-rgb), 0.45) !important;
}
body.is-dark .grid-card-cover,
body.is-dark .grid-card-empty {
  background: rgba(var(--primary-rgb), 0.10) !important;
}
body.is-dark .grid-card-excerpt,
body.is-dark .grid-card-name {
  color: var(--text) !important;
}

/* 45.3 全站 404 / not-found modal .nf-overlay .nf-card */
body.is-dark .nf-overlay .nf-card {
  background: rgba(var(--bg-rgb), 0.78) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}

/* 45.4 feed.php / index.php feed 主卡 body.theme-warm .post */
body.is-dark .post {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .post:hover {
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}
body.is-dark .post-head .avatar {
  background: rgba(var(--primary-rgb), 0.18) !important;
}
body.is-dark .post-head .name,
body.is-dark .post-head .name a,
body.is-dark .post-body,
body.is-dark .post .lock-title,
body.is-dark .post .lock-msg {
  color: var(--text) !important;
}

/* 45.5 share-modal 分享彈窗 */
body.is-dark .share-modal .dialog {
  background: rgba(var(--bg-rgb), 0.78) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}
body.is-dark .share-modal .opt {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.30) !important;
  color: var(--text) !important;
}
body.is-dark .share-modal .opt:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
  border-color: rgba(var(--primary-rgb), 0.55) !important;
}

/* 45.6 view.php 自己編輯模式 .editable-input / .np-form / .np-textarea / .pe-input / .plan-edit / .toggle / .owner-btn */
body.is-dark.view-self .editable-input {
  background: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .editable-input:focus {
  background: rgba(var(--primary-rgb), 0.14) !important;
}
body.is-dark.view-self .np-form {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .np-textarea {
  background: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .np-textarea:focus {
  background: rgba(var(--primary-rgb), 0.14) !important;
  border-color: var(--primary) !important;
}
body.is-dark.view-self .field-num:focus {
  background-color: rgba(var(--primary-rgb), 0.14) !important;
  border-color: var(--primary) !important;
}
body.is-dark.view-self .toggle:hover {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
}
body.is-dark.view-self .toggle.on {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.35), rgba(var(--primary-rgb), 0.18)) !important;
}
body.is-dark.view-self .plan-edit {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .plan-edit.gold {
  background: linear-gradient(180deg, rgba(var(--accent-soft-rgb), 0.12) 0%, rgba(var(--bg-rgb), 0.6) 60%) !important;
}
body.is-dark.view-self .pe-input {
  background: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .owner-btn {
  background: rgba(var(--bg-rgb), 0.75) !important;
  color: var(--text) !important;
}

/* 45.7 .plan.subscribed .plan-cta 白底 → 深底淺綠 */
body.is-dark .plan.subscribed .plan-cta {
  background: rgba(var(--bg-rgb), 0.78) !important;
  color: rgba(134, 239, 172, 0.95) !important;
  border-color: rgba(22, 163, 74, 0.55) !important;
}

/* 45.8 .plan-save 折扣 chip 粉紅 → 桃紅 alpha */
body.is-dark .plan-save {
  background: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--accent-soft) !important;
}

/* 45.9 .btn-white 通用白按鈕（safety net） */
body.is-dark .btn-white {
  background: rgba(var(--bg-rgb), 0.75) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
}

/* 45.10 search-page .search-card / .sc-cat / .sc-banner / .sc-name / .sc-bio
   — 頭貼下方 footer 區塊太貼底色不明顯：footer 提升 alpha + cover 加底線分隔 + 名字/bio 改淺字 */
body.is-dark .search-card {
  background: rgba(var(--bg-rgb), 0.78) !important;
  border-color: rgba(var(--primary-rgb), 0.35) !important;
  box-shadow: 0 12px 28px -16px rgba(var(--primary-rgb), 0.35) !important;
}
body.is-dark .search-card:hover {
  background: rgba(var(--bg-rgb), 0.85) !important;
  border-color: rgba(var(--primary-rgb), 0.55) !important;
  box-shadow: 0 16px 36px -14px rgba(var(--primary-rgb), 0.5) !important;
}
body.is-dark .sc-banner {
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.4) !important;
  box-shadow: 0 4px 12px -6px rgba(var(--primary-rgb), 0.55) !important;
}
body.is-dark .sc-cat {
  background: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--text) !important;
}
body.is-dark .sc-name {
  color: var(--text) !important;
}
body.is-dark .sc-bio {
  color: var(--text-faint) !important;
}

/* 45.11 landing testi-card / .how 區（landing 頁低頻但 cover 一下） */
body.is-dark .testi-card {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .testi-card.hi {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(var(--bg-rgb), 0.55)) !important;
}
body.is-dark .how {
  background: rgba(var(--bg-rgb), 0.55) !important;
}
body.is-dark .testimonials {
  background: transparent !important;
}

/* 45.12 .media-badge.follow 跟隨可看 chip */
body.is-dark .media-badge.follow {
  background: rgba(var(--primary-rgb), 0.85) !important;
  color: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════
   (46) 第 7 輪：view_self.css 全部白底 selector 一次包乾
   — view.php 自看自編模式（剁椒魚頭1 等創作者的自家頁）
   ═══════════════════════════════════════════════════════════════ */

/* 46.1 .vw-url-row MY URL 列 + 內按鈕 */
body.is-dark.view-self .vw-url-row {
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.78) 0%, rgba(var(--bg-rgb), 0.55) 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .vw-url-label,
body.is-dark.view-self .vw-url-val,
body.is-dark.view-self .vw-url-val b {
  color: var(--text) !important;
}
body.is-dark.view-self .vw-url-val .pre {
  color: var(--text-faint) !important;
}
body.is-dark.view-self .vw-url-btn {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .vw-url-btn:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
}

/* 46.2 .vw-btn-ghost（編輯個人頁面 / 預覽公開頁 等 ghost 按鈕） */
body.is-dark.view-self .vw-actions .vw-btn-ghost {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .vw-actions .vw-btn-ghost:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}

/* 46.3 .vw-social（IG/X social chips bar） */
body.is-dark.view-self .vw-social {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .vw-social-edit .vw-prefix-row {
  background: rgba(var(--primary-rgb), 0.08) !important;
}
body.is-dark.view-self .vw-social-edit .vw-prefix-row:focus-within {
  background: rgba(var(--primary-rgb), 0.14) !important;
  border-color: rgba(var(--primary-rgb), 0.55) !important;
}

/* 46.4 .vw-media-thumb 媒體縮圖 placeholder */
body.is-dark.view-self .vw-media-thumb {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .vw-media-thumb .remove-btn {
  background: rgba(var(--bg-rgb), 0.78) !important;
}

/* 46.5 .vw-schedule / datetime input */
body.is-dark.view-self .vw-schedule {
  background: rgba(var(--primary-rgb), 0.08) !important;
}
body.is-dark.view-self .vw-schedule input[type="datetime-local"] {
  background: rgba(var(--primary-rgb), 0.10) !important;
  color: var(--text) !important;
  color-scheme: dark;
}

/* 46.6 .vw-cocreator 共同創作者 panel + 搜尋 input + dropdown + chips */
body.is-dark.view-self .vw-cocreator {
  background: rgba(var(--primary-rgb), 0.08) !important;
}
body.is-dark.view-self .vw-cocreator-search-anchor input {
  background: rgba(var(--primary-rgb), 0.10) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .vw-cocreator-dropdown {
  background: rgba(var(--bg-rgb), 0.85) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
}
body.is-dark.view-self .vw-cocreator-dropdown > div:hover {
  background: rgba(var(--primary-rgb), 0.10) !important;
}
body.is-dark.view-self .vw-cocreator-chip {
  background: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--text) !important;
}

/* 46.7 .vw-post-tools 貼文工具列 + 內 tab */
body.is-dark.view-self .vw-post-tools {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark.view-self .ptab:hover {
  background: rgba(var(--primary-rgb), 0.10) !important;
}

/* 46.8 .vw-search-row 搜尋列 */
body.is-dark.view-self .vw-search-row input {
  background: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--text) !important;
}
body.is-dark.view-self .vw-search-row input:focus {
  background: rgba(var(--primary-rgb), 0.14) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
}

/* 46.9 .vw-load-more-area button */
body.is-dark.view-self .vw-load-more-area button {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}

/* 46.10 .vw-cta-card 大 cream gradient CTA */
body.is-dark.view-self .vw-cta-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18) 0%, rgba(var(--bg-rgb), 0.55) 100%) !important;
}

/* 46.11 view-self 內 .grid-card .owner-btn（編輯模式 hover 4 顆白按鈕） */
body.is-dark.view-self .grid-card .owner-btn {
  background: rgba(var(--bg-rgb), 0.75) !important;
  color: var(--text) !important;
}

/* 47. .plan.featured .plan-cta 「搶購最划算方案」白底 — universal *:not() !important
   把字色強制成 var(--text)（白），白底白字看不見。改成桃紅金漸層深底+深字 pop。 */
body.is-dark .plan.featured .plan-cta {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--primary) 100%) !important;
  color: #1A0008 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 8px 20px -8px rgba(var(--primary-rgb), 0.55) !important;
}
body.is-dark .plan.featured .plan-cta:hover {
  filter: brightness(1.08) !important;
}

/* 48. follow-confirm-card 追蹤確認彈窗
   theme_warm.css:786 把 new_app.css 的深紫漸層覆蓋成白漸層；is-dark 加 explicit override 回深底 */
body.is-dark .follow-confirm-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}
body.is-dark .follow-confirm-card {
  background: linear-gradient(160deg, rgba(var(--bg-rgb), 0.95) 0%, rgba(var(--primary-rgb), 0.18) 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.35) !important;
  color: var(--text) !important;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7) !important;
}
body.is-dark .follow-confirm-title {
  color: var(--accent-soft) !important;
}
body.is-dark .follow-confirm-msg {
  color: var(--text) !important;
}
body.is-dark .follow-confirm-msg-en {
  color: var(--text-faint) !important;
}
body.is-dark .follow-confirm-btn.btn-ghost {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}
body.is-dark .follow-confirm-btn.btn-ghost:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
}

/* 49. chatroom.php 補洞：頭像 fallback 白圓 + 對方訊息白底 + 時間/空狀態文字
   先前 (38) 已修 .cr-input-bar / -inner / -input，這裡補剩餘 selector */
body.is-dark .cr-avatar {
  background: rgba(var(--primary-rgb), 0.18) !important;
}
body.is-dark .cr-avatar span {
  color: var(--accent-soft) !important;
}
body.is-dark .msg-received {
  background: rgba(var(--bg-rgb), 0.65) !important;
  color: var(--text) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
}
body.is-dark .cr-time-sep {
  color: var(--text-faint) !important;
}
body.is-dark .cr-empty,
body.is-dark .cr-loading {
  color: var(--text-faint) !important;
}

/* ═══════════════════════════════════════════════════════════════
   50. 動態貼文卡 badge 配色換成 poster palette（桃紅/鈷藍/橘紅/金）
   — feed 用 .media-badge.* / grid 用 .grid-card-* / 雜誌 .mini-badge.* */
/* 50.1 .media-badge.* feed 用（renderNewPostCard） */
body.is-dark .media-badge.free {
  background: rgba(31, 181, 255, 0.90) !important;     /* 鈷藍 #1FB5FF */
  color: #051A33 !important;
}
body.is-dark .media-badge.unlocked {
  background: rgba(31, 181, 255, 0.90) !important;     /* 已解鎖 同 free 鈷藍 */
  color: #051A33 !important;
}
body.is-dark .media-badge.follow {
  background: rgba(var(--primary-rgb), 0.85) !important;
  color: #fff !important;
}
body.is-dark .media-badge.sub {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary)) !important;
  color: #fff !important;
}
body.is-dark .media-badge.single {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary)) !important;   /* 橘紅→桃紅 */
  color: #1A0008 !important;
  font-weight: 700 !important;
}
body.is-dark .media-badge.offsell {
  background: rgba(var(--bg-rgb), 0.85) !important;
  color: var(--text-faint) !important;
}

/* 50.2 .grid-card-* 探索/動態 grid 用（renderPostGridCard） */
body.is-dark .grid-card-r18 {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary)) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px -4px rgba(var(--primary-rgb), 0.5) !important;
}
body.is-dark .grid-card-video,
body.is-dark .grid-card-multi {
  background: rgba(var(--primary-rgb), 0.5) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.is-dark .grid-card-lock {
  background: rgba(var(--bg-rgb), 0.65) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.18) !important;
}
body.is-dark .grid-card-offsell {
  background: rgba(var(--bg-rgb), 0.85) !important;
  color: var(--text-faint) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.28) !important;
}

/* 50.3 .mini-badge.* 雜誌式（若仍有頁面使用） */
body.is-dark .mini-badge.mb-free {
  background: rgba(31, 181, 255, 0.92) !important;
  color: #051A33 !important;
}
body.is-dark .mini-badge.mb-sub-unlocked {
  background: rgba(31, 181, 255, 0.92) !important;
  color: #051A33 !important;
}
body.is-dark .mini-badge.mb-sub {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary)) !important;
  color: #fff !important;
}
body.is-dark .mini-badge.mb-single {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary)) !important;
  color: #1A0008 !important;
  font-weight: 700 !important;
}
body.is-dark .mini-badge.mb-ticket {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--primary) 100%) !important;
  color: #1A0008 !important;
}

/* 51. .nav-dropdown 右上頭像下拉 — 用戶要實體不要透明
   原本 alpha 0.92 + box-shadow rgba(white,.03) inset 還是有點透 → 改 solid 深紫漸層 */
body.is-dark .nav-dropdown,
body.is-dark .nav-lang-menu {
  background: linear-gradient(180deg, #1A0008 0%, #050008 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.4) !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(var(--primary-rgb), 0.18) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   (52) theme-pink (05) light variant 淡粉化 panel override
   — theme-warm 預設 #FFF/#FBFAF7 純米白在 pink 改用透白 + 桃紅 alpha 邊
   讓整體淡粉系一致，不留純米白
   ═══════════════════════════════════════════════════════════════ */
body.theme-pink .dash-card,
body.theme-pink .ref-list-card,
body.theme-pink .card,
body.theme-pink .search-card,
body.theme-pink .plan,
body.theme-pink .mini-post,
body.theme-pink .grid-card,
body.theme-pink .post,
body.theme-pink .nf-overlay .nf-card,
body.theme-pink .follow-confirm-card,
body.theme-pink .cc-row,
body.theme-pink .rec-card,
body.theme-pink .np-form,
body.theme-pink .vw-post-tools,
body.theme-pink .vw-url-row {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.18) !important;
}

body.theme-pink .np-textarea,
body.theme-pink .editable-input,
body.theme-pink .pe-input,
body.theme-pink .cr-input-inner,
body.theme-pink .inp,
body.theme-pink .vw-search-row input,
body.theme-pink .vw-cocreator-search-anchor input {
  background: rgba(255,245,248,.95) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
}

body.theme-pink .tabs-underline {
  border-bottom-color: rgba(var(--primary-rgb), 0.25) !important;
}
body.theme-pink .tabs-underline .tab-item.active {
  color: var(--primary) !important;
  box-shadow: inset 0 -2px 0 0 var(--primary) !important;
}

body.theme-pink .btn-glass,
body.theme-pink .btn-ghost,
body.theme-pink .vw-btn-ghost,
body.theme-pink .vw-url-btn {
  background: rgba(255,255,255,.7) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--primary-deep) !important;
}

body.theme-pink .follow-confirm-card {
  background: linear-gradient(160deg, rgba(255,255,255,.95) 0%, #FCE7EE 100%) !important;
}

body.theme-pink .nav-dropdown,
body.theme-pink .nav-lang-menu {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFEAF1 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
}

/* footer 在 theme-warm 預設 #1A1815 dark — pink light theme 下視覺突兀 → 改深酒紅 + 桃紅 alpha 邊光 */
body.theme-pink footer {
  background: linear-gradient(180deg, #3A1426 0%, #2A0F1C 100%) !important;
  border-top: 1px solid rgba(var(--primary-rgb), 0.32) !important;
  color: rgba(255, 240, 245, .8) !important;
}

/* chatroom .cr-avatar fallback 白圓在 pink 底看不見 → 淡粉 alpha + 桃紅字 */
body.theme-pink .cr-avatar {
  background: rgba(var(--primary-rgb), 0.10) !important;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.45) !important;
}
body.theme-pink .cr-avatar span {
  color: var(--primary) !important;
}

/* msg-received / cr-system-bubble — pink 改淡粉 alpha + 桃紅邊 */
body.theme-pink .msg-received {
  background: rgba(var(--primary-rgb), 0.06) !important;
  border-color: rgba(var(--primary-rgb), 0.22) !important;
  color: var(--text) !important;
}
body.theme-pink .cr-system-bubble {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
  color: var(--primary-deep) !important;
}

/* (53) register/login .inp 表單欄位 dark theme 填值/錯誤/瀏覽器 autofill 狀態
   email 等 input typed 後 chrome autofill 或 .inp.err 套 light pink #FEF2F2 → dark 上看起來像亮粉填色突兀。
   分三類處理：
   1) .inp.err / .inp.ok 用語意色 alpha 不走 light pink/green 純底
   2) -webkit-autofill 蓋一層 var(--bg) inset shadow + var(--text) 文字色（chrome 預設 autofill 黃/粉強制變透 dark）
   3) input 文字色補強（autofill 走 -webkit-text-fill-color 不是 color） */
body.is-dark .inp.err {
  background: rgba(217, 54, 32, 0.15) !important;
  border-color: rgba(217, 54, 32, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(217, 54, 32, 0.18) !important;
}
body.is-dark .inp.err .inp-icon { color: #FF8B7C !important; }
body.is-dark .inp.ok {
  background: rgba(22, 163, 74, 0.10) !important;
  border-color: rgba(22, 163, 74, 0.65) !important;
}
body.is-dark .inp.ok .inp-icon { color: #86EFAC !important; }

/* Chrome autofill 亮藍/亮黃 inset bg 全站通用蓋層 — 對 dark theme 內任何 input/textarea 都生效
   不限 .inp / .rpc-wrap / .inv-input 等個別 selector，user 反映 register_pre_creator 仍出現亮藍是因 (53) 只蓋 .inp */
body.is-dark input:-webkit-autofill,
body.is-dark input:-webkit-autofill:hover,
body.is-dark input:-webkit-autofill:focus,
body.is-dark input:-webkit-autofill:active,
body.is-dark textarea:-webkit-autofill,
body.is-dark textarea:-webkit-autofill:hover,
body.is-dark textarea:-webkit-autofill:focus,
body.is-dark textarea:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(var(--bg-rgb), 0.85) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* (54) 全站 empty / loading state 統一處理
   .mo-empty / .mo-loading 用 rgba(white,.95) 白 box → dark 上看不清；改深桃紅 alpha + 淺字
   .ibx / .inc / .sub / .cr 等純文字 empty 雖被 universal 蓋白可讀但語意應 muted，改 text-faint */
body.is-dark .mo-empty,
body.is-dark .mo-loading {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--text-faint) !important;
}
body.is-dark .ibx-empty,
body.is-dark .ibx-empty-text,
body.is-dark .ibx-loading,
body.is-dark .inc-empty,
body.is-dark .inc-loading,
body.is-dark .sub-loading,
body.is-dark .sub-empty p {
  color: var(--text-faint) !important;
}

/* pink (05) light theme — .mo-empty 維持淡白卡 + 桃紅 alpha 邊 */
body.theme-pink .mo-empty,
body.theme-pink .mo-loading {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.18) !important;
}

/* (55) register_pre_creator.php 申請創作者頁表單欄位 dark theme override
   inline css 預設 .rpc-wrap bg #FBFAF7 米白，:focus-within 切 #FFFFFF 純白；
   dark 上 typed/focus 變亮白塊 + universal 白文字 = 看不清。 */
body.is-dark .rpc-card {
  background: rgba(var(--bg-rgb), 0.65) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .rpc-wrap {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark .rpc-wrap:focus-within {
  background: rgba(var(--primary-rgb), 0.14) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.20) !important;
}
body.is-dark .rpc-wrap input,
body.is-dark .rpc-wrap textarea {
  color: var(--text) !important;
}
body.is-dark .rpc-wrap input::placeholder,
body.is-dark .rpc-wrap textarea::placeholder {
  color: var(--text-faint) !important;
}
body.is-dark .rpc-wrap.rpc-locked,
body.is-dark .rpc-wrap.rpc-locked:focus-within {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
  box-shadow: none !important;
}
body.is-dark .rpc-upload-item .rpc-upload-preview {
  background: rgba(var(--primary-rgb), 0.06) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text-faint) !important;
}
body.is-dark .rpc-upload-item .rpc-upload-preview:hover {
  background: rgba(var(--primary-rgb), 0.12) !important;
  border-color: var(--primary) !important;
}
body.is-dark .rpc-agree-row input {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.35) !important;
}
body.is-dark .rpc-done-actions .btn-ghost {
  background: rgba(var(--primary-rgb), 0.10) !important;
  border-color: rgba(var(--primary-rgb), 0.32) !important;
  color: var(--text) !important;
}
body.is-dark .rpc-done-actions .btn-ghost:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
  border-color: var(--primary) !important;
}

/* (56) view.php 「發布」左邊兩顆狀態按鈕 #btn-clear-draft / #btn-cancel-edit
   inline style 寫死 bg #fff + 桃紅/灰字邊；dark 上白塊跟主底色不協調，universal *:not 不蓋 [class*=btn-publish] 所以 bg 維持白。
   用 #id selector + !important 蓋 inline，bg → transparent，邊維持原語意 */
body.is-dark #btn-clear-draft {
  background: transparent !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
body.is-dark #btn-clear-draft:hover {
  background: rgba(var(--primary-rgb), 0.10) !important;
}
body.is-dark #btn-cancel-edit {
  background: transparent !important;
  border-color: rgba(var(--primary-rgb), 0.35) !important;
  color: var(--text-faint) !important;
}
body.is-dark #btn-cancel-edit:hover {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border-color: rgba(var(--primary-rgb), 0.55) !important;
  color: var(--text) !important;
}

/* (57) view.php pink theme：.crt-tabs / .crt-tab / .np-tool 在 new_app.css 用 var(--text) 深酒紅 bg —
   pink (05) 是 light theme var(--text) 解析成 #3A1426 深酒紅 → 在淡粉米白主底上呈深酒紅塊不搭。
   改淡白 panel + 桃紅 alpha 邊 + active 桃紅漸層（與其他 light cohesive） */
body.theme-pink .crt-tabs {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}
body.theme-pink .crt-tab {
  color: var(--text-faint) !important;
  background: transparent !important;
}
body.theme-pink .crt-tab:hover {
  color: var(--primary-deep) !important;
}
body.theme-pink .crt-tab.on {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--primary) 50%, var(--primary-deep) 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px -8px rgba(var(--primary-rgb), 0.45) !important;
}
body.theme-pink .np-tool {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--primary-deep) !important;
}
body.theme-pink .np-tool:hover {
  background: rgba(var(--primary-rgb), 0.12) !important;
  border-color: var(--primary) !important;
}

/* (58) pink theme 一輪掃 new_app.css 還在硬編紫黑 / 金 hex 當 BG 的孤兒 selector
   設計債 root cause：早期 new_app.css 只為紫金一個主題寫，hex 直接 hardcode，後加 theme 系統沒回補 var()
   涵蓋：.tabs-pill .tab:hover / .mini-post .mini-media / .plan.featured .plan-cta / .owner-btn:hover /
        .media-badge.single / .mini-badge.mb-single / .mini-badge.mb-ticket */
body.theme-pink .tabs-pill .tab:hover {
  background: rgba(var(--primary-rgb), 0.12) !important;
  color: var(--primary-deep) !important;
}
body.theme-pink .mini-post .mini-media {
  background: rgba(var(--primary-rgb), 0.10) !important;
}
body.theme-pink .plan.featured .plan-cta {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px -8px rgba(var(--primary-rgb), 0.5) !important;
}
body.theme-pink .owner-btn:hover {
  background: rgba(var(--primary-rgb), 0.18) !important;
  color: var(--primary-deep) !important;
}
body.theme-pink .media-badge.single,
body.theme-pink .mini-badge.mb-single {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary)) !important;
  color: #FFFFFF !important;
}
body.theme-pink .mini-badge.mb-ticket {
  background: rgba(var(--primary-rgb), 0.15) !important;
  color: var(--primary-deep) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.4) !important;
}

/* (59) batch 掃 — 全站硬編碼 hex 但漏網 selector
   涵蓋：offline_exhibition .off-sub-filter / .event-card；
        inline style 含「background: #FBFAF7」/「edit-mode-only notice」/ inline mb-stop badge；
        post_detail 狀態提示框（黃/紫/紅 alpha 化 維持語意） */
body.is-dark .off-sub-filter,
body.is-dark .event-card {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.theme-pink .off-sub-filter,
body.theme-pink .event-card {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(var(--primary-rgb), 0.20) !important;
}

/* inline style 寫死 #FBFAF7 + #E5DCC4（view.php L160 / profile.php L117 edit-mode notice） */
body.is-dark [style*="background:#FBFAF7"],
body.is-dark [style*="background: #FBFAF7"] {
  background: rgba(var(--bg-rgb), 0.5) !important;
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}
body.is-dark [style*="border-color: #E5DCC4"],
body.is-dark [style*="border-color:#E5DCC4"] {
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}

/* inline 狀態提示框 — 維持 warning / info 語意但 alpha 化讓 dark theme 不會亮塊 */
body.is-dark [style*="background:#fee2e2"],
body.is-dark [style*="background: #fee2e2"] {
  background: rgba(217, 54, 32, 0.20) !important;
}
body.is-dark [style*="background:#fef3c7"],
body.is-dark [style*="background: #fef3c7"] {
  background: rgba(252, 211, 77, 0.18) !important;
}
body.is-dark [style*="background:#e0e7ff"],
body.is-dark [style*="background: #e0e7ff"] {
  background: rgba(165, 180, 252, 0.18) !important;
}

/* ═══════════════════════════════════════════════════════════════
   (60) mobile drawer per-theme — new_app.css 寫死 #1F0E15 深酒紅漸層
   + 白字，在 light theme (editorial / pink) 漸層下半段 var(--bg) 變
   米白/淡粉，白字直接看不見。各 theme 重新對齊色票：
   - light themes (editorial / pink)：drawer 改 light bg + theme text
   - dark themes (02/03/04)：drawer 沿用深底但 accent 改 theme primary
   ═══════════════════════════════════════════════════════════════ */

/* === light themes (editorial 預設 / theme-pink) — 漸層改 light 系 + 深字 === */
body:not(.is-dark) .drawer {
  background: linear-gradient(180deg, var(--surface-card, #FBFAF7) 0%, var(--bg) 100%) !important;
  border-right-color: rgba(var(--primary-rgb), 0.25) !important;
  box-shadow: 24px 0 60px -12px rgba(0,0,0,.18) !important;
}
body:not(.is-dark) .drawer-head {
  background: linear-gradient(180deg, var(--surface-card, #FBFAF7) 80%, rgba(255,255,255,0)) !important;
  border-bottom-color: rgba(var(--primary-rgb), 0.15) !important;
}
body:not(.is-dark) .drawer-logo {
  color: var(--text) !important;
}
body:not(.is-dark) .drawer-logo em {
  color: var(--primary) !important;
}
body:not(.is-dark) .drawer-close {
  background: rgba(var(--primary-rgb), 0.06) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  color: var(--primary-deep) !important;
}
body:not(.is-dark) .drawer-close:hover {
  background: rgba(var(--primary-rgb), 0.12) !important;
  color: var(--primary) !important;
}
body:not(.is-dark) .drawer-label {
  color: var(--primary-deep) !important;
  opacity: 0.75;
}
body:not(.is-dark) .drawer-item {
  color: var(--text) !important;
}
body:not(.is-dark) .drawer-item svg {
  color: rgba(var(--primary-rgb), 0.6) !important;
}
body:not(.is-dark) .drawer-item:hover,
body:not(.is-dark) .drawer-item:active {
  background: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--primary-deep) !important;
}
body:not(.is-dark) .drawer-item:hover svg {
  color: var(--primary) !important;
}
body:not(.is-dark) .drawer-item.dd-logout {
  color: rgba(var(--text-rgb), 0.55) !important;
}
body:not(.is-dark) .drawer-divider {
  background: rgba(var(--primary-rgb), 0.12) !important;
}
body:not(.is-dark) .drawer-user {
  background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.10) 0%, rgba(var(--primary-deep-rgb), 0.14) 100%) !important;
  border-color: rgba(var(--primary-rgb), 0.30) !important;
}
body:not(.is-dark) .du-name {
  color: var(--text) !important;
}
body:not(.is-dark) .du-name em {
  color: var(--primary-deep) !important;
}
body:not(.is-dark) .du-handle {
  color: rgba(var(--text-rgb), 0.55) !important;
}
body:not(.is-dark) .du-stats {
  background: rgba(var(--primary-rgb), 0.06) !important;
}
body:not(.is-dark) .drawer-legal {
  color: rgba(var(--text-rgb), 0.45) !important;
}
body:not(.is-dark) .drawer-legal a {
  color: rgba(var(--text-rgb), 0.6) !important;
}
body:not(.is-dark) .drawer-legal a:hover {
  color: var(--primary-deep) !important;
}

/* === dark themes (02 neon / 03 electro / 04 poster) — 漸層下半段用 theme bg + accent 同步 === */
body.is-dark .drawer {
  background: linear-gradient(180deg, #1F0E15 0%, rgba(var(--bg-rgb), 0.92) 100%) !important;
  border-right-color: rgba(var(--primary-rgb), 0.35) !important;
}
body.is-dark .drawer-head {
  background: linear-gradient(180deg, #1F0E15 80%, rgba(31,14,21,0)) !important;
}
body.is-dark .drawer-item {
  color: rgba(255,255,255,0.85) !important;
}
body.is-dark .drawer-item:hover,
body.is-dark .drawer-item:active {
  background: rgba(var(--primary-rgb), 0.14) !important;
  color: var(--accent-soft) !important;
}
body.is-dark .drawer-label {
  color: rgba(var(--accent-soft-rgb), 0.8) !important;
}

/* ═══════════════════════════════════════════════════════════════
   (61) view_category 手機版「類型」filter dropdown — inline style 寫死
   .media-filter-btn / .media-filter-sheet { background: #FFF }
   .media-filter-opt { color: #1A1815 }
   PC 走 sidebar 不顯示，僅手機 ≤900px 顯示，dark/pink theme 下白塊+深字脫離主題
   ═══════════════════════════════════════════════════════════════ */
body.is-dark .media-filter-btn {
  background: rgba(var(--bg-rgb), 0.55) !important;
  border-color: rgba(var(--primary-rgb), 0.4) !important;
  color: var(--primary) !important;
}
body.is-dark .media-filter-btn:active {
  background: rgba(var(--primary-rgb), 0.12) !important;
}
body.is-dark .media-filter-sheet {
  background: rgba(var(--bg-rgb), 0.95) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
body.is-dark .media-filter-opt {
  color: var(--text) !important;
}
body.is-dark .media-filter-opt:hover,
body.is-dark .media-filter-opt:active {
  background: rgba(var(--primary-rgb), 0.12) !important;
}
body.is-dark .media-filter-opt.active {
  color: var(--primary) !important;
}

/* pink (05) — 純白底+深墨字對淡粉系也脫離（脫 #FFF5F8 底） */
body.theme-pink .media-filter-btn {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(var(--primary-rgb), 0.3) !important;
}
body.theme-pink .media-filter-sheet {
  background: rgba(255, 245, 248, 0.98) !important;
  border-color: rgba(var(--primary-rgb), 0.18) !important;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.18) !important;
}
body.theme-pink .media-filter-opt {
  color: var(--text) !important;
}