:root {
  --ink: #18201e;
  --muted: #69716e;
  --paper: #f3f0e7;
  --panel: #fffdf8;
  --line: #d8d4c9;
  --accent: #173e35;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at 10% 8%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 27rem), var(--paper); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand > span:last-child strong, .brand > span:last-child small { display: block; }
.brand > span:last-child strong { font-size: 14px; }
.brand > span:last-child small { margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--ink); font-size: 12px; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.privacy, .subtle { color: var(--muted); font-size: 13px; }
.quit-button, .header-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--panel); font: 700 12px inherit; cursor: pointer; }
.quit-button:hover, .header-button:hover { border-color: var(--accent); }
.quit-button:disabled { cursor: wait; opacity: .55; }
.closed-message { width: min(480px, calc(100% - 40px)); margin: 18vh auto 0; padding: 36px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-align: center; }
.closed-message strong, .closed-message span { display: block; }
.closed-message strong { font: 500 28px Georgia, serif; }
.closed-message span { margin-top: 8px; color: var(--muted); }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 80px; }
.intro { max-width: 800px; margin-bottom: 42px; }
.eyebrow, .step { color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1 { max-width: 760px; margin: 10px 0 18px; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 70px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.intro > p:last-child { max-width: 680px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.92); box-shadow: 0 15px 45px rgba(24,32,30,.04); }
.panel-title, .preview-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-title { margin-bottom: 22px; }
.panel-title h2, .preview-header h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.dropzone { min-height: 128px; display: flex; align-items: center; justify-content: center; gap: 17px; padding: 22px; border: 1px dashed #aaa79e; border-radius: 14px; cursor: pointer; transition: .2s; text-align: left; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, white); }
.upload-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: white; background: var(--accent); font-size: 25px; }
.dropzone strong, .dropzone small { display: block; }
.dropzone small { margin-top: 6px; color: var(--muted); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.folder-upload { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.folder-upload strong, .folder-upload small { display: block; }
.folder-upload small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.folder-upload code { font-size: inherit; }
.folder-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.folder-button { flex: 0 0 auto; padding: 8px 10px; border-radius: 7px; color: white; background: var(--accent); font-size: 11px; font-weight: 750; }
.error { margin-top: 15px; padding: 12px 14px; border-radius: 8px; color: #8b2019; background: #fdebe7; font-size: 14px; }
.results { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; margin-top: 28px; }
.settings { position: sticky; top: 24px; }
.settings > label { display: block; margin-top: 17px; color: #4d5552; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.settings input:not([type="color"]) { width: 100%; height: 43px; margin-top: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font: 14px inherit; outline: 0; }
.settings select { width: 100%; height: 43px; margin-top: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font: 14px inherit; }
.settings .logo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-control { height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; text-transform: none; letter-spacing: 0; }
.file-control span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-control strong { color: var(--accent); font-size: 12px; }
.clear-logo { margin: 8px 0 0; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.range-control { height: 43px; display: flex; align-items: center; gap: 11px; margin-top: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.settings .range-control input { width: 100%; height: auto; margin: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); cursor: pointer; }
.range-control output { flex: 0 0 44px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; text-align: right; text-transform: none; }
.settings input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.color-control { height: 43px; display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
input[type="color"] { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.color-control span { color: var(--muted); font: 13px ui-monospace, monospace; }
.summary { margin: 23px 0 13px; padding-top: 19px; border-top: 1px solid var(--line); }
.summary span, .summary strong { display: block; }
.summary span { color: var(--muted); font-size: 12px; }
.summary strong { margin-top: 3px; font-size: 16px; }
.saved-note { margin: -2px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.primary-button { width: 100%; height: 51px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border: 0; border-radius: 9px; color: white; background: var(--ink); font-size: 14px; font-weight: 750; cursor: pointer; }
.primary-button:disabled { cursor: wait; opacity: .55; }
.status { min-height: 34px; margin: 10px 4px 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.preview-header { margin: 4px 0 20px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card-item { margin: 0; }
.canvas-shell { padding: 15px; border-radius: 16px; background: #edf0ed; }
.card-item canvas { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 16px 34px rgba(24,32,30,.17); }
.card-item figcaption { display: flex; justify-content: space-between; gap: 8px; margin: 9px 4px 0; color: var(--muted); font-size: 12px; }
.help-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--panel); box-shadow: 0 30px 90px rgba(24,32,30,.25); }
.help-dialog::backdrop { background: rgba(24,32,30,.55); backdrop-filter: blur(3px); }
.help-dialog form { padding: 28px; }
.help-heading, .help-heading > div { display: flex; align-items: center; }
.help-heading { justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.help-heading > div { gap: 11px; }
.help-heading strong, .help-heading small { display: block; }
.help-heading small { margin-top: 2px; color: var(--muted); }
.dialog-close { border: 0; color: var(--muted); background: transparent; font-size: 30px; cursor: pointer; }
.help-dialog section { margin-top: 24px; }
.help-dialog h2 { margin: 0 0 10px; font: 500 24px Georgia, serif; }
.help-dialog p, .help-dialog li { color: #4d5552; font-size: 14px; line-height: 1.6; }
.help-dialog ol { padding-left: 22px; }
.help-note { padding: 12px 14px; border-radius: 9px; background: var(--paper); }
.site-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 750; }
@media (max-width: 900px) { .results { grid-template-columns: 1fr; } .settings { position: static; } }
@media (max-width: 620px) { .privacy { display: none; } main { width: calc(100% - 24px); padding-top: 45px; } .panel { padding: 19px; } .cards { grid-template-columns: 1fr; } .panel-title { align-items: flex-start; flex-direction: column; } }
