:root {
  --bg: #08080c;
  --bg2: #101018;
  --cream: #faf8f2;
  --cream2: #f2ecdd;
  --orange: #FF7A2F;
  --yellow: #FFD23F;
  --pink: #FF2FA8;
  --teal: #2FF0E6;
  --purple: #9D87E8;
  --dim: #8a8a96;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'DM Sans', -apple-system, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.hidden { display: none !important; }

/* top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid #1c1c26;
}
.tag {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid #26262f; border-radius: 999px; padding: 6px 12px;
}

/* hero */
.hero { padding: 48px 20px 8px; max-width: 1060px; margin: 0 auto; width: 100%; }
.display {
  font-family: 'Anton', sans-serif;
  font-size: clamp(56px, 11vw, 128px);
  line-height: .92;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.display .accent { color: var(--orange); display: inline-block; transform: rotate(-1.5deg); }
.lede {
  margin-top: 18px; max-width: 560px;
  font-size: 17px; line-height: 1.55; color: #c9c7bd;
}
.specchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  border-radius: 6px; padding: 6px 10px; color: #08080c; font-weight: 700;
}
.chip.orange { background: var(--orange); }
.chip.yellow { background: var(--yellow); }
.chip.teal   { background: var(--teal); }
.chip.pink   { background: var(--pink); color: #fff; }
.chip.purple { background: var(--purple); }

/* deck */
.deck {
  max-width: 1060px; margin: 32px auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px;
  width: 100%;
}
@media (max-width: 860px) { .deck { grid-template-columns: 1fr; } }
.card {
  background: var(--bg2);
  border: 1px solid #22222c;
  border-radius: 16px;
  padding: 20px;
}
.cardtitle {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--yellow); margin-bottom: 14px;
}

/* dropzone */
.dropzone {
  position: relative;
  border: 2px dashed #34343f;
  border-radius: 12px;
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s;
  background: repeating-linear-gradient(45deg, #0c0c12 0 12px, #0e0e15 12px 24px);
}
.dropzone:hover, .dropzone.drag { border-color: var(--orange); }
.dz-empty { text-align: center; padding: 20px; }
.duckface { font-size: 44px; margin-bottom: 8px; }
.dropzone.loaded { background: none; }
#canvas { max-width: 100%; display: block; margin: 0 auto; }

/* examples */
.exrow { margin-top: 14px; }
.extitle { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
#examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#examples button {
  border: 1px solid #2c2c38; background: #15151d; border-radius: 8px;
  padding: 0; overflow: hidden; cursor: pointer; height: 64px;
}
#examples button:hover { border-color: var(--teal); }
#examples img { height: 64px; display: block; }

/* controls */
.controls {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; flex-wrap: wrap;
}
.controls label { font-size: 12px; }
#conf { accent-color: var(--orange); flex: 1; min-width: 120px; }
.bigbtn {
  font-family: 'Anton', sans-serif;
  font-size: 20px; letter-spacing: .06em;
  background: var(--orange); color: #08080c;
  border: none; border-radius: 10px; padding: 14px 26px;
  cursor: pointer; transition: transform .1s, opacity .15s;
}
.bigbtn:hover:not(:disabled) { transform: translateY(-2px) rotate(-.5deg); }
.bigbtn:disabled { opacity: .35; cursor: not-allowed; }
.bigbtn.busy { background: var(--yellow); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .7; } }

/* readout */
.status {
  font-size: 13px; padding: 10px 12px;
  border: 1px solid #22222c; border-radius: 8px; background: #0c0c12;
  white-space: pre-wrap; word-break: break-word;
}
.status.busy { color: var(--yellow); }
.status.ok { color: var(--teal); }
.status.err { color: var(--pink); }
.readout { margin-top: 12px; font-size: 12px; line-height: 1.8; color: #b9b7ad; white-space: pre-wrap; }
.readout .hit { color: var(--teal); }
.readout .miss { color: var(--dim); }
.verdict {
  margin-top: 16px; padding: 18px; border-radius: 12px;
  font-family: 'Anton', sans-serif; font-size: 26px; text-transform: uppercase;
  letter-spacing: .04em;
}
.verdict.duck { background: var(--teal); color: #08080c; }
.verdict.noduck { background: #22222c; color: var(--dim); }

/* footer */
.footer {
  margin-top: auto; padding: 22px 20px 30px;
  border-top: 1px solid #1c1c26;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim);
}
.footer a { color: var(--cream2); text-decoration: none; margin-left: 14px; }
.footer a:hover { color: var(--orange); }
