:root {
  color: #1c1b19;
  background: #f3f0e8;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { width: 100%; }

body {
  margin: 0;
  padding: 8px 10px 16px;
}

h2 { margin: 0; font-weight: 600; font-size: 14px; }

button, input, select { font: inherit; color: inherit; }

button {
  background: #1c1b19;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}

button.still {
  background: transparent;
  color: #1c1b19;
  border: 1px solid #c9c2b6;
}

button:disabled { opacity: 0.45; cursor: wait; }

nav {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.nav {
  background: transparent;
  color: #1c1b19;
  border: 1px solid transparent;
}

.nav.an {
  background: #1c1b19;
  color: #fff;
}

.ablage {
  width: 100%;
  border: 1.5px dashed #b7b0a4;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.ablage.darueber { border-color: #1c1b19; background: #fffdf6; }

.ablage p { margin: 0 0 8px; }

.ordner {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ordner figure { margin: 0; }

.ordner img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e4ddd2;
  display: block;
}

.ordner figcaption {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  margin-top: 3px;
  font-size: 11px;
}

.karte {
  background: #fff;
  width: 100%;
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.karte-kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.meta { color: #4e4a44; }

.blatt {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4e4a44;
}

.blatt input { width: 3.2em; }

.zaehler { margin-left: auto; color: #4e4a44; }

.aktionen { display: flex; gap: 6px; }

.zuordnung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.jahre { display: flex; flex-wrap: wrap; gap: 3px; }

.jahr {
  background: #fff;
  color: #1c1b19;
  border: 1px solid #c9c2b6;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 12px;
  line-height: 1.4;
}

.jahr.an { background: #1c1b19; color: #fff; }

.region {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.region select {
  background: #fff;
  border: 1px solid #c9c2b6;
  border-radius: 8px;
  padding: 3px 6px;
}

.vergleich {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #f7f4ee;
  border-radius: 8px;
  margin: 0 0 8px;
}

.fehler {
  color: #8a2b1b;
  margin: 6px 0 0;
  font-size: 13px;
}

.leer { color: #4e4a44; margin: 8px 0; }

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

th, td {
  border: 1px solid #e4ddd2;
  padding: 1px;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}

th:first-child, td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 196px;
  text-align: left;
  background: #faf8f4;
}

input.zelle {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  padding: 1px 3px;
}

input.zelle:focus { border-color: #1c1b19; outline: none; background: #fff; }

input.unsicher { background: #fff3c4; }

.name {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: block;
  height: 112px;
  width: 20px;
  margin: 0 auto;
  padding: 2px 0;
  font-size: 11px;
  text-align: left;
}

input.bereich { width: calc(100% - 16px); font-size: 12px; }

button.punkt, span.punkt {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  border: 1px solid #d5cec3;
  position: relative;
}

button.punkt.an::after, span.punkt.an::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c1b19;
  position: absolute;
  inset: 0;
  margin: auto;
}

button.weg, button.zeile-weg {
  background: transparent;
  color: #8a8378;
  border: 0;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}

.warten { color: #4e4a44; padding: 8px; }

.namen-warnung { margin-top: 8px; }

.namen-warnung p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bestand th:first-child,
.bestand td:first-child {
  width: auto;
  position: static;
  white-space: nowrap;
}

.bestand { table-layout: auto; }

.bestand td.offen { background: #f7f4ee; height: 36px; }

.bestand td.da { background: #fff; }

.zugang {
  max-width: 280px;
  margin: 18vh auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zugang h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }

.zugang label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

.zugang input {
  border: 1px solid #c9c2b6;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.overlay[hidden] { display: none; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 25, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow: auto;
  z-index: 5;
}

.overlay-karte {
  background: #fff;
  width: min(1200px, 100%);
  border-radius: 12px;
  padding: 12px;
}
