/* ===== 首页弹窗广告：优速数据（香港特价云 + 代理扶持计划）=====
   独立样式文件，所有选择器都收在 .yspop- 前缀下，
   避免与站点现有 .tag / .overlay / .popup / .toast 等全局类互相覆盖。
   视觉沿用原广告稿：浅底细边、直角小圆角、深藏青主色 + 琥珀点缀。 */
.yspop-overlay{
  --ys-panel:#ffffff;
  --ys-panel-2:#fafafa;
  --ys-line:#e5e7eb;
  --ys-ink:#1e293b;
  --ys-muted:#64748b;
  --ys-accent:#d97706;
  --ys-accent-soft:#fffbeb;
  position:fixed;inset:0;z-index:99997;
  display:flex;align-items:center;justify-content:center;padding:14px;
  background:rgba(15,23,42,.5);
  font-family:"Noto Sans SC",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px;line-height:1.5;color:var(--ys-ink);text-align:left;
  opacity:1;visibility:visible;
  transition:opacity .3s ease,visibility .3s ease;
}
.yspop-overlay.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
.yspop-overlay *,.yspop-overlay *::before,.yspop-overlay *::after{box-sizing:border-box}
.yspop-overlay h1,.yspop-overlay p{margin:0}

/* 顶部声明条：广告来源提示。刻意压低视觉权重（浅灰小字、无强调色、无图标），
   让读者先看到广告内容本身，只在需要时注意到归属与到期信息 */
.yspop-notice{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;
  padding:5px 14px;border-bottom:1px solid #eef2f6;background:#fff;
  font-size:11px;font-weight:400;line-height:1.45;letter-spacing:.2px;color:#9aa5b1;
}
.yspop-notice .yspop-notice-dot{width:2px;height:2px;flex:none;border-radius:50%;background:#dbe2ea}

/* ===== 弹窗主体 ===== */
.yspop{
  position:relative;display:flex;flex-direction:column;
  width:100%;max-width:640px;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);
  background:var(--ys-panel);border:1px solid var(--ys-line);border-radius:8px;
  box-shadow:0 10px 30px -5px rgba(0,0,0,.08);
  overflow:hidden;
  animation:yspop-in .3s ease-out;
}
@keyframes yspop-in{
  from{opacity:0;transform:scale(.98) translateY(10px)}
  to{opacity:1;transform:scale(1) translateY(0)}
}
@media (prefers-reduced-motion:reduce){.yspop{animation:none}}

