:root {
  --bg: #16110C;
  --cream: #F3E6D0;
  --cream-dim: rgba(243, 230, 208, 0.55);
  --line: rgba(243, 230, 208, 0.16);
  --line-strong: rgba(243, 230, 208, 0.32);
  --fail: #E8A87C;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: "Bricolage Grotesque", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(243,230,208,0.06), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

/* Header */
.head {
  text-align: center;
  margin-bottom: 34px;
  animation: rise 0.7s ease both;
}
.title {
  font-weight: 800;
  font-size: clamp(30px, 7vw, 58px);
  letter-spacing: 0.14em;
  margin: 0 0 10px;
  line-height: 1;
}
.subtitle {
  font-weight: 400;
  font-size: clamp(14px, 3.5vw, 18px);
  color: var(--cream);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.help {
  font-weight: 200;
  font-size: 13px;
  color: var(--cream-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 22px;
  background: rgba(243,230,208,0.02);
  animation: rise 0.7s ease 0.05s both;
}
.dropzone.compact { padding: 20px; }
.dropzone:hover { border-color: var(--cream); background: rgba(243,230,208,0.05); }
.dropzone.drag {
  border-color: var(--cream);
  background: rgba(243,230,208,0.08);
  transform: scale(1.01);
}
.drop-glyph {
  font-size: 30px;
  color: var(--cream);
  opacity: 0.7;
  margin-bottom: 8px;
}
.dropzone.compact .drop-glyph { font-size: 20px; margin-bottom: 4px; }
.drop-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
}
.drop-sub {
  font-weight: 200;
  font-size: 12px;
  color: var(--cream-dim);
  margin-top: 4px;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
  animation: rise 0.7s ease 0.1s both;
}
.field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.field.narrow { flex: 0 1 180px; }
.flabel {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-weight: 600;
}
.text-in, .select-in {
  background: rgba(243,230,208,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--cream);
  padding: 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.text-in::placeholder { color: rgba(243,230,208,0.3); }
.text-in:focus, .select-in:focus { border-color: var(--cream); background: rgba(243,230,208,0.07); }
.select-in option { background: var(--bg); color: var(--cream); }

/* Buttons */
.btn {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  border: 1px solid transparent;
}
.btn.primary {
  background: var(--cream);
  color: var(--bg);
  flex: 0 0 auto;
}
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(243,230,208,0.18); }
.btn.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--cream); background: rgba(243,230,208,0.06); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Loading */
.loadrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--cream-dim);
  margin-bottom: 18px;
  font-family: "JetBrains Mono", monospace;
}
.wolf-spin { display: flex; gap: 5px; }
.wolf-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cream);
  animation: bounce 0.9s infinite ease-in-out;
}
.wolf-dot:nth-child(2) { animation-delay: 0.15s; }
.wolf-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Fail */
.fail-box {
  border: 1px solid rgba(232,168,124,0.4);
  background: rgba(232,168,124,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  animation: rise 0.4s ease both;
}
.fail-title { color: var(--fail); font-weight: 700; font-size: 14px; }
.fail-notes {
  color: var(--cream-dim);
  font-size: 12px;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
}

/* Compare panels */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-weight: 600;
}
.panel-frame {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.svg-stage {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.svg-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.svg-stage svg { max-width: 100%; max-height: 100%; width: auto; height: auto; }
/* force logo fill to cream in AFTER preview */
.svg-stage:not(.before) svg,
.svg-stage:not(.before) svg path,
.svg-stage:not(.before) svg circle,
.svg-stage:not(.before) svg ellipse,
.svg-stage:not(.before) svg polygon,
.svg-stage:not(.before) svg polyline,
.svg-stage:not(.before) svg rect {
  fill: var(--cream) !important;
  stroke: none !important;
}
.svg-empty {
  color: var(--cream-dim);
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
}
.ok-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cream);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
  animation: pop 0.4s ease both;
}

/* Meta chips */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

/* Actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.actions .btn { flex: 1 1 auto; min-width: 120px; }

/* Code view */
.code-view {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 30px;
}
.code-view summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  font-weight: 600;
}
.code-view pre {
  margin: 12px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--cream);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow: auto;
  opacity: 0.8;
}

/* Footer */
.foot {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.foot-note {
  font-size: 12px;
  color: var(--cream-dim);
  font-weight: 200;
  margin: 0 0 12px;
}
.swatch-bg {
  color: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: "JetBrains Mono", monospace;
}
.remix {
  color: var(--cream);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.remix:hover { border-color: var(--cream); }

/* Animations */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: translate(-50%, 6px) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Mobile */
@media (max-width: 620px) {
  .compare { grid-template-columns: 1fr; }
  .field, .field.narrow { flex: 1 1 100%; }
  .btn.primary { width: 100%; }
  .wrap { padding: 28px 16px 48px; }
}
</parameter>