/* ══════════════════════════════════════════════════════════════════
   星座.live · 手机版（mobile.css）
   ──────────────────────────────────────────────────────────────────
   主上 2026-11-08 口径：
     1）网站重新弄一个手机版（工作台不用动）
     2）尽可能保留所有元素，手机上内容也要看得清楚
     3）顶部要有导航条
     4）logo 要完整，不能分割开

   设计原则：
     · 只作用于手机断点（≤820px），PC 版一行不改
     · 保留全部元素，不隐藏功能，改用「可横向滑动的导航条」容纳 17 个入口
     · logo 恢复为完整尺寸（62×72），不压缩、不裁切
     · 正文最小 13px、表格/卡片可纵向堆叠，保证看得清
   ══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   手机版主断点（≤820px）—— 全部手机规则集中于此
   2026-11-08 重构：原来分散在 3 个同名 @media 块里（共 139 个 !important、
   17 个选择器重复定义），维护与排错都困难。现在合并为单一块。
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {

  /* ─────────── ① 顶栏：logo 完整 + 导航条 ─────────── */

  /* 顶栏改为两行：第一行 logo+品牌，第二行可滑动的导航条 */
  header.site .bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    gap: 0;
    padding: 8px 0 0;
    width: calc(100% - 20px);
  }

  /* 品牌区：单独一行，左对齐，完整显示 logo */
  header.site .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px 6px;
    flex: none;
  }

  /* ⚠️ 关键：手机端 logo 必须是完整尺寸。
     原来 @media max-width:760 把它压成 26×26 —— 图形被挤成一团，
     看起来就像"logo 被分割"（主上附件2 指的问题）。 */
  header.site .logo-slot {
    width: 62px;
    height: 72px;
    flex: none;
    margin-left: 0;
    margin-right: -6px;
  }
  header.site .logo-slot svg,
  header.site .logo-slot > * {
    width: 100%;
    height: 100%;
    overflow: visible;      /* 不裁切旋转的星尘 */
  }

  header.site .brand-name {
    font-size: 20px;
    line-height: 1.1;
  }
  header.site .brand-slogan {
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
  }
  header.site .brand-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  /* 导航条：横向铺开、可滑动，所有入口都保留 */
  header.site nav.screens {
    display: flex !important;      /* 覆盖原来 760px 断点里的 display:none */
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: static;
    border-radius: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  header.site nav.screens::-webkit-scrollbar { display: none; }

  /* 导航按钮：足够大、字够清楚（实测 DOM：#nav-screens > button，无 class） */
  header.site nav.screens > button {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.2;
  }

  /* 顶栏下加一条细分割线，让"导航条"边界清楚 */
  header.site nav.screens::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
      transparent, rgba(150,120,255,.35), transparent);
  }
  header.site nav.screens { position: relative; }

  /* 右侧渐隐：提示"还能往右滑"（否则最后几个入口看起来像被切坏）
     ⚠️ 2026-11-10 修复（主上：「还有色块」）：
        这个伪元素原来是 `right:0` 的 34px 宽横向渐变，
        用 inset 算出来落在 x=336~370、y=6~44，
        **正好压在右上角「工作台」按钮的右半截上**（按钮 x=290~366, y=23~55）。
        它 `pointer-events:none`，所以 elementFromPoint 永远检测不到，
        前几轮排查全被它躲过去了 —— 像素上表现为按钮右端从 184 平滑掉到 98，
        肉眼就是"一块深色矩形把按钮右边切了"。

        修法：不再用绝对定位压在内容上，改成**贴着导航行底部的一条**，
              并且只在导航真的可横向滚动时才显示（用 ::after 的高度限定在 nav 区）。 */
  header.site .bar { position: relative; }
  /* ⚠️ 2026-11-13 移除「右侧渐隐」伪元素（主上：「附件1 里面 附件2 的黑块一直没有解决。要清楚掉」）
     ── 它是这个黑块的真正来源 ──
       · 22px 宽、40px 高，linear-gradient(90deg, 透明 → rgba(10,6,32,.72))
       · position:absolute; right:0 → 压在导航条最右端（实测 x=367..371 覆盖「今日…」按钮）
       · pointer-events:none → **elementFromPoint 永远测不到**，DOM 扫描也找不到
         （前两轮我扫"右边缘深色元素"扫不到它，就是这个原因；只有像素分析能发现）
       · 2026-11-10 曾把它从"压按钮右半截"改成"贴导航行底部"，但宽度 22px 依然
         盖住最右那个按钮，手机窄屏下表现为一块深色竖条
     ⇒ 直接删除。用户能看到"还能往右滑"靠的是按钮被裁切这个视觉线索，
        不需要再叠一层渐隐（反而误伤可点区域）。 */
  /* header.site .bar::after { ... } 已移除 */

  /* ─────────── ② 全局：留白收窄、字号不缩水 ─────────── */

  .screen-inner {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  /* 防止任何元素横向溢出（首屏已实测 24 个溢出元素） */
  .screen, .screen-inner, section.screen {
    overflow-x: hidden;
  }

  /* 正文最小可读 13px */
  body, p, .sub, .card p, li {
    font-size: 13px;
    line-height: 1.65;
  }

  /* ─────────── ③ 今日运程页：三栏 → 纵向堆叠 ─────────── */

  .today-stage {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 100%;
    margin: 14px auto 20px;
  }

  /* 圆盘：铺满可用宽度 */
  .today-wheel-wrap {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 16px;
  }
  .today-wheel-wrap > #today-wheel,
  #today-wheel {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* 盘下波浪：跟圆盘同宽 */
  #today-wave {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* 左右信息栏：改为上下两块，占满宽度，不再挤在两侧 */
  .today-left, .today-right, .today-side {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    order: 2;
  }

  /* ─────────── ④ 今日运程：12 维卡片 ─────────── */

  #today-dims {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  #today-dims .dimcard {
    width: 100%;
    padding: 12px 14px;
  }
  #today-dims .dimcard h3,
  #today-dims .dimcard .dc-title {
    font-size: 15px;
  }

  /* ─────────── ⑤ 排盘输入条：4 列 → 2 列 → 1 列 ─────────── */

  .formgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .formgrid > div:last-child {
    grid-column: 1 / -1;      /* 按钮独占一行 */
  }
  .field input, .field select {
    height: 44px;
    font-size: 15px;          /* ≥16px 可避免 iOS 自动放大；44px 高便于点按 */
  }
  #today-birth-bar { margin-bottom: 12px; }
  .today-birth-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* ─────────── ⑥ 星盘 / 能力 / 人格等图表页 ─────────── */

  /* 星盘圆盘：在手机上放大到接近满宽，保证细节看得清 */
  #bigchart {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* 命盘页的左右栏（.chart-arena 结构）改为纵向 */
  .chart-arena {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
  }
  .chart-arena .chart-side,
  .chart-arena .side,
  .chart-arena .chart-block {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ─────────── ⑦ 卡片与网格：多列改单列 ─────────── */

  .cards, .grid, .dim-grid, .card-grid {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  /* 表格横向可滑，不挤压内容 */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }

  /* ─────────── ⑧ 弹窗：手机上占满屏幕 ─────────── */

  .modal-card, .modal-box {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 16px;
  }

  /* ─────────── ⑨ 屏指示器 / 底部切换 ─────────── */

  #dots {
    display: none;      /* 已有顶部导航条，屏点不再需要（避免占位） */
  }

  /* 滑动切换屏在手机上的触控提示 */
  .screen { -webkit-tap-highlight-color: transparent; }

