@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --grund: #faf9f5;
  --flaeche: #ffffff;
  --flaeche-2: #f0eee6;
  --text: #1f1e1d;
  --leise: #6b6a63;
  --linie: #e6e3d9;
  --linie-stark: #d6d2c4;
  --akzent: #b85a3c;
  --akzent-text: #ffffff;
  --akzent-zart: #f6e8e1;
  --akzent-zart-text: #8a3f26;
  --aussen: #5b7f5e;
  --innen: #b07d2c;
  --stern: #c96442;
  --fehler: #a8372b;
  --buehne: #1a1a18;
  --schatten: 0 1px 2px rgba(31, 30, 29, 0.04), 0 1px 1px rgba(31, 30, 29, 0.02);
  --radius: 16px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1f1e1d;
    --flaeche: #2a2927;
    --flaeche-2: #33312e;
    --text: #ecebe6;
    --leise: #a8a69e;
    --linie: #3a3835;
    --linie-stark: #4a4844;
    --akzent: #d97757;
    --akzent-text: #1f1e1d;
    --akzent-zart: #3d2a22;
    --akzent-zart-text: #f0b49c;
    --aussen: #8fb38f;
    --innen: #d9a650;
    --stern: #e8906f;
    --fehler: #f09b8b;
    --buehne: #141413;
    --schatten: none;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden],
.ikon-retro {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) calc(env(safe-area-inset-right) + 20px) calc(env(safe-area-inset-bottom) + 104px) calc(env(safe-area-inset-left) + 20px);
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 18px;
  background: var(--grund);
}

.kopfmitte {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.kopfmitte.links {
  text-align: left;
}

.tagtitel {
  margin: 0;
  font: 600 28px/1.2 var(--serif);
  letter-spacing: -0.01em;
}

.tagdatum {
  margin: 2px 0 0;
  color: var(--leise);
  font-size: 16px;
}

.rund {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--linie-stark);
  background: var(--flaeche);
  color: var(--text);
  display: grid;
  place-items: center;
  flex: none;
}

.rund:disabled {
  opacity: 0.35;
  cursor: default;
}

.rund.leise {
  color: var(--leise);
}

.rund svg {
  width: 20px;
  height: 20px;
}

.hinweis {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--flaeche-2);
  color: var(--text);
  font-size: 16px;
}

.kennzahlen {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  margin-bottom: 20px;
}

.kennzahl {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wert {
  font: 600 32px/1.15 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wert.klein {
  font-size: 20px;
  line-height: 1.3;
  padding: 7px 0 3px;
}

.bezeichnung {
  color: var(--leise);
  font-size: 15px;
}

.filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scrollbar-width: none;
}

.filter::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid var(--linie-stark);
  border-radius: 999px;
  background: var(--flaeche);
  font-size: 16px;
  white-space: nowrap;
}

.chip[aria-pressed="true"] {
  background: var(--akzent-zart);
  border-color: var(--akzent);
  color: var(--akzent-zart-text);
  font-weight: 600;
}

