/* ============================================================
 * miya-dark.css — 深色模式（蚀月定制）
 * 作用域：html.miya-dark
 * 策略：变量覆盖（自动翻大部分 UI）+ 硬编码选择器补丁 + 壁纸遮罩
 * 注意：--ink 系列会被 JS 内联覆盖，由 miya-dark.js setProperty('important') 强制
 * ============================================================ */

/* ── 全局变量：浅→深 ── */
html.miya-dark {
  --white: rgba(24, 26, 31, 0.98);
  --glass-bg: rgba(26, 28, 34, 0.96);
  --glass-line: rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --ink: rgba(232, 234, 238, 0.92);
  --ink-soft: rgba(188, 192, 200, 0.78);
  --ink-faint: rgba(148, 153, 163, 0.62);

  /* 聊天变量 */
  --mc-bg: #14161a;
  --mc-bg-warm: #1a1d22;
  --mc-surface: #1e2127;
  --mc-surface-glass: #20232a;
  --mc-ink: #e6e8ec;
  --mc-ink-dim: #9aa1ac;
  --mc-ink-faint: #757c88;
  --mc-line: rgba(255, 255, 255, 0.10);
  --mc-line-strong: rgba(255, 255, 255, 0.18);
  --mc-accent: #e6e8ec;
  --mc-accent-soft: rgba(255, 255, 255, 0.06);
  --mc-gold-soft: rgba(255, 255, 255, 0.08);

  /* qq 派生 */
  --qq-text: var(--mc-ink);
  --qq-text-2: var(--mc-ink-dim);
  --qq-text-3: var(--mc-ink-faint);
  --qq-divider: var(--mc-line);
  --qq-bg: var(--mc-bg);
  --qq-surface: var(--mc-surface);
  --qq-blue: var(--mc-accent);
  --qq-blue-soft: var(--mc-accent-soft);
  --qq-badge: var(--mc-accent);
  --qq-red: #c9c9c9;
}

/* ── 手机壳与壁纸 ── */
html.miya-dark body,
html.miya-dark .phone {
  background: #0c0e12;
}
html.miya-dark .phone__wall {
  background: #0c0e12;
}
/* 桌面壁纸遮罩：半透明深蓝灰，不纯黑 */
html.miya-dark .phone__wall.has-custom-wall::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8, 10, 14, 0.42);
  pointer-events: none;
}