/* ── 以下为后续几轮补充的规则（原分散在两处） ── */
  /* ─────────── ⑤ 首屏登录卡：圆盘/表单不溢出 ───────────
     实测 390px 下 .hero-art 有 transform:translateX(56px)，
     右沿 436 > 390 ⇒ 内容被切（users 报「元素被分割」的同类问题）。
     planetlock-mobile.css 只覆盖了 #s-chart，首屏 hero-grid 没管到。 */
  .hero-grid {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    grid-template-columns: none !important;
    width: 100%;
    max-width: 100%;
  }
  .hero-grid > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }
  .hero-art,
  .pl-wrap,
  .pl-stage {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;      /* 关键：去掉 translateX(56px) */
  }
  /* 首屏圆盘按屏幕宽度缩放，保持完整可见 */
  .hero-art {
    aspect-ratio: auto;
    display: flex;
    justify-content: center;
    padding: 0 !important;
  }
  .hero-art svg,
  .pl-svg {
    width: min(100%, 340px) !important;
    height: auto !important;
    max-width: 100% !important;
    overflow: visible;
  }
  .pl-core,
  .pl-core-inner,
  .pl-core-pane {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* ─────────── ⑩ 玛雅页：日历网格 509px 宽，手机放不下 ───────────
     实测 390px 下 .maya-cal-left 宽 539、.mc-grid 内部 8 列撑到 509，
     整块被推到屏幕外 ⇒ 82 个元素溢出。
     处理：日历容器允许横向滑动（保留 8 列信息不删），外层做溢出约束。 */
  .maya-cal-left,
  .maya-cap,
  .mc-grid,
  .mc-legend {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  /* 日历本体横向可滑，不压缩格子（压缩会看不清日期） */
  .maya-cal-left {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mc-grid {
    min-width: 460px;      /* 保留 8 列的辨识度，靠滑动查看 */
  }
  /* 玛雅页整体不允许把页面撑宽 */
  #s-maya, #s-maya .screen-inner { overflow-x: hidden; }

  /* ─────────── ⑪ 人格页：装饰光晕不出屏 ─────────── */
  .ph-glow {
    max-width: 100vw !important;
    pointer-events: none;
  }

  /* ─────────── ⑫ 手机端禁用左右栏的"对齐圆心"位移 ───────────
     真因：app.js 的 alignTodaySidesToCenter() 会给 .today-side 设
     --tw-side-shift（PC 版用来把左右栏中线对到圆心的 transform）。
     手机上左右栏已改成上下堆叠，这个位移会把它们推到圆盘上面重叠：
     实测 390px 下 圆盘 y=634、左栏 y=600、右栏 y=594 —— 三者压在一起。
     手机端把 shift 归零，让 flex column 正常堆叠。 */
  .today-stage .today-side,
  .today-side {
    --tw-side-shift: 0px !important;
    transform: none !important;
    position: static !important;
  }
  /* 堆叠顺序：圆盘+波浪 → 左栏 → 右栏 */
  .today-center { order: 1 !important; }
  .today-side { order: 2 !important; }
  .today-side.today-right { order: 3 !important; }

  /* ─────────── ⑬ 顶栏让位（2026-11-08 第二十六轮）───────────
     主上附件1：「原始的标题bar压住主要标题了，所有都是全部要调整。」

     真因：header.site 是 position:fixed + z-index:60，
           #stage / .screen 靠 --barh（PC 96px、旧 760 断点写死 58px）给它让位。
           但手机版顶栏改成两行（logo 一行 + 导航条一行）后实测高 138px，
           而 .screen 的 inset 仍是 58px ⇒ 内容从 58px 开始排，
           被 138px 高的顶栏压住 80px（实测标题 y=101 落在顶栏内）。

     修法：不让位靠写死数字，改成 app.js 实测 header 高度后写入
           --mob-barh，这里消费它。顶栏高度随字体/换行变化也不会再压内容。 */
  #stage {
    padding-top: var(--mob-barh, 140px) !important;
  }
  .screen {
    inset: var(--mob-barh, 140px) 0 0 0 !important;
    padding: 10px 12px 84px !important;
  }
  /* 顶栏自身：两行紧凑排布，不要虚高 */
  header.site .bar {
    padding: 6px 0 4px;
    gap: 0;
  }
  header.site nav.screens {
    padding: 4px 2px 6px;
  }

  /* ─────────── ⑭ 图表满屏（2026-11-08 第二十六轮）───────────
     主上附件4：「这些全部都要满屏，特别是命盘，否则看不见。其它同样原理。」

     实测各屏图表只占 80~92% 宽（内边距吃掉 12~40px）。
     手机屏幕本来就窄，圆盘类图表必须尽量满宽才看得清细节。
     做法：图表容器撑满到屏幕边（负边距抵消 .screen 的 padding）。 */

  /* 屏内留白：给文字正常留白（主上 2026-11-13）
     ══════════════════════════════════════════════════════════════════
     历史：2026-11-08 第二十六轮为了「图表满屏」，把这条强行压成 6px：
             `.screen { padding-left:6px !important; padding-right:6px !important }`
           图表确实撑满了，但**所有文字也跟着贴边**——实测 18 个屏里
           标题左沿 x=6、正文最右沿 384（右边距 6px），
           星盘首屏「输入出生日期…」那段甚至左右都贴（左空 6 / 右空 7）。

     主上 2026-11-13：「字体都完全靠右了，没有登陆的时间，整个手机版都有类似的问题。」
     ⇒ 恢复 16px 正常留白（文字类内容需要呼吸边）；
       图表类容器改由下方「负边距抵边」规则单独撑满，两者不再互相绑架。
     ══════════════════════════════════════════════════════════════════ */
  .screen { padding-left: 16px !important; padding-right: 16px !important; }
  .screen-inner { padding-left: 0 !important; padding-right: 0 !important; }

  /* err-ok: 删除与下方重复的图表规则（已读真源 mobile.css:454-479 两段原文）
     454-466 与 468-479 是同一批选择器的两套互斥写法，保留下方合并版即可。 */
  /* 所有圆盘/图表类容器：**抵消 .screen 的 16px，撑满到屏幕边**
     err-ok: 已读真源 mobile.css 自身 462-479 两段原文（原先互相打架）
     原状况：462-466 写 margin:-16 / width:calc(100%+32px)，
             468-479 又写 margin:auto / width:100% —— 后者覆盖前者，
             结果 margin-left 实测 0px、宽度退回 342（视口 390），图表并不满宽。
     现在合成唯一一条：负边距 + calc 宽度 + max-width 同值，
     margin 必须显式 -16px（不能用 auto，否则抵不了 .screen padding）。 */
  #today-wheel, #today-wave, #today-wheel-wrap,
  #bigchart, .pl-wrap, .pl-stage,
  .need-chart, .term-wheel, .sc-wheel, .life-chart,
  .chart-block, .persona-panel,
  #s-chart .hero-art {
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    box-sizing: border-box;
  }

  /* 圆盘类 SVG：保证是正方形、按宽度自适应（height:auto 会按 viewBox 等比） */
  #today-wheel svg, #bigchart svg, .term-wheel svg, .sc-wheel svg,
  .need-chart svg, .life-chart svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
  }

  /* 今日运程的圆盘：占满宽度（原来被 .today-center 的 680 上限卡住） */
  .today-center { width: 100% !important; max-width: 100% !important; }

  /* 卡片：左右留 4px，让内容尽量宽 */
  .card, .nx-card, .big-b { margin-left: 4px; margin-right: 4px; }

  /* ─────────── ⑮ 右上角「登录」按钮 ───────────
     主上附件2：「"登录" 两字放右上角。点击后跳出一个 圆盘就是 附件3 这样。」 */

  /* 手机端隐藏原位的大圆盘（它会搬进弹窗），只留右上角按钮 */
  .hero-art { position: relative; }
  .hero-art > #pl-wrap-src {
    /* ⚠️ 必须 !important：桌面端有 @media(min-width:821px) 的 display:block!important，
       不加会在手机上被它顶掉，导致大圆盘仍留在首屏（实测 display=block）。 */
    display: none !important;
  }
  /* 主上 2026-11-08：「登陆我是要放在根logo同一行的右上角。」
     原来 position:fixed 浮在顶栏下方（y=144，独立一层）。
     现在放进 .brand 那一行，靠右对齐 —— 与 logo 同排，视觉上就是"根 logo 右上角"。
     做法：.brand 变成 flex 行（logo+文字 | 按钮），按钮 margin-left:auto 推到最右。 */
  header.site .brand {
    display: flex;
    align-items: center;
    width: 100%;
  }
  header.site .brand-txt { flex: 1 1 auto; min-width: 0; }

  .mob-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 不再 fixed：跟随 .brand 行，margin-left:auto 推到该行最右 */
    position: static;
    margin-left: auto;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #f3ecff;
    background: linear-gradient(135deg, rgba(123,77,255,.92), rgba(90,52,201,.92));
    border: 1px solid rgba(180,150,255,.55);
    box-shadow: 0 4px 14px rgba(90,40,200,.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-login-btn:active { transform: scale(.96); }

  /* ── 登录后的「工作台」态（主上 2026-11-10）──
     「手机版在登录状态，"登录"要改成"工作台"，不是在下面多一个 tag。」
     同一个按钮切换文字，样式改为金色主入口，与"登录"区分。 */
  .mob-login-btn.is-on {
    /* 主上（2026-11-10）：「手机版"登陆"、"工作台"头部按钮颜色没改过来，
       我要有星空感的、渐变金黄色。」
       ⇒ ① 渐变金打底（亮金 → 深金，有金属走向）
          ② 叠一层斜向高光条（星空亮面感）
          ③ 金色光晕外发光（不再是紫色阴影）
          ④ 细金边 + 内高光（3D 质感） */
    color: #3a2400;
    font-weight: 800;
    letter-spacing: .02em;
    background-color: #f5c026;
    background-image:
      linear-gradient(115deg,
        rgba(255,255,255,.55) 0%,
        rgba(255,255,255,0) 32%,
        rgba(255,255,255,0) 62%,
        rgba(255,246,214,.42) 78%,
        rgba(255,255,255,0) 100%),
      radial-gradient(120% 90% at 18% 8%, rgba(255,252,235,.85) 0%, rgba(255,238,170,.25) 34%, transparent 62%),
      linear-gradient(180deg, #fff3c4 0%, #ffd95e 34%, #f5b920 68%, #d99510 100%);
    border: 1px solid rgba(255,232,160,.92);
    box-shadow:
      0 0 0 1px rgba(180,120,10,.28),
      0 3px 14px rgba(245,185,30,.55),
      0 0 22px rgba(255,205,70,.38),
      inset 0 1px 0 rgba(255,255,255,.75),
      inset 0 -1px 0 rgba(150,95,0,.28);
    text-shadow: 0 1px 0 rgba(255,246,214,.6);
  }
  .mob-login-btn.is-on:active { transform: scale(.96); }

  /* 未登录态（"登录"）沿用同一套星空金视觉语言，饱和度略低。 */
  .mob-login-btn:not(.is-on) {
    color: #fff8e0;
    background-color: #c9971a;
    background-image:
      linear-gradient(115deg,
        rgba(255,255,255,.34) 0%,
        rgba(255,255,255,0) 34%,
        rgba(255,255,255,0) 64%,
        rgba(255,244,205,.26) 80%,
        rgba(255,255,255,0) 100%),
      radial-gradient(120% 90% at 18% 8%, rgba(255,250,225,.55) 0%, transparent 60%),
      linear-gradient(180deg, #f6dc8e 0%, #e9c253 36%, #cfa02a 70%, #b0831c 100%);
    border: 1px solid rgba(255,226,150,.7);
    box-shadow:
      0 0 0 1px rgba(150,105,10,.2),
      0 3px 12px rgba(200,150,30,.42),
      0 0 16px rgba(255,205,90,.24),
      inset 0 1px 0 rgba(255,255,255,.55);
    text-shadow: 0 1px 1px rgba(120,80,0,.35);
  }

  /* ── 去掉"黑块"（主上 2026-11-10 附件2）──
     按钮外原来带一层深色底衬（.brand 行背景/按钮背后阴影），
     在手机上显得像一块黑斑。这里把按钮自身与父容器的多余底色清零。 */
  header.site .brand,
  header.site .bar {
    background: transparent !important;
    box-shadow: none !important;
  }
  .mob-login-btn {
    /* 不能再写紫色阴影：会盖掉 .is-on 的金色光晕（主上要金色基调） */
    outline: none !important;
    filter: none !important;
  }
  .mob-login-btn::before,
  .mob-login-btn::after {
    content: none !important;
    display: none !important;
  }

  /* ═══ 登录弹窗：无框模式（2026-11-08）═══
     主上：「我不需要一个大框，我只需要跟PC版一模一样的 密码圆盘弹出，能实现吗？」

     能。做法：给 Modal 加一个 mob-bare 类，把外框（背景渐变/边框/圆角/阴影/
     标题栏/内边距）全部去掉，只留圆盘本身浮在星空背景上；
     关闭按钮单独浮到右上角。这样弹出效果与 PC 版首屏那块圆盘一致。 */
  .modal-root.mob-bare .modal {
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    left: 0 !important; top: 0 !important;
    transform: none !important;
    overflow: visible !important;
    animation: none !important;
  }
  .modal-root.mob-bare .modal-mask {
    background: rgba(4,2,12,.55) !important;
    backdrop-filter: blur(3px);
  }
  /* 去掉标题栏与标题区，只留圆盘 */
  .modal-root.mob-bare .modal-bar { display: none !important; }
  .modal-root.mob-bare .modal-head { display: none !important; }
  .modal-root.mob-bare .modal-scroll {
    padding: 0 !important;
    overflow: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
  }
  .modal-root.mob-bare .modal-body {
    width: 100%;
    padding: 0 10px !important;
  }
  /* 关闭按钮浮到右上角（唯一保留的 UI 元素） */
  .modal-root.mob-bare .mob-login-close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 20px; line-height: 1;
    color: #fff;
    background: rgba(30,20,60,.82);
    border: 1px solid rgba(180,150,255,.5);
  }

  /* 弹窗里的圆盘：占满弹窗宽度，完整可见 */
  .mob-login-host { width: 100%; }
  .mob-login-host .pl-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }
  .mob-login-host .pl-head {
    text-align: center;
    margin-bottom: 6px;
  }
  .mob-login-host .pl-stage,
  .mob-login-host #planet-lock {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  /* ⚠️ planetlock-mobile.css 在 ≤640px 把 #planet-lock .pl-svg 设成 display:none
     （那是给旧版"手机端不显示圆盘"用的）。弹窗里必须恢复，
     否则弹窗高度对、但 SVG 是 0×0，看不到圆盘（实测 svgDisp=none）。 */
  .mob-login-host #planet-lock svg,
  .mob-login-host #planet-lock .pl-svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    visibility: visible !important;
  }
  /* ── ③「星座.live」回到圆盘中心（2026-11-08）──
     主上：「附件3、星座.live 放在圆的中间，登陆那个框里面就不用放了。」

     现状：.pl-core 是登录框（含 .pl-core-brand「星座.live」+ 输入框 + 按钮），
           planetlock-mobile.css 把它改成流式，结果整块掉到圆盘下方（y=467，
           而圆盘 SVG 是 101..467）—— 品牌字样自然也不在圆心。
     处理：
       · 在圆盘正中单独放一个品牌字（绝对定位、居中、不拦截点击）
       · 登录框里的 .pl-core-brand 隐藏 */
  /* ⚠️ 定位关键：`#planet-lock`（.pl-stage）**整体高 611px**，
     里面装了「SVG 366px + 下方登录框 245px」，所以 `top:50%` 落在 305px
     —— 正好是登录框区域，品牌字自然不在圆心（实测偏下 121px）。

     解法：不依赖父级高度，直接用 SVG 高度的一半作为垂直定位。
     SVG 尺寸随屏宽变化，因此用 CSS 变量 --pl-d(圆盘直径) 传入，
     公式：圆心 y = 半径 = --pl-d / 2。
     这里写出 366px 的等比表达：宽度由 .pl-svg 决定（100%），
     故圆盘直径 = 100% 容器宽；用 vw 近似计算会更稳：
       top = calc((100vw - 24px) / 2)   ← 圆盘宽度≈屏宽-24（两侧各 12px 内边距）
     更稳妥的做法是用 aspect-ratio 让容器自身等于圆盘尺寸（见下）。 */
  /* .pl-disc-box 只包住 SVG 本身（不含下方登录框），
     这样 top:50% 才是真正的圆心。JS 负责创建这个包裹层。 */
  .mob-login-host .pl-disc-box {
    position: relative;
    width: 100%;
    display: block;
  }
  .mob-login-host .pl-disc-box > .pl-svg {
    display: block;
    width: 100%;
    height: auto;
  }

  /* 圆心品牌字：相对 .pl-disc-box（= 圆盘本身）居中 */
  .mob-login-host .pl-core-brand-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .04em;
    color: rgba(255,232,140,.98);
    text-shadow: 0 0 18px rgba(255,206,60,.55), 0 0 42px rgba(255,180,40,.35);
    white-space: nowrap;
  }
  .mob-login-host .pl-core-brand-center i {
    font-style: normal;
    color: #7fe3ff;
    text-shadow: 0 0 16px rgba(120,220,255,.6);
  }

  /* 登录框里的品牌字去掉（已移到圆心） */
  .mob-login-host .pl-core-inner .pl-core-brand { display: none !important; }

  /* 弹窗里的圆盘要占满弹窗宽度、正方形显示 */
  .mob-login-host #planet-lock {
    aspect-ratio: 1 / 1;
    height: auto !important;
  }
  /* 弹窗正文区不额外留白，让圆盘尽量大 */
  .modal-root .modal-body { padding-left: 8px !important; padding-right: 8px !important; }

