:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #17212b;
  background: #eef2f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafb 0, #eef2f5 55%, #e7edf0 100%);
}

.shell {
  width: min(760px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.brand {
  height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #147d64;
  color: white;
  font-size: 20px;
  font-weight: 800;
  border-radius: 8px;
}

.brand div { display: flex; flex-direction: column; }
.brand strong { font-size: 16px; }
.brand div span { color: #687681; font-size: 12px; }

.workspace {
  width: 100%;
  margin: auto 0;
  padding: 54px 58px 48px;
  background: #fff;
  border: 1px solid #dce4e8;
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(35, 55, 64, .10);
}

.eyebrow {
  margin: 0 0 12px;
  color: #147d64;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: 0;
}

.intro > p:last-child {
  margin: 14px 0 0;
  color: #65737d;
  line-height: 1.7;
}

.build-form { margin-top: 38px; }
.build-form label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; }

input, button {
  height: 48px;
  border-radius: 6px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid #bac6cc;
  padding: 0 15px;
  color: #17212b;
  background: #fbfcfd;
  outline: none;
}

input:focus { border-color: #147d64; box-shadow: 0 0 0 3px rgba(20, 125, 100, .13); }
input:disabled { opacity: .7; }

button {
  border: 0;
  background: #147d64;
  color: white;
  font-weight: 750;
  cursor: pointer;
}

button:hover:not(:disabled) { background: #0f6b55; }
button:disabled { cursor: wait; opacity: .76; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
button.loading .spinner { display: inline-block; margin-left: 8px; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint { margin: 9px 0 0; color: #849098; font-size: 12px; }
.password-label { margin-top: 22px; }

.result {
  margin-top: 28px;
  padding: 18px;
  display: flex;
  gap: 14px;
  border: 1px solid #dce5e8;
  border-left: 4px solid #69808c;
  background: #f7f9fa;
  border-radius: 6px;
}

.result[data-state="success"] { border-left-color: #16845f; background: #f2faf7; }
.result[data-state="error"] { border-left-color: #c84040; background: #fff6f5; }
.result[data-state="busy"] { border-left-color: #d58a1f; background: #fff9ef; }
.status-icon { width: 9px; height: 9px; margin-top: 6px; flex: 0 0 auto; border-radius: 50%; background: #69808c; }
.result[data-state="success"] .status-icon { background: #16845f; }
.result[data-state="error"] .status-icon { background: #c84040; }
.result[data-state="busy"] .status-icon { background: #d58a1f; }
.result-copy { min-width: 0; }
.result-copy strong { font-size: 14px; }
.result-copy p { margin: 5px 0 0; color: #5d6a73; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.download-link { display: inline-block; margin-top: 12px; color: #0c6f58; font-size: 14px; font-weight: 750; }
.download-link[hidden], .claim-form[hidden] { display: none; }
.build-progress[hidden] { display: none; }
.build-progress { margin-top: 15px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #60717a; font-size: 12px; }
.progress-meta strong { color: #147d64; }
.progress-track { height: 7px; overflow: hidden; border-radius: 4px; background: #dbe5e7; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #147d64; transition: width .45s ease; }
.claim-form { margin-top: 14px; }
.claim-form label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.claim-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px; }
.claim-row input, .claim-row button { height: 42px; }

footer { padding: 28px 0; text-align: center; color: #7b8890; font-size: 12px; }

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 760px); }
  .brand { height: 72px; }
  .workspace { padding: 34px 22px 30px; }
  h1 { font-size: 28px; }
  .input-row { grid-template-columns: 1fr; }
  .claim-row { grid-template-columns: 1fr; }
  button { width: 100%; }
}
#status-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