.chip .anzahl {
  color: var(--leise);
  margin-left: 6px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .anzahl {
  color: inherit;
  opacity: 0.8;
}

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

.eintrag {
  width: 100%;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  text-align: left;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}

.vorschau {
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  background: var(--flaeche-2);
  display: block;
}

.vorschau.platzhalter {
  display: grid;
  place-items: center;
  color: var(--leise);
  font-size: 13px;
}

.eintragtext {
  min-width: 0;
}

.eintragname {
  display: block;
  font: 600 19px/1.3 var(--serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eintragmeta {
  display: block;
  margin-top: 2px;
  color: var(--leise);
  font-size: 15px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.punkt {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
  background: var(--aussen);
}

.punkt.innen {
  background: var(--innen);
}

.stern {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--stern);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.leer {
  text-align: center;
  color: var(--leise);
  padding: 56px 16px;
  font: 400 20px/1.4 var(--serif);
}

.anmeldung {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 20px;
  box-shadow: var(--schatten);
}

.anmeldekarte {
  width: min(380px, 100%);
  padding: 32px 28px 28px;
  display: grid;
  gap: 10px;
}

.anmeldelogo {
  border-radius: 16px;
  justify-self: center;
}

.anmeldekarte h1 {
  margin: 8px 0 14px;
  text-align: center;
  font: 600 30px/1.2 var(--serif);
}

.anmeldekarte label {
  font-size: 15px;
  color: var(--leise);
}

.anmeldekarte input {
  font: 18px/1.3 var(--sans);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--linie-stark);
  background: var(--grund);
  color: var(--text);
}

.anmeldekarte input:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.fehler {
  margin: 0;
  color: var(--fehler);
  font-size: 16px;
}

.knopf {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--linie-stark);
  border-radius: 12px;
  background: var(--flaeche);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.knopf.haupt {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--akzent-text);
}

.knopf:disabled {
  opacity: 0.55;
}

a.knopf {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.knopf[aria-pressed="true"]::before {
  content: "★ ";
  color: var(--stern);
}

.detail {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--flaeche);
  color: var(--text);
  overflow: auto;
}

.detail::backdrop {
  background: rgba(20, 20, 19, 0.45);
  backdrop-filter: blur(2px);
}

.detailmedien img,
.detailmedien video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--buehne);
}

.detailtext {
  padding: 18px 22px 22px;
}

.detailtext h2 {
  margin: 0 0 12px;
  font: 600 26px/1.2 var(--serif);
}

.felder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  margin: 0 0 20px;
  font-size: 17px;
}

.felder dt {
  color: var(--leise);
}

.felder dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.detailknoepfe {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detailschluss {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 16px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--grund) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--linie);
}

.tab {
  flex: 0 1 132px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--leise);
  font-size: 13px;
  font-weight: 600;
}

.tab svg {
  width: 24px;
  height: 24px;
}

.tab[aria-current="page"] {
  color: var(--akzent);
}

.buehne {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--buehne);
}

.livevideo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--buehne);
}

.livename {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.livename::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5484d;
}

.livename.wartet::before {
  background: #9a988f;
}

.livestatus {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: rgba(20, 20, 19, 0.55);
  color: #f5f4ef;
  font-size: 17px;
  text-align: center;
  pointer-events: none;
}

.livestatus:empty {
  display: none;
}

.bildimbild {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 32%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  overflow: hidden;
  background: #2a2927;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.bildimbild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bildimbild.ohnebild img {
  visibility: hidden;
}

.bildimbildname {
  position: absolute;
  left: 7px;
  bottom: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.liveknoepfe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.liveknoepfe .knopf {
  text-align: center;
}

.block {
  padding: 20px;
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
}

.abschnitt {
  margin: 0;
  font: 600 22px/1.25 var(--serif);
}

.zustand {
  margin: 0;
}

.regeln {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.regeln:disabled,
.regeln.aus {
  opacity: 0.45;
}

.regeln legend {
  padding: 0;
  margin-bottom: 10px;
  color: var(--leise);
  font-size: 15px;
}

.haken {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  cursor: pointer;
}

.haken input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--akzent);
}

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

.alarmzeit-titel {
  color: var(--leise);
  font-size: 15px;
}

.alarmzeit-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.zeit-rad {
  --zeile: 46px;
  position: relative;
  flex: none;
  width: 84px;
  height: calc(var(--zeile) + 2px);
  border: 1px solid var(--linie-stark);
  border-radius: 12px;
  background: var(--grund);
  overflow: hidden;
}

.zeit-rad:has(.rad-rolle:focus-visible) {
  border-color: var(--akzent);
  box-shadow: 0 0 0 3px var(--akzent-zart);
}

.rad-band {
  position: absolute;
  inset: 0;
  background: var(--grund);
}

.rad-rolle {
  position: relative;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
  cursor: ns-resize;
  outline: none;
}

.rad-rolle::-webkit-scrollbar {
  display: none;
}

