:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  background: #eef1f2;
  color: #202628;
  letter-spacing: 0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

button, input { font: inherit; }

button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #aeb7b9;
  border-radius: 6px;
  background: #ffffff;
  color: #202628;
  cursor: pointer;
}

button:hover:not(:disabled) { border-color: #5c686b; }
button:disabled { cursor: not-allowed; opacity: 0.48; }

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow, .label {
  margin: 0 0 5px;
  color: #667174;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #c1c9ca;
  border-radius: 999px;
  background: #f8f9f9;
  font-size: 13px;
}

.state[data-kind="ready"] {
  border-color: #3f8762;
  background: #e9f4ed;
  color: #195a39;
}

.state[data-kind="error"] {
  border-color: #bb625c;
  background: #faecea;
  color: #7d2924;
}

.workspace, .console {
  border: 1px solid #cbd1d2;
  border-radius: 8px;
  background: #ffffff;
}

.workspace { padding: 24px; }

.device-row, .actions, .package-meta, .console-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.device-row strong { display: block; font-size: 15px; }

.file-field {
  display: block;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e3e7e8;
}

.file-field input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #bac3c5;
  border-radius: 6px;
  background: #f8f9f9;
}

.package-meta {
  margin-top: 10px;
  color: #596467;
  font-size: 13px;
}

#file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 4px;
  background: #dde2e3;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: #28794f;
  transition: width 120ms linear;
}

.actions { margin-top: 16px; }

.primary {
  border-color: #236642;
  background: #28794f;
  color: #ffffff;
  font-weight: 650;
}

#progress-text {
  color: #596467;
  font-size: 13px;
  text-align: right;
}

.console { margin-top: 16px; overflow: hidden; }

.console-title {
  padding: 10px 14px;
  border-bottom: 1px solid #dce1e2;
  color: #505b5d;
  font-size: 13px;
  font-weight: 650;
}

.quiet {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  color: #596467;
  font-size: 12px;
}

pre {
  height: 190px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #202628;
  color: #dce5e0;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 760px); padding: 20px 0; }
  header { align-items: center; }
  h1 { font-size: 22px; }
  .workspace { padding: 18px; }
  .device-row, .actions { align-items: stretch; flex-direction: column; }
  .device-row button, .actions button { width: 100%; }
  #progress-text { text-align: left; }
}
