@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --papier: #f7f4ee;
  --papier-tief: #efeae1;
  --flaeche: #fffdf9;
  --linie: #e2dbcf;
  --linie-stark: #cfc6b7;
  --tinte: #2b2420;
  --tinte-leise: #6d6259;
  --tinte-blass: #998e83;
  --oxblut: #6e2a24;
  --oxblut-hell: #8a3a32;
  --oxblut-hauch: #f1e4e0;
  --gruen: #3f6b47;
  --gelb: #c08a1d;
  --rot: #a3372b;
  --schatten: 0 10px 40px rgb(43 36 32 / 0.16), 0 2px 8px rgb(43 36 32 / 0.08);
  --rund: 10px;
  --rund-gross: 16px;
  --ziel: 44px;
  --titel: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --links: env(safe-area-inset-left, 0px);
  --rechts: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
}

#app {
  height: 100%;
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--oxblut);
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-gross {
  width: 44px;
  height: 44px;
  color: var(--tinte-blass);
}

.dreht {
  animation: drehen 1s linear infinite;
}

@keyframes drehen {
  to {
    transform: rotate(360deg);
  }
}

.fuellung {
  flex: 1 1 auto;
}

.wortmarke {
  font-family: var(--titel);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--tinte);
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--ziel);
  padding: 0 16px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund);
  background: var(--flaeche);
  color: var(--tinte);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.knopf:hover {
  background: var(--papier-tief);
}

.knopf:active {
  transform: scale(0.97);
}

.knopf:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.knopf-haupt {
  background: var(--oxblut);
  border-color: var(--oxblut);
  color: #fff;
}

.knopf-haupt:hover {
  background: var(--oxblut-hell);
}

.knopf-leise {
  border-color: transparent;
  background: transparent;
  color: var(--tinte-leise);
}

.knopf-leise:hover {
  background: var(--papier-tief);
  color: var(--tinte);
}

.knopf-gefahr {
  color: var(--rot);
}

.knopf-klein {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
  gap: 6px;
}

.knopf-klein .icon {
  width: 17px;
  height: 17px;
}

.knopf-gross {
  min-height: 52px;
  font-size: 17px;
  width: 100%;
}

.knopf-rund {
  display: inline-grid;
  place-items: center;
  width: var(--ziel);
  height: var(--ziel);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinte);
  flex: none;
}

.knopf-rund:hover {
  background: var(--papier-tief);
}

.knopf-rund:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.knopf-platz {
  width: var(--ziel);
}

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.knopfspalte {
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.eingabe {
  width: 100%;
  min-height: var(--ziel);
  padding: 10px 12px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund);
  background: var(--flaeche);
  font-size: 17px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

select.eingabe {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236d6259' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.eingabe:focus {
  outline: none;
  border-color: var(--oxblut);
  box-shadow: 0 0 0 3px var(--oxblut-hauch);
}

.eingabe::placeholder {
  color: var(--tinte-blass);
}

textarea.eingabe {
  resize: none;
  overflow: hidden;
  display: block;
}

.eingabe-titel {
  font-family: var(--titel);
  font-size: 26px;
  font-weight: 500;
  padding: 6px 12px;
}

.beschriftung {
  font-size: 13px;
  font-weight: 600;
  color: var(--tinte-leise);
  letter-spacing: 0.01em;
}

.pruef-punkt {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gelb);
  flex: none;
  box-shadow: 0 0 0 3px rgb(192 138 29 / 0.18);
}

.knopf-passt {
  min-height: 30px;
  padding: 0 10px;
  border-color: rgb(192 138 29 / 0.5);
  color: #7a5710;
  background: #fbf3df;
}

.knopf-passt:hover {
  background: #f6e8c4;
}

/* App-Gerüst */

.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  height: 100%;
}

.seitenleiste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(18px + var(--oben)) 12px calc(14px + var(--unten)) calc(12px + var(--links));
  border-right: 1px solid var(--linie);
  background: var(--papier);
  overflow-y: auto;
}

.nav-marke {
  display: block;
  padding: 2px 12px 6px;
  text-decoration: none;
}

.nav-gruppe {
  display: grid;
  gap: 2px;
}

.nav-ueberschrift {
  padding: 0 12px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tinte-blass);
}

