:root {
  --ink: #142b2e;
  --deep: #0d4b4b;
  --jade: #168979;
  --muted: #64716e;
  --paper: #f5f6f2;
  --surface: #ffffff;
  --line: #dce4e0;
  --mint: #e3f3ed;
  --gold: #b98528;
  --warning: #8d5f13;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button, a { font: inherit; letter-spacing: 0; }

.download-shell {
  width: min(680px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(32px + env(safe-area-inset-bottom));
}

.download-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.back-link {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--deep);
  background: var(--surface);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.brand-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-copy img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.brand-copy strong { display: block; font-size: 17px; line-height: 1.1; }
.brand-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beta-mark { border-radius: 16px; padding: 7px 10px; color: var(--deep); background: var(--mint); font-size: 11px; font-weight: 700; }

.download-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 52, 52, 0.08);
}

.release-art { height: 210px; overflow: hidden; background: #dae6e0; }
.release-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 36%; }
.release-copy { padding: 20px; }
.eyebrow { margin: 0; color: var(--jade); font-size: 12px; font-weight: 800; }
.release-copy h1 { margin: 8px 0 0; font-size: 27px; line-height: 1.25; }
.release-copy > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.download-progress, .download-steps, .safety-note {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.download-progress { padding: 20px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-head strong { font-size: 18px; }
.progress-head span { color: var(--jade); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.progress-track { height: 8px; margin-top: 15px; overflow: hidden; border-radius: 4px; background: #e8eeeb; }
.progress-track span { width: 0; height: 100%; display: block; background: var(--jade); transition: width 160ms ease; }
#downloadDetail { min-height: 44px; margin: 12px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.primary-action, .secondary-action {
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  font-weight: 750;
  cursor: pointer;
}

.primary-action { border: 0; color: #fff; background: var(--deep); }
.primary-action:disabled { cursor: wait; opacity: 0.62; }
.secondary-action { margin-top: 10px; border: 1px solid var(--line); color: var(--deep); background: var(--surface); }

.download-steps { padding: 4px 18px; }
.step-row { min-height: 86px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: 0; }
.step-row > span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--deep); background: var(--mint); font-weight: 800; }
.step-row strong { font-size: 15px; }
.step-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.safety-note { padding: 16px 18px; color: var(--warning); background: #fff8e7; border-color: #ead9b3; }
.safety-note strong { font-size: 14px; }
.safety-note p { margin: 5px 0 0; font-size: 12px; line-height: 1.65; }

@media (min-width: 700px) {
  .download-shell { padding-left: 0; padding-right: 0; }
  .release-art { height: 260px; }
}

@media (max-width: 359px) {
  .download-shell { padding-left: 12px; padding-right: 12px; }
  .download-header { grid-template-columns: 44px minmax(0, 1fr); }
  .beta-mark { display: none; }
  .release-copy { padding: 17px; }
  .release-copy h1 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-track span { transition: none; }
}
