:root {
  --ink: #1a1f2b;
  --muted: #5b6372;
  --line: #d9dde4;
  --bg: #f6f4f1;
  --card: #ffffff;
  --accent: #d9331f;
  --ok: #1f7a3d;
  --warn: #a35a00;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }

.hero { max-width: 720px; margin: 0 auto; padding: 48px 16px 24px; }
.brand { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; }
.accent { color: var(--accent); }
.lede { font-size: 1.1rem; color: var(--muted); margin: 0; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgb(0 0 0 / .08); }

fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 700; margin-bottom: 8px; }
.optional { font-weight: 400; color: var(--muted); }

.drop { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; padding: 16px; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.quality { margin: 8px 0 0; font-weight: 600; }
.quality.great, .quality.good { color: var(--ok); }
.quality.soft { color: var(--warn); }
.quality.bad { color: var(--accent); }

.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.size { display: flex; gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; }
.size:has(input:checked) { border-color: var(--ink); }
.size input { accent-color: var(--ink); }
.size strong { display: block; }
.size .price { margin-left: auto; font-weight: 700; font-size: 1.15rem; }
.size .dpi { font-size: .85rem; color: var(--muted); }

.field input { width: 100%; font: inherit; padding: 12px; border: 2px solid var(--line); border-radius: 10px; }
.field input:focus { outline: none; border-color: var(--ink); }
.hint { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.center { text-align: center; }

.preview { position: relative; aspect-ratio: 841 / 594; border-radius: 8px; overflow: hidden; background: #c9ced6 center / cover no-repeat; margin-bottom: 24px; }
.preview-grid { position: absolute; inset: 14% 3% 4% 6%; background:
  repeating-linear-gradient(to right, transparent 0 calc(100% / 37 - 1px), rgb(140 148 160 / .7) calc(100% / 37 - 1px) calc(100% / 37)),
  repeating-linear-gradient(to bottom, rgb(255 255 255 / .72) 0 calc(100% / 12 - 1px), rgb(140 148 160 / .7) calc(100% / 12 - 1px) calc(100% / 12)); }
.preview-title { position: absolute; left: 3%; top: 2.5%; margin: 0; padding: .1em .4em; background: rgb(255 255 255 / .8); font-weight: 800; font-size: clamp(.9rem, 3.5vw, 1.6rem); }
.preview-title .year { color: var(--accent); }

button { width: 100%; font: inherit; font-weight: 700; font-size: 1.1rem; padding: 16px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; cursor: pointer; }
button:disabled { background: #9aa1ad; cursor: not-allowed; }

.error { color: var(--accent); font-weight: 600; }
.notice { background: #fff4e5; padding: 12px; border-radius: 10px; margin-top: 0; }

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