.nav-punkt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--rund);
  color: var(--tinte);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-punkt .icon {
  color: var(--tinte-leise);
}

.nav-punkt:hover {
  background: var(--papier-tief);
}

.nav-punkt.ist-aktiv {
  background: var(--oxblut-hauch);
  color: var(--oxblut);
}

.nav-punkt.ist-aktiv .icon {
  color: var(--oxblut);
}

.nav-name {
  flex: 1;
}

.nav-zahl {
  min-width: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: #fbf3df;
  color: #7a5710;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 22px;
}

.nav-zahl:empty {
  display: none;
}

.nav-zahl-leise {
  background: var(--papier-tief);
  color: var(--tinte-leise);
}

.status {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--linie);
}

.status-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 14px;
  color: var(--tinte-leise);
  text-decoration: none;
}

.status-zeile .icon {
  width: 17px;
  height: 17px;
}

.status-gut .icon {
  color: var(--gruen);
}

.status-fehler {
  color: var(--rot);
}

.status-link {
  color: var(--oxblut);
  font-weight: 500;
}

.status-link:hover {
  text-decoration: underline;
}

.haupt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.oben {
  display: none;
}

.inhalt {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.schleier {
  display: none;
}

.ansicht {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(28px + var(--oben)) calc(36px + var(--rechts)) calc(80px + var(--unten)) 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ansicht-kopf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.ansicht-titel {
  margin: 0;
  font-family: var(--titel);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
}

.ansicht-zahl {
  color: var(--tinte-blass);
  font-size: 15px;
  margin-right: 4px;
}

.abschnitt-titel {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 -6px;
  font-family: var(--titel);
  font-weight: 500;
  font-size: 26px;
}

.abschnitt-zahl {
  font-family: var(--ui);
  font-size: 14px;
  color: var(--tinte-blass);
}

.ganzseite {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  height: 100%;
  padding: 24px;
  text-align: center;
}

.ganzseite-text {
  margin: 0;
  font-size: 18px;
  color: var(--tinte-leise);
}

.lade-punkt {
  color: var(--tinte-blass);
}

.leer {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px;
  border: 1.5px dashed var(--linie-stark);
  border-radius: var(--rund-gross);
  color: var(--tinte-leise);
  text-align: center;
}

.leer > .icon {
  width: 36px;
  height: 36px;
  color: var(--tinte-blass);
}

.leer p {
  margin: 0;
  font-size: 17px;
}

.leer-gut > .icon {
  color: var(--gruen);
}

.ablage-aktiv {
  outline: 3px dashed var(--oxblut);
  outline-offset: -10px;
  border-radius: var(--rund-gross);
  background: var(--oxblut-hauch);
}

/* Kacheln */

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kachel {
  position: relative;
  min-width: 0;
  touch-action: manipulation;
}

.kachel-knopf {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.kachel-bild {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--rund);
  background: var(--papier-tief);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.kachel-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
  -webkit-user-drag: none;
}

.kachel-knopf:hover .kachel-bild {
  box-shadow: 0 0 0 2px var(--linie-stark);
}

.kachel-knopf:active .kachel-bild {
  transform: scale(0.98);
}

.kachel-text {
  display: grid;
  gap: 1px;
  padding: 8px 2px 0;
  min-width: 0;
}

.kachel-titel {
  font-family: var(--titel);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kachel-titel.leer {
  all: unset;
  font-family: var(--titel);
  font-size: 19px;
  color: var(--tinte-blass);
  font-style: italic;
}

.kachel-meta {
  font-size: 13px;
  color: var(--tinte-leise);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kachel-marken {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.kachel-marke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgb(255 253 249 / 0.94);
  font-size: 12px;
  font-weight: 600;
  color: var(--tinte-leise);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.kachel-marken .icon {
  width: 14px;
  height: 14px;
}

.kachel-punkt {
  position: absolute;
  top: 12px;
  right: 12px;
}

.kachel-ecke {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(255 253 249 / 0.94);
  color: var(--tinte-leise);
}

.kachel-ecke .icon {
  width: 16px;
  height: 16px;
}

.ist-versteckt .kachel-bild img {
  opacity: 0.38;
  filter: grayscale(0.6);
}

.ist-versteckt .kachel-titel {
  color: var(--tinte-leise);
}

.foto-fehlt {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--tinte-blass);
  font-size: 13px;
  font-weight: 500;
}

.foto-fehlt .icon {
  width: 28px;
  height: 28px;
}

.ohne-foto .kachel-bild {
  border: 1.5px dashed var(--linie-stark);
  background: transparent;
}

.kachel-laedt .kachel-bild img {
  opacity: 0.55;
}

.ladebalken {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 6px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.85);
  overflow: hidden;
}

.ladebalken-fuellung {
  height: 100%;
  width: 4%;
  background: var(--oxblut);
  transition: width 0.2s;
}

.kachel-fehler .kachel-bild {
  box-shadow: 0 0 0 2px var(--rot);
}

.kachel-fehlertext {
  font-size: 13px;
  color: var(--rot);
}

.kachel-fehler .knopfreihe {
  margin-top: 6px;
}

.ist-aktiv > .kachel-knopf .kachel-bild {
  box-shadow: 0 0 0 3px var(--oxblut);
}

.platzhalter {
  opacity: 0.25;
}

.geist {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  list-style: none;
  filter: drop-shadow(0 14px 24px rgb(43 36 32 / 0.25));
}

body.zieht,
body.zieht * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Textfelder */

.textfeld {
  display: grid;
  gap: 8px;
}

.feldkopf {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.text-eingabe {
  font-size: 17px;
  line-height: 1.55;
  padding: 12px 14px;
  min-height: 120px;
}

.text-klein {
  min-height: var(--ziel);
}

.textfeld.zeigt-fassung .text-eingabe {
  background: var(--papier-tief);
  color: var(--tinte-leise);
}

.fassungen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.pfeil {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinte-leise);
}

.pfeil:hover {
  background: var(--papier-tief);
}

.pfeil:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.fassung-name {
  font-size: 13px;
  color: var(--tinte-leise);
  min-width: 90px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.fassungen .knopf {
  margin-left: 6px;
}

.konflikt {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgb(163 55 43 / 0.35);
  border-radius: var(--rund);
  background: #fbefec;
}

.konflikt p {
  margin: 0;
}

.konflikt-text {
  white-space: pre-wrap;
  font-size: 15px;
  max-height: 200px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: var(--flaeche);
}

.notiz {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.notiz-zeichen {
  display: grid;
  place-items: center;
  height: var(--ziel);
  color: var(--tinte-blass);
}

.notiz-eingabe {
  background: #fdf9ee;
  border-color: #e9dfc4;
  font-size: 16px;
}

.hat-notiz {
  color: var(--oxblut);
}

.nur-breit {
  display: inline;
}

/* Seiten */

.seite-oben {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.platz {
  display: grid;
  gap: 10px;
}

.platz-buehne {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--rund-gross);
  background: var(--papier-tief);
  overflow: hidden;
}

.platz-buehne img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.platz-buehne .kachel-bild {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.uebersicht-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.uebersicht-liste {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--flaeche);
  text-align: left;
}

.zeile:hover {
  border-color: var(--linie-stark);
}

.zeile > .icon:first-child {
  color: var(--tinte-leise);
}

.zeile > .icon:last-child {
  color: var(--tinte-blass);
}

.zeile-text {
  font-weight: 500;
  font-size: 16px;
}

.zeile-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--tinte-leise);
}

.zeile-text + .icon {
  margin-left: auto;
}

.zeile-pruefen {
  border-color: rgb(192 138 29 / 0.4);
  background: #fdf8ea;
}

.archiv-gruppe {
  display: grid;
  gap: 18px;
}

.fotoliste {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fotoeintrag {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--linie);
  border-radius: var(--rund-gross);
  background: var(--flaeche);
  touch-action: manipulation;
}

.fotoeintrag-bild {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--rund);
  background: var(--papier-tief);
  overflow: hidden;
  cursor: grab;
}

.fotoeintrag-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.fotoeintrag-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.unterschrift {
  display: grid;
  gap: 6px;
}

.unterschrift-marken {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unterschrift-marken:has(.pruef-punkt[hidden]) {
  display: none;
}

.papierkorb {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.papierkorb-zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--flaeche);
}

.papierkorb-bild {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--papier-tief);
  overflow: hidden;
  flex: none;
}

.papierkorb-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.papierkorb-bild .foto-fehlt span {
  display: none;
}

.papierkorb-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.konto-name {
  margin: 0;
  color: var(--tinte-leise);
}

/* Blätter */

dialog {
  padding: 0;
  border: 0;
  color: inherit;
}

dialog::backdrop {
  background: rgb(43 36 32 / 0.42);
}

.werk-blatt,
.wahl-blatt {
  width: min(1240px, calc(100vw - 48px));
  max-width: none;
  height: min(920px, calc(100dvh - 48px));
  max-height: none;
  border-radius: 18px;
  background: var(--papier);
  box-shadow: var(--schatten);
  overflow: hidden;
}

.werk-blatt[open],
.wahl-blatt[open] {
  display: flex;
  flex-direction: column;
}

.wahl-blatt {
  width: min(900px, calc(100vw - 48px));
}

.blatt-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + var(--oben)) 12px 8px;
  border-bottom: 1px solid var(--linie);
  background: var(--papier);
  flex: none;
}

