/* ============================================================
   赞赏浮窗 (Donate Float) — standalone stylesheet
   Extracted verbatim from DrX Daily (dailystocks build.py CSS
   constant, live since 2026-10-26, mobile collapse 2026-10-27).
   Host page must define --bg, --ink and --line, or uncomment
   the fallback :root block below.
   ============================================================ */
/* :root{--bg:#fff;--ink:#222;--line:#e5e7eb} */

/* Bilingual spans (optional, only if the host uses .lz/.le) */
.le{display:none}
html[data-lang="en"] .le{display:inline}
html[data-lang="en"] .lz{display:none}

/* Container: fixed bottom-right, above the news float */
#donatefloat{position:fixed;right:16px;bottom:70px;z-index:59;
  font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}

/* Panel */
#donatefloat-panel{position:relative;width:188px;max-width:calc(100vw - 24px);
  max-height:calc(100vh - 92px);overflow-y:auto;background:var(--bg);color:var(--ink);
  border:1px solid var(--line);border-radius:14px;padding:10px 12px 8px;
  box-shadow:0 8px 28px rgba(0,0,0,.16);text-align:center}
#donatefloat-panel[hidden],#donatefloat-open[hidden]{display:none!important}

/* Close button: round x at the panel top-right */
#donatefloat-close{position:absolute;top:5px;right:6px;width:26px;height:26px;
  border:none;border-radius:50%;background:#eef2f7;color:#334155;
  font-size:1.05rem;line-height:1;cursor:pointer;padding:0}
#donatefloat-close:hover{background:#e2e8f0}

/* Title */
.donate-title{color:#e05d52;font-size:.98rem;font-weight:700;margin:2px 22px 8px}

/* Images: coffee banner first, then one QR poster per channel */
#donatefloat img{margin:0 auto}
.donate-coffee{display:block;width:100%;border-radius:6px;margin-bottom:8px}
.donate-qr{display:block;width:100%;border-radius:8px}
.donate-label{font-size:.8rem;color:#4b5563;margin:3px 0 8px}
.donate-label:last-child{margin-bottom:2px}

/* Reopen pill, shown only while the panel is closed */
#donatefloat-open{border:1px solid #1a3a6b;background:#1a3a6b;color:#fff;
  border-radius:24px;padding:9px 16px;font-size:.88rem;cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.18)}
#donatefloat-open:hover{background:#24487f}

/* Mobile: tighter offset. Default-collapsed on mobile is done
   in the script, not here. */
@media(max-width:600px){
  #donatefloat{right:12px;bottom:70px}
}

/* Dark mode, system preference (suppressed by an explicit
   light choice). Keep this group in sync with the manual
   group below. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .donate-title{color:#f28b82}
  :root:not([data-theme="light"]) .donate-label{color:#cbd5e1}
  :root:not([data-theme="light"]) #donatefloat-close{background:rgba(255,255,255,.14);color:#fff}
  :root:not([data-theme="light"]) #donatefloat-close:hover{background:rgba(255,255,255,.28)}
}

/* Dark mode, manual toggle */
:root[data-theme="dark"] .donate-title{color:#f28b82}
:root[data-theme="dark"] .donate-label{color:#cbd5e1}
:root[data-theme="dark"] #donatefloat-close{background:rgba(255,255,255,.14);color:#fff}
:root[data-theme="dark"] #donatefloat-close:hover{background:rgba(255,255,255,.28)}

/* Mobile: prominent collapse bar pinned to the bottom of the panel.
   This only restyles #donatefloat-close, so the two-button contract holds. */
@media(max-width:600px){
  #donatefloat-panel{display:flex;flex-direction:column}
  #donatefloat #donatefloat-close{order:99;position:sticky;bottom:0;z-index:1;
    display:block;width:100%;height:34px;margin:8px 0 0;
    border-radius:8px;background:#1a3a6b;color:#fff;font-size:1rem;font-weight:700}
  #donatefloat #donatefloat-close:hover{background:#24487f}
  #donatefloat #donatefloat-close::after{content:' 收起面板';font-size:.82rem;font-weight:600;margin-left:4px}
  html[data-lang="en"] #donatefloat #donatefloat-close::after{content:' Collapse'}
  #donatefloat-panel .donate-title{margin:2px 0 8px}
}

/* Print: never print the float */
@media print{
  #donatefloat{display:none!important}
}
