:root {
  --green: #63c93a;
  --green-dark: #4fae2b;
  --green-light: #8fe45e;
  --ink: #1d2433;
  --muted: #8b91a1;
  --line: #edf1e9;
  --bg: #f4f8f1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei',
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(560px 420px at 88% -8%, rgba(143, 228, 94, 0.32), transparent 65%),
    radial-gradient(480px 380px at 8% 108%, rgba(143, 228, 94, 0.18), transparent 68%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 34px;
  padding: 54px 36px 30px;
  box-shadow: 0 22px 70px rgba(55, 92, 40, 0.13), 0 2px 6px rgba(55, 92, 40, 0.04);
  overflow: hidden;
}

.card::before,
.card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.card::before {
  width: 210px;
  height: 210px;
  right: -92px;
  top: 46px;
  background: radial-gradient(circle, rgba(150, 230, 101, 0.3), rgba(150, 230, 101, 0) 70%);
}

.card::after {
  width: 150px;
  height: 150px;
  right: -58px;
  top: 118px;
  background: radial-gradient(circle, rgba(150, 230, 101, 0.22), rgba(150, 230, 101, 0) 70%);
}

.app-icon {
  width: 116px;
  height: 116px;
  margin: 0 auto 22px;
  border-radius: 27px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(30, 42, 20, 0.24);
  background: #101317;
}

.app-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 2px;
}

.meta {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.meta b {
  color: #59606f;
  font-weight: 600;
}

.meta .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ccd3c6;
  margin: 0 9px 2px;
  vertical-align: middle;
}

.tabs {
  margin: 26px auto 20px;
  padding: 4px;
  display: flex;
  gap: 4px;
  width: fit-content;
  border-radius: 999px;
  background: #f2f6ee;
}

.tab {
  border: 0;
  cursor: pointer;
  background: transparent;
  color: #7c8472;
  font-size: 14px;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: inherit;
  transition: all 0.18s ease;
}

.tab.active {
  background: #fff;
  color: var(--green-dark);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(66, 104, 44, 0.12);
}

.panel[hidden] {
  display: none;
}

.invite-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  padding: 8px 10px 8px 14px;
  border: 1px solid #dcecd2;
  border-radius: 999px;
  background: #f4fbef;
  color: #6f7a66;
  font-size: 13px;
}

.invite-tip[hidden] {
  display: none;
}

.invite-tip b {
  color: #2f5f1d;
  font-size: 15px;
  letter-spacing: 1px;
}

.invite-tip button {
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  background: #e2f3d7;
  color: #4f8f2b;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.invite-tip button:active {
  transform: scale(0.97);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  background: linear-gradient(92deg, var(--green-light), var(--green));
  box-shadow: 0 12px 24px rgba(99, 201, 58, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(99, 201, 58, 0.34);
}

.download-btn:active {
  transform: translateY(1px) scale(0.995);
}

.download-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 410px;
  margin: 20px auto 0;
  color: #7d8478;
  font-size: 13px;
  line-height: 1.65;
  cursor: pointer;
  user-select: none;
}

.consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--green);
  cursor: pointer;
}

.consent.warn {
  color: #d9534f;
  animation: shake 0.32s ease;
}

.consent.warn input {
  outline: 2px solid rgba(217, 83, 79, 0.35);
  outline-offset: 2px;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.qr-block {
  margin: 30px auto 0;
  text-align: center;
}

.qr-block img {
  width: 168px;
  height: 168px;
  display: block;
  margin: 0 auto;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.qr-block p {
  margin: 12px 0 0;
  color: #9aa094;
  font-size: 13.5px;
  letter-spacing: 0.5px;
}

.ios-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7faf4;
  color: #6e7568;
  font-size: 13.5px;
  line-height: 1.75;
  text-align: left;
}

.ios-note b {
  color: var(--ink);
}

.ios-note ol {
  margin: 8px 0 0;
  padding-left: 19px;
}

.help {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.help summary {
  cursor: pointer;
  color: #767d70;
  font-size: 13.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help summary::-webkit-details-marker {
  display: none;
}

.help summary::after {
  content: '＋';
  color: #a6ac9e;
  font-size: 15px;
}

.help[open] summary::after {
  content: '－';
}

.help-body {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8faf6;
  color: #747b6e;
  font-size: 13px;
  line-height: 1.8;
}

.help-body ol {
  margin: 0;
  padding-left: 18px;
}

.help-body li + li {
  margin-top: 4px;
}

footer {
  margin-top: 26px;
  color: #a1a79b;
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 14px);
  background: rgba(29, 36, 51, 0.92);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 20;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 600px) {
  body {
    padding: 0;
    background: #fff;
    justify-content: flex-start;
  }

  .card {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding: 56px 24px 28px;
    display: flex;
    flex-direction: column;
  }

  .card::before {
    top: 8px;
  }

  .card::after {
    top: 70px;
  }

  .app-icon {
    width: 98px;
    height: 98px;
    border-radius: 23px;
    margin-bottom: 18px;
  }

  h1 {
    font-size: 29px;
  }

  .qr-block {
    margin-top: auto;
    padding-top: 30px;
  }

  .help {
    margin-top: 18px;
  }

  footer {
    margin-top: 18px;
  }
}
