*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --accent: #2563eb;
    --accent-h: #1d4ed8;
    --accent-soft: #eff6ff;
    --green: #16a34a;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 17px;
}

/* ═══ HEADER ═══ */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 900px; margin: 0 auto; padding: 0 20px;
    height: 60px; display: flex; align-items: center;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: var(--accent);
}

/* ═══ HERO ═══ */
.hero {
    text-align: center; padding: 36px 20px 20px;
    max-width: 600px; margin: 0 auto;
}
.hero h1 {
    font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 8px;
}
.hero p {
    font-size: 18px; color: var(--text-light); line-height: 1.5;
}

/* ═══ WIZARD ═══ */
.wizard {
    max-width: 900px; margin: 0 auto; padding: 0 20px 60px;
}

/* Steps bar */
.steps-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 28px; padding: 20px 10px;
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.step-dot {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    font-size: 15px; font-weight: 600; color: var(--text-light);
    padding: 8px 6px; border-radius: 10px;
    transition: all 0.2s; font-family: inherit;
    white-space: nowrap; flex-shrink: 0;
}
.step-dot .dot-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); color: var(--text-light);
    font-size: 14px; font-weight: 700; flex-shrink: 0;
    transition: all 0.2s;
}
.step-dot .dot-label {
    font-size: 11px; font-weight: 600;
}
.step-dot.active .dot-num {
    background: var(--accent); color: #fff;
}
.step-dot.active { color: var(--accent); }
.step-dot.done .dot-num {
    background: var(--green); color: #fff;
}
.step-dot.done { color: var(--green); }
.step-line {
    width: 16px; height: 2px; background: var(--border);
    flex-shrink: 0; align-self: center; margin-top: -12px;
}

/* ═══ CHECK PREVIEW ═══ */
.preview-wrapper {
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    overflow: hidden;
}
.check-container {
    display: flex; justify-content: center;
    overflow: hidden;
    position: relative;
}

