/* ============================================================================
 * floating-actions.css v3 —— 站长 2026-11-02 14:20 最终口径
 * ----------------------------------------------------------------------------
 * ## ★★★ 站长最终原话（逐字）
 * ```
 *   「我的排名和设置他们两项应该是对调的，相反的。
 *     我的排名才是应该跟随窗口去固定，
 *     设置才是贴的背面去不动的，他们应该是相反的」
 * ```
 *
 * ## ★ 正确语义（我前两轮全搞反了）
 * ```
 *   我的排名  → position: fixed   ← **跟随窗口固定**，滚动时不动
 *   设置      → position: static  ← **贴在背面（dayrow 里）**，随页面划走
 * ```
 *
 * ## ⛔ 我的两次错误
 * ```
 *   v1（13:54）：我的排名=fixed，设置=fixed      ← 两个都固定，错
 *   v2（14:05）：我的排名=static，设置=fixed     ← 正好反了，错
 *   v3（现在）：我的排名=fixed，设置=static      ← ✔ 对调
 * ```
 *
 * ## ★ 依据：设置按钮**本来就是文档流里的**（原件 board-optout.css L124-130）
 * ```css
 *   .agh-bo { display:inline-flex; align-items:center;
 *             flex:0 0 auto; position:relative; margin-left:auto; }
 *   .agh-bo-btn { flex:0 0 auto; height:28px; ... }   ← 无 position = static
 * ```
 * ```
 *   ⇒ 它本来就在 .rankv2-dayrow 那一行里，跟着页面滚
 *   ⇒ 是我 2026-10-30 擅自改成 fixed 的
 *   ⇒ 现在恢复 static，让面板用回 absolute（相对 .agh-bo）
 * ```
 * ========================================================================== */

/* ══ ① 「我的排名」→ 跟随窗口固定 ═══════════════════════════════════════════ */
.rankv2-mine {
  position: fixed !important;
  top: 84px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;            /* ⛔ 去掉 -52px / -46px 那套 */
  z-index: 40 !important;
  pointer-events: auto !important;
  min-height: 44px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
  max-width: calc(100vw - 24px) !important;
}

/* 容器不占位 */
.rankv2-minerow {
  position: static !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

/* ══ ② 「设置」→ 贴回背面（文档流，随页面划走）═══════════════════════════ */
.agh-bo {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  position: relative !important;    /* ★ 恢复定位参照，panel 用 absolute */
  margin-left: auto !important;
  margin-top: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.agh-bo-btn {
  position: static !important;      /* ★ 关键：回到文档流 */
  right: auto !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

/* ══ ③ 设置面板 → 相对 .agh-bo 绝对定位（原设计）══════════════════════════ */
.agh-bo-panel {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 41 !important;
  width: min(300px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  box-sizing: border-box !important;
}

/* ══ ④ 窄屏 ═════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .rankv2-mine {
    top: 76px !important;
    right: 8px !important;
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    max-width: calc(100vw - 16px) !important;
  }
  .agh-bo-panel {
    width: calc(100vw - 24px) !important;
    max-width: 320px !important;
    right: 0 !important;          /* ⛔ 不用负值，避免整页右滑 */
  }
}

@media (max-width: 360px) {
  .rankv2-mine {
    padding: 6px 8px !important;
    font-size: 11.5px !important;
  }
}
