:root {
  --ink: #0b1b31;
  --muted: #5d6877;
  --paper: #fbf5ef;
  --panel: #fffdfa;
  --brand-orange: #ff4f1f;
  --brand-orange-dark: #d93b0f;
  --brand-orange-text: #b8320d;
  --brand-orange-soft: #ffe0d1;
  --ink-hover: #173454;
  --line: #e8ddd4;
  --danger: #b3261e;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 88% 3%, #ffe3d5 0, transparent 32rem), var(--paper); }
button, input { font: inherit; }
button, .button { border: 0; border-radius: 14px; background: var(--ink); color: white; font-weight: 750; padding: .95rem 1.25rem; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease; }
button:hover, .button:hover { background: var(--ink-hover); transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, .drop-zone:focus-visible, .brand:focus-visible { outline: 3px solid var(--brand-orange); outline-offset: 3px; }
.site-header { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; }
.brand { display: block; width: clamp(10.5rem, 19vw, 13.5rem); text-decoration: none; }
.brand img { display: block; width: 100%; height: auto; }
.secure-note { color: var(--muted); font-size: .88rem; }
main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.hero { max-width: 780px; padding: clamp(4rem, 9vw, 8rem) 0 6rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--brand-orange-text); font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 850px; font-size: clamp(2.5rem, 7vw, 5.7rem); line-height: .98; letter-spacing: -.065em; }
.lede { max-width: 630px; margin: 1.6rem 0 2.6rem; color: var(--muted); font-size: 1.14rem; line-height: 1.65; }
.code-form { max-width: 620px; padding: 1.25rem; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,250,.9); box-shadow: 0 18px 55px rgba(11, 27, 49, .09); }
.code-form label { display: block; margin: 0 0 .6rem; font-weight: 750; font-size: .88rem; }
.code-row { display: flex; gap: .65rem; }
.code-row input { min-width: 0; flex: 1; border: 1px solid #cfc2b7; border-radius: 14px; padding: .95rem 1rem; text-transform: uppercase; letter-spacing: .08em; }
.notice { position: fixed; right: 1.25rem; bottom: 1.25rem; max-width: 420px; padding: 1rem 1.2rem; border-radius: 14px; color: white; background: var(--danger); box-shadow: 0 15px 45px rgba(0,0,0,.18); }
.order-shell { padding: 2rem 0 5rem; }
.order-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.order-head h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); }
.steps { display: flex; gap: .8rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .82rem; font-weight: 700; }
.steps li { display: grid; justify-items: center; gap: .3rem; }
.steps span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: white; }
.steps .active, .steps .done { color: var(--brand-orange-text); }
.steps .active span { color: var(--ink); border-color: var(--brand-orange); background: var(--brand-orange); }
.steps .done span { border-color: var(--brand-orange-soft); background: var(--brand-orange-soft); color: var(--ink); }
.work-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.25fr); gap: 1.2rem; }
.upload-card, .preview-card, .result { border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,250,.94); box-shadow: 0 18px 55px rgba(11, 27, 49, .07); }
.upload-card, .preview-card { padding: clamp(1.2rem, 3vw, 2rem); }
.upload-card h2 { margin: 0 0 .5rem; font-size: 1.45rem; }
.upload-card > p { color: var(--muted); line-height: 1.55; }
.drop-zone { min-height: 190px; margin: 1.5rem 0 1rem; padding: 1rem; display: grid; place-items: center; align-content: center; gap: .5rem; text-align: center; border: 1.5px dashed #b9a99d; border-radius: 18px; background: #fff8f3; cursor: pointer; }
.drop-zone small { color: var(--muted); }
#artwork { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-card form button { width: 100%; }
.preview { position: relative; min-height: 350px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; background: #f2ebe5; }
.preview img, .preview iframe { display: block; width: 100%; height: 430px; border: 0; object-fit: contain; background: white; }
.guide { display: none; position: absolute; pointer-events: none; }
.trim_safe .guide-outer { display: block; inset: 5%; border: 2px dashed #ff5b4d; }
.trim_safe .guide-inner { display: block; inset: 12%; border: 2px dashed #28a867; }
.contour_safe .guide-outer { display: block; inset: 7%; border: 3px dashed var(--brand-orange); border-radius: 10%; }
.contour_safe .guide-inner { display: block; inset: 15%; border: 2px dashed #28a867; border-radius: 10%; }
.empty-preview { min-height: 350px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; border-radius: 18px; background: #f6eee8; }
.empty-preview span { display: grid; place-items: center; width: 5rem; aspect-ratio: 1; border: 1px dashed #b9a99d; border-radius: 16px; font-weight: 800; color: var(--brand-orange); }
.guidance { margin: 1.2rem 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.55; }
.guidance li + li { margin-top: .45rem; }
.confirm { width: 100%; background: var(--ink); }
.result { max-width: 720px; padding: clamp(2rem, 5vw, 4rem); }
.result > span { display: inline-block; padding: .35rem .65rem; border-radius: 999px; background: var(--brand-orange-soft); font-weight: 800; font-size: .8rem; }
.result h2 { margin: 1rem 0 .5rem; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.result p { margin: 0 0 2rem; color: var(--muted); line-height: 1.6; }
.result.error > span { background: #ffd9d6; color: var(--danger); }
footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }

@media (max-width: 780px) {
  .secure-note { display: none; }
  .code-row, .order-head { align-items: stretch; flex-direction: column; }
  .code-row button { width: 100%; }
  .work-grid { grid-template-columns: 1fr; }
  .steps { justify-content: space-between; }
  .preview img, .preview iframe { height: 340px; }
}