.check {
    width: 756px; height: 347px;
    position: relative; display: flex;
    border-radius: 4px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.15);
    transform-origin: top center;
    flex-shrink: 0;
}
.check-bg {
    position: absolute; inset: 0; z-index: 0;
    background: #eef3fa; transition: background 0.3s;
}
.check-art {
    position: relative; z-index: 1;
    width: 150px; min-width: 80px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #1a1a2e;
    transition: width 0.3s, background 0.3s;
}
.art-placeholder {
    display: flex; flex-direction: column; align-items: center;
    color: rgba(255,255,255,0.3); pointer-events: none;
}
.art-image { width: 100%; height: 100%; object-fit: cover; }
.check-body {
    position: relative; z-index: 1;
    flex: 1; padding: 14px 22px 8px 18px;
    display: flex; flex-direction: column;
}
.check-row { display: flex; align-items: baseline; }
.check-row-top { justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.owner-name { font-size: 14px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.owner-address { font-size: 9px; line-height: 1.45; opacity: 0.75; margin-top: 1px; }
.check-top-right { text-align: right; }
.check-number { font-size: 16px; font-weight: 700; }
.check-row-date { justify-content: flex-end; margin-bottom: 8px; gap: 8px; }
.date-label { font-size: 9px; font-weight: 600; font-style: italic; opacity: 0.6; }
.date-line { font-size: 10px; border-bottom: 1px solid currentColor; opacity: 0.35; min-width: 160px; }
.check-row-payto { gap: 8px; margin-bottom: 6px; }
.payto-left { display: flex; align-items: baseline; gap: 8px; flex: 1; }
.payto-label { font-size: 8px; font-weight: 700; line-height: 1.3; opacity: 0.55; white-space: nowrap; font-style: italic; }
.payto-line { flex: 1; border-bottom: 1.5px solid currentColor; opacity: 0.3; }
.amount-box {
    display: flex; align-items: center; gap: 2px;
    border: 2px solid currentColor; border-radius: 3px;
    padding: 2px 8px; opacity: 0.5;
}
.dollar-sign { font-size: 13px; font-weight: 700; }
.amount-space { display: inline-block; width: 70px; }
.check-row-written { gap: 6px; margin-bottom: 10px; align-items: center; }
.written-line { flex: 1; border-bottom: 1.5px solid currentColor; opacity: 0.3; }
.dollars-word { font-size: 10px; font-weight: 700; opacity: 0.5; font-style: italic; }
.check-row-bank { margin-bottom: auto; gap: 12px; align-items: flex-start; }
.bank-block { display: flex; align-items: flex-start; gap: 8px; }
.bank-logo-area {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bank-logo-img { width: 100%; height: 100%; object-fit: contain; }
.bank-info { font-size: 9px; line-height: 1.35; }
.bank-name { font-weight: 700; font-size: 10px; }
.bank-state { opacity: 0.65; }
.custom-message {
    margin-left: auto; text-align: right;
    font-size: 9px; font-weight: 600; line-height: 1.35; opacity: 0.7;
    max-width: 200px; white-space: pre-line;
}
.check-row-bottom { justify-content: space-between; align-items: flex-end; margin-bottom: 6px; }
.memo-area, .signature-area { display: flex; align-items: baseline; gap: 6px; }
.memo-label { font-size: 8px; font-weight: 600; font-style: italic; opacity: 0.5; }
.memo-line { border-bottom: 1px solid currentColor; opacity: 0.3; min-width: 160px; }
.signature-line { border-bottom: 1px solid currentColor; opacity: 0.35; min-width: 180px; }
.check-row-micr { border-top: 1px solid rgba(0,0,0,0.08); padding-top: 4px; justify-content: center; }
.micr-text { font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 2.5px; opacity: 0.55; }

/* Check borders */
.check.border-thin   { border: 1px solid #8a8a8a; }
.check.border-medium { border: 2px solid #8a8a8a; }
.check.border-thick  { border: 3px solid #8a8a8a; }
.check.border-double { border: 3px double #8a8a8a; }
.check.border-none   { border: none; }

/* Check backgrounds */
.bg-white       { background: #ffffff; }
.bg-cream       { background: linear-gradient(145deg, #faf6ee, #f0ead6); }
.bg-light-blue  { background: linear-gradient(145deg, #eef3fa, #dce8f5); }
.bg-light-green { background: linear-gradient(145deg, #edf7ed, #d5ecd5); }
.bg-light-pink  { background: linear-gradient(145deg, #fdf0f3, #f7dde4); }
.bg-light-gray  { background: linear-gradient(145deg, #f5f5f5, #e8e8e8); }
.bg-rose        { background: linear-gradient(145deg, #fff0f3, #ffe0e6); }

/* ═══ STEP PANELS ═══ */
.step-panel { display: none; }
.step-panel.active { display: block; }

.step-heading {
    font-size: 26px; font-weight: 700; margin-bottom: 6px;
}
.step-desc {
    font-size: 17px; color: var(--text-light); margin-bottom: 24px; line-height: 1.5;
}

/* Form cards */
.form-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 24px; margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.card-title {
    font-size: 20px; font-weight: 700; margin-bottom: 4px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-hint {
    font-size: 15px; color: var(--text-light); margin-bottom: 16px; line-height: 1.5;
}
.optional-badge {
    font-size: 12px; font-weight: 600; color: var(--text-light);
    background: var(--bg); padding: 3px 10px; border-radius: 20px;
}

/* Fields */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
    display: block; font-size: 16px; font-weight: 600;
    margin-bottom: 8px; color: var(--text);
}
.field .hint {
    font-weight: 400; color: var(--text-light); font-size: 14px;
}
.field input[type="text"],
.field textarea {
    width: 100%; padding: 14px 16px;
    border: 2px solid var(--border); border-radius: 12px;
    font-size: 18px; font-family: inherit; color: var(--text);
    background: #fff; outline: none;
    transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}
.field textarea { resize: vertical; font-size: 17px; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder {
    color: #b0b8c4;
}

/* Upload areas */
.upload-area {
    border: 2.5px dashed var(--border); border-radius: 16px;
    padding: 28px 20px; display: flex; flex-direction: column;
    align-items: center; gap: 8px; cursor: pointer;
    transition: 0.2s; text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.upload-area:hover, .upload-area:active {
    border-color: var(--accent); background: var(--accent-soft);
}
.upload-area.has-file {
    border-color: var(--green); border-style: solid;
    background: #f0fdf4;
}
.upload-area.small { padding: 20px; }
.upload-icon { color: var(--accent); }
.upload-text { font-size: 17px; font-weight: 600; color: var(--text); }
.upload-hint { font-size: 14px; color: var(--text-light); }
.upload-area.has-file .upload-text { color: var(--green); }

/* Art controls */
.art-controls {
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.art-controls label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 8px; }
.range-slider {
    width: 100%; height: 8px; border-radius: 4px;
    -webkit-appearance: none; appearance: none;
    background: var(--border); outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); cursor: pointer; border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.range-ends {
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--text-light); margin-top: 4px;
}

/* Style picker grid */
.style-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.style-card {
    background: none; border: 3px solid var(--border); border-radius: 14px;
    padding: 8px; cursor: pointer; transition: 0.15s; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.style-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.style-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.style-preview { height: 52px; border-radius: 8px; margin-bottom: 6px; }
.style-preview.classic   { background: linear-gradient(135deg, #1a237e, #3f51b5); }
.style-preview.elegant   { background: linear-gradient(135deg, #f5f0e1, #d4c9a8); }
.style-preview.patriotic { background: linear-gradient(135deg, #bf0a30, #fff 50%, #002868); }
.style-preview.nature    { background: linear-gradient(135deg, #e8f5e9, #66bb6a); }
.style-preview.dark      { background: linear-gradient(135deg, #1a1a2e, #2d2d44); }
.style-preview.rose      { background: linear-gradient(135deg, #fff0f3, #f48fb1); }
.style-name { font-size: 14px; font-weight: 600; color: var(--text); }

/* Step navigation */
.step-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; gap: 12px; flex-wrap: wrap;
}
.btn-next {
    background: var(--accent); color: #fff; border: none;
    padding: 16px 32px; border-radius: 14px;
    font-size: 18px; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-next:hover { background: var(--accent-h); }
.btn-back {
    background: none; border: 2px solid var(--border); color: var(--text-light);
    padding: 14px 24px; border-radius: 14px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-back:hover { border-color: var(--text-light); color: var(--text); }

/* Skip hint */
.skip-hint {
    text-align: center; margin-top: 16px;
    font-size: 15px; color: var(--text-light);
}
.skip-link {
    color: var(--accent); text-decoration: none; font-weight: 600;
}
.skip-link:hover { text-decoration: underline; }

/* Download buttons */
.download-card { text-align: center; }
.btn-download {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 18px 24px; border-radius: 14px;
    font-size: 18px; font-weight: 700; cursor: pointer;
    font-family: inherit; border: none; margin-bottom: 12px;
    transition: 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-download:last-child { margin-bottom: 0; }
.btn-download.primary { background: var(--accent); color: #fff; }
.btn-download.primary:hover { background: var(--accent-h); }
.btn-download.secondary {
    background: var(--surface); color: var(--text);
    border: 2px solid var(--border);
}
.btn-download.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ═══ FOOTER ═══ */
footer {
    text-align: center; padding: 24px 20px; font-size: 14px;
    color: var(--text-light); border-top: 1px solid var(--border);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 700px) {
    body { font-size: 16px; }
    .hero { padding: 24px 16px 14px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 16px; }

    .wizard { padding: 0 12px 40px; }

    .steps-bar {
        padding: 10px 4px; gap: 0; border-radius: 12px;
        margin-bottom: 16px; overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .step-dot { padding: 6px 3px; gap: 3px; }
    .step-dot .dot-num { width: 26px; height: 26px; font-size: 12px; }
    .step-dot .dot-label { font-size: 9px; }
    .step-line { width: 8px; margin-top: -10px; }

    .preview-wrapper { padding: 12px; border-radius: 12px; margin-bottom: 16px; }
    .check { transform-origin: top left; }

    .step-heading { font-size: 22px; }
    .step-desc { font-size: 15px; margin-bottom: 16px; }

    .form-card { padding: 18px 16px; border-radius: 12px; margin-bottom: 12px; }
    .card-title { font-size: 18px; }
    .card-hint { font-size: 14px; }

    .field input[type="text"],
    .field textarea {
        padding: 14px; font-size: 17px;
    }

    .style-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .style-preview { height: 44px; }
    .style-name { font-size: 13px; }

    .btn-next { width: 100%; text-align: center; justify-content: center; padding: 16px; font-size: 17px; }
    .btn-back { padding: 14px 20px; font-size: 15px; }

    .step-nav { flex-direction: column-reverse; }

    footer { padding: 20px 16px; }
}

@media (max-width: 380px) {
    .style-grid { grid-template-columns: repeat(2, 1fr); }
    .step-dot { font-size: 11px; padding: 6px 4px; }
}
