:root {
  color-scheme: light;
  --ink: #183a2c;
  --muted: #60766b;
  --green: #4f8f48;
  --green-deep: #34713b;
  --cream: #fbfff7;
  --line: rgba(69, 115, 74, .18);
  --shadow: 0 24px 70px rgba(24, 70, 49, .22);
}

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background-color: #83ccef;
  background-image:
    linear-gradient(90deg, rgba(234, 255, 229, .36), transparent 62%),
    url("assets/background.png");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

a, button { font: inherit; }

.page {
  display: flex;
  min-height: 100svh;
  align-items: flex-start;
  padding: clamp(30px, 8vh, 86px) clamp(20px, 7vw, 108px) 120px;
}

.download-card {
  width: min(455px, 100%);
  padding: clamp(23px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(247,255,240,.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid rgba(72, 137, 69, .18);
  border-radius: 999px;
  color: var(--green-deep);
  background: rgba(230, 248, 219, .78);
  font-size: 13px;
  font-weight: 750;
}

.tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6eb75b;
  box-shadow: 0 0 0 4px rgba(110,183,91,.13);
}

h1 {
  margin: 0;
  max-width: 460px;
  font-size: clamp(30px, 4vw, 43px);
  line-height: 1.1;
  letter-spacing: -.045em;
  white-space: pre-line;
}

.subtitle {
  margin: 14px 0 21px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.features li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #476657;
  background: rgba(255,255,255,.64);
  font-size: 13px;
  font-weight: 650;
}

.features svg { color: #57954d; }

.download-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 17px;
  color: white;
  background: linear-gradient(135deg, #63a657, #34713b);
  box-shadow: 0 14px 28px rgba(54, 113, 59, .26);
  text-decoration: none;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease;
}

.download-button:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(54,113,59,.32); }
.download-button:active { transform: translateY(0); }

.code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
  color: #6d8277;
  font-size: 13px;
}

.code-row strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}

.code-row[hidden] { display: none; }

.copy-code {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-deep);
  background: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.notice {
  margin: 20px 0 0;
  color: #829087;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(17, 47, 34, .36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .25s ease;
}

.support-modal[hidden] { display: none; }
.support-modal.is-open { opacity: 1; }

.support-card {
  position: relative;
  width: min(410px, 100%);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 27px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(247,255,241,.94));
  box-shadow: 0 30px 80px rgba(14,45,29,.3);
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}

.support-modal.is-open .support-card { opacity: 1; transform: translateY(0) scale(1); }
.support-modal.is-closing .support-card { opacity: 0; transform: translate(42vw, 42vh) scale(.18); }

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #61776b;
  background: #edf5e9;
  cursor: pointer;
}

.modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 800;
}

.modal-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48b46b;
  box-shadow: 0 0 0 4px rgba(72,180,107,.13);
}

h2 { margin: 0; padding-right: 32px; font-size: 28px; letter-spacing: -.03em; }

.modal-copy {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.qr-wrap {
  width: min(218px, 65vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(36,84,48,.12);
}

.qr-wrap a { display: block; width: 100%; height: 100%; border-radius: 13px; overflow: hidden; }
.qr-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; }

.scan-tip {
  margin: 13px 0 16px;
  color: #73857b;
  font-size: 12px;
  text-align: center;
}

.support-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 0 19px 0 14px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #244b31;
  background: rgba(251,255,248,.93);
  box-shadow: 0 15px 36px rgba(23,71,40,.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.92);
  transition: transform .22s ease, opacity .18s ease;
}

.support-launcher.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.launcher-icon {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #78ba63, #3e8246);
}

.launcher-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: #36bd71;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  padding: 10px 15px;
  border-radius: 999px;
  color: white;
  background: rgba(24,58,44,.92);
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .18s ease, transform .18s ease;
}

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

.copy-helper {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

:focus-visible { outline: 3px solid rgba(61,133,72,.35); outline-offset: 3px; }

@media (max-width: 700px) {
  body { background-position: 54% center; background-attachment: scroll; }
  .page { align-items: flex-start; padding: 22px 14px 100px; }
  .download-card { padding: 25px 20px; border-radius: 25px; }
  h1 { font-size: clamp(30px, 10vw, 41px); }
  .support-card { padding: 24px 20px 21px; border-radius: 24px; }
  .support-launcher { right: max(13px, env(safe-area-inset-right)); bottom: max(13px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