.blatt-mitte {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.blatt-titel {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blatt-zaehler {
  font-size: 14px;
  color: var(--tinte-blass);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.blatt-pfeile {
  display: flex;
}

.blatt-inhalt {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.werk-blatt .blatt-inhalt {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
  align-items: start;
}

.wahl-blatt .blatt-inhalt {
  padding: 20px;
}

.bildspalte {
  position: sticky;
  top: 0;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.buehne {
  position: relative;
  display: grid;
  place-items: center;
  height: min(56dvh, 560px);
  border-radius: var(--rund-gross);
  background: var(--papier-tief);
  overflow: hidden;
}

.buehne img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: opacity 0.2s;
}

.buehne.laedt img {
  opacity: 0;
}

.buehne .foto-fehlt .icon {
  width: 40px;
  height: 40px;
}

.buehne .foto-fehlt {
  font-size: 16px;
}

.buehne-marke {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgb(255 253 249 / 0.94);
  font-size: 13px;
  font-weight: 600;
  color: var(--tinte-leise);
}

.bild-werkzeuge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.streifen-bereich {
  display: grid;
  gap: 8px;
}

.fotostreifen {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 2px 2px 6px;
  list-style: none;
  overflow-x: auto;
}

.fotostreifen .kachel {
  width: 84px;
  flex: none;
}

.fotostreifen .kachel-bild img {
  padding: 4px;
}

.fotostreifen .kachel-text {
  display: none;
}

.fotostreifen .kachel-neu .kachel-knopf {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--linie-stark);
  border-radius: var(--rund);
  color: var(--tinte-leise);
}

.fotostreifen .kachel-neu .kachel-knopf:hover {
  border-color: var(--oxblut);
  color: var(--oxblut);
}

.stern {
  position: absolute;
  top: 5px;
  left: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--oxblut);
  color: #fff;
}

.stern .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.felderspalte {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 24px 40px 4px;
}

.feld {
  display: grid;
  gap: 6px;
}

.feldreihe {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
}

.feldgruppe {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--linie);
}

.raster-felder {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.format {
  display: flex;
  align-items: center;
  gap: 10px;
}

.format .eingabe {
  width: 100px;
  text-align: center;
}

.mal,
.einheit {
  color: var(--tinte-leise);
}

.zeile-schalter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--ziel);
  cursor: pointer;
}

