/* 主站样式 —— 由 index.html 的内联 <style> 拆分而来。
   内容原样搬移（只去掉了首尾换行），没有改动任何规则。 */

      /* hidden 属性兜底：避免类选择器里的 display 覆盖 UA 的 [hidden]{display:none} */
      [hidden] { display: none !important; }

      /* ---------- 手动刷新 ----------
         切页面时不再自动请求（每次切页都打接口会把 Cloudflare 的
         免费额度很快耗光），改成数据留在内存里、切回来直接显示，
         旁边给一个「刷新」按钮，想更新时自己点。
         视图里统一用 .lw-refresh + LWRefresh 绑定。 */
      .lw-refresh {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex: none;
        border: 1px solid var(--border-input);
        background: var(--surface-2);
        color: var(--text-muted);
        border-radius: 999px;
        padding: 5px 11px;
        font-size: 12px;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
      }
      .lw-refresh:active { background: var(--border); }
      .lw-refresh[disabled] { opacity: 0.55; cursor: default; }
      .lw-refresh .lr-ico { display: inline-flex; align-items: center; justify-content: center; }
      /* 图标是内联 SVG（Pixelarticons reload），固定像素尺寸，别再跟着字号变 */
      .lw-refresh .lr-ico svg { width: 14px; height: 14px; display: block; }
      .lw-refresh.busy .lr-ico { animation: lrSpin 0.8s linear infinite; }
      @keyframes lrSpin { to { transform: rotate(360deg); } }
      @media (prefers-reduced-motion: reduce) {
        .lw-refresh.busy .lr-ico { animation: none; }
      }
      /* 顶部一行：标题 + 刷新按钮 */
      .lw-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 12px 0 4px;
      }
      .lw-bar > .lw-bar-main { flex: 1; min-width: 0; }
      /* 数据是缓存的，给个淡淡的标记，让人知道看到的可能是旧的 */
      .lw-stale {
        font-size: 11px;
        color: var(--text-faint);
      }

      /* 加载动画：一个小方块在轨道里左右来回走。
         颜色只用 var(--accent)，主题一变它就跟着变，不用为每个主题单独写。 */
      @keyframes lwSlide {
        0%   { transform: translateX(0); }
        50%  { transform: translateX(calc(var(--lw-run, 44px) - 10px)); }
        100% { transform: translateX(0); }
      }
      .lw-load {
        --lw-run: 44px;
        display: inline-block;
        vertical-align: -2px;
        width: 46px;
        height: 10px;
        margin-right: 7px;
        position: relative;
        border-radius: 999px;
        background: color-mix(in srgb, var(--accent) 16%, transparent);
      }
      .lw-load::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        border-radius: 3px;
        background: var(--accent);
        animation: lwSlide 1.15s cubic-bezier(0.45, 0, 0.55, 1) infinite;
      }
      /* 尊重「减少动态效果」的系统设置 */
      @media (prefers-reduced-motion: reduce) {
        .lw-load::before { animation: none; }
      }

      :root {
        --bg: #fdf8f2;
        --surface: #fff;
        --surface-2: #efe9e0;
        --surface-3: #f0ece4;
        --art-bg: #fff;
        --text: #3b342c;
        --text-muted: #6b5f50;
        --text-muted2: #9a8c7a;
        --text-faint: #b0a697;
        --text-report: #8c7f6b;
        --border: #efe7da;
        --border-strong: #e0d3c0;
        --border-input: #e0d8d0;
        --ring: #fff;
        --shadow1: rgba(80, 60, 40, 0.15);
        --shadow2: rgba(80, 60, 40, 0.10);
        --shadow3: rgba(80, 60, 40, 0.06);
        --shadow-hover: rgba(80, 60, 40, 0.14);
        --accent: #5b8def;
        --toast-bg: #3b342c;
        --tip-text: #d1944d;
        --tip-btn-border: #f0e2cf;
        --blacktip-bg: #fff8ef;
        --blacktip-border: #f0e2cf;
        --blacktip-text: #b97f3a;
        --like: #e5574b;
        --like-bg: #fff1ee;
        --like-border: #eec9c2;
        --nav-base: 255, 253, 250;
        /* 文字光晕色：浅色主题用白光，深色主题用黑光 */
        --nav-halo: 255, 255, 255;
      }
      [data-mood="dark"] {
        --bg: #211c17;
        --surface: #2a251f;
        --surface-2: #38312a;
        --surface-3: #322c25;
        --art-bg: #f6f2ea;
        --text: #f1ead9;
        --text-muted: #c5baa7;
        --text-muted2: #a39582;
        --text-faint: #857b68;
        --text-report: #97896d;
        --border: #4a4238;
        --border-strong: #5e5448;
        --border-input: #554b3e;
        --ring: #2a251f;
        --shadow1: rgba(0, 0, 0, 0.30);
        --shadow2: rgba(0, 0, 0, 0.22);
        --shadow3: rgba(0, 0, 0, 0.16);
        --shadow-hover: rgba(0, 0, 0, 0.55);
        --accent: #76a3ff;
        --toast-bg: #3e372e;
        --tip-text: #e8b970;
        --tip-btn-border: #4e3a20;
        --blacktip-bg: #2b2316;
        --blacktip-border: #4e3a20;
        --blacktip-text: #eec27d;
        --like: #ff8577;
        --like-bg: #3d231f;
        --like-border: #5e352c;
        --nav-base: 42, 38, 33;
        --nav-halo: 0, 0, 0;
      }

      /* ---------- 5 套特色主题 ---------- */
      html[data-theme="sakura"] {
        --bg: #fdf2f5;
        --surface: #fffafb;
        --surface-2: #f7e7ec;
        --surface-3: #f2dde4;
        --art-bg: #fff;
        --text: #4a3540;
        --text-muted: #7d6470;
        --text-muted2: #a08d97;
        --text-faint: #bfa9b3;
        --border: #f2dde4;
        --border-strong: #e8c6d1;
        --border-input: #e4c2ce;
        --accent: #e0698a;
        --shadow1: rgba(150, 90, 110, 0.16);
        --shadow-hover: rgba(150, 90, 110, 0.18);
        --like: #e0576a;
        --like-bg: #fdeef1;
        --like-border: #f0c9d3;
        --nav-halo: 255, 255, 255;
      }
      html[data-theme="sea"] {
        --bg: #f0f8fa;
        --surface: #fbfeff;
        --surface-2: #e4f1f4;
        --surface-3: #d8eaee;
        --art-bg: #fff;
        --text: #2c3f47;
        --text-muted: #5a7079;
        --text-muted2: #8599a1;
        --text-faint: #a3b4ba;
        --border: #dcecef;
        --border-strong: #c3dee3;
        --border-input: #bfdbe1;
        --accent: #2f93a8;
        --shadow1: rgba(40, 100, 115, 0.15);
        --shadow-hover: rgba(40, 100, 115, 0.18);
        --like: #e05a6a;
        --like-bg: #fdeff1;
        --like-border: #f2ccd3;
      }
      html[data-theme="mint"] {
        --bg: #f2f9f1;
        --surface: #fcfffc;
        --surface-2: #e6f2e6;
        --surface-3: #dcecdd;
        --art-bg: #fff;
        --text: #33452f;
        --text-muted: #5c705a;
        --text-muted2: #869a84;
        --text-faint: #a3b4a1;
        --border: #ddedde;
        --border-strong: #c3ddc5;
        --border-input: #bfd9c1;
        --accent: #3f9c5c;
        --shadow1: rgba(50, 110, 65, 0.15);
        --shadow-hover: rgba(50, 110, 65, 0.18);
        --like: #e0576a;
        --like-bg: #fdeff1;
        --like-border: #f2ccd3;
      }
      html[data-theme="sunset"] {
        --bg: #fff6ec;
        --surface: #fffcf8;
        --surface-2: #fbeedd;
        --surface-3: #f7e3cf;
        --art-bg: #fff;
        --text: #4a3826;
        --text-muted: #7d6248;
        --text-muted2: #a08771;
        --text-faint: #bda189;
        --border: #f7e3cf;
        --border-strong: #eecfb0;
        --border-input: #ebc9a7;
        --accent: #d9823e;
        --shadow1: rgba(150, 100, 55, 0.16);
        --shadow-hover: rgba(150, 100, 55, 0.18);
        --like: #d9524a;
        --like-bg: #fdeeea;
        --like-border: #f2ccc4;
      }
      html[data-theme="midnight"] {
        --bg: #191a2e;
        --surface: #21223a;
        --surface-2: #2b2c48;
        --surface-3: #33345a;
        --art-bg: #f4f2ee;
        --text: #ece9f5;
        --text-muted: #b6b2cc;
        --text-muted2: #918ca8;
        --text-faint: #6f6a86;
        --border: #2e2f4c;
        --border-strong: #3d3e63;
        --border-input: #3a3b5e;
        --ring: #21223a;
        --shadow1: rgba(0, 0, 0, 0.34);
        --shadow2: rgba(0, 0, 0, 0.26);
        --shadow3: rgba(0, 0, 0, 0.18);
        --shadow-hover: rgba(0, 0, 0, 0.58);
        --accent: #8b7cf0;
        --toast-bg: #34355a;
        --like: #ff8f9c;
        --like-bg: #3a2436;
        --like-border: #553044;
        --nav-halo: 0, 0, 0;
      }

      /* ---------- PWA 安装提示条 ---------- */
      .pwa-tip {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 11px 13px;
        border-radius: 14px;
        background: var(--surface);
        border: 1px solid var(--border-strong);
        box-shadow: 0 6px 22px var(--shadow1);
        font-size: 13px;
        color: var(--text);
        max-width: 460px;
        margin: 0 auto;
      }
      .pwa-tip span { flex: 1; line-height: 1.5; }
      .pwa-go {
        padding: 7px 14px;
        border-radius: 10px;
        border: none;
        background: var(--accent);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
      }
      .pwa-x {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
        border-radius: 50%;
        border: none;
        background: var(--surface-2);
        color: var(--text-muted);
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
      }

            * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

      html { background: var(--bg); overflow-x: clip; }

      body {
        margin: 0;
        min-height: 100vh;
        background: var(--bg);
        /* 不设这一行时 body 用浏览器默认的纯黑，深色模式下会变成黑字黑底 */
        color: var(--text);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
        padding: 16px 16px 112px;
        transition: background 0.25s ease, color 0.25s ease;
        overflow-x: clip;
      }

      /* 让表单控件、滚动条也跟着主题走 */
      :root { color-scheme: light; }
      html[data-mood="dark"] { color-scheme: dark; }
      html[data-theme="midnight"] { color-scheme: dark; }

      /* 路由出口用 display:contents 彻底"透明"：
         各视图的根元素直接参与 body 的布局，与迁移前的单文件页面完全一致。
         （外壳不设 display:flex，因为原本只有画板/联机/管理是 flex 布局，
           社区/日志/设置原本是块级布局，强行统一会导致宽度算错） */
      #siteRoot { display: contents; }

      /* 关键：#app 是 Vue 挂载点，也是 body 的 flex 子项。
         align-items:center 会让它按内容宽度收缩（本项目最宽元素是 460px），
         于是页面内所有 width:100% 都相对 460px 解析，在窄屏上整体超宽。
         把它钉死为可视宽度，各视图的 width:100% 才会正确。 */
      #app {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
      }

      /* 关键补丁：把视图根元素钉成可视宽度。

         #siteRoot 是 display:contents，所以视图的根元素在 DOM 上确实是
         #siteRoot 的子元素，在布局上则是 **#app 的 flex 子项**。
         而 flex 子项有两处默认值会咬人：
           · width:auto —— 对普通块级元素是「撑满」，对 flex 子项却是
             「按内容收缩」，于是根元素被锁死在内容的 max-content 宽度上
           · min-width —— 默认 auto（=min-content），不许缩得比内容更窄
         两者合起来就是：根元素宽度只跟内容走，跟屏幕宽度无关。
         之前 8 个视图的中文容器漏了 width:100%（.u-wrap/.ch-wrap/.rk-wrap/
         .tk-wrap，以及靠 min-height:100vh 撑满的 .ach-page/.av-page/
         .in-page/.mail-page），在窄屏上整页横向溢出 —— 又因为 html/body
         都有 overflow-x:clip，溢出部分既看不见、也滚不回去，
         表现就跟「内容被吃掉了」一样。

         这里只在 #siteRoot 直接子元素上补 width/min-width，不动 max-width：
         max-width 得留给各视图自己（社区 .container 是 760px、
         日志/设置是 560px），用 id 选择器压过去会把它们全改成窄版。
         视图自己的 .xxx-wrap { width:100% } 仍然保留，两者一致不冲突。 */
      #siteRoot > * {
        width: 100%;
        min-width: 0;
      }

      /* 兜底：极老浏览器不支持 display:contents 时，用 block+100% 保持同样宽度 */
      @supports not (display: contents) {
        #siteRoot { display: block; width: 100%;
        --nav-halo: 0, 0, 0;
      }
      }

      /* ---------- 底部导航（全局壳，四个页面共用） ---------- */
      .bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);
        z-index: 80;
        display: flex;
        align-items: center;
        gap: 2px;
        width: min(420px, calc(100% - 36px));
        padding: 8px 12px;
        /* --nav-op 由设置页的滑块实时调节，0 = 完全透明，1 = 最实 */
        background: rgba(var(--nav-base, 255, 253, 250), var(--nav-op, 0.66)) !important;
        -webkit-backdrop-filter: blur(calc(6px + var(--nav-op, 0.66) * 22px)) saturate(180%);
        backdrop-filter: blur(calc(6px + var(--nav-op, 0.66) * 22px)) saturate(180%);
        border: 1px solid rgba(180, 168, 150, 0.30) !important;
        border-radius: 999px;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
      }
      [data-mood="dark"] .bottom-nav {
        background: rgba(var(--nav-base, 42, 38, 33), var(--nav-op, 0.62)) !important;
        border-color: rgba(255, 255, 255, 0.10) !important;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      }
      html.glass-off .bottom-nav,
      html.glass-off [data-mood="dark"] .bottom-nav {
        /* 关掉毛玻璃：仍按同一个不透明度混色，滑块依然有效 */
        background: color-mix(in srgb, var(--surface) calc(var(--nav-op, 0.66) * 100%), transparent) !important;
        border-color: var(--border) !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
      }

      @keyframes glassJelly {
        0%   { transform: translateX(-50%) scale(1, 0.98) translateY(5px); }
        30%  { transform: translateX(-50%) scale(1.04, 0.99) translateY(-4px); }
        55%  { transform: translateX(-50%) scale(0.985, 1.012) translateY(3px); }
        78%  { transform: translateX(-50%) scale(1.01, 0.997) translateY(-1px); }
        100% { transform: translateX(-50%) scale(1, 1) translateY(0); }
      }
      .bottom-nav.jelly { animation: glassJelly 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

      /* ---------- 导航栏样式：共 6 款，用 data-nav-style 切换 ----------
         玻璃(glass)为默认。其余 5 款覆盖背景、边框、阴影与高亮方式。
         原有规则用了 !important，所以这里也必须带 !important 才能覆盖。 */

      /* 实心：不透明色块，边界最清楚 */
      html[data-nav-style='solid'] .bottom-nav,
      html[data-nav-style='solid'][data-theme] .bottom-nav {
        background: var(--surface) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-color: var(--border) !important;
        box-shadow: 0 6px 20px var(--shadow1, rgba(0, 0, 0, 0.08)) !important;
      }

      /* 描边：完全透明底，只留一圈细边 */
      html[data-nav-style='outline'] .bottom-nav,
      html[data-nav-style='outline'][data-theme] .bottom-nav {
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-color: var(--border-strong) !important;
        box-shadow: none !important;
      }
      html[data-nav-style='outline'] .bottom-nav a.active {
        box-shadow: none !important;
        border-radius: 999px;
        outline: 1.5px solid var(--accent);
        outline-offset: -1.5px;
      }

      /* 药丸：底透明，只有当前页是个填充药丸 */
      html[data-nav-style='pill'] .bottom-nav,
      html[data-nav-style='pill'][data-theme] .bottom-nav {
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-color: transparent !important;
        box-shadow: none !important;
        padding: 6px 10px !important;
      }
      html[data-nav-style='pill'] .bottom-nav a.active {
        background: var(--accent) !important;
        color: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
        border-radius: 999px !important;
      }

      /* 分段：四格之间用竖线分隔，像经典 tabbar */
      html[data-nav-style='segmented'] .bottom-nav,
      html[data-nav-style='segmented'][data-theme] .bottom-nav {
        background: var(--surface) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-color: var(--border) !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 14px var(--shadow1, rgba(0, 0, 0, 0.07)) !important;
        padding: 6px 8px !important;
        gap: 0 !important;
      }
      html[data-nav-style='segmented'] .bottom-nav a {
        border-radius: 10px;
        border-right: 1px solid var(--border);
      }
      html[data-nav-style='segmented'] .bottom-nav a:last-child { border-right: none; }
      html[data-nav-style='segmented'] .bottom-nav a.active {
        background: var(--surface-2) !important;
        box-shadow: none !important;
      }

      /* 渐变：用强调色渐变，存在感最强 */
      html[data-nav-style='gradient'] .bottom-nav,
      html[data-nav-style='gradient'][data-theme] .bottom-nav {
        background: var(--accent) 62%, #000) 100%) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-color: transparent !important;
        box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent) !important;
      }
      html[data-nav-style='gradient'] .bottom-nav a {
        color: rgba(255, 255, 255, 0.82) !important;
        text-shadow: none !important;
      }
      html[data-nav-style='gradient'] .bottom-nav a.active {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.22) !important;
        box-shadow: none !important;
      }

      /* ---------- 导航栏放到顶部 ---------- */
      html[data-nav-pos='top'] .bottom-nav {
        top: calc(10px + env(safe-area-inset-top, 0px));
        bottom: auto;
      }
      html[data-nav-pos='top'] body {
        /* 原本给底部导航留的 112px 改成顶部留白 */
        padding-top: calc(84px + env(safe-area-inset-top, 0px));
        padding-bottom: 16px;
      }
      /* 顶部时给内容区留出与导航相同的高度 */
      html[data-nav-pos='top'] #siteRoot {
        width: 100%;
      }
      @keyframes switchWobble {
        0%   { transform: scale(1); }
        40%  { transform: scale(1.18) rotate(-5deg); }
        70%  { transform: scale(0.94) rotate(2deg); }
        100% { transform: scale(1) rotate(0); }
      }
      .switch.jelly { animation: switchWobble 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

      .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 7px 0 6px;
        border-radius: 14px;
        text-decoration: none;
        /* 导航越透明，文字反而越清晰、每个图标越自带底衬，保证任何内容上都能看清 */
        color: color-mix(in srgb, var(--text-faint) calc(var(--nav-op, 0.66) * 100%), var(--text));
        /* 不用背景色块（叠在导航条上会显出一块亮斑），改用文字光晕：
           导航越透明光晕越强，任何内容上文字都清晰，且永远不会出现方块 */
        background: transparent;
        text-shadow: 0 0 calc((1 - var(--nav-op, 0.66)) * 5px)
          rgba(var(--nav-halo, 255, 255, 255), calc((1 - var(--nav-op, 0.66)) * 0.95));
        font-size: 10px;
        font-weight: 700;
        transition: color 0.2s, background 0.2s;
      }
      .bottom-nav a .nav-icon { font-size: 18px; line-height: 1; }
      /* 像素图标版的导航图标。emoji 的兜底 span 保持原样 */
      .bottom-nav a .nav-px {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        min-height: 22px;
      }
      /* 高亮项不再用 surface-2（深色下比导航条亮很多，会浮出一个方块），
         改用同底色的淡强调色，透不透明都协调 */
      .bottom-nav a.active {
        color: var(--accent);
        background: transparent;
        box-shadow: inset 0 -2.5px 0 var(--accent);
      }

      /* ---------- 全局提示 ---------- */
      #toast {
        position: fixed;
        left: 50%;
        bottom: 96px;
        /* 收起状态：往下沉一点、缩一点、透明 */
        transform: translate(-50%, 14px) scale(.94);
        transform-origin: 50% 100%;
        z-index: 120;
        max-width: 86vw;
        padding: 10px 18px;
        border-radius: 12px;
        background: var(--toast-bg);
        color: #f5f0e6;
        font-size: 13px;
        font-weight: 600;
        text-align: center;
        word-break: break-word;
        opacity: 0;
        pointer-events: none;
        /* 消失用短促的 ease-in；出现时换成弹性曲线（见 .show） */
        transition: opacity .18s ease-in, transform .18s ease-in;
      }
      #toast.show {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
        transition: opacity .22s ease-out, transform .34s cubic-bezier(.2, 1.35, .4, 1);
      }
      @media (prefers-reduced-motion: reduce) {
        #toast, #toast.show { transition: opacity .12s linear; transform: translate(-50%, 0); }
      }
              /* 无限循环的那些直接停掉，不然会「闪一下」 */
        [class*='lwa-'][class*='pulse'],
        [class*='lwa-'][class*='beat'],
        [class*='lwa-'][class*='float'],
        [class*='lwa-'][class*='glow'],
        [class*='lwa-'][class*='breathe'],
        [class*='lwa-'][class*='shine'],
        [class*='lwa-'][class*='ring'],
        [class*='lwdeco-wave'] i,
        [class*='lwfx-unread']::after {
          animation: none !important;
        }
      }

