:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --panel: #fffaf2;
  --text: #1f2933;
  --muted: #687385;
  --line: #e7dccb;
  --brand: #185c55;
  --brand-2: #f0b33f;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.shell.narrow {
  width: min(560px, calc(100% - 32px));
}

.shell.wide {
  width: min(1180px, calc(100% - 32px));
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

.lead.compact {
  font-size: 17px;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(72, 54, 25, 0.08);
}

.upload-box {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  padding: 24px;
  border: 2px dashed #c9b89f;
  border-radius: 8px;
  background: #fffdf8;
  cursor: pointer;
}

.upload-title {
  font-size: 22px;
  font-weight: 850;
}

.upload-hint,
.message,
.error {
  color: var(--muted);
  font-size: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input[type="file"] {
  padding: 12px;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.options {
  margin: 22px 0;
  padding: 20px;
  border-radius: 8px;
  background: #fdf4e4;
}

.notice,
.notice-list {
  border: 1px solid #ead8ad;
  border-radius: 8px;
  background: #fff7df;
  color: #72511a;
}

.notice {
  padding: 12px 14px;
}

.notice.success {
  border-color: #b7dac9;
  background: #eaf7ef;
  color: #185c55;
}

.notice-list {
  margin-top: 22px;
  padding: 18px 20px;
}

.notice-list ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.options label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.primary,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.link-btn.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
}

.danger-btn {
  background: var(--danger);
}

.primary {
  width: 100%;
  margin-top: 22px;
  font-size: 18px;
}

.primary:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.task-head,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.task-actions,
.admin-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions form {
  margin: 0;
}

.user-chip {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--brand);
  font-weight: 850;
}

.task-head {
  margin-bottom: 26px;
}

.centered {
  text-align: center;
}

.task-head h1 {
  font-size: 30px;
}

.status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: #e8f3ef;
  color: var(--brand);
  font-weight: 850;
}

.progress {
  height: 12px;
  margin: 12px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfce;
}

.progress div {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.25s ease;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.downloads.empty {
  display: block;
  color: var(--muted);
}

.download {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.logs {
  min-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #111827;
  color: #d1fae5;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.logs.small {
  min-height: 140px;
  max-height: 280px;
}

.transcript {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.error {
  color: var(--danger);
  font-weight: 750;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.queue-panel {
  margin-bottom: 18px;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-card {
  display: grid;
  gap: 16px;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-card h2 {
  margin-bottom: 6px;
}

.admin-actions form {
  margin: 0;
}

details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 850;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding: 20px 0;
  }

  .panel {
    padding: 18px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero,
  .task-head,
  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-card-head {
    flex-direction: column;
  }
}