.zeile-schalter .beschriftung {
  font-size: 16px;
  color: var(--tinte);
  font-weight: 500;
}

.schalter {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 16px;
  background: var(--linie-stark);
  transition: background 0.15s;
  cursor: pointer;
  flex: none;
}

.schalter::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  transition: transform 0.15s;
}

.schalter:checked {
  background: var(--oxblut);
}

.schalter:checked::after {
  transform: translateX(20px);
}

.feldgruppe > .knopf {
  justify-self: start;
}

.pruef-leiste {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: var(--rund);
  background: #fbf3df;
}

.pruef-text {
  flex: 1;
  font-size: 14px;
  color: #6a4c0e;
}

.beobachtung summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--tinte-leise);
  cursor: pointer;
}

.beobachtung p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--tinte-leise);
  white-space: pre-wrap;
}

.werk-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--linie);
}

.zuschnitt {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: #1d1916;
  color: #fff;
}

.zuschnitt[open] {
  display: flex;
  flex-direction: column;
}

.zuschnitt .blatt-kopf {
  background: transparent;
  border-color: rgb(255 255 255 / 0.12);
  justify-content: space-between;
}

.zuschnitt .blatt-titel {
  color: #fff;
}

.zuschnitt .knopf-leise {
  color: #fff;
}

