:root {
  --bg: #0f1623;
  --surface: #172033;
  --surface-2: #1f2a40;
  --border: #2b3850;
  --text: #e8edf7;
  --muted: #9aa8c2;
  --accent: #ff7a1a;
  --accent-text: #1a0e02;
  --ok: #3ddc97;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1rem 4rem;
  background: radial-gradient(1200px 600px at 50% -10%, #1d2b45 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}

.masthead {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.masthead h1 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.masthead p { margin: 0; color: var(--muted); }

main { max-width: 820px; margin: 0 auto; display: grid; gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

h2 { margin: 0 0 1rem; font-size: 1.1rem; }

.field { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }

select, input[type="number"] {
  width: 100%;
  padding: .6rem .7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
}

.hint { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; font-weight: 400; }

.spec-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .9rem;
  display: grid;
  gap: .6rem;
  grid-template-columns: 1fr 1fr;
}

legend { padding: 0 .4rem; color: var(--muted); font-size: .85rem; }
fieldset label { font-size: .8rem; font-weight: 500; color: var(--muted); }

.uploads { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.dropzone {
  display: grid;
  gap: .3rem;
  place-content: center;
  text-align: center;
  min-height: 130px;
  padding: 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  margin-bottom: 0;
}

.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: #243150; }
.dropzone.filled { border-style: solid; border-color: var(--ok); }
.dropzone-title { font-weight: 700; }
.dropzone-hint { color: var(--muted); font-size: .85rem; word-break: break-all; }
.dropzone input[type="file"] { display: none; }

button { font: inherit; cursor: pointer; border-radius: 10px; }

.primary {
  width: 100%;
  margin-top: 1.25rem;
  padding: .85rem 1rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.primary:disabled { opacity: .55; cursor: progress; }

.ghost {
  margin-top: 1rem;
  padding: .55rem .9rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.ghost.danger { border-color: #7a3340; color: #ff8585; }

.status { margin: .9rem 0 0; min-height: 1.3em; color: var(--muted); font-size: .9rem; }
.status.error { color: #ff8585; }

.result-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.result button { margin-top: auto; }

.result img {
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  image-rendering: auto;
}

.result h3 { margin: .7rem 0 .2rem; font-size: .95rem; text-transform: capitalize; }
.result .meta { color: var(--muted); font-size: .85rem; margin: 0 0 .7rem; }

.result button {
  width: 100%;
  padding: .55rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.result button:disabled { opacity: .5; cursor: default; }

.paywall {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: #2a1d10;
}

.paywall .primary { width: auto; margin: 0; }
.paywall.paid { border-color: var(--ok); background: #13302a; }

.paywall-copy { display: flex; flex-direction: column; gap: .3rem; }

.price-tag { display: flex; align-items: baseline; gap: .5rem; margin: .15rem 0 0; }
.price-tag #price { font-size: 2.2rem; font-weight: 700; line-height: 1; color: var(--accent); }
.price-sub { color: var(--muted); font-size: .82rem; }
.paywall.paid .price-tag { display: none; }

.privacy-note { color: var(--muted); font-size: .85rem; margin: 1.25rem 0 0; }

.faq ol { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); }
.faq li { margin-bottom: .4rem; }

footer { max-width: 820px; margin: 2rem auto 0; text-align: center; color: var(--muted); font-size: .85rem; }
