* {
  box-sizing: border-box;
}

:root {
  --bg: #f4efe8;
  --bg-accent: #e7dfd5;
  --ink: #21201d;
  --muted: #67635c;
  --card: #fffaf3;
  --line: #d4c7b6;
  --primary: #1e6f68;
  --primary-2: #15544f;
  --error: #8b2e1e;
  --ok: #1f6a2d;
  --pending: #70501d;
  --shadow: 0 14px 36px rgba(41, 28, 14, 0.12);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 520px at -10% -20%, #d8ece9 0%, transparent 60%),
    radial-gradient(1100px 520px at 120% -10%, #f4d8be 0%, transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg-accent));
  min-height: 100vh;
}

.shell {
  width: min(980px, calc(100% - 40px));
  margin: 28px auto 40px;
  display: grid;
  gap: 18px;
  animation: rise 420ms ease-out;
}

.hero,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px 26px;
}

.hero h1 {
  margin: 6px 0 10px;
  letter-spacing: 0.2px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #6d5f50;
  font-weight: 700;
}

.panel {
  padding: 18px 20px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #3b3832;
}

input[type="text"],
select,
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 15px;
  color: #222;
}

input:focus,
select:focus {
  outline: 2px solid #9bc8c2;
  outline-offset: 1px;
}

.advanced {
  margin-top: 14px;
  border: 1px dashed #c9b8a4;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffdfa;
}

.advanced summary {
  cursor: pointer;
  user-select: none;
  color: #5d5449;
  font-weight: 600;
}

.advanced label {
  margin-top: 10px;
}

.actions {
  margin-top: 14px;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  letter-spacing: 0.15px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 8px 18px rgba(26, 91, 84, 0.26);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
}

.status {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.status.info {
  color: #2d2d2d;
}

.status.pending {
  color: var(--pending);
  border-color: #c8ab7b;
  background: #fff7ea;
}

.status.error {
  color: var(--error);
  border-color: #d7ab9d;
  background: #fff2ef;
}

.status.success {
  color: var(--ok);
  border-color: #9cc8a1;
  background: #f1fff0;
}

.downloads {
  display: grid;
  gap: 8px;
}

.downloads a {
  display: inline-block;
  width: fit-content;
  color: #0f5f5b;
  text-decoration: none;
  border-bottom: 1px dashed rgba(15, 95, 91, 0.55);
}

.downloads a:hover {
  color: #0a4441;
  border-bottom-style: solid;
}

.muted {
  color: var(--muted);
}

.code {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fcf8f1;
  border: 1px solid #ddcfbf;
  border-radius: 10px;
  padding: 12px;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 260px;
  overflow: auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 24px);
    margin: 16px auto 26px;
    gap: 12px;
  }

  .hero,
  .panel {
    border-radius: 12px;
    padding: 14px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
