*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #1f2a2e;
  --muted: #4a5358;
  --accent: #2f5d3a;
  --accent-dark: #22452b;
  --paper: #f7f5ef;
  --bg: #ffffff;
  --line: #6b7280;
  --error: #b00020;
  --focus: #1d4ed8;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

.lead {
  margin: 0 0 1rem;
}

.note,
.hint {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0.75rem;
}

.field {
  margin: 0 0 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="url"],
textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
}

input[type="file"] {
  font: inherit;
  max-width: 100%;
}

textarea {
  resize: vertical;
}

[aria-invalid="true"] {
  border-color: var(--error);
}

.error {
  color: var(--error);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

.error:empty {
  display: none;
}

fieldset.modes {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.9rem 0.75rem;
  margin: 0 0 1rem;
}

legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

label.radio {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 400;
  padding: 0.35rem 0;
}

label.radio input {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  min-height: 44px;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  background: #d9d9d9;
  border-color: #b5b5b5;
  color: #444;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.thumbs {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.75rem;
}

.thumbs li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: #ddd;
}

.capacity {
  font-weight: 600;
  margin: 0 0 1rem;
}

.capacity.over {
  color: var(--error);
}

.qr-box {
  margin: 0 0 1rem;
}

.qr svg {
  display: block;
  width: 220px;
  height: 220px;
  max-width: 100%;
  border: 1px solid #ccc;
}

.qr:empty {
  display: none;
}

.qr-box figcaption {
  word-break: break-all;
}

.k-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.125rem;
}

.site-footer {
  font-size: 0.95rem;
  padding-top: 0;
  padding-bottom: 2rem;
}

a {
  color: #1d4e89;
}

.prose p {
  max-width: 38rem;
}

.print-sticker {
  display: none;
}

@media print {
  @page {
    margin: 15mm;
  }

  main,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .print-sticker {
    display: block;
    width: 35mm;
    height: 35mm;
    /* dünne Schnittmarke außerhalb der 35 mm, damit die Ruhezone voll bleibt */
    outline: 0.15mm solid #777;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-sticker svg {
    display: block;
    width: 35mm;
    height: 35mm;
  }
}
