:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #faf5ff;
  background: #100d19;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(ellipse at 49% -10%, #332048 0, transparent 62%),
    linear-gradient(165deg, #191126 0, #15101e 56%, #100d19 100%);
}

.download {
  position: relative;
  display: grid;
  align-content: start;
  width: min(100%, 61rem);
  min-height: 100svh;
  gap: 2.25rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5.5rem) clamp(1rem, 5vw, 3rem) 1.8rem;
}

.download-hero { text-align: center; }
.download-hero .download-seal { width: 9rem; height: 9rem; margin: 0 auto 1.05rem; }
.download-hero .download-seal canvas,
.download-hero .download-seal .pony-seal__fallback { inset: .35rem; width: 8.3rem; height: 8.3rem; }
.download-hero .download-seal::after { inset: auto 1rem .15rem; height: .8rem; }
.download-hero .download-seal::before { inset: auto -.7rem -.5rem; height: 2rem; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.45rem, 6vw, 4.1rem); line-height: 1.1; letter-spacing: -.065em; }
.release-version { margin-top: .85rem; color: #c3b2d5; font-size: .825rem; text-align: center; }

.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.platform-group {
  display: grid;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid #e4c8ff1a;
  border-radius: 1.5rem;
  background: linear-gradient(140deg, #ecd5ff0c, #d4c2ff03);
  box-shadow: 0 1rem 3rem #0c061c32;
}

.platform-group h2 {
  padding: .12rem .35rem .15rem;
  color: #c4afda;
  font-size: .84rem;
  font-weight: 600;
}

.platform {
  display: grid;
  grid-template-columns: 2.95rem minmax(4rem, 1fr) auto;
  align-items: center;
  column-gap: .8rem;
  min-height: 4.7rem;
  padding: .65rem .75rem;
  border: 1px solid #f2dfff14;
  border-radius: 1rem;
  background: linear-gradient(120deg, #f8e8ff0b, #120e1dc4);
}

.platform-icon {
  width: 2.95rem;
  height: 2.95rem;
  padding: .63rem;
  border-radius: .77rem;
  filter: invert(1);
  opacity: .94;
}

.platform--android .platform-icon { filter: invert(.88) sepia(.3) saturate(1.9) hue-rotate(74deg); }
.platform--windows .platform-icon { filter: invert(.8) sepia(.23) saturate(1.7) hue-rotate(153deg); }
.platform--harmonyos .platform-icon { filter: invert(.84) sepia(.25) saturate(2) hue-rotate(206deg); }

.platform-name { overflow-wrap: anywhere; }
.platform-name h3 { font-size: clamp(1rem, 3.7vw, 1.12rem); font-weight: 640; }
.platform-name span { font-size: .78rem; color: #c4b3d6; }
.platform-files { display: flex; flex-wrap: wrap; justify-content: end; gap: .35rem; }

.download-action {
  display: inline-flex;
  gap: .3rem;
  justify-content: center;
  align-items: center;
  min-height: 2.6rem;
  padding: .45rem .65rem;
  border: 1px solid #ae78e891;
  border-radius: .65rem;
  background: #603489;
  color: #fff7ff;
  font-size: .8rem;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}

.download-action[href]:hover { background: #7441a5; }
.download-action[href]:focus-visible { outline: 2px solid #e4bbff; outline-offset: 3px; }
.download-action.pending { color: #c5adcf; border-color: #d4a9ed27; background: #210f3426; }

footer { margin-top: .3rem; color: #a694b6; text-align: center; font-size: .8rem; }

@media (max-width: 46rem) {
  .download-grid { width: min(100%, 27rem); margin-inline: auto; grid-template-columns: 1fr; gap: .9rem; }
  .download { gap: 1.45rem; }
  .download-hero .download-seal { transform: scale(.87); transform-origin: bottom; margin-bottom: .8rem; }
}

@media (max-width: 22rem) {
  .download { padding-inline: .65rem; }
  .platform { grid-template-columns: 2.45rem minmax(4rem, 1fr) auto; column-gap: .5rem; padding-inline: .5rem; }
  .platform-icon { width: 2.45rem; height: 2.45rem; padding: .49rem; }
}