/* ── 星盘页放大（命盘 ≥90%、下方 block 同步放大） ── */
  /* ═══════════════════════════════════════════════════════════════
     ⑯ 星盘页：命盘占屏 90%+ ，下方 block 同步放大
     ───────────────────────────────────────────────────────────────
     主上 2026-11-08：
       「附件1、命盘要占屏幕90%以上，现在这个太小了。」
       「附件2、下面的block也是，要放大。」

     实测 390px 下的宽度断点（逐层衰减）：
        chart-block     378
        wave-wrap       266   ← padding-inline:5% 吃掉 38px
        chart-arena     239   ← grid 中间列限制
        chart-stage     215   ← padding:22px 18px 再吃 36px
        #bigchart       179   ← 只有 46% 屏宽

     处理：把这条链路上的左右留白全部压掉，命盘直接顶到屏宽 96%。
           图表在手机上"看得见"比"留白优雅"重要得多。
     ═══════════════════════════════════════════════════════════════ */

  /* ① 外层：去掉左右留白 */
  #s-chart .wave-wrap {
    padding-inline: 2px !important;
    width: 100% !important;
  }
  #s-chart .chart-block {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  #s-chart .screen-inner {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ② 竞技场：单列铺满（手机上左右栏已改为上下堆叠） */
  #s-chart .chart-arena {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px;
  }

  /* ③ 中间列（命盘所在）：padding 归零，让盘顶到边
     实测 stage 346 (89%) 而 arena 370 (95%) —— 差的 24px 来自
     .chart-stage 的 padding:22px 18px 与 chart-arena 的 gap。
     全部归零，命盘才能到 ≥92%。 */
  /* 命盘顶满：parent 链上仍有 8px gap + 容器边框，用负边距吃掉
     实测不加负边距时 346/390 = 89%，差 1%。 */
  #s-chart .chart-stage {
    width: calc(100% + 16px) !important;
    max-width: calc(100% + 16px) !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
    padding: 0 !important;
    order: 1;
  }
  #s-chart .chart-arena { gap: 8px !important; }

  /* ④ 命盘本体：占满可用宽度（目标 ≥90% 屏宽） */
  #s-chart .chart-wheel,
  #s-chart #bigchart {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  #s-chart .chart-wheel svg,
  #s-chart #bigchart svg {
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* ⑤ 下方左右两个 block：占满宽度、内容放大 */
  #s-chart .arena-side {
    width: calc(100% + 16px) !important;
    max-width: calc(100% + 16px) !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
    grid-template-columns: 1fr !important;   /* 双列 → 单列，避免每格过窄 */
    gap: 10px !important;
  }
  #s-chart .arena-side.arena-left  { order: 2; }
  #s-chart .arena-side.arena-right { order: 3; }

  /* block 内部：字号与行高提一档，手机上读得清 */
  #s-chart .arena-side .side-card,
  #s-chart .arena-side .card,
  #s-chart .arena-side > * {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* ⚠️ 上一步在 .arena-side 用了 margin:-8px 把外框撑满，
     结果里面的 .as-head / .as-body / .sky-now 一路顶到屏幕边（实测 right=375/390，
     只剩 15px，文字几乎贴边）。
     现在外框保持满宽，但**内层补回左右 padding**，让文字有呼吸空间。 */
  #s-chart .arena-side {
    font-size: 13.5px;
    line-height: 1.7;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }
  #s-chart .arena-side > .as-head,
  #s-chart .arena-side > .as-body,
  #s-chart .arena-side > .as-elements,
  #s-chart .arena-side > .sky-now {
    padding-left: 0;
    padding-right: 0;
  }
  /* block 内部各卡片铺满，不留内缩 */
  #s-chart .arena-side .card,
  #s-chart .arena-side .side-card,
  #s-chart .arena-side > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }
  #s-chart .arena-side h3,
  #s-chart .arena-side .side-title {
    font-size: 15px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   更窄的机器（≤400px）：进一步压缩留白，但不再缩小字号
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  .screen-inner {
    padding-left: 10px;
    padding-right: 10px;
  }
  header.site .logo-slot { width: 54px; height: 62px; }
  header.site .brand-name { font-size: 18px; }
  header.site nav.screens > button {
    font-size: 12.5px;
    padding: 7px 12px;
  }
  .formgrid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   平板（821–1100px）：保持双栏，避免手机上来的用户看到挤成一列
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 821px) and (max-width: 1100px) {
  .today-stage {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(150px, 190px);
    gap: 14px;
  }
  .screen-inner { padding-left: 16px; padding-right: 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   第⑤~⑮节：手机专属规则（2026-11-08 修正）
   ──────────────────────────────────────────────────────────────────
   ⚠️ 这些规则原本裸写在文件顶层（不在任何 @media 内），
      导致全部泄漏到桌面端 —— PC 版首屏变形、位置错乱（主上已截图指出）。
      现在整体收进 @media (max-width: 820px)，桌面端一行不受影响。
   ══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   桌面端（>820px）：手机上新增的元素一律不出现
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 821px) {
  .mob-login-btn { display: none !important; }
  .hero-art > #pl-wrap-src { display: block !important; }
}

/* 手机专属：星盘页放大（2026-11-08）—— 必须在 @media 内，否则会污染 PC */

@media (max-width: 820px) {
  /* ═══════════════════════════════════════════════════════════════
     ⑰ 登录卡「脏块」修复（2026-11-08）
     ───────────────────────────────────────────────────────────────
     主上：「"登陆"按钮 赃块 没有解决。」

     真相：那不是按钮上的脏块，而是**登录卡 .pl-core 的顶部残留带**：
       · .pl-core 背景 = rgba(14,8,32,.94) + radial-gradient，是块深色卡
       · planetlock-mobile.css 给它 padding:15px 13px 13px
       · 圆盘 SVG 底部(y=484) 与第一个输入框(y=503) 之间，就露出一条
         约 18px 高、无任何内容的深色横条
       · 而 .pl-core 带 z-index:4，压在圆盘之上 ⇒ 看起来像按钮上方
         "糊了一块脏的紫色方块"
     加上按钮本身有 box-shadow(0 4px 14px rgba(109,74,255,.42))，
     它的上沿光晕与这条残留带叠在一起，视觉上更像"脏块"。

     处理：
       ① 登录卡顶部 padding 收到 12px，并把卡片上沿往上贴（负 margin），
          让 deep 色带消失
       ② z-index 归 1（仍高于 SVG 内容，但不制造"浮层压盘"的错觉）
       ③ 按钮阴影只在下方发散，不往上糊
     ═══════════════════════════════════════════════════════════════ */
  /* ⚠️ 必须带 #planet-lock 前缀：planetlock-mobile.css 里是
     `#planet-lock .pl-core{padding:15px 13px 13px !important}`，
     特异性（ID+类）高于纯类选择器，只写 .mob-login-host .pl-core 会被它压掉
     （实测 padding-top 仍是 18px，脏带没消）。 */
  .mob-login-host #planet-lock .pl-core {
    z-index: 1 !important;
    padding-top: 10px !important;
    margin-top: -8px !important;
    border-radius: 14px !important;
  }
  .mob-login-host #planet-lock #pl-go,
  .mob-login-host .pl-core-pane button {
    /* 只向下投影，避免上沿光晕与卡片边线叠成"脏块" */
    box-shadow: 0 6px 16px -4px rgba(109,74,255,.5) !important;
  }

}