.zeit-rad.zieht .rad-rolle {
  scroll-snap-type: none;
  cursor: grabbing;
}

.rad-rolle button {
  display: block;
  width: 100%;
  height: var(--zeile);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: 18px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  opacity: 0.25;
  scroll-snap-align: start;
  cursor: inherit;
}

.rad-rolle button[data-abstand="0"] {
  opacity: 1;
}

.rad-fokus {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.regeln:disabled .rad-rolle {
  pointer-events: none;
  overflow: hidden;
}

.themenwahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.themaoption {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--linie-stark);
  border-radius: 14px;
  cursor: pointer;
}

.themaoption input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.themaoption:has(input:checked) {
  border: 2px solid var(--akzent);
  padding: 11px;
  background: var(--akzent-zart);
}

.themaoption:has(input:focus-visible) {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.themavorschau {
  display: flex;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.themavorschau i {
  flex: 1;
}

.vorschau-ruhig i:nth-child(1) {
  background: #faf9f5;
}

.vorschau-ruhig i:nth-child(2) {
  background: #c96442;
}

.vorschau-ruhig i:nth-child(3) {
  background: #1f1e1d;
}

.vorschau-retro {
  background: linear-gradient(90deg, #c2c3c7 0 14.28%, #ffec27 0 28.57%, #29adff 0 42.85%, #00e436 0 57.14%, #ff77a8 0 71.42%, #ff004d 0 85.71%, #1d2b53 0);
}

.themaname {
  font-weight: 600;
}

.thematext {
  color: var(--leise);
  font-size: 14px;
  line-height: 1.35;
}

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

  .kennzahl.breit {
    grid-column: 1 / -1;
  }

  .eintrag {
    grid-template-columns: 96px 1fr auto;
    gap: 12px;
  }

  .vorschau {
    width: 96px;
  }
}

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

.passwortfeld {
  position: relative;
}

.passwortfeld input {
  width: 100%;
  padding-right: 56px;
}

.auge {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--leise);
  display: grid;
  place-items: center;
}

.auge svg {
  width: 22px;
  height: 22px;
}

.auge[aria-pressed="false"] .auge-zu,
.auge[aria-pressed="true"] .auge-offen {
  display: none;
}

.textknopf {
  justify-self: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--akzent);
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.erklaerung {
  margin: 0;
  color: var(--leise);
  font-size: 16px;
}

.erklaerung strong {
  color: var(--text);
}

.ziffern {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 360px;
}

.ziffer {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0;
  border: 1px solid var(--linie-stark);
  border-radius: 12px;
  background: var(--grund);
  color: var(--text);
  font: 600 26px/1 var(--serif);
  font-variant-numeric: tabular-nums;
  text-align: center;
  caret-color: var(--akzent);
}

.ziffer:focus {
  outline: none;
  border: 2px solid var(--akzent);
}

.ziffern.fehlerhaft .ziffer {
  border-color: var(--fehler);
}

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

.wiederbereich label {
  font-size: 15px;
  color: var(--leise);
}

.wiederbereich input {
  font: 20px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--linie-stark);
  background: var(--grund);
  color: var(--text);
  text-transform: uppercase;
}

.unterblock {
  display: grid;
  gap: 14px;
}

.qr {
  justify-self: start;
  width: 220px;
  height: 220px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--linie);
  image-rendering: pixelated;
}

.geheimnis {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--flaeche-2);
  font: 17px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.codeliste {
  margin: 0;
  padding: 14px 18px 14px 44px;
  border-radius: 12px;
  background: var(--flaeche-2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 28px;
  font: 18px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.zeile {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

  .ziffer {
    height: 52px;
    font-size: 24px;
  }
}

.teilenfeld {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--linie);
}

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

.geteilt {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  align-items: center;
}

.geteiltbild {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--buehne);
}

.geteilttext {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.geteilttext b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geteilttext span {
  color: var(--leise);
  font-size: 15px;
}

.geteiltknoepfe {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.knopf.warnung {
  border-color: var(--fehler);
  color: var(--fehler);
}
