@font-face { font-family: "Juana"; src: url(fonts/Juana-Bold.otf) format("opentype"); font-weight: 700; }

:root {
  --bg: #f6f2ec;
  --surface: #ffffff;
  --ink: #171617;
  --muted: #6f675e;
  --line: #e4ddd2;
  --accent: #8a6f52;
  --accent-soft: #efe7dc;
  --danger: #c0443f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 12px 32px rgba(40, 30, 20, .08);
  --ui: "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

h1, h2 { font-family: "Juana", Georgia, serif; font-weight: 700; letter-spacing: .01em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 11px; color: var(--accent); margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 24px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.logo { height: 28px; width: auto; object-fit: cover; object-position: center; aspect-ratio: 5.2 / 1; }
.order-badge { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buttons & Formulare */
.btn { font: inherit; font-weight: 500; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 12px 20px; border-radius: 99px; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { border-color: #cfc5b6; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #33302d; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
input[type=text], input[type=email], input:not([type]), textarea {
  display: block; width: 100%; margin-top: 6px; font: 15px/1.45 var(--ui); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 44px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-bad input, .field-bad textarea { border-color: var(--danger); }
.field-msg { display: block; font-weight: 400; font-size: 12px; color: var(--danger); margin-top: 4px; }
.field-hint { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 0 0 12px; }

/* Schritt 1 */
.login, .done { display: grid; place-items: center; min-height: calc(100vh - 57px); padding: 32px 16px; }
.login-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 20px; padding: 36px 32px; box-shadow: var(--shadow); }
.login-card.center { text-align: center; }
.demo-hint { font-size: 12px; color: var(--muted); margin: 18px 0 0; }

/* Schritt 2 */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - 57px); }
.preview-area { padding: 28px 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pages { display: flex; gap: 28px; justify-content: center; width: 100%; flex: 1; align-items: flex-start; }
.page { flex: 1 1 0; max-width: 460px; min-width: 0; }
.page-label { text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pages.landscape, .review-pages.landscape { flex-direction: column; align-items: center; gap: 20px; }
.pages.landscape .page, .review-pages.landscape .page { flex: none; width: 100%; max-width: 560px; }
.page svg { display: block; width: 100%; height: auto; box-shadow: var(--shadow); border-radius: 2px; background: #fff; }
.page svg .photo-hit { cursor: pointer; }
.page svg .photo-hit.has-photo { cursor: grab; touch-action: none; }
.page svg .photo-hit.dragging { cursor: grabbing; }
.preview-note { font-size: 12px; color: var(--muted); margin: 0; }
.page-switch { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.page-switch button { font: inherit; font-size: 13px; border: 0; background: none; padding: 7px 16px; border-radius: 99px; cursor: pointer; color: var(--muted); }
.page-switch button[aria-selected=true] { background: var(--ink); color: #fff; }

.panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; height: calc(100vh - 57px); position: sticky; top: 57px; }
.panel-scroll { overflow-y: auto; padding: 28px 28px 8px; flex: 1; }
.panel-footer { padding: 16px 28px 22px; border-top: 1px solid var(--line); }
.issues { font-size: 13px; color: var(--danger); margin: 0 0 10px; }
.issues:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding: 0; margin-bottom: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.photo-box { border: 1px dashed #d3c8b8; border-radius: 12px; padding: 14px; background: #fbf9f6; margin-bottom: 12px; }
.photo-box .photo-title { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.demo-hint select { font: inherit; font-size: 12px; margin-top: 6px; display: block; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.photo-box .photo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.photo-box .zoom { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.photo-box input[type=range] { flex: 1; accent-color: var(--ink); }
.photo-box .tip { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.quality { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.quality::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.quality.good { color: #3f7d4e; }
.quality.ok { color: #b07a1d; }
.quality.bad { color: var(--danger); }

/* Schritt 3 */
.review { max-width: 1060px; margin: 0 auto; padding: 36px 24px 60px; }
.review-head { text-align: center; max-width: 560px; margin: 0 auto 28px; }
.review-pages { display: flex; gap: 32px; justify-content: center; margin-bottom: 32px; }
.review-pages .page { max-width: 420px; }
.review-box { max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); }
.checklist { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.confirm { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; }
.confirm input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.review-actions { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

.done-heart { width: 28px; height: 28px; fill: var(--ink); margin-bottom: 14px; }

.busy { position: fixed; inset: 0; background: rgba(246, 242, 236, .85); display: grid; place-items: center; z-index: 50; font-size: 15px; color: var(--muted); }

/* Mobil */
@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .editor { grid-template-columns: 1fr; }
  .preview-area { padding: 10px 16px 12px; gap: 10px; position: sticky; top: 53px; background: var(--bg); z-index: 3; border-bottom: 1px solid var(--line); }
  .page-switch { display: inline-flex; }
  .pages .page { display: none; max-width: min(180px, 48vw, 21vh); }
  .pages .page.active { display: block; }
  .pages .page-label { display: none; }
  .preview-note { display: none; }
  .panel { height: auto; position: static; border-left: 0; }
  .panel-scroll { padding: 20px 16px 4px; overflow: visible; }
  .panel-footer { position: sticky; bottom: 0; background: var(--surface); padding: 12px 16px 16px; }
  .review { padding: 24px 16px 40px; }
  .review-pages { flex-direction: column; align-items: center; gap: 20px; }
  .review-pages .page { width: 100%; max-width: 360px; }
  .review-actions .btn { flex: 1; }
}

/* Screenshot-Modus: Prototyp-Hinweise ausblenden */
body.screenshot .photo-box .tip:last-child, body.screenshot .demo-hint { display: none; }

.choose { margin-top: 20px; }
.choose-list { display: grid; gap: 8px; }
.choose-list .btn { text-align: left; }

.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px 32px; }
.site-footer a, .privacy-note a { color: var(--muted); }
.privacy-note { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
body.screenshot .site-footer { display: none; }