.zuschnitt .knopf-leise:hover {
  background: rgb(255 255 255 / 0.1);
}

.zuschnitt-buehne {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  min-height: 0;
}

.zuschnitt-flaeche {
  position: relative;
  touch-action: none;
  max-height: 100%;
  line-height: 0;
}

.zuschnitt-bild {
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 170px - var(--oben) - var(--unten));
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.zuschnitt-schatten {
  position: absolute;
  background: rgb(0 0 0 / 0.55);
  pointer-events: none;
}

.schatten-oben {
  top: 0;
  left: 0;
  right: 0;
}

.schatten-unten {
  left: 0;
  right: 0;
  bottom: 0;
}

.schatten-links {
  left: 0;
}

.schatten-rechts {
  right: 0;
}

.zuschnitt-rahmen {
  position: absolute;
  border: 2px solid #fff;
  cursor: move;
}

.zuschnitt-griff {
  position: absolute;
  width: 44px;
  height: 44px;
}

.zuschnitt-griff::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
}

.griff-nw {
  top: -22px;
  left: -22px;
  cursor: nwse-resize;
}

.griff-nw::after {
  top: 18px;
  left: 18px;
  border-right: 0;
  border-bottom: 0;
}

.griff-ne {
  top: -22px;
  right: -22px;
  cursor: nesw-resize;
}

.griff-ne::after {
  top: 18px;
  right: 18px;
  border-left: 0;
  border-bottom: 0;
}

.griff-sw {
  bottom: -22px;
  left: -22px;
  cursor: nesw-resize;
}

.griff-sw::after {
  bottom: 18px;
  left: 18px;
  border-right: 0;
  border-top: 0;
}

.griff-se {
  bottom: -22px;
  right: -22px;
  cursor: nwse-resize;
}

.griff-se::after {
  bottom: 18px;
  right: 18px;
  border-left: 0;
  border-top: 0;
}

.zuschnitt-fuss {
  display: flex;
  justify-content: center;
  padding: 12px 12px calc(16px + var(--unten));
}

.zuschnitt-fuss .knopf {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 0.35);
}

.hinweis-blatt {
  width: min(400px, calc(100vw - 32px));
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: var(--papier);
  box-shadow: var(--schatten);
}

.hinweis-blatt[open] {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.hinweis-symbol .icon {
  width: 48px;
  height: 48px;
  color: var(--oxblut);
  stroke-width: 1.5;
}

.hinweis-titel {
  margin: 0 0 8px;
  font-family: var(--titel);
  font-weight: 500;
  font-size: 28px;
}

/* Meldungen */

.meldungen {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--unten));
  z-index: 200;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
}

.meldung {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 8px 6px 18px;
  border-radius: 14px;
  background: var(--tinte);
  color: #fff;
  box-shadow: var(--schatten);
  font-size: 15px;
  animation: auftauchen 0.18s ease-out;
}

.meldung.geht {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.meldung-fehler {
  background: var(--rot);
}

.meldung-text {
  padding: 8px 0;
}

.meldung-knopf {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font-weight: 600;
}

.meldung-knopf:hover {
  background: rgb(255 255 255 / 0.24);
}

.meldung-zu {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgb(255 255 255 / 0.7);
}

@keyframes auftauchen {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Anmeldung */

.anmeldung,
.einladung {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: calc(24px + var(--oben)) 20px calc(24px + var(--unten));
  overflow-y: auto;
}

.anmeldung-karte,
.einladung-karte {
  display: grid;
  gap: 14px;
  width: min(380px, 100%);
}

.anmeldung-karte .wortmarke,
.einladung-karte .wortmarke {
  margin: 0;
  font-size: 38px;
  text-align: center;
  line-height: 1.1;
}

.marke-unter {
  margin: -8px 0 18px;
  text-align: center;
  color: var(--tinte-leise);
}

.anmeldung-formular {
  display: grid;
  gap: 10px;
}

.trenner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tinte-blass);
  font-size: 14px;
}

.trenner::before,
.trenner::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--linie);
}

