/* Zettel – schlicht, schwarz-weiß wie der Morgenbon, große Tippflächen. Dunkel, wenn das Handy dunkel ist. */
:root {
  --papier: #ffffff;
  --tinte: #000000;
  --grau: #6b6b6b;
  --hell: #e6e6e6;
  --rot: #c01818;
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --papier: #000000; --tinte: #ffffff; --grau: #9a9a9a; --hell: #2a2a2a; --rot: #ff6b6b; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--schrift); font-size: 17px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 16px calc(env(safe-area-inset-bottom) + 24px); max-width: 560px; margin: 0 auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: var(--tinte); background: var(--papier); }
input:focus-visible, button:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }
#liste { margin-top: 12px; }
[hidden] { display: none !important; }

.marke { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 0; }
.klein-marke { font-size: 28px; }
.leise { color: var(--grau); margin: 0; }
.klein { font-size: 14px; }
.linie { height: 6px; width: 60%; background: var(--tinte); }

/* Anmeldung */
.tuer { min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.gross { background: var(--tinte); color: var(--papier); border-radius: 12px; padding: 14px 20px; font-weight: 700; min-height: 50px; }
.link { color: var(--grau); text-decoration: underline; font-size: 15px; padding: 8px; }
.code { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }
.code input { border: 2px solid var(--tinte); border-radius: 10px; padding: 12px; text-align: center; }
.code label { font-weight: 700; }
.meldung { color: var(--rot); min-height: 1.4em; margin: 0; }

/* Kopf und Reiter */
.kopf { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
.symbol { font-size: 28px; width: 44px; height: 44px; line-height: 1; }
.reiter { display: flex; border: 2px solid var(--tinte); border-radius: 12px; overflow: hidden; margin: 12px 0; }
.reiter button { flex: 1; padding: 10px 0; font-weight: 700; min-height: 46px; }
.reiter button[aria-selected="true"] { background: var(--tinte); color: var(--papier); }
.hinweis { background: var(--hell); padding: 8px 12px; border-radius: 8px; font-size: 15px; }

/* Neuer Eintrag */
.neu { display: flex; gap: 8px; }
.neu input { flex: 1; border: 2px solid var(--tinte); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.neu input::placeholder { color: var(--grau); }
.plus { width: 52px; border-radius: 12px; background: var(--tinte); color: var(--papier); font-size: 28px; font-weight: 300; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.chips button, .chip-datum { border: 1.5px solid var(--hell); border-radius: 10px; padding: 6px 12px; font-size: 15px; color: var(--grau); position: relative; min-height: 36px; display: inline-flex; align-items: center; }
.chips .an { border-color: var(--tinte); color: var(--papier); background: var(--tinte); }
.chip-datum input { position: absolute; inset: 0; opacity: 0; width: 100%; }

/* Listen */
.balken { background: var(--tinte); color: var(--papier); font-weight: 800; font-size: 15px; padding: 4px 10px; margin: 20px 0 4px; display: flex; justify-content: space-between; }
.eintrag { display: flex; align-items: flex-start; gap: 4px; border-bottom: 1px solid var(--hell); }
.haken { width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.haken span { width: 24px; height: 24px; border: 3px solid var(--tinte); display: block; }
.eintrag.fertig .haken span { background: var(--tinte); }
.text { flex: 1; text-align: left; padding: 12px 4px 12px 0; min-height: 48px; overflow-wrap: anywhere; }
.text small { display: block; color: var(--grau); font-size: 14px; }
.eintrag.fertig .text { text-decoration: line-through; color: var(--grau); }
.leer { color: var(--grau); text-align: center; margin: 40px 0; }
.korb { width: 100%; border: 2px solid var(--tinte); border-radius: 12px; padding: 12px; font-weight: 700; margin-top: 16px; }

/* Blätter (Bearbeiten, Menü) */
.blatt { border: none; border-radius: 18px 18px 0 0; width: 100%; max-width: 560px; margin: auto auto 0; padding: 20px 16px calc(env(safe-area-inset-bottom) + 20px); background: var(--papier); color: var(--tinte); }
.blatt::backdrop { background: rgba(0, 0, 0, 0.45); }
.blatt h2 { margin: 0 0 12px; font-size: 22px; }
.blatt h3 { margin: 18px 0 6px; font-size: 16px; }
.blatt > form > input, #b-text { width: 100%; border: 2px solid var(--tinte); border-radius: 12px; padding: 12px; }
.knoepfe { display: flex; gap: 8px; margin-top: 18px; align-items: center; }
.knoepfe .gross { margin-left: auto; }
.rot { color: var(--rot); }
.zeile-knopf { display: block; width: 100%; text-align: left; padding: 14px 0; border-bottom: 1px solid var(--hell); font-weight: 600; }
.blatt > .gross { width: 100%; margin-top: 18px; }
.grosser-code { font-size: 40px; font-weight: 800; letter-spacing: 6px; text-align: center; margin: 10px 0; }
.grosser-code small { display: block; font-size: 14px; letter-spacing: 0; font-weight: 400; color: var(--grau); }
.geraete { list-style: none; margin: 0; padding: 0; }
.geraete li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hell); }
.geraete small { display: block; color: var(--grau); font-size: 13px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); max-width: 528px; margin: 0 auto; background: var(--tinte); color: var(--papier); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.toast button { color: var(--papier); font-weight: 800; text-decoration: underline; }
