html { overscroll-behavior: none; background: #000; }
body {
    touch-action: pan-x pan-y;
}
.self_pwa_btn, .self_pwa_ios_btn {
  display: inline-block;
  padding: 14px 40px;
  background: #007aff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.self_pwa_btn:active, .self_pwa_ios_btn:active { opacity: 0.7; }

/* ========== iOS Bottom Sheet ========== */
.self_pwa_sheet_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  animation: self_pwa_fadeIn .25s ease;
}
@keyframes self_pwa_fadeIn { from { opacity: 0; } to { opacity: 1; } }

.self_pwa_sheet {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 24px 36px;
  text-align: center;
  animation: self_pwa_slideUp .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}
@keyframes self_pwa_slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.self_pwa_sheet_bar {
  width: 36px;
  height: 5px;
  background: #d1d1d6;
  border-radius: 3px;
  margin: 0 auto 20px;
}

.self_pwa_sheet_icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: #007aff;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  color: #fff;
}

.self_pwa_sheet h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 8px;
}

.self_pwa_sheet p {
  font-size: 0.95rem;
  color: #6e6e73;
  line-height: 1.6;
  padding: 0 8px;
}

.self_pwa_sheet_actions { margin-top: 24px; }

.self_pwa_ios_btn {
  width: 100%;
  background: #007aff;
  font-size: 1rem;
  padding: 14px;
  border-radius: 10px;
}

/* ========== 暗色模式 ========== */
@media (prefers-color-scheme: dark) {
  .self_pwa_sheet { background: #1c1c1e; }
  .self_pwa_sheet_bar { background: #48484a; }
  .self_pwa_sheet h3 { color: #f2f2f7; }
  .self_pwa_sheet p { color: #aeaeb2; }
  .self_pwa_sheet_overlay { background: rgba(0,0,0,0.55); }
  .self_pwa_sheet_icon { background: #0a84ff; }
  .self_pwa_btn, .self_pwa_ios_btn { background: #0a84ff; }
}

/* ========== Loading 遮罩 ========== */
.self_pwa_loading_overlay {
  position: fixed; inset: 0; z-index: 20000;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.self_pwa_loading_logo {
  width: 250px; height: auto; margin-bottom: 30px;
}
.self_pwa_loading_spinner {
  width: 40px; height: 40px;
  animation: self_pwa_spin 1s linear infinite;
}
@keyframes self_pwa_spin {
  to { transform: rotate(360deg); }
}