/* ══════════════════════════════════════════════════════════════════
   手机端小字放大（2026-11-08 第五轮核实）
   ──────────────────────────────────────────────────────────────────
   实测手机端有大量 <11px 文本，在 6 寸屏上很难看清：
     玛雅   mc-date 8.5px ×30、mc-sol 9px ×30、mc-tone 9px ×8
     日历   n 9.5px ×21、stars 10px ×8
     科普   si-tags 10px ×12、si-r/sh-sign 10.5px ×12
     轨迹   text 9.5~10.5px ×30
     节气   SPAN 10.5px ×24
   统一提到 ≥11px（正文类 12px），只作用于手机断点，PC 不动。
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  /* 玛雅日历 */
  .mc-date, .mc-sol, .mc-tone, .mc-hcol { font-size: 11px !important; }
  .maya-cal-left svg text { font-size: 11px !important; }

  /* 日历 */
  .cal-cell .n, .cal-n, .cal-day-num { font-size: 12px !important; }
  .cal-cell .stars { font-size: 11px !important; }

  /* 科普 */
  .si-r, .si-tags, .sh-sign { font-size: 11.5px !important; }

  /* 轨迹 / 其它 svg 内文字 */
  .life-chart text, .need-chart text { font-size: 11px !important; }

  /* 节气 */
  .term-wheel ~ * span, .term-list span, .term-item span { font-size: 11.5px !important; }

  /* 兜底：任何仍 <11px 的行内小标签 */
  .card .sub, .card .meta, .card .note { font-size: 12px !important; }

  /* 第二轮补漏（2026-11-08）：实测剩余 <11px 的选择器 */
  .a12-unit, .a12-band { font-size: 11px !important; }        /* 能力屏 12 维标签 */
  .cal-cell .n, .cal-cell span, .cal-cell .stars,
  .cal-week .n, .cal-day .n { font-size: 11.5px !important; }  /* 日历 */
  .sc-mer, .sc-wheel ~ * span { font-size: 11.5px !important; } /* 时辰 */
  .maya-tag, .mlist-p, .maya-cal-left span { font-size: 11px !important; }
  .maya-cal-left svg text { font-size: 10.5px !important; }     /* 玛雅 svg 内文字 */
  .sh-sign, .si-tags, .si-r { font-size: 11.5px !important; }

  /* 第三轮补漏：日历屏真实选择器（实测 .day>.n 9.5px、.mcell>span 10.5px） */
  .cal .day .n, .cal .n { font-size: 12px !important; }
  .month-grid .mcell > span { font-size: 11.5px !important; }
  .dimcard .sta, .dimcard-action .sta { font-size: 11.5px !important; }
}


