@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: block;
  src: url('fonts/nunito-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: block;
  src: url('fonts/nunito-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}
/* Wie Calibri aus dem Word-Dokument der Fotoseite */
@font-face {
  font-family: 'Carlito';
  font-weight: 400;
  font-display: block;
  src: url('fonts/carlito-regular.ttf') format('truetype');
}

:root {
  --ink: #24221f;
  --muted: #6b6660;
  --line: #d9d4cc;
  --paper: #faf8f5;
  --card: #ffffff;
  --accent: #2e74b5;
  --warn: #a8410b;
  --warn-bg: #fdf1e7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 20px 16px 120px;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

h1 { font: 700 30px/1.2 'Nunito', system-ui, sans-serif; margin: 0 0 8px; }

.intro { max-width: 680px; margin: 0 auto 24px; }
.intro p { margin: 0 0 6px; }
.privacy { color: var(--muted); font-size: 14px; }

.button {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button:hover { border-color: var(--ink); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:disabled { background: #b9b5ae; border-color: #b9b5ae; cursor: not-allowed; }
.button.ghost { background: transparent; }

/* Fotos hereinziehen */
.dropzone {
  max-width: 680px;
  margin: 0 auto 18px;
  padding: 28px 20px;
  border: 2px dashed var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: center;
}
.dropzone.over { border-color: var(--accent); background: #eef4fb; }
.dropzone-title { font: 700 20px 'Nunito', system-ui, sans-serif; margin: 0 0 4px; }
.dropzone-sub { color: var(--muted); margin: 0 0 10px; }
.dropzone-hint { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
code { background: #f0ece6; padding: 1px 5px; border-radius: 4px; }

/* Liste einfügen */
.paste { max-width: 680px; margin: 0 auto 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.paste summary { font-weight: 600; cursor: pointer; }
.paste p { margin: 10px 0; }
.paste textarea { width: 100%; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.paste-result { color: var(--muted); font-size: 14px; min-height: 1.5em; }

.empty { text-align: center; color: var(--muted); }

/* Karten */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.card > canvas {
  width: 200px;
  height: 200px;
  max-width: 100%;
  touch-action: none;
  cursor: grab;
  border-radius: 50%;
}
.card > canvas:active { cursor: grabbing; }
.card.busy canvas { opacity: .45; }

.field { width: 100%; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.field input, .field select {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field input.missing { border-color: var(--warn); background: var(--warn-bg); }

.adjust { font-size: 12px; color: var(--muted); margin: 0; text-align: center; }
.zoom { width: 100%; }
.card-tools { display: flex; gap: 10px; width: 100%; justify-content: space-between; }
.link {
  background: none; border: none; padding: 0; font: inherit; font-size: 14px;
  color: var(--muted); text-decoration: underline; cursor: pointer;
}
.link:hover { color: var(--ink); }

/* Fotoseite (aufklappbar) */
.photo-page { width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
.photo-page summary { font-weight: 600; cursor: pointer; }
.photo-page[open] { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.photo-page .page { width: 100%; max-width: 230px; height: auto; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.editors { display: flex; gap: 12px; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
.editor { display: flex; flex-direction: column; gap: 4px; }
.editor canvas { height: 130px; touch-action: none; cursor: grab; border-radius: 6px; }
.editor.square canvas { width: 130px; }
.editor.portrait canvas { width: 87px; }
.editor canvas:active { cursor: grabbing; }
.editor input { width: 100%; }
.editor-label { font-size: 13px; color: var(--muted); }

.hint { font-size: 13px; margin: 0; text-align: center; min-height: 1.2em; }
.hint.warn { color: var(--warn); font-weight: 600; }
.hint.info { color: var(--muted); }

/* Leiste unten */
.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.bar-buttons { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ring-color { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.ring-color input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }

@media (max-width: 420px) {
  .bar { justify-content: center; text-align: center; }
}