/* ============ 轻量化：全站压平 ============
   画板页是白底 + 1px 细线 + 单一蓝色强调；其余页面被「暖色渐变底 +
   多层暖灰 surface + 柔和投影」压得比较重，所以看起来"臃肿"。

   这一层只动观感、不动布局：
   - 页面底色：渐变已在各自主题里压平成纯色（保留色相）
   - surface-2/3 向白靠拢，卡片之间不再靠色差「浮起来」
   - 投影令牌清空，层级只靠描边
   放在文件最后，覆盖前面所有主题的取值。 */
:root,
html[data-theme] {
  --surface-2: #f7f3ec;
  --surface-3: #f2ece3;
  --shadow1: transparent;
  --shadow2: transparent;
  --shadow3: transparent;
  --shadow-hover: transparent;
}
[data-mood="dark"],
html[data-theme][data-mood="dark"] {
  --surface-2: #2f2a24;
  --surface-3: #342f28;
  --shadow1: transparent;
  --shadow2: transparent;
  --shadow3: transparent;
  --shadow-hover: transparent;
}

/* 内联的像素图标（Pixelarticons，viewBox 0 0 24 24）默认按字号大小走，
   和文字同色、基线对齐；需要具体尺寸的地方（如设置页图标槽）再单独覆盖。 */