.anmeldung-fehler {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--rund);
  background: #fbefec;
  color: var(--rot);
  font-size: 15px;
  text-align: center;
}

/* Schmal */

@media (max-width: 999px) {
  .app {
    grid-template-columns: 1fr;
  }

  .nav-punkt {
    min-height: var(--ziel);
  }

  .seitenleiste {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(300px, 84vw);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--schatten);
    border-right: 0;
  }

  body.nav-offen .seitenleiste {
    transform: none;
  }

  .schleier {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgb(43 36 32 / 0.35);
  }

  body.nav-offen .schleier {
    display: block;
  }

  .oben {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(4px + var(--oben)) calc(8px + var(--rechts)) 4px calc(4px + var(--links));
    border-bottom: 1px solid var(--linie);
    background: var(--papier);
    min-height: calc(56px + var(--oben));
  }

  .oben-titel {
    flex: 1;
    min-width: 0;
    font-family: var(--titel);
    font-size: 22px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-oben {
    padding: 0;
    border: 0;
  }

  .status-oben .status-zeile {
    font-size: 13px;
  }

  .ansicht {
    padding: 22px calc(20px + var(--rechts)) calc(80px + var(--unten)) calc(20px + var(--links));
  }

  .ansicht-titel {
    display: none;
  }

  .werk-blatt,
  .wahl-blatt {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .werk-blatt .blatt-inhalt {
    display: block;
  }

  .bildspalte {
    position: static;
    padding: 16px;
  }

  .felderspalte {
    padding: 4px 16px calc(40px + var(--unten));
  }

  .seite-oben {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .uebersicht-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .ansicht {
    padding-left: calc(16px + var(--links));
    padding-right: calc(16px + var(--rechts));
    gap: 18px;
  }

  .ansicht-kopf .knopf-haupt {
    position: fixed;
    right: calc(16px + var(--rechts));
    bottom: calc(20px + var(--unten));
    z-index: 40;
    min-height: 56px;
    padding: 0 20px;
    border-radius: 28px;
    box-shadow: var(--schatten);
  }

  .ansicht-kopf {
    gap: 6px 8px;
  }

  .ansicht-kopf .fuellung {
    display: none;
  }

  .nur-breit {
    display: none;
  }

  .buehne {
    height: 46dvh;
  }

  .kachel-titel {
    font-size: 17px;
  }

  .fotoeintrag {
    grid-template-columns: 1fr;
  }

  .raster-felder {
    grid-template-columns: 1fr;
  }

  .feldreihe {
    grid-template-columns: 96px 1fr;
  }

  .meldungen {
    bottom: calc(88px + var(--unten));
  }

  .blatt-zaehler {
    display: none;
  }
}

@media (hover: none) {
  .knopf:hover,
  .knopf-rund:hover,
  .nav-punkt:hover,
  .pfeil:hover {
    background: inherit;
  }

  .knopf-haupt:hover {
    background: var(--oxblut);
  }

  .kachel-knopf:hover .kachel-bild {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.ansicht, .ansicht > *, .platz, .textfeld, .feldkopf, .bildspalte, .felderspalte {
  min-width: 0;
}
.feldkopf { flex-wrap: wrap; }
.platz-buehne, .fotoeintrag-bild, .kachel-bild { min-height: 0; }
.platz-buehne img, .fotoeintrag-bild img, .kachel-bild img, .buehne img {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
img { transition: opacity 180ms ease; }
img.bild-laedt { opacity: 0; }
.ansicht { animation: sichtbar 160ms ease-out; }
dialog[open] { animation: blatt-auf 180ms ease-out; }
dialog::backdrop { animation: sichtbar 160ms ease-out; }
.status-zeile { transition: color 160ms ease; }
@keyframes sichtbar { from { opacity: 0; } to { opacity: 1; } }
@keyframes blatt-auf { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.uebersicht-liste, .uebersicht-liste > li { min-width: 0; }
@media (max-width: 640px) {
  .zeile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; padding-top: 10px; padding-bottom: 10px; gap: 6px 12px; }
  .zeile-text { overflow-wrap: anywhere; }
  .zeile-meta { grid-column: 2; grid-row: 2; white-space: normal; overflow-wrap: anywhere; }
  .zeile > .icon:last-child { grid-column: 3; grid-row: 1; }
}
