:root {
  --mg-black: #070706;
  --mg-graphite: #15120f;
  --mg-amber: #f28a2d;
  --mg-orange: #e65f1e;
  --mg-gold: #d4a14b;
  --mg-ivory: #f6e6c5;
  --mg-hi: #fbefd3;
  --mg-alt: #0a0908;
  --mg-card: #100e0b;
  --mg-line: rgba(212, 161, 75, 0.28);
  --font-display: "Oswald", "Montserrat", system-ui, sans-serif;
  --font-body: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(242, 138, 45, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(212, 161, 75, 0.08), transparent 50%),
    var(--mg-black);
  color: var(--mg-ivory);
  line-height: 1.45;
}
a { color: var(--mg-gold); text-decoration: none; }
a:hover { color: var(--mg-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin: 0 0 0.4em;
}
.grain::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 0; border-radius: 10px; padding: 0.7rem 1.15rem; cursor: pointer;
  background: linear-gradient(135deg, var(--mg-amber), var(--mg-orange));
  color: #1a0f08; font-weight: 700;
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent; border: 1px solid var(--mg-line); color: var(--mg-ivory);
}
.btn-ghost:hover { border-color: var(--mg-gold); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.card {
  background: linear-gradient(180deg, rgba(16,14,11,0.95), rgba(10,9,8,0.98));
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(242,138,45,0.05), 0 20px 50px rgba(0,0,0,0.45);
}
.muted { color: rgba(246, 230, 197, 0.62); }
.mono { font-family: var(--font-mono); font-size: 0.85em; }
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 10000;
  background: var(--mg-card); border: 1px solid var(--mg-gold);
  padding: 0.75rem 1rem; border-radius: 12px; max-width: 360px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: rise 0.25s ease;
}
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 8000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  width: min(560px, 100%);
  padding: 1.25rem 1.35rem;
}
.modal h2 { margin-bottom: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; }
.field input, .field select, .field textarea {
  background: var(--mg-alt); border: 1px solid var(--mg-line); border-radius: 10px;
  padding: 0.65rem 0.75rem;
}
.field textarea { min-height: 88px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  border: 1px solid var(--mg-line); border-radius: 999px; padding: 0.45rem 0.85rem;
  background: var(--mg-alt); cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--mg-amber); color: var(--mg-hi); }