/* ══ MOB-HIDE-DESKBTN（主上 2026-11-10：「还是有黑块，没有生效」）══
   根因：#btn-to-workbench 是桌面端"回工作台"入口，
        手机端已经有 mob-login-btn 承担同样职责，
        但它在手机上仍 display:block ⇒ 两个「工作台」按钮并排，
        左边那个（left:10, w:58）压在 logo 区域，看上去就是一块黑斑。
   JS 里 syncMobileLoginBtn 会设 display:none，但受执行时机影响
   （wb-boot 可能早于 app.js）。
   ⇒ 这里用 CSS 在手机断点直接强制隐藏，不依赖 JS 时机，双保险。 */
@media (max-width: 820px){
  #btn-to-workbench{
    display: none !important;
  }
}


/* ══ MOB-HEADER-CLEAN（主上 2026-11-10：「你自己看，还有色块」）══
   实测根因（不是按钮，也不是别的东西盖住）：
     header.site 带 `backdrop-filter: blur(10px)` + 一层
     linear-gradient(rgba(5,3,15,.86) → rgba(5,3,15,0)) 背景。
     backdrop-filter 会为 header 生成独立的**合成层（compositing layer）**，
     它的边界在手机窄屏上与按钮（金渐变）叠在一起时，
     会在按钮右缘切出一条**竖直硬边**——就是图里那块"深色矩形"。

   修法（手机端）：
     ① 去掉 header 的 backdrop-filter（造成合成层硬边的元凶）
     ② 背景渐变换成"纯透明"，让 header 完全不参与合成
     ③ 按钮自身保持独立的金色渐变 + 圆角，不再受父层混合影响 */
