:root {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #151331;
  background: #ecebfa;
  font-synthesis: none;
  --ink: #151331;
  --muted: #514d69;
  --purple: #4e36cc;
  --purple-dark: #3925aa;
  --line: #d4d1e7;
  --panel: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--purple-dark); }

.shell {
  width: min(100% - 2rem, 34rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 9vh, 6rem) 3rem;
}

.heading { margin-bottom: 1.75rem; }
.mark { display: block; margin-bottom: 1.1rem; border-radius: 1rem; }
h1 {
  margin: 0;
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1.18;
  letter-spacing: -.065em;
  font-weight: 800;
}
.heading p { margin: .75rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.download-panel {
  padding: clamp(1rem, 4.8vw, 1.75rem);
  border: 1px solid #dcd8ee;
  border-radius: 1.6rem;
  background: var(--panel);
  box-shadow: 0 10px 40px #2112490d, 0 1px 2px #2112490a;
}

.input-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.75rem;
  margin: -.3rem 0 .3rem;
}
label { font-weight: 700; }
.text-button {
  min-height: 2.75rem;
  padding: 0 .75rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--purple-dark);
  font-size: .95rem;
  font-weight: 700;
}
.text-button:hover { background: #efedfd; }

textarea {
  display: block;
  width: 100%;
  min-height: 6.25rem;
  max-height: 15rem;
  padding: .95rem 1rem;
  resize: vertical;
  border: 1px solid #cbc7df;
  border-radius: .9rem;
  background: #f8f7fd;
  color: var(--ink);
  line-height: 1.55;
}
textarea::placeholder { color: #635c79; opacity: 1; }

.primary, .secondary, .retry {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  border-radius: .85rem;
  padding: .75rem 1rem;
  text-decoration: none;
  font-weight: 700;
}
.primary {
  width: 100%;
  margin-top: .8rem;
  border: 0;
  background: var(--purple);
  color: white;
}
.primary:hover { background: var(--purple-dark); }
.primary:disabled { opacity: .65; cursor: wait; }

:focus-visible { outline: 3px solid #8068f5; outline-offset: 3px; }
.status {
  margin-top: 1rem;
  padding: .75rem .9rem;
  border-radius: .75rem;
  background: #eeebfd;
  color: #3d2d83;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.status[data-state="error"] { background: #fff0f1; color: #91273b; }
.status strong { display: block; margin-bottom: .25rem; }
.retry, .secondary {
  width: fit-content;
  margin-top: .45rem;
  border: 1px solid #c9beff;
  background: #f5f3ff;
  color: var(--purple-dark);
}
.secondary:hover, .retry:hover { background: #eae4ff; }

.setup { margin-top: 1.65rem; padding-inline: .2rem; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.1rem;
  padding: .75rem .25rem;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; color: var(--purple-dark); font-size: 1.3rem; font-weight: 500; }
details[open] summary::after { content: "−"; }
.setup-body { padding: 0 .25rem .85rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.65; }
.setup-body p { margin: .25rem 0 .6rem; }
.setup-body .secondary { margin: 0 0 .65rem; }
.manual { border: 0; }
.manual summary { min-height: 2.75rem; padding-inline: 0; }
ol { margin: .5rem 0; padding-inline-start: 1.5rem; }
li + li { margin-top: .35rem; }
code { padding: .12em .25em; border-radius: .25em; background: #e3dffc; color: #322365; font-size: .9em; }
