:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --primary: #2f6bff;
  --primary-dark: #1f4fd6;
  --primary-soft: #eaf1ff;
  --danger: #ff3b30;
  --ink: #1f2430;
  --muted: #8a93a6;
  --line: #eceff5;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(31, 36, 48, .14);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 80% -10%, #dfe8ff 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #ffe9ec 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ---------- 卡片（悬浮窗） ---------- */
.card {
  position: relative;
  width: 380px;
  max-width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
  transition: box-shadow .25s ease, transform .05s linear;
}
.card.dragging { transition: none; cursor: grabbing; }
.card.focus-hidden .status-row,
.card.focus-hidden .countdown { visibility: hidden; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f7f9ff, #eef3ff);
  border-bottom: 1px solid var(--line);
  cursor: grab;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.logo {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--primary);
  color: #fff; font-weight: 800; font-size: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(47,107,255,.35);
}
.title { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.top-actions { display: flex; gap: 8px; }

/* ---------- 标题下方：同时在线牛马人数 ---------- */
.online-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  line-height: 1.2; white-space: nowrap;
}
.online-badge .online-dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: #b6bdcb; box-shadow: 0 0 0 3px rgba(182,189,203,.2);
}
.online-badge.is-online .online-dot {
  background: #19b36b; box-shadow: 0 0 0 3px rgba(25,179,107,.18);
  animation: onlinePulse 2s ease-in-out infinite;
}
.online-badge b { color: var(--primary); font-size: 12px; font-variant-numeric: tabular-nums; }
.online-badge.is-offline b { color: var(--muted); }
@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(25,179,107,.18); }
  50% { box-shadow: 0 0 0 5px rgba(25,179,107,.06); }
}