/* 头部 */
.yspop-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:16px 20px;border-bottom:1px solid var(--ys-line);background:var(--ys-panel-2);
}
.yspop-brand{display:flex;align-items:center;gap:8px;min-width:0}
.yspop-brand-logo{width:24px;height:24px;flex:none;border-radius:4px}
.yspop-brand-name{font-size:15px;font-weight:600;letter-spacing:0;color:var(--ys-ink)}
.yspop-brand-tag{
  display:inline-flex;align-items:center;gap:4px;
  font-size:12px;font-weight:500;color:var(--ys-ink);
  background:#fff;border:1px solid var(--ys-line);
  padding:2px 8px;border-radius:4px;margin-left:8px;
}
.yspop-close{
  width:32px;height:32px;flex:none;display:flex;align-items:center;justify-content:center;
  background:transparent;border:none;border-radius:4px;color:var(--ys-muted);
  cursor:pointer;transition:background .2s,color .2s;
}
.yspop-close:hover{background:#e2e8f0;color:var(--ys-ink)}

/* 主体 */
.yspop-body{padding:20px 24px;overflow-y:auto;overscroll-behavior:contain}
.yspop-eyebrow{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;font-weight:500;color:var(--ys-muted);
}
.yspop-hero{
  margin-top:12px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  flex-wrap:wrap;padding-bottom:20px;border-bottom:1px dashed var(--ys-line);margin-bottom:20px;
}
.yspop-hero-title{font-size:22px;font-weight:700;line-height:1.3;color:var(--ys-ink)}
.yspop-hero-title .yspop-sub-line{display:block;font-size:13px;font-weight:400;color:var(--ys-muted);margin-top:6px;letter-spacing:0}
.yspop-price{display:flex;align-items:flex-end;gap:2px;line-height:1}
.yspop-price .yspop-cur{font-size:20px;color:var(--ys-ink);padding-bottom:4px;font-weight:600}
.yspop-price .yspop-num{font-size:48px;color:var(--ys-ink);letter-spacing:-.02em;font-weight:700;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.yspop-price .yspop-unit{font-size:13px;color:var(--ys-muted);font-weight:500;padding-bottom:6px;margin-left:4px}
.yspop-price .yspop-unit em{font-style:normal;font-size:12px;color:#94a3b8;display:block;padding-bottom:2px;font-weight:400}

/* 规格条 */
.yspop-specs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.yspop-spec{
  min-width:0;display:flex;align-items:center;gap:8px;
  padding:10px;border:1px solid var(--ys-line);border-radius:4px;background:#fff;
}
.yspop-spec .yspop-ic{flex:none;width:18px;height:18px;color:var(--ys-muted)}
.yspop-spec .yspop-t{font-size:11px;color:var(--ys-muted);line-height:1.2}
.yspop-spec .yspop-v{font-size:14px;font-weight:600;color:var(--ys-ink);line-height:1.3;margin-top:2px}

/* 卖点标签 */
.yspop-tags{margin-top:16px;display:flex;flex-wrap:wrap;gap:8px}
.yspop-tag{
  display:inline-flex;align-items:center;gap:4px;
  font-size:12px;font-weight:500;color:var(--ys-ink);
  background:var(--ys-panel-2);border:1px solid var(--ys-line);border-radius:4px;padding:4px 10px;
}
.yspop-tag svg{flex:none;width:12px;height:12px;color:var(--ys-muted)}

/* 代理联动块 */
.yspop-agent{
  margin-top:20px;padding:14px 16px;border-radius:6px;
  background:var(--ys-accent-soft);border:1px solid #fde68a;
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
}
.yspop-agent-left{display:flex;align-items:center;gap:12px;min-width:0}
.yspop-agent-badge{
  flex:none;width:32px;height:32px;border-radius:4px;background:#f59e0b;
  display:flex;align-items:center;justify-content:center;
}
.yspop-agent-badge svg{width:18px;height:18px;color:#fff}
.yspop-agent-txt{min-width:0}
.yspop-agent-txt .yspop-a1{font-size:14px;font-weight:600;color:#92400e}
.yspop-agent-txt .yspop-a1 .yspop-price-txt{font-size:15px;font-weight:700}
.yspop-agent-txt .yspop-a2{font-size:12px;color:#b45309;margin-top:2px;line-height:1.5}
.yspop-agent-cta{
  flex:none;display:inline-flex;align-items:center;gap:4px;
  padding:6px 12px;border-radius:4px;text-decoration:none;
  font-size:13px;font-weight:500;color:#fff;background:#d97706;transition:opacity .2s;
}
.yspop-agent-cta:hover{opacity:.9;color:#fff}
.yspop-agent-cta svg{width:14px;height:14px}

/* 主 CTA */
.yspop-cta-row{margin-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.yspop-cta{
  display:flex;align-items:center;justify-content:center;gap:6px;
  padding:12px 16px;border-radius:4px;text-decoration:none;
  font-size:14px;font-weight:600;transition:all .2s;
}
.yspop-cta svg{width:16px;height:16px;flex:none}
.yspop-cta-primary{color:#fff;background:var(--ys-ink)}
.yspop-cta-primary:hover{background:#0f172a;color:#fff}
.yspop-cta-ghost{color:var(--ys-ink);background:#fff;border:1px solid var(--ys-line)}
.yspop-cta-ghost:hover{background:var(--ys-panel-2);color:var(--ys-ink)}

/* 优惠码行 */
.yspop-bonus{
  margin-top:16px;display:flex;align-items:center;justify-content:space-between;gap:10px;
  flex-wrap:wrap;padding:10px 14px;border:1px solid var(--ys-line);border-radius:4px;
  background:var(--ys-panel-2);
}
.yspop-bonus .yspop-b-txt{font-size:12px;color:var(--ys-muted);line-height:1.5}
.yspop-bonus .yspop-b-txt strong{color:var(--ys-ink);font-weight:600}
.yspop-coupon{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border:1px solid var(--ys-line);border-radius:4px;
  background:#fff;cursor:pointer;user-select:none;transition:border-color .2s;
  font-family:inherit;color:var(--ys-ink);
}
.yspop-coupon:hover{border-color:#94a3b8}
.yspop-coupon svg{width:14px;height:14px;color:var(--ys-muted)}
.yspop-coupon .yspop-code{font-size:14px;font-weight:600;letter-spacing:.05em;color:var(--ys-ink)}
.yspop-coupon .yspop-copy{font-size:11px;color:var(--ys-muted)}

/* 底部信任条 */
.yspop-foot{
  padding:12px 24px;
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 12px;
  border-top:1px solid var(--ys-line);background:var(--ys-panel-2);
  font-size:12px;color:var(--ys-muted);
}
.yspop-foot .yspop-dot{width:2px;height:2px;border-radius:50%;background:#cbd5e1}

/* 复制提示（在遮罩外面，故不引用 .yspop-overlay 内的局部变量） */
.yspop-toast{
  position:fixed;left:50%;bottom:36px;z-index:99999;transform:translateX(-50%) translateY(10px);
  padding:10px 18px;border-radius:4px;background:#1e293b;
  color:#fff;font-size:13px;
  font-family:"Noto Sans SC",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;
}
.yspop-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== 移动端：整体压缩，控制在屏幕中间（约 55%~65% 高度），不出现内部滚动 ===== */
@media (max-width:520px){
  .yspop-notice{padding:4px 10px;font-size:10px;gap:5px;line-height:1.4}
  .yspop-head{padding:9px 12px;gap:8px}
  .yspop-brand{gap:6px}
  .yspop-brand-logo{width:18px;height:18px;border-radius:3px}
  .yspop-brand-name{font-size:13px}
  .yspop-brand-tag{font-size:10px;padding:1px 5px;margin-left:4px;gap:3px}
  .yspop-brand-tag svg{width:10px;height:10px}
  .yspop-close{width:26px;height:26px}
  .yspop-close svg{width:15px;height:15px}

  .yspop-body{padding:10px 12px 12px}
  .yspop-eyebrow{font-size:10.5px;gap:4px}
  .yspop-eyebrow svg{width:12px;height:12px}

  .yspop-hero{margin-top:6px;padding-bottom:9px;margin-bottom:9px;gap:6px 10px;align-items:center}
  .yspop-hero-title{font-size:16px;line-height:1.25}
  .yspop-hero-title .yspop-sub-line{font-size:11px;margin-top:3px;line-height:1.4}
  .yspop-price{gap:1px}
  .yspop-price .yspop-cur{font-size:14px;padding-bottom:2px}
  .yspop-price .yspop-num{font-size:30px}
  .yspop-price .yspop-unit{font-size:10.5px;padding-bottom:3px;margin-left:2px}
  .yspop-price .yspop-unit em{font-size:10px}

  .yspop-specs{grid-template-columns:repeat(4,1fr);gap:5px}
  .yspop-spec{padding:5px 4px;gap:4px;justify-content:center}
  .yspop-spec .yspop-ic{width:13px;height:13px}
  .yspop-spec .yspop-t{font-size:9px;line-height:1.15}
  .yspop-spec .yspop-v{font-size:11.5px;line-height:1.2;margin-top:1px}

  .yspop-tags{margin-top:9px;gap:5px}
  .yspop-tag{font-size:10.5px;padding:2px 7px;gap:3px}
  .yspop-tag svg{width:10px;height:10px}

  .yspop-agent{margin-top:10px;padding:8px 10px;gap:8px;border-radius:5px;flex-wrap:nowrap}
  .yspop-agent-left{flex:1 1 auto;gap:8px;min-width:0}
  .yspop-agent-badge{width:24px;height:24px;border-radius:3px}
  .yspop-agent-badge svg{width:14px;height:14px}
  .yspop-agent-txt .yspop-a1{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .yspop-agent-txt .yspop-a1 .yspop-price-txt{font-size:12.5px}
  .yspop-agent-txt .yspop-a2{font-size:10px;line-height:1.4;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .yspop-agent-cta{padding:4px 9px;font-size:11.5px;gap:3px}
  .yspop-agent-cta svg{width:12px;height:12px}

  .yspop-cta-row{margin-top:10px;grid-template-columns:1fr 1fr;gap:8px}
  .yspop-cta{padding:8px 6px;font-size:13px;gap:4px}
  .yspop-cta svg{width:14px;height:14px}

  .yspop-bonus{margin-top:9px;padding:7px 10px;gap:6px;flex-wrap:nowrap;align-items:center}
  .yspop-bonus .yspop-b-txt{flex:1 1 auto;min-width:0;font-size:10.5px;line-height:1.4}
  .yspop-coupon{flex:none;padding:3px 8px;gap:4px}
  .yspop-coupon svg{width:12px;height:12px}
  .yspop-coupon .yspop-code{font-size:12px}
  .yspop-coupon .yspop-copy{font-size:10px}

  /* 移动端隐藏底部信任条：纯装饰信息，优先保证一屏放下 */
  .yspop-foot{display:none}
}
@media (max-width:360px){
  .yspop-hero-title{font-size:15px}
  .yspop-price .yspop-num{font-size:26px}
  .yspop-spec .yspop-ic{display:none}
}