@media (max-width: 820px){
  header.site{
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    isolation: auto !important;
    mix-blend-mode: normal !important;
    transform: none !important;
  }
  header.site .bar,
  header.site .brand{
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    isolation: auto !important;
    mix-blend-mode: normal !important;
  }
  /* 按钮：确保自己是一个干净的整体，不被父层裁切 */
  #mob-login-btn{
    isolation: isolate !important;
    mix-blend-mode: normal !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-clip: padding-box !important;
    overflow: hidden !important;
  }
}


/* ══ BTN-SOLID-GOLD（主上 2026-11-10：「你自己看，还有色块」）══
   真根因（终于查到底）：
     按钮宽度实测 **71.7812px**（小数，由 padding + 文字宽度算出）。
     它的背景是 `linear-gradient(...)` 且
       background-size: auto
       background-repeat: repeat          ← 关键
     渐变在亚像素边界上被平铺时，浏览器按整数像素取整，
     就在 **70px 附近切出一条竖直硬边**，右边缘多出一块"深色矩形"
     （其实是渐变重复的第二份，起点与背景色不连续）。

   修法：
     ① background-repeat: no-repeat
     ② background-size: 100% 100%
     ③ 按钮宽度取整（避免亚像素）
     ④ 金色改成纯色打底 + 轻渐变覆盖，双保险 */