/* ── 聊天室 ── */
html.miya-dark .qq-room {
  background: #14161a;
}
html.miya-dark .qq-room__loading {
  background: rgba(20, 22, 26, 0.9);
}
html.miya-dark .qq-room__head {
  background: rgba(20, 22, 26, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
html.miya-dark .qq-room__head-name {
  color: #eceef2;
}
html.miya-dark .qq-room__head-avatar::after {
  border-color: #14161a;
}
html.miya-dark .qq-room__foot {
  background: rgba(20, 22, 26, 0.94);
  border-top-color: rgba(255, 255, 255, 0.08);
}
html.miya-dark .qq-room.qq-room--keyboard .qq-room__foot {
  background: #14161a;
}
/* 聊天壁纸遮罩 */
html.miya-dark .qq-room.mq-has-wall .mq-room-wall::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.52);
  pointer-events: none;
}
/* 气泡 */
html.miya-dark .qq-room__row--them .qq-room__bubble {
  background: #23262c;
  color: #dfe2e8;
  border-color: rgba(255, 255, 255, 0.06);
}
html.miya-dark .qq-room__row--me .qq-room__bubble {
  background: #2b2e35;
  color: #eceef2;
  border-color: rgba(255, 255, 255, 0.05);
}
/* 翻译气泡 */
html.miya-dark .qq-room__row--them .qq-room__bubble-stack > .qq-room__bubble-trans {
  background: #1a1d22;
  border-color: rgba(255, 255, 255, 0.06);
}
html.miya-dark .qq-room__row--me .qq-room__bubble-stack > .qq-room__bubble-trans {
  background: #20232a;
  border-color: rgba(255, 255, 255, 0.06);
}
/* 输入区 */
html.miya-dark .qq-room__input-box {
  background: #1b1e24;
  border-color: rgba(255, 255, 255, 0.09);
}
html.miya-dark .qq-room__input-box:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
html.miya-dark .qq-room__input {
  color: #e8eaee;
  -webkit-text-fill-color: #e8eaee;
}
html.miya-dark .qq-room__input::placeholder {
  color: #565c66;
}
html.miya-dark .qq-room__msg-time {
  color: rgba(150, 155, 165, 0.6);
}
html.miya-dark .qq-room__head-status,
html.miya-dark .qq-room__typing-text {
  color: #6b7280;
}
html.miya-dark .qq-room__tool-icon,
html.miya-dark .qq-room__compose-btn,
html.miya-dark .qq-room__send {
  color: #6b7280;
}
html.miya-dark .qq-room__tool-icon:hover,
html.miya-dark .qq-room__compose-btn:hover,
html.miya-dark .qq-room__send:hover {
  color: #a8adb8;
}
/* HTML 面板 */
html.miya-dark .qq-room__html-panel {
  background: rgba(20, 22, 26, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
}
html.miya-dark .qq-room__html-toolbar {
  background: rgba(20, 22, 26, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
html.miya-dark .qq-room__html-iframe {
  background: #14161a;
}

/* ── 通用：弹窗 / 面板 / 输入框 / 列表（变量自动翻，补硬编码） ── */
html.miya-dark .ins-modal,
html.miya-dark .modal {
  background: #1a1d22;
  color: var(--ink);
}
html.miya-dark .ins-text-input,
html.miya-dark .ins-select {
  background: #121418;
  color: #dfe2e8;
  border-color: rgba(255, 255, 255, 0.12);
}
html.miya-dark .ins-text-input::placeholder {
  color: #565c66;
}

/* ── 桌面图标文字（内联 --ink 由 JS important 强制，这里兜底） ── */
html.miya-dark .desk--p1,
html.miya-dark .desk--p2,
html.miya-dark .desk--p3,
html.miya-dark .desk--p4 {
  color: rgba(235, 237, 241, 0.92);
}

/* ============================================================
 * miya-dark.css — 扩展覆盖 v2（各 app 根类变量族 + 硬编码补丁）
 * 变量定义在根类上的（--st-*/--vf-*），必须用 html.miya-dark .根类 覆盖
 * ============================================================ */

/* ── 通用 ins 变量族（:root 上，html.miya-dark 直接覆盖生效） ── */
html.miya-dark {
  --ins-bg: #0e1014;
  --ins-surface: rgba(28, 30, 36, 0.92);
  --ins-surface-2: #1a1d22;
  --ins-ink: rgba(232, 234, 238, 0.92);
  --ins-ink-dim: rgba(158, 164, 174, 0.82);
  --ins-accent: #e6e8ec;
  --ins-accent-deep: #a8adb8;
  --ins-rose: #9aa0aa;
  --ins-rose-deep: #cfd3da;
  --ins-champagne: #e6e8ec;
  --ins-gold: #d6dae0;
  --ins-gold-soft: rgba(255, 255, 255, 0.12);
  --ins-cream: #1a1d22;
  --ins-glass-line: rgba(255, 255, 255, 0.10);
  --ins-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);

  /* 聊天设置 mi 变量族（:root 上） */
  --mi-bg: #101216;
  --mi-ink: #e8eaee;
  --mi-sub: #9aa1ac;
  --mi-white: #14161a;
  --mi-line: rgba(255, 255, 255, 0.10);
  --mi-line-strong: rgba(255, 255, 255, 0.18);
  --mi-accent: #e6e8ec;
  --mi-pink: #e6e8ec;
  --mi-lilac: rgba(255, 255, 255, 0.06);
  --mi-mint: rgba(255, 255, 255, 0.08);
  --mi-danger: #d6dae0;

  /* 音乐 ncm 变量族（:root 上） */
  --ncm-page-bg: #101216;
  --ncm-text: #e6e8ec;
  --ncm-text-dim: rgba(230, 232, 236, 0.45);
}

/* ── st 变量族（世界书 / 设置，定义在根类上，需加根类选择器） ── */
html.miya-dark .miya-worldbook-app,
html.miya-dark .miya-settings-app,
html.miya-dark .mi-set-page {
  --st-bg: #101216;
  --st-bg-warm: #14161a;
  --st-card-bg: rgba(30, 33, 39, 0.80);
  --st-card-bg-hover: rgba(38, 42, 49, 0.92);
  --st-text-primary: #e8eaee;
  --st-text-secondary: #a0a6b0;
  --st-text-tertiary: #7a818c;
  --st-text-muted: #6b7280;
  --st-border: rgba(255, 255, 255, 0.10);
  --st-border-strong: rgba(255, 255, 255, 0.18);
  --st-accent-soft: rgba(255, 255, 255, 0.08);
  --st-accent-warm: #8a90a0;
  --st-accent-warm-soft: rgba(255, 255, 255, 0.06);
  --st-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --st-shadow-md: 0 6px 22px rgba(0, 0, 0, 0.4);
  --st-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ── vf 变量族（vault folio，根类覆盖） ── */
html.miya-dark .ins-vault--folio {
  --vf-paper: #101216;
  --vf-paper-2: #15181d;
  --vf-ink: #e6e8ec;
  --vf-muted: rgba(230, 232, 236, 0.46);
  --vf-faint: rgba(230, 232, 236, 0.24);
  --vf-line: rgba(255, 255, 255, 0.09);
  --vf-line-strong: rgba(255, 255, 255, 0.16);
  --vf-accent: #d6dae0;
  --vf-accent-soft: rgba(255, 255, 255, 0.08);
  --vf-rule: rgba(255, 255, 255, 0.05);
  --vf-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ── 硬编码补丁：聊天 app 会话列表 / 设置表单 / 世界书卡片 ── */
html.miya-dark .miya-chat-app {
  background: #14161a;
}
html.miya-dark .miya-chat-app .ins-search,
html.miya-dark .miya-chat-app input[type="search"] {
  background: #1b1e24;
  color: #e6e8ec;
}
html.miya-dark .st-form-card,
html.miya-dark .mi-set-zone,
html.miya-dark .mi-wb-sort-panel {
  background: rgba(30, 33, 39, 0.96);
}
html.miya-dark .ins-icon-btn,
html.miya-dark .ins-st-cell,
html.miya-dark .ins-bento-cell {
  background: #1b1e24;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ins-ink);
}
html.miya-dark .ins-textarea,
html.miya-dark .ins-text-input,
html.miya-dark .ins-select {
  background: #121418;
  color: #e6e8ec;
  border-color: rgba(255, 255, 255, 0.14);
}
html.miya-dark .ins-chip,
html.miya-dark .ins-ico-btn {
  background: rgba(30, 33, 39, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ins-ink);
}
html.miya-dark .ins-mm-segment {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}
html.miya-dark .miya-dialog-card {
  background: linear-gradient(160deg, #1c1f25 0%, #14161a 100%);
  border-color: rgba(255, 255, 255, 0.12);
}
html.miya-dark .miya-dialog-textarea {
  background: #121418;
  color: #e6e8ec;
}
html.miya-dark .ins-wb-card,
html.miya-dark .ins-wb-editor {
  background: linear-gradient(168deg, #1c1f25 0%, #14161a 100%);
}
html.miya-dark .ins-wb-editor-foot {
  background: rgba(20, 22, 26, 0.92);
}
html.miya-dark .ins-atelier-splash-card,
html.miya-dark .ins-atelier-type-card--specimen {
  background: linear-gradient(160deg, #1c1f25 0%, #14161a 100%);
  border-color: rgba(255, 255, 255, 0.12);
}
html.miya-dark .ins-atelier-rail {
  background: linear-gradient(180deg, rgba(24, 26, 31, 0.95) 0%, rgba(18, 20, 24, 0.98) 100%);
  border-right-color: rgba(255, 255, 255, 0.10);
}
html.miya-dark .ins-atelier-frame,
html.miya-dark .ins-atelier-frame-screen {
  background: linear-gradient(145deg, #1a1d22 0%, #121418 100%);
}
html.miya-dark .ins-atelier-dismiss {
  background: rgba(28, 30, 36, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ── 硬编码补丁：音乐 app ── */
html.miya-dark .ncm-search-bar {
  background: #1b1e24;
}
html.miya-dark .ncm-sheet {
  background: #1a1d22;
}
html.miya-dark .ncm-mine-body {
  background: #14161a;
}
html.miya-dark .ncm-pl-detail {
  background: #14161a;
}
html.miya-dark .ncm-mini-player {
  background: rgba(30, 33, 39, 0.95);
}
html.miya-dark .ncm-sheet-btn {
  background: #22252b;
  border-color: rgba(255, 255, 255, 0.10);
  color: #e6e8ec;
}
html.miya-dark .ncm-sheet-btn--ghost {
  background: #1a1d22;
}

/* ── 硬编码补丁：聊天设置页细碎 ── */
html.miya-dark .mi-pill-note,
html.miya-dark .mi-search,
html.miya-dark .mi-ctx-src-list,
html.miya-dark .mi-bf-tile,
html.miya-dark .mi-copy-bar,
html.miya-dark .mi-bf-block--copy {
  background: #1b1e24;
}
html.miya-dark .mi-bf-block {
  background: rgba(28, 30, 36, 0.9);
}
html.miya-dark .mi-bf-preview,
html.miya-dark .mi-bg-stage,
html.miya-dark .mi-img-slot {
  background: #1b1e24;
}
html.miya-dark .mi-bf-block--applied {
  background: #20232a;
}
html.miya-dark .mi-input--readonly {
  background: #1b1e24;
  color: #9aa1ac;
}
html.miya-dark .mi-ctx-inject--warn {
  background: rgba(120, 90, 20, 0.18);
  color: #d9b45c;
  border-color: rgba(200, 160, 60, 0.3);
}
html.miya-dark .mi-ctx-stats {
  background: linear-gradient(135deg, #1a1d22 0%, #14161a 100%);
}
html.miya-dark .mq-mine-row {
  background: #1a1d22;
}

/* ============================================================
 * miya-dark.css — v3 强化覆盖（!important 压过主题 CSS 与内联样式）
 * 聊天 app 有多套主题（theme-soft / chat-bf-theme-*），且
 * applyChatBodyTheme 会把 body 内联成白色 —— 必须 !important。
 * ============================================================ */
html.miya-dark body,
html.miya-dark .phone {
  background: #0c0e12 !important;
}
html.miya-dark .phone__wall {
  background: #0c0e12 !important;
}

/* 聊天 app 全家桶（会话列表 / 动态 / 联系人 / 我的 四个页 + 容器） */
html.miya-dark .miya-chat-app,
html.miya-dark .miya-chat-app .qq-pages,
html.miya-dark .miya-chat-app .qq-page,
html.miya-dark .miya-chat-app .qq-page__scroll,
html.miya-dark .miya-chat-app .qq-page--msg,
html.miya-dark .miya-chat-app .qq-page--feed,
html.miya-dark .miya-chat-app .qq-page--contacts,
html.miya-dark .miya-chat-app .qq-page--mine,
html.miya-dark .miya-chat-app.theme-soft,
html.miya-dark .miya-chat-app.theme-soft .qq-pages,
html.miya-dark .miya-chat-app.theme-soft .qq-page,
html.miya-dark .miya-chat-app.theme-soft .qq-page__scroll,
html.miya-dark .miya-chat-app.theme-soft .qq-page--msg,
html.miya-dark .miya-chat-app.theme-soft .qq-page--feed,
html.miya-dark .miya-chat-app.theme-soft .qq-page--contacts,
html.miya-dark .miya-chat-app.theme-soft .qq-page--mine,
html.miya-dark .miya-chat-app.theme-soft .qq-chat-swipe__main {
  background: #14161a !important;
}

/* 聊天 app 顶栏 / 底栏 / 搜索 / 会话行 */
html.miya-dark .miya-chat-app .soft-topbar,
html.miya-dark .miya-chat-app .qq-topbar,
html.miya-dark .miya-chat-app .soft-tabbar,
html.miya-dark .miya-chat-app .qq-tabbar,
html.miya-dark .miya-chat-app .soft-search,
html.miya-dark .miya-chat-app .qq-search {
  background: #16181d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html.miya-dark .miya-chat-app .soft-search input,
html.miya-dark .miya-chat-app .qq-search input {
  background: #1b1e24 !important;
  color: #e6e8ec !important;
}
html.miya-dark .miya-chat-app .soft-thread,
html.miya-dark .miya-chat-app .qq-chat-item,
html.miya-dark .miya-chat-app .qq-chat-item--pinned,
html.miya-dark .miya-chat-app .soft-menu,
html.miya-dark .miya-chat-app .soft-menu__item,
html.miya-dark .miya-chat-app .soft-stats,
html.miya-dark .miya-chat-app .soft-profile-card,
html.miya-dark .miya-chat-app .soft-quick-grid,
html.miya-dark .miya-chat-app .soft-quick-card,
html.miya-dark .miya-chat-app .soft-fab,
html.miya-dark .miya-chat-app .mm-feed-card,
html.miya-dark .miya-chat-app .soft-feed-card {
  background: #1a1d22 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e6e8ec !important;
}
html.miya-dark .miya-chat-app .soft-thread__name,
html.miya-dark .miya-chat-app .qq-chat-item__name,
html.miya-dark .miya-chat-app .soft-topbar__title {
  color: #eceef2 !important;
}
html.miya-dark .miya-chat-app .soft-thread__preview,
html.miya-dark .miya-chat-app .qq-chat-item__preview,
html.miya-dark .miya-chat-app .soft-thread__time,
html.miya-dark .miya-chat-app .qq-chat-item__time {
  color: #9aa1ac !important;
}
html.miya-dark .miya-chat-app .soft-tabbar__item,
html.miya-dark .miya-chat-app .qq-tabbar__item {
  color: #9aa1ac !important;
}
html.miya-dark .miya-chat-app .soft-tabbar__item.is-active,
html.miya-dark .miya-chat-app .qq-tabbar__item.is-active {
  color: #eceef2 !important;
}
html.miya-dark .miya-chat-app .soft-search input::placeholder,
html.miya-dark .miya-chat-app .qq-search input::placeholder {
  color: #565c66 !important;
}

/* 设置 / 世界书 根容器 */
html.miya-dark .miya-worldbook-app,
html.miya-dark .miya-settings-app {
  background: #101216 !important;
}
/* 联系人 app 已是深色系，不动 */

/* ============================================================
 * miya-dark.css — v4 高特异性刺头补丁
 * 主题 CSS 里 .miya-chat-app.theme-soft .soft-tabbar.qq-tabbar
 * 带 !important（0-0-4-0）——必须用更高特异性 !important 压过。
 * ============================================================ */

/* 底部导航栏（主题 important 锁死，需 0-0-5-1） */
html.miya-dark .miya-chat-app.theme-soft .soft-tabbar.qq-tabbar {
  background: #16181d !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html.miya-dark .miya-chat-app.theme-soft .soft-tabbar__item.qq-tabbar__item.is-active {
  color: #eceef2 !important;
}
html.miya-dark .miya-chat-app.theme-soft .soft-tabbar__item.qq-tabbar__item {
  color: #8a909c !important;
}

/* 顶部栏（若主题锁） */
html.miya-dark .miya-chat-app.theme-soft .soft-topbar {
  background: #16181d !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* 消息页筛选胶囊（选中态白底） */
html.miya-dark .miya-chat-app .soft-filter.is-active {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #eceef2 !important;
}
html.miya-dark .miya-chat-app .soft-filter {
  color: #8a909c !important;
}

/* 快拍 / 圆形快捷按钮 */
html.miya-dark .miya-chat-app .soft-quick-card__icon,
html.miya-dark .miya-chat-app .ins-quick-card__icon--new,
html.miya-dark .miya-chat-app .soft-story__ava,
html.miya-dark .miya-chat-app .soft-story-ring {
  background: #22252b !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
html.miya-dark .miya-chat-app .soft-quick-card__icon svg,
html.miya-dark .miya-chat-app .ins-quick-card__icon--new svg {
  color: #dfe2e8 !important;
}

/* 空状态文字提亮 */
html.miya-dark .miya-chat-app .qq-page__empty,
html.miya-dark .miya-chat-app .soft-empty,
html.miya-dark .miya-chat-app .qq-empty {
  color: #a0a6b0 !important;
}

/* 动态页 feed 卡片内分隔 */
html.miya-dark .miya-chat-app .mm-feed-social,
html.miya-dark .miya-chat-app .mm-feed-action {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================================
 * miya-dark.css — v5 全 app 深色适配（蚀月 2026-08-30）
 * 覆盖：论坛(fr) / 行程(it) / 日记(dy) / 设置(st)
 * 策略：按根类作用域覆盖变量族 → 整页自动翻深；再补硬编码浅色
 * ============================================================ */

/* ── 论坛 · 韩系 INS 白系编辑风 ── */
html.miya-dark .miya-forum-app {
  --fr-white: #171a1f;
  --fr-cream: #101216;
  --fr-ivory: #14171c;
  --fr-pearl: #1a1d23;
  --fr-mist: rgba(24, 27, 33, 0.86);
  --fr-ink: #e6e8ec;
  --fr-ink-soft: #c4c9d1;
  --fr-muted: rgba(230, 232, 238, 0.55);
  --fr-faint: rgba(230, 232, 238, 0.18);
  --fr-line: rgba(230, 232, 238, 0.08);
  --fr-line-strong: rgba(230, 232, 238, 0.16);
  --fr-accent: #d4b98a;
  --fr-accent-soft: rgba(212, 185, 138, 0.16);
  --fr-rose: #c98f8f;
}
/* 论坛硬编码浅色渐变卡片 */
html.miya-dark .miya-forum-app .fr-card--hero .fr-card__media {
  background: linear-gradient(155deg, #2a2d34 0%, #23262c 45%, #1c1f25 100%);
}
html.miya-dark .miya-forum-app .fr-card,
html.miya-dark .miya-forum-app .fr-post,
html.miya-dark .miya-forum-app .fr-sheet {
  background: var(--fr-white);
}
html.miya-dark .miya-forum-app [style*="background: #faf9f7"],
html.miya-dark .miya-forum-app [style*="background:#faf9f7"] {
  background: #101216 !important;
}

/* ── 行程轨迹 · INS 韩系杂志刊物风 ── */
html.miya-dark .miya-itinerary-app {
  --it-bg: #101216;
  --it-paper: #171a1f;
  --it-ink: #e6e8ec;
  --it-soft: rgba(230, 232, 238, 0.6);
  --it-faint: rgba(230, 232, 238, 0.3);
  --it-hair: rgba(230, 232, 238, 0.08);
  --it-hair2: rgba(230, 232, 238, 0.14);
  --it-accent: #d4b98a;
  --it-accent-soft: rgba(212, 185, 138, 0.16);
  --it-blush: rgba(120, 100, 90, 0.28);
}
/* 行程硬编码浅色渐变 */
html.miya-dark .miya-itinerary-app .it-pick-item,
html.miya-dark .miya-itinerary-app .it-card,
html.miya-dark .miya-itinerary-app .it-sheet {
  background: linear-gradient(135deg, #1a1d23, #171a1f);
}

/* ── 日记 · 编辑风 Ins ── */
html.miya-dark .miya-diary-app {
  --dy-bg: #101216;
  --dy-bg2: #0d0f13;
  --dy-surface: #171a1f;
  --dy-ink: #e6e8ec;
  --dy-soft: rgba(230, 232, 238, 0.62);
  --dy-faint: rgba(230, 232, 238, 0.38);
  --dy-mute: rgba(230, 232, 238, 0.12);
  --dy-hair: rgba(230, 232, 238, 0.08);
  --dy-chip: #1e2127;
  --dy-charcoal: #c4c9d1;
  --dy-accent: #e6e8ec;
  --dy-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --dy-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
}
/* 日记硬编码白底 */
html.miya-dark .miya-diary-app .dy-card,
html.miya-dark .miya-diary-app .dy-sheet,
html.miya-dark .miya-diary-app .dy-surface,
html.miya-dark .miya-diary-app [class*="dy-card"] {
  background: var(--dy-surface);
}

/* ── 设置 · 暖色玻璃刊面 ── */
html.miya-dark .miya-settings-app {
  --st-bg: #101216;
  --st-bg-warm: #14171c;
  --st-card-bg: rgba(26, 29, 35, 0.9);
  --st-card-bg-hover: rgba(32, 36, 43, 0.94);
  --st-text-primary: #e6e8ec;
  --st-text-secondary: #aab0ba;
  --st-text-tertiary: #7d848e;
  --st-text-muted: #5c626b;
  --st-accent: #6ab0ff;
  --st-accent-soft: rgba(106, 176, 255, 0.12);
  --st-accent-warm: #ff8a7a;
  --st-accent-warm-soft: rgba(255, 138, 122, 0.12);
  --st-border: rgba(255, 255, 255, 0.05);
  --st-border-strong: rgba(255, 255, 255, 0.10);
  --st-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.25);
  --st-shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --st-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.35);
  --st-shadow-float: 0 30px 80px rgba(0, 0, 0, 0.65), 0 12px 30px rgba(0, 0, 0, 0.4);
}
/* 设置硬编码白底（开关圆点 / 选中卡片） */
html.miya-dark .miya-settings-app .ins-toggle__knob,
html.miya-dark .miya-settings-app [class*="toggle"] [class*="knob"] {
  background: #d7dbe2 !important;
}
html.miya-dark .miya-settings-app .ins-toggle.is-on {
  background: #1e2127 !important;
}
html.miya-dark .miya-settings-app .miya-settings__card,
html.miya-dark .miya-settings-app [class*="settings-card"] {
  background: var(--st-card-bg);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── v5 补充：论坛残留硬编码白底（拍立得卡/导航栏） ── */
html.miya-dark .miya-forum-app .fr-polaroid {
  background: var(--fr-white);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 2px 5px rgba(0, 0, 0, 0.3);
}
html.miya-dark .miya-forum-app .fr-polaroid__photo {
  background: #23262d;
}
html.miya-dark .miya-forum-app .fr-nav__bar {
  background: rgba(30, 33, 39, 0.92);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 32px rgba(0, 0, 0, 0.5);
}
html.miya-dark .miya-forum-app .fr-nav__item {
  color: #aab0ba;
}
html.miya-dark .miya-forum-app .fr-nav__item.is-active {
  color: #e6e8ec;
}
html.miya-dark .miya-forum-app .fr-nav__fab {
  background: #262a31;
  border-color: rgba(255, 255, 255, 0.14);
}