.btn {
  border: none; cursor: pointer; font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 9px; transition: transform .1s, background .2s;
}
.btn:active { transform: scale(.95); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid #cdd9ff; }

/* ---------- 状态区 ---------- */
.status { padding: 14px 18px 6px; }
.clock { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.status-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; gap: 8px; flex-wrap: wrap; }
.status-text { font-size: 26px; font-weight: 900; color: var(--primary); }
.status-text.off { color: #19b36b; }
.status-text.pre { color: var(--muted); }
.countdown { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 动画区 ---------- */
.scene {
  position: relative;
  margin: 12px 16px 4px;
  height: 168px;
  background: linear-gradient(180deg, #f3f8ff 0%, #e8f0ff 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e3ebff;
}
.scene-tag {
  position: absolute; top: 8px; left: 10px;
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: rgba(255,255,255,.7); padding: 3px 8px; border-radius: 20px;
}
.btn-pause {
  position: absolute; top: 8px; right: 10px;
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: rgba(255,255,255,.85); border: 1px solid #d6e2ff;
  border-radius: 20px; padding: 4px 10px; cursor: pointer;
}
/* 3D 画布 */
.horse3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0;
}
.horse3d.is-hover { cursor: pointer; }
.scene.paused .horse3d { filter: grayscale(.2) brightness(.98); }
/* 点击牛后的 5 秒冲刺状态 */
.scene.boost { border-color: #ffc46b; box-shadow: inset 0 0 0 2px rgba(255,160,40,.35); }
.boost-hint {
  position: absolute; right: 10px; bottom: 8px; z-index: 2;
  font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #ff9e2c, #ff6a00);
  padding: 4px 10px; border-radius: 20px;
  box-shadow: 0 3px 10px rgba(255,140,20,.35);
  font-variant-numeric: tabular-nums;
  animation: pop .2s ease;
}
.boost-hint b { font-size: 12px; }

/* 3D 不可用时的降级方案：CSS 3D 旋转小马 */
.horse-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  perspective: 600px;
}
.horse-fallback[hidden] { display: none; }
.horse-fallback .fb-horse {
  font-size: 66px; transform-style: preserve-3d;
  animation: spinY 3.2s linear infinite;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.15));
  cursor: pointer;
}
.scene.boost .horse-fallback .fb-horse { animation-duration: 1.07s; }
.horse-fallback .fb-carrot { font-size: 30px; }
@keyframes spinY {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

/* ---------- v6.1 配额行内嵌纯图标分享按钮 ----------
   内联在「今日还可发 N 条」同一行最右侧；无文字、仅标准分享图标 + 状态圆点。
   选择器带 .status-actions 前缀，确保覆盖 .status-actions button 的通用 padding/border。 */
.status-actions .btn-share {
  position: relative;
  width: 30px; height: 30px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ffd79c; border-radius: 9px;
  background: #fff7e9; color: #d2740a;
  cursor: pointer; font-size: 0; line-height: 0;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
}
.status-actions .btn-share:hover {
  background: #ffedcf; transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(255,140,30,.22);
}
.status-actions .btn-share:active { transform: scale(.94); }
.status-actions .btn-share[data-state="claimed"] {
  background: #f4f5f8; border-color: #dfe3ec; color: #8a93a6;
}
.status-actions .btn-share[data-state="lifetime"] {
  background: #fff5d9; border-color: #f0d489; color: #c47a00;
}
.share-icon {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.share-dot {
  position: absolute; top: -4px; right: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff8a1a; border: 1.5px solid #fff;
  box-sizing: content-box; pointer-events: none;
}
.share-dot[data-state="claimable"] {
  box-shadow: 0 0 0 2px rgba(255,138,26,.18);
  animation: shareDotPulse 2.4s ease-in-out infinite;
}
.share-dot[data-state="claimed"] { background: #b9c0cf; box-shadow: none; }
.share-dot[data-state="lifetime"] { background: #e0a92a; box-shadow: none; }
@keyframes shareDotPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,138,26,.18); }
  50%      { box-shadow: 0 0 0 5px rgba(255,138,26,.06); }
}

/* ---------- v6 分享弹窗 ---------- */
.share-dialog {
  width: 360px; max-width: 100%; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; animation: pop .2s ease;
}
.share-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; font-weight: 800; background: linear-gradient(135deg, #fff2d8, #ffe8c4);
  color: #8a5300;
}
.share-head button {
  border: 1px solid #d9c7a4; cursor: pointer; background: #fff; color: #8a5300;
  border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 800;
}
.share-body { padding: 16px; }
.share-hero {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, #eef4ff, #fff4e6); border-radius: 12px; padding: 12px 14px;
}
.share-hero-emoji { font-size: 38px; line-height: 1; }
.share-hero-copy { display: flex; flex-direction: column; gap: 3px; }
.share-hero-copy b { font-size: 15px; }
.share-hero-copy small { font-size: 11px; color: var(--muted); line-height: 1.45; }
.share-label { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.share-text {
  width: 100%; resize: none; padding: 10px 12px; border: 1px solid #d8deea; border-radius: 10px;
  font-size: 12.5px; line-height: 1.65; color: #39415a; background: #fbfcff; font-family: inherit;
}
.share-text:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.share-status { font-size: 11px; color: #c4740a; font-weight: 800; margin: 8px 0 12px; }
.share-status.done { color: var(--muted); }
.share-actions { display: flex; flex-direction: column; gap: 8px; }
.share-actions button {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .1s, opacity .2s;
}
.share-actions button:active { transform: scale(.98); }
.share-actions button:disabled { opacity: .55; cursor: not-allowed; }
.share-actions .btn-primary { border: none; background: linear-gradient(135deg, #ffb43b, #ff7a1a); color: #fff; }
.share-actions .btn-ghost { background: #fff; color: var(--primary); border: 1px solid #cdd9ff; }
.share-fineprint { font-size: 10.5px; line-height: 1.6; color: #a8afbd; text-align: center; margin-top: 12px; }

/* ---------- 备案号页脚 ---------- */
.site-footer {
  margin-top: 18px; text-align: center;
  font-size: 12px; color: var(--muted); line-height: 1.6;
  padding: 4px 12px;
}
.site-footer .beian { color: var(--primary); font-weight: 700; letter-spacing: .3px; }
.site-footer .beian-tip { color: #b6bdcb; font-size: 11px; }

/* ---------- SEO 可读内容（默认极简，不破坏悬浮卡片视觉） ---------- */
.site-footer { width: 380px; max-width: 100%; }
.seo-lead { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
.seo-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 11.5px; margin-bottom: 6px; }
.seo-links a { color: var(--muted); }
.seo-links a:hover { color: var(--primary); }
.seo-details { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.seo-details summary { cursor: pointer; color: #9aa2b1; list-style: none; }
.seo-details summary::-webkit-details-marker { display: none; }
.seo-details summary::before { content: "▸ "; }
.seo-details[open] summary::before { content: "▾ "; }
.seo-details-body { text-align: left; padding: 10px 2px 4px; line-height: 1.75; color: #6b7280; }
.seo-details-body h2 { font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 10px 0 4px; }
.seo-details-body p { margin: 0 0 8px; }
.seo-details-body dt { font-weight: 700; color: var(--ink); margin-top: 8px; }
.seo-details-body dd { margin: 2px 0 0; }
.beian-line { font-size: 12px; }
.noscript-note {
  width: 380px; max-width: 100%; margin: 12px auto; padding: 12px 14px;
  background: #fff8f1; border: 1px solid #ffdfc2; border-radius: 12px;
  font-size: 12px; line-height: 1.7; color: #6b7280; text-align: center;
}

/* ---------- 今日收入 ---------- */
.income { padding: 12px 18px; text-align: center; }
.income-label { font-size: 12px; color: var(--muted); }
.income-amount {
  font-size: 40px; font-weight: 900; color: var(--danger);
  font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0;
  text-shadow: 0 2px 0 rgba(255,59,48,.12);
}
.reward-text { font-size: 13px; font-weight: 700; color: var(--ink); }

/* ---------- 专注条 ---------- */
.focus-bar {
  display: block; width: calc(100% - 36px); margin: 4px 18px 12px;
  padding: 12px; border: none; cursor: pointer; border-radius: 12px;
  background: linear-gradient(135deg, #2b3550, #1f2430); color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: .5px;
}
.focus-bar:active { transform: scale(.99); }

/* ---------- 工时进度 ---------- */
.progress { padding: 4px 18px 10px; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.progress-head b { color: var(--primary); }
.progress-hours { color: var(--muted); }
.progress-track { height: 12px; background: #eef1f8; border-radius: 20px; overflow: hidden; }
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #4f8bff, #2f6bff);
  border-radius: 20px; transition: width .6s ease;
}

/* ---------- 本月累计 ---------- */
.monthly { padding: 6px 18px 12px; text-align: center; border-top: 1px dashed var(--line); margin-top: 4px; }
.monthly-head { font-size: 12px; color: var(--muted); margin-top: 10px; }
.monthly-amount { font-size: 28px; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.monthly-note { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ---------- 弹幕发送栏 ---------- */
.barrage-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.barrage-toggle-inline {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #d6e2ff; background: #fff; color: var(--primary);
  font-weight: 900; cursor: pointer; font-size: 14px;
  transition: transform .1s;
}
.barrage-toggle-inline:active { transform: scale(.92); }
.barrage-toggle-inline.off { color: var(--muted); border-color: var(--line); }
.barrage-input {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px;
  border: 1px solid #d8deea; border-radius: 10px;
  font-size: 13px; outline: none; color: var(--ink);
}
.barrage-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.barrage-input:disabled { background: #f1f3f7; color: var(--muted); cursor: not-allowed; }
.barrage-send {
  flex: 0 0 auto; padding: 9px 14px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 800; cursor: pointer; font-size: 13px;
  transition: transform .1s, background .2s;
}
.barrage-send:active { transform: scale(.95); }
.barrage-send:disabled { background: #c2ccdd; cursor: not-allowed; }
.barrage-left { flex: 0 0 auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.barrage-left.is-vip { color: #c47a00; font-weight: 800; }

/* ---------- 配额状态 / 广告 / 付费入口 ---------- */
.barrage-status {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap; padding: 10px 16px 14px 16px;
  background: #fbfcff; border-top: 1px dashed var(--line);
}
.quota-hint { font-size: 11px; color: var(--muted); line-height: 1.5; flex: 1 1 130px; }
.quota-hint.warn { color: #d2741a; font-weight: 700; }
.quota-hint.vip { color: #c47a00; font-weight: 800; }
.status-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.status-actions button {
  border: none; cursor: pointer; font-size: 11px; font-weight: 800;
  padding: 6px 9px; border-radius: 8px; white-space: nowrap;
  transition: transform .1s, filter .2s;
}
.status-actions button:active { transform: scale(.95); }
.status-actions button:disabled { opacity: .5; cursor: not-allowed; }
.btn-ad { background: #fff1dc; color: #c4740a; border: 1px solid #ffd79c !important; }
.btn-upgrade { background: linear-gradient(135deg, #ffb43b, #ff8c1a); color: #fff; box-shadow: 0 3px 10px rgba(255,150,30,.28); }
.btn-upgrade.is-vip { background: #fff4df; color: #b8750c; box-shadow: none; }

/* ---------- 弹窗通用（付费 / 广告） ---------- */
.pay-dialog, .ad-dialog {
  width: 360px; max-width: 100%; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; animation: pop .2s ease;
}
.pay-dialog .dialog-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; font-weight: 800; background: linear-gradient(135deg, #fff2d8, #ffe8c4);
  color: #8a5300;
}
.pay-dialog button, .ad-dialog button {
  border: none; cursor: pointer; font-size: 13px; font-weight: 700;
  padding: 9px 14px; border-radius: 9px; transition: transform .1s, opacity .2s;
}
.pay-dialog button:active, .ad-dialog button:active { transform: scale(.96); }
.pay-dialog button:disabled, .ad-dialog button:disabled { opacity: .55; cursor: not-allowed; }
.pay-dialog button.btn-ghost, .ad-dialog button.btn-ghost { background: #fff; color: var(--primary); border: 1px solid #cdd9ff; }
.pay-dialog button.small, .ad-dialog button.small { padding: 6px 10px; font-size: 12px; }
.pay-body { padding: 16px; max-height: 62vh; overflow-y: auto; }
.pay-price { display: flex; align-items: baseline; gap: 4px; justify-content: center; color: var(--danger); }
.pay-price span { font-size: 20px; font-weight: 800; }
.pay-price b { font-size: 42px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.pay-price small { font-size: 11px; color: var(--muted); margin-left: 8px; }
.pay-perks { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.pay-perks li { font-size: 12px; color: #4a5262; background: #f7f9ff; border-radius: 9px; padding: 9px 11px; }
.pay-perks li::before { content: "✓ "; color: var(--primary); font-weight: 900; }
.pay-perks b { color: var(--ink); }
.pay-note { font-size: 11px; line-height: 1.6; color: #9a6410; background: #fff8e8; border: 1px solid #ffe1a6; border-radius: 9px; padding: 9px 11px; margin-bottom: 12px; }
.pay-qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.pay-qr svg { width: 176px; height: 176px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.pay-tip { text-align: center; font-size: 11px; color: var(--muted); margin: 8px 0 12px; }
.pay-main { display: block; width: 100%; padding: 12px !important; font-size: 15px !important; }
.pay-success { margin-top: 14px; background: #eefaf1; border: 1px solid #c9ecd4; border-radius: 11px; padding: 12px; text-align: center; }
.pay-ok { font-weight: 800; color: #167a3c; font-size: 14px; margin-bottom: 10px; }
.pay-code-label { font-size: 11px; color: var(--muted); }
.pay-code-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; }
.pay-code-row code { font-size: 14px; font-weight: 800; letter-spacing: .5px; color: #1f4fd6; background: #fff; border: 1px dashed #a9c2ff; border-radius: 8px; padding: 6px 9px; }
.pay-success p { font-size: 11px; color: #5c7a64; line-height: 1.5; }
.pay-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.redeem-row { display: flex; gap: 8px; margin-top: 10px; }
.redeem-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #d8deea; border-radius: 9px; font-size: 13px; text-transform: uppercase; }
.redeem-row input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

/* ---------- 激励广告 ---------- */
.ad-dialog { padding: 18px; }
.ad-tag { font-size: 10px; font-weight: 800; color: #a06a12; background: #fff1d8; display: inline-block; padding: 4px 9px; border-radius: 20px; letter-spacing: .5px; }
.ad-visual { display: flex; align-items: center; gap: 14px; margin: 16px 0; background: linear-gradient(135deg, #eef4ff, #f7f0ff); border-radius: 12px; padding: 16px; }
.ad-emoji { font-size: 44px; line-height: 1; }
.ad-copy { display: flex; flex-direction: column; gap: 4px; }
.ad-copy b { font-size: 16px; }
.ad-copy span { font-size: 11px; color: var(--muted); }
.ad-title { font-size: 15px; font-weight: 800; text-align: center; }
.ad-desc { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 12px; }
.ad-progress { height: 7px; border-radius: 20px; background: #e9eef8; overflow: hidden; margin-bottom: 16px; }
.ad-progress > div { height: 100%; width: 0; border-radius: 20px; background: linear-gradient(90deg, #2f6bff, #6d9bff); transition: width .25s linear; }
.ad-actions { display: flex; gap: 8px; }
.ad-actions button { flex: 1; }
.ad-fineprint { margin-top: 12px; font-size: 10px; line-height: 1.5; color: #a8afbd; text-align: center; }

/* ---------- 弹幕层 ---------- */
.barrage {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50;
}
.barrage.off { display: none; }
.bullet {
  position: absolute; right: -40%; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(31,36,48,.38); padding: 5px 11px; border-radius: 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  animation: fly linear forwards;
}
.bullet-user {
  font-size: 14px;
  background: linear-gradient(135deg, #2f6bff, #1f4fd6);
  box-shadow: 0 4px 12px rgba(47,107,255,.4);
}
@keyframes fly {
  from { transform: translateX(0); }
  to { transform: translateX(-160vw); }
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: rgba(31,36,48,.92); color: #fff;
  font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 20px;
  z-index: 200; max-width: 86vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toastIn .2s ease;
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 设置面板 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(20,24,35,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.mask[hidden] { display: none; }
.settings {
  width: 360px; max-width: 100%; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.settings-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-weight: 800; background: var(--primary-soft);
}
.settings-body { padding: 14px 16px; max-height: 60vh; overflow-y: auto; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.field input {
  width: 150px; padding: 8px 10px; border: 1px solid #d8deea; border-radius: 9px;
  font-size: 14px; text-align: right; font-variant-numeric: tabular-nums;
}
.field input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.field-tip { display: block; font-size: 10px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.rewards-field { flex-direction: column; align-items: stretch; gap: 8px; }
.reward-list { display: flex; flex-direction: column; gap: 8px; }
.reward-item { display: flex; gap: 8px; align-items: center; }
.reward-item input { flex: 1; width: auto; text-align: left; }
.reward-item input.cost { max-width: 90px; text-align: right; }
.reward-item .del { border: none; background: #ffeceb; color: var(--danger); border-radius: 8px; padding: 6px 9px; cursor: pointer; font-weight: 800; }
.btn-ghost.small { align-self: flex-start; padding: 6px 10px; font-size: 12px; }
.settings-foot { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- 响应式 ---------- */
@media (max-width: 430px) {
  body { padding: 10px; align-items: flex-start; }
  .card { width: 100%; }
  .income-amount { font-size: 34px; }
  .status-text { font-size: 22px; }
}

/* ---------- 动效敏感用户（prefers-reduced-motion） ----------
   纯装饰动效全部关闭；JS 侧会同时默认暂停 3D 动画与语录弹幕（见 app.js init） */
@media (prefers-reduced-motion: reduce) {
  .online-badge.is-online .online-dot,
  .horse-fallback .fb-horse,
  .share-dot,
  .settings,
  .pay-dialog,
  .ad-dialog,
  .share-dialog,
  .toast { animation: none; }
  .progress-bar { transition: none; }
}