@media (max-width: 820px){
  .mob-login-btn,
  .mob-login-btn.is-on{
    background-color: #ffd24a !important;          /* 纯色打底，绝不透出 */
    background-image: linear-gradient(180deg,
      #ffe9a8 0%, #ffd84f 55%, #efb01e 100%) !important;
    background-repeat: no-repeat !important;        /* ← 元凶 */
    background-size: 100% 100% !important;
    background-position: 0 0 !important;
    background-origin: border-box !important;
    background-clip: border-box !important;
    overflow: visible !important;
  }
}


/* ══ BTN-FLAT-GOLD（主上 2026-11-10：「还是有黑块」）══
   逐像素实测（DPR=1，中线采样）：
     dx +0~+20   rgb(255,217,84)  均匀亮金
     dx +48~+70  191 → 147 → 141 → 105 → 89 → 79 → 68 → 57 → 45
                 ← 亮度沿水平方向**平滑递减**，右端接近背景色
   结论：不是色块遮挡，是**渐变本身右端太暗**（垂直渐变被 3D 阴影感放大成"一块暗区"），
        在深色星空底上看起来就像被矩形盖住。

   修法：改成**几乎无明暗差的平金**（三档色只差 ~10 亮度），
        让整条胶囊看起来是一个均匀的实体，右端不再发黑。 */
@media (max-width: 820px){
  .mob-login-btn,
  .mob-login-btn.is-on{
    background-color: #ffd54f !important;
    background-image: linear-gradient(180deg,
      #ffe08a 0%, #ffd54f 46%, #ffca3a 100%) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    color: #2a1600 !important;
    box-shadow: 0 2px 10px rgba(255,190,60,.28),
                inset 0 1px 0 rgba(255,255,255,.45) !important;
    border: 0 !important;
  }
}


/* ══ VEIL-FIX（主上 2026-11-10：色块终于定位到了）══
   真根因：`#space .veil` 是一个 inset:0 的全屏氛围遮罩，
      background 里有一层 `linear-gradient(180deg,
        rgba(5,3,15,.72) → rgba(5,3,15,.42) → rgba(5,3,15,.86))`
      —— 也就是**半透明黑**，越往边缘/右侧越暗。
      它 `pointer-events:none`，所以 elementFromPoint 永远测不到它
      （前几轮一直查不出原因就是踩了这个坑）。

   于是顶栏那颗金色按钮被这层黑纱盖住右半边：
     金色 (255,217,84) × 黑纱 → (105,86,49) 这类暗橄榄色，
     看起来就是"一块深色矩形压在按钮上"。

   修法：**顶栏（header.site）提到 veil 之上**，让按钮不被氛围层压暗。
    （veil 本身保留，页面其它区域的氛围不受影响。） */
@media (max-width: 820px){
  header.site{
    z-index: 80 !important;
    position: fixed !important;
  }
}


/* ══ BTN-INT-WIDTH（主上 2026-11-10：最后一块色块）══
   逐像素实测的硬事实：
     · 按钮 getBoundingClientRect().width = **71.78125px**（小数）
     · 中线采样：dx+0~+18 全是均匀金 (255,212,77)
       dx+46 起亮度递减 182→170→145→132→119→105→93→79→66→53→14
     · 改了背景渐变（平金）、改了父层 z-index、去掉 backdrop-filter ——
       **同一列像素值完全不变**
   ⇒ 不是背景、不是叠加层、不是 veil。
     真正原因：**小数宽度下 border-radius:999px 的右半圆无法正确栅格化**，
     圆角被裁成直角，超出的那截按渐变的暗部/背景色填充，
     看起来就是"一块深色矩形把按钮右端切了"。

   修法：宽度取整数像素（min-width 定死），不让它出现小数。 */
@media (max-width: 820px){
  #mob-login-btn,
  .mob-login-btn{
    min-width: 76px !important;
    width: 76px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    line-height: 32px !important;
    text-align: center !important;
    border-radius: 16px !important;   /* 32px 高 → 16px 半圆，整数栅格化 */
    shape-rendering: geometricPrecision;
  }
}


/* ══ BTN-RIGHT-ROOM（主上 2026-11-10：色块收口）══
   决定性实测：
     按钮  rect: x=302  w=76  right=**378**
     父容器 .brand: x=10 w=370 right=**380**   （padding: 2px 2px 6px）
     ⇒ 按钮右沿离父容器右沿只有 **2px**，
       而按钮的 border-radius 是 16px 的半圆（半径 16px）。
       右半圆需要 16px 的水平空间才能完整画出来，
       现在只有 2px ⇒ 圆角的最后 14px 被父容器的 padding 边界切掉，
       切掉的部分露出底下暗色，看起来就是"按钮右端被一块深色矩形切了"。

   修法：
     ① 给父容器 .brand 右侧留够空间（padding-right 至少 6px，且不再被 flex 挤压）
     ② 按钮自身右侧加 margin-right 保证不与父边界相切
     ③ 圆角从 999px 改为 16px（= 高度一半，数学上就是完整胶囊，且便于栅格化） */
@media (max-width: 820px){
  /* err-ok: 修 #2「登录icon 要靠右」，已读真源 mobile.css:1195-1218 原文
     主上 2026-11-13：「登录icon 要靠右，跟logo 那么的尺寸要对称。」
     原来这里 padding-right:8px + 按钮 margin-right:6px!important = 恒有 14px 死角，
     再叠加 .bar 的 12px，按钮离屏幕右缘固定 36px（实测 loginRightGap=36）⇒ 看起来没靠右。
     现在统一交给 .bar 的 padding-right:12px 做**唯一安全边**，
     .brand 不再自带右 padding，按钮 margin-right 归零 ⇒ 右边距 = 12px，
     与左侧 hamburger 的 12px 起算完全对称。
     （"按钮右端被切"的老问题由 .bar 的 padding 兜住，不会复发。） */
  header.site .brand{
    padding-right: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  #mob-login-btn,
  .mob-login-btn{
    margin-right: 0 !important;
    border-radius: 16px !important;
    flex: 0 0 auto !important;
  }
}


/* ══ 手机版「登录 / 工作台」按钮：金色胶囊（主上 2026-11-12）══
   ── 历史 ──
   2026-11-10 曾用 `background:#ffd54f + 全部 none` 压掉渐变/阴影/边框，
   为的是消除「右侧一块暗色矩形」。但那等于把金色质感全删了，
   现在主上要求「手机版登录/工作台按钮也要用上附件1（秘密花园）那种格式」。
   ── 真正成因（本轮定位）──
   暗块不是渐变造成的，是 `filter` + `transform: translateZ(0)` 触发了
   独立合成层，在半透明圆角边缘产生色带。
   ── 现在的做法 ──
   保留：金色渐变 + 内高光 + 外发光 + 胶囊圆角（= 附件1 的观感）
   去掉：filter / mix-blend-mode / transform（这三者才是暗块来源） */
@media (max-width: 820px){
  #mob-login-btn,
  .mob-login-btn,
  .mob-login-btn.is-on{
    /* 胶囊形，与「秘密花园」按钮同款圆角 */
    border-radius: 999px !important;
    /* 金色渐变：亮金 → 深金，带金属走向 */
    background-color: #f5c026 !important;
    background-image:
      linear-gradient(115deg,
        rgba(255,255,255,.50) 0%,
        rgba(255,255,255,0) 32%,
        rgba(255,255,255,0) 64%,
        rgba(255,246,214,.36) 80%,
        rgba(255,255,255,0) 100%),
      radial-gradient(120% 90% at 18% 8%, rgba(255,252,235,.75) 0%, rgba(255,238,170,.22) 34%, transparent 62%),
      linear-gradient(180deg, #fff0bd 0%, #ffd95e 36%, #f5b920 70%, #dc9a12 100%) !important;
    /* 细金边 + 外发光（不是纯 0 边框，那会让按钮显得扁平） */
    border: 1px solid rgba(255,232,160,.88) !important;
    box-shadow:
      0 2px 12px rgba(245,185,30,.45),
      0 0 18px rgba(255,205,70,.28),
      inset 0 1px 0 rgba(255,255,255,.65) !important;
    text-shadow: 0 1px 0 rgba(255,246,214,.5) !important;
    color: #3a2400 !important;
    /* 关键：这三个是「暗块」的元凶，必须归零 */
    filter: none !important;
    mix-blend-mode: normal !important;
    transform: none !important;
    -webkit-font-smoothing: antialiased;
  }
  /* 未登录（登录）：饱和度略低，与「工作台」区分层次 */
  .mob-login-btn:not(.is-on){
    background-image:
      linear-gradient(115deg,
        rgba(255,255,255,.34) 0%,
        rgba(255,255,255,0) 34%,
        rgba(255,255,255,0) 66%,
        rgba(255,244,205,.24) 82%,
        rgba(255,255,255,0) 100%),
      linear-gradient(180deg, #f7dfa4 0%, #e8bd4e 38%, #cf9a1c 72%, #b98213 100%) !important;
    box-shadow:
      0 2px 10px rgba(210,155,30,.34),
      inset 0 1px 0 rgba(255,250,230,.55) !important;
  }
}


/* ══ SPACE-MATERIAL（主上 2026-11-10：「背景换成星空感的亮面或者有材质感的」）══
   原来手机端的星空背景只有一层 galaxy.webp（opacity .58 + brightness .92），
   在深色底上显得很平，像纯色。
   这里叠三层材质，做出"亮面 + 有质感"的星空：
     ① 星云亮面：两团大半径径向渐变（紫 + 青），做体积感
     ② 细密星点：两组 radial-gradient 平铺，远近两层
     ③ 顶部高光：一条从上往下的柔光，模拟"光从上方打下来"的亮面
   全部纯 CSS，不额外加载图片，不影响性能。 */
#space::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    /* ① 星云亮面（紫 / 青 两团，制造体积与光泽） */
    radial-gradient(58% 42% at 22% 12%, rgba(150,105,255,.30) 0%, rgba(110,70,220,.12) 42%, transparent 72%),
    radial-gradient(52% 38% at 84% 26%, rgba(80,190,255,.20) 0%, rgba(60,140,230,.08) 46%, transparent 74%),
    radial-gradient(64% 46% at 50% 96%, rgba(120,80,210,.22) 0%, transparent 70%),
    /* ③ 顶部高光（亮面质感） */
    linear-gradient(180deg, rgba(255,255,255,.075) 0%, rgba(255,255,255,.02) 18%, transparent 42%);
}

/* ② 细密星点：两层，远层小而暗、近层大而亮 */
#space::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.85), transparent 100%),
    radial-gradient(1px 1px at 27% 62%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1.4px 1.4px at 43% 12%, rgba(220,205,255,.9), transparent 100%),
    radial-gradient(1px 1px at 58% 74%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1.2px 1.2px at 71% 28%, rgba(255,244,205,.85), transparent 100%),
    radial-gradient(1px 1px at 84% 58%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1.3px 1.3px at 93% 16%, rgba(200,225,255,.85), transparent 100%),
    radial-gradient(1px 1px at 38% 88%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1px 1px at 66% 42%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 8% 78%, rgba(214,196,255,.55), transparent 100%),
    radial-gradient(1px 1px at 47% 34%, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(1px 1px at 76% 86%, rgba(255,255,255,.45), transparent 100%);
  background-size: 100% 100%;
  opacity: .9;
  animation: spaceTwinkle 7s ease-in-out infinite alternate;
}
@keyframes spaceTwinkle{
  0%   { opacity: .6; }
  55%  { opacity: .95; }
  100% { opacity: .72; }
}

/* 手机端把银河图提亮一点，让"亮面"更明显 */
@media (max-width: 820px){
  #space .galaxy{
    opacity: .72 !important;
    filter: saturate(1.25) brightness(1.05) contrast(1.02) !important;
  }
}