svg[viewBox="0 0 24 24"] {
  width: 1.15em; height: 1.15em;
  vertical-align: -0.18em;
  fill: currentColor;
}

/* 底部导航图标：Pixelarticons 单色，尺寸由 app.js 的 pxIconSize 决定 */
.bottom-nav .nav-px { display: inline-flex; align-items: center; justify-content: center; }
.bottom-nav .nav-px svg { width: 100%; height: 100%; }

/* ============ 邀请好友（从「我的」挪到「设置」） ============ */
.invite-rules {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.invite-rules b { color: var(--accent); font-weight: 800; }
.invite-code-label {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 7px;
}
.invite-code {
  display: block;
  background: var(--surface-2);
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 15px 8px;
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.invite-copy {
  width: 100%;
  margin-top: 10px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.invite-copy:active { transform: scale(0.97); }
/* 战绩：三格小数据，和创作账本同一套观感 */
.invite-stat {
  display: flex;
  margin-top: 14px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 11px 0;
}
.invite-stat .is-cell { flex: 1; text-align: center; position: relative; }
.invite-stat .is-cell + .is-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 22px;
  background: var(--border-strong);
}
.invite-stat .is-num { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.2; }
.invite-stat .is-lab { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.invite-bind {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong, rgba(128,128,128,0.3));
}
.invite-bind-tip { font-size: 12px; color: var(--text-muted); margin-bottom: 9px; line-height: 1.6; }
.invite-bind-row { display: flex; gap: 8px; }
.invite-bind-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(128,128,128,0.35));
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.invite-bind-btn {
  flex: none;
  padding: 0 20px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.invite-bind-btn:active { transform: scale(0.96); }
.invite-bind-btn:disabled { opacity: 0.5; }
