* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
}

body.is-locked {
  overflow: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  background: #ffffff;
  border-radius: 18px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.app-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 22px;
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.app-icon img {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.app-icon.is-fallback::before {
  content: "喵";
  color: #ffffff;
  font-size: 34px;
  font-weight: 800;
}

.app-icon.is-fallback {
  background: #007aff;
}

.app-icon.is-fallback img {
  display: none;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

p {
  margin: 14px 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #6e6e73;
}

.download-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 15px 20px;
  border-radius: 12px;
  background: #007aff;
  color: #ffffff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}

.download-btn:active,
.copy-btn:active {
  transform: translateY(1px);
}

.version {
  margin-top: 18px;
  font-size: 13px;
  color: #8e8e93;
}

.browser-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  overflow-y: auto;
}

.browser-mask.is-visible {
  display: flex;
}

.browser-guide {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: 30px 24px;
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

.guide-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff9500;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
}

.browser-guide h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.browser-guide p {
  margin: 12px 0 18px;
}

.link-box {
  width: 100%;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  user-select: text;
}

.copy-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #007aff;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.copy-status {
  min-height: 20px;
  margin-top: 12px;
  color: #34c759;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .card {
    padding: 30px 22px;
  }

  h1 {
    font-size: 25px;
  }

  .browser-guide {
    padding: 26px 20px;
  }
}
