:root {
  --bg: #f7f2ea;
  --card: #fffdf9;
  --ink: #2f2a26;
  --muted: #8a7f74;
  --accent: #9c7a54;
  --accent-dark: #7f6242;
  --line: #e6ddd0;
  --ok: #5f8a63;
  --err: #b0513f;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px 24px;
  box-shadow: 0 10px 40px -20px rgba(80, 60, 30, .25);
}

.hero { text-align: center; margin-bottom: 24px; }
.ornament { width: 120px; height: 24px; color: var(--accent); }
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 2.3rem;
  line-height: 1.1;
  margin: 8px 0 6px;
}
.subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0;
}

label { display: block; font-weight: 500; font-size: .95rem; margin: 16px 0 6px; }
.hint { font-weight: 400; color: var(--muted); }

input[type=text] {
  width: 100%;
  font: inherit;
  font-size: 17px; /* verhindert Zoom auf iOS */
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(156, 122, 84, .15); }

.btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: default; }

.error { color: var(--err); font-size: .92rem; margin: 12px 0 0; }

.greeting { text-align: center; font-size: 1.1rem; margin: 0; }
.muted { color: var(--muted); text-align: center; font-size: .92rem; margin: 4px 0 18px; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 30px 16px;
  margin: 0;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: #fbf7f0;
  color: var(--accent-dark);
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.dropzone:active, .dropzone.drag { background: #f3eadc; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone svg { width: 44px; height: 44px; margin-bottom: 6px; }
.dz-title { font-weight: 600; font-size: 1.1rem; }
.dz-sub { font-weight: 400; font-size: .88rem; color: var(--muted); }

.summary { margin-top: 18px; }
.summary p { margin: 8px 0 0; font-size: .92rem; text-align: center; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.summary.done .bar-fill { background: var(--ok); }

.queue { list-style: none; padding: 0; margin: 14px 0 0; max-height: 320px; overflow-y: auto; }
.queue li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.queue li:last-child { border-bottom: 0; }
.thumb {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--line) center/cover no-repeat;
  display: grid; place-items: center;
  font-size: 18px;
}
.qinfo { flex: 1; min-width: 0; }
.qname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbar { height: 4px; background: var(--line); border-radius: 99px; margin-top: 5px; overflow: hidden; }
.qbar div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.qstatus { flex: none; font-size: .8rem; color: var(--muted); min-width: 44px; text-align: right; }
li.ok .qstatus { color: var(--ok); }
li.ok .qbar div { background: var(--ok); }
li.fail .qstatus { color: var(--err); }
.retry { font: inherit; font-size: .8rem; color: var(--err); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }

.link {
  display: block;
  margin: 22px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
  text-decoration: underline;
  cursor: pointer;
}

.footer { color: var(--muted); font-size: .8rem; margin-top: 18px; text-align: center; }
