/* 企鹅钱包 下载页样式 —— 移动端优先，视觉按产品原型（钱包 App 3.0 需求 › 下载页（手机端））
 *
 * 配色取自原型截图：主蓝 #2f6df6（按钮渐变 #3d82f7 → #2457e6，logo 渐变 #5a9bff → #2a63ea），
 * 标题 #1f2937，页面顶部淡蓝 #eef4ff 渐到白。
 *
 * 屏幕适配与 App H5 的「手机外框」同一套做法（app/src/components/app/phone-frame.web.tsx，
 * 常量 app/src/constants/theme.ts 的 H5Frame.maxWidth = 486，2026-11-03 对齐 star）：
 *   - 内容区 width: 100% + max-width: 486px 居中、overflow: hidden；手机视口 < 486 时 max-width
 *     是空操作，手机端零变化，所以布局不写任何断点；
 *   - 外层（body）在宽于外框时铺 frame-gutter 纯黑：487 = 486 + 1，手机视口一律不命中
 *     （App 里这条媒体查询由 lib/zoom-lock.ts 注入，目的是 JS 跑起来前就有黑边，不闪白；
 *     本页 CSS 在 <head> 里同步加载，静态写在这里即可）；
 *   - 尺寸一律 px，不用 rem / vw（App 的 global.css 也没有一处 rem / vw）；
 *   - safe-area：viewport-fit=cover + env(safe-area-inset-*) 兜刘海与底部条。 */
:root {
  --primary: #2f6df6;
  --primary-gradient: linear-gradient(90deg, #3d82f7 0%, #2457e6 100%);
  --primary-pressed: #1e4fd6;
  --outline-border: #c3d4fb;
  --outline-bg: #ffffff;
  --page-top: #eef4ff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --bg: #ffffff;
  --frame-gutter: #000000;
  --frame-max-width: 486px;
  --btn-height: 52px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* 宽屏：外框两侧铺黑（同 App H5 的 bg-frame-gutter） */
@media (min-width: 487px) {
  body {
    background: var(--frame-gutter);
  }
}

/* 「手机外框」：486 居中，手机上就是 100% 宽 */
.page {
  width: 100%;
  max-width: var(--frame-max-width);
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top)) 32px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--bg) 220px);
}

/* Logo + 名称（原型：76px 圆角方块、22px 下方是 24px 粗体名称） */
.hero {
  text-align: center;
}
.logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(47, 109, 246, 0.3);
}
.logo svg {
  display: block;
  width: 76px;
  height: 76px;
}
.title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0.5px;
}

/* 按钮区：紧接名称下方（原型留白 36px），两个胶囊按钮纵排，间距 16px */
.actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--btn-height);
  padding: 0 20px;
  border-radius: calc(var(--btn-height) / 2);
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.1s,
    box-shadow 0.15s,
    background-color 0.15s;
}
/* display:flex 会压过 hidden 属性的 UA 样式，必须显式关掉（2026-11-04 旧版二维码卡片踩过） */
.btn[hidden] {
  display: none;
}
.btn:active {
  transform: scale(0.985);
}
/* 「下载APP」：蓝色渐变胶囊 + 下载图标 */
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 109, 246, 0.32);
}
.btn-primary:active {
  background: var(--primary-pressed);
}
/* 「立刻体验」：白底蓝字描边胶囊 */
.btn-outline {
  background: var(--outline-bg);
  color: var(--primary);
  border-color: var(--outline-border);
}
.btn-outline:active {
  background: #f3f7ff;
}
.btn-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}
/* 空态：两个按钮都不可用时 */
.empty {
  margin: 8px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
}
.empty[hidden] {
  display: none;
}

/* 下载确认层：居中小弹层（安卓才会出现） */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}
.dialog[hidden] {
  display: none;
}
.dialog-panel {
  width: 100%;
  max-width: 300px;
  padding: 24px 20px 16px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.dialog-title {
  margin: 0 0 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  gap: 12px;
}
.dialog-btn {
  flex: 1;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid var(--outline-border);
  background: var(--outline-bg);
  color: var(--primary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.dialog-btn-primary {
  border-color: transparent;
  background: var(--primary-gradient);
  color: #ffffff;
}
.dialog-btn:active {
  opacity: 0.85;
}

/* 微信 / QQ 引导遮罩：fixed 铺满视口（逃出 .page 这层框），内容再套一层 486 居中的 .mask-inner */
.mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
}
.mask[hidden] {
  display: none;
}
.mask-inner {
  width: 100%;
  max-width: var(--frame-max-width);
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 20px 0;
}
.mask-arrow {
  display: flex;
  justify-content: flex-end;
}
.mask-arrow svg {
  width: 96px;
  height: 96px;
  margin-right: 8px;
}
.mask-body {
  margin-top: 8px;
  padding: 0 8px;
}
.mask-step {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 14px;
  line-height: 1.4;
}
.mask-dots {
  display: inline-block;
  padding: 0 8px;
  border: 1.5px solid #ffffff;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
}
.mask-note {
  margin: 24px 0 0;
  font-size: 14px;
  opacity: 0.8;
}
