@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #faf9f5;
  --paper-2: #f1eee3;
  --ink: #1c1b16;
  --ink-soft: #57543f;
  --muted: #8a856c;
  --sage: #5c6f45;
  --sage-deep: #404f2f;
  --sage-tint: #e7ebe0;
  --line: #ddd6c1;
  --danger: #a4433a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
  padding: calc(16px + env(safe-area-inset-top)) 20px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.brand .dein { color: var(--ink-soft); font-weight: 500; }
.brand .dein b { color: var(--ink); font-weight: 700; }
.brand .sep { color: var(--muted); font-weight: 400; margin: 0 2px; }
.brand .mein { color: var(--sage-deep); font-weight: 500; }
.brand .mein b { color: var(--sage); font-weight: 700; }

main {
  padding: 20px;
  max-width: 480px;
  margin: 0 auto;
}

#capture-area {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.capture-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 40px 20px;
  background: var(--paper-2);
  border: 2px dashed var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--sage-deep);
  -webkit-tap-highlight-color: transparent;
}
.capture-btn:active { background: var(--sage-tint); }
.capture-icon { font-size: 2.5rem; }

#queue {
  margin-top: 16px;
}
#queue h2 { font-size: 1rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

#queue-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.queue-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.queue-item .queue-name {
  flex: 1;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-item .queue-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
}
.queue-item .queue-state {
  font-size: 0.85rem;
  color: var(--muted);
}

.primary-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--sage-deep);
  color: var(--paper);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.primary-btn:disabled { opacity: 0.5; }
.primary-btn:active:not(:disabled) { background: var(--sage); }

.text-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

#status {
  margin-top: 20px;
  font-size: 0.95rem;
  text-align: center;
}
#status.error { color: var(--danger); }
#status.success { color: var(--sage-deep); }
