.download-page { min-width: 0; background: #1d2a22; }
.download-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 80% 8%, #3f624b 0%, #284635 38%, #192e24 73%);
}
.download-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("assets/download-mountains.webp") left 65% / cover no-repeat;
  mask-image: radial-gradient(ellipse 90% 92% at left bottom, #000 14%, transparent 94%);
  mix-blend-mode: luminosity;
  opacity: .23;
  pointer-events: none;
}
.download-inner {
  width: min(100%, 1320px);
  min-height: min(760px, 100vh);
  min-height: min(760px, 100dvh);
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(16px, 3vw, 46px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 76px) clamp(22px, 6vw, 95px);
}

.download-copy { position: relative; z-index: 1; }
.download-logo { display: block; width: clamp(127px, 15vw, 196px); height: auto; margin: 0 0 10px -28px; filter: drop-shadow(0 10px 16px #101c11aa); }
.app-wordmark { margin: 0 0 7px; color: #e1c895; font: .89rem/1.3 Georgia, serif; letter-spacing: .19em; text-transform: uppercase; }
.download-copy h1 {
  margin: 0;
  color: #fff3da;
  font: 750 clamp(2.8rem, 6.2vw, 6.15rem)/1.05 "Songti SC", STSong, "PingFang SC", serif;
  letter-spacing: .035em;
}
.download-description { max-width: 19em; margin: 19px 0 26px; font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.65; }
.download-actions { display: grid; justify-items: start; gap: 9px; }
.download-actions > span { color: #dbe0d2; font-size: .82rem; }
.store-link { display: inline-block; border-radius: 8px; }
.store-link img { display: block; width: 150px; height: auto; }
.store-link:hover { filter: brightness(1.16); }
.browser-link { color: #efd5a2; font-size: .87rem; font-weight: 600; padding-block: 6px; }
.browser-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.device-preview { position: relative; min-height: clamp(315px, 40vw, 550px); }
.device-preview figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid #829084;
  padding: 7px;
  background: #101614;
  box-shadow: 12px 25px 34px #0c1a15b8, inset 0 0 0 2px #50585063;
}
.device-preview img { display: block; width: 100%; height: auto; }
.device-tablet { top: 14%; right: 2%; width: 82%; border-radius: 21px; transform: rotate(6deg); }
.device-tablet img { border-radius: 14px; }
.device-phone { bottom: 4%; left: 2%; width: 33%; max-width: 238px; border-radius: 27px; transform: rotate(-8deg); }
.device-phone img { border-radius: 20px; }

.app-themes {
  width: min(calc(100% - 56px), 1050px);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 76px) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(20px, 6vw, 80px);
}
.app-themes h2 { margin: 0 0 12px; font: 700 clamp(1.65rem, 3.1vw, 2.65rem)/1.15 "Songti SC", STSong, "PingFang SC", serif; color: #f1d8a5; }
.app-themes p { margin: 0; max-width: 24em; color: var(--muted); line-height: 1.7; }
.app-themes img { display: block; width: 100%; height: auto; border: 1px solid #58634e; border-radius: 16px; }

.download-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px clamp(15px, 5vw, 65px) calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .81rem;
}
.download-footer a:hover { color: var(--gold); }

@media (max-width: 820px) {
  .download-inner { padding-inline: 26px; }
  .device-preview figure { padding: 5px; }
  .device-phone { border-radius: 20px; }
  .device-phone img { border-radius: 15px; }
}
@media (max-width: 680px) {
  .download-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
    padding: calc(23px + env(safe-area-inset-top)) 17px 34px;
  }
  .download-copy { text-align: center; }
  .download-logo { width: 136px; margin: 0 auto 4px; }
  .app-wordmark { font-size: .76rem; }
  .download-copy h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .download-description { margin: 12px auto 15px; }
  .download-actions { justify-items: center; }
  .device-preview { width: min(100%, 390px); min-height: clamp(220px, 66vw, 315px); margin: 0 auto; }
  .device-tablet { right: 4%; top: 12%; width: 80%; }
  .device-phone { left: 8%; bottom: 1%; }
  .app-themes { width: calc(100% - 32px); grid-template-columns: 1fr; }
}
