:root { --bg: #FBF6E3; --papier: #FFFDF6; --tinte: #1F2933; --leise: #6B7585; --linie: #E3DAC0; --akzent: #2f5f8f; --gut: #1d7a52; --warn: #b23a1c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--tinte); font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif; }
a { color: var(--akzent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.kopf { background: var(--papier); border-bottom: 1px solid var(--linie); }
.kopf .wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; min-height: 3.2rem; }
.kopf .marke { font: 500 1.05rem "Fraunces", "Iowan Old Style", Georgia, serif; color: var(--tinte); text-decoration: none; }
.kopf .marke span { color: var(--leise); font-size: .85rem; margin-left: .3rem; }
.kopf nav { display: flex; gap: 1.2rem; margin-left: auto; flex-wrap: wrap; }
.kopf nav a { text-decoration: none; color: var(--leise); padding: .9rem 0; border-bottom: 2px solid transparent; }
.kopf nav a.aktiv, .kopf nav a:hover { color: var(--akzent); border-bottom-color: var(--akzent); }
main.wrap { padding: 1.6rem 1rem 3rem; }
h1 { font: 500 1.6rem/1.2 "Fraunces", "Iowan Old Style", Georgia, serif; margin: 0 0 .3rem; }
h2 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); margin: 1.8rem 0 .6rem; }
.leise { color: var(--leise); font-size: .9rem; }
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: 12px; padding: .9rem 1rem; }
.karte .zahl { font: 500 1.9rem/1.1 "Fraunces", Georgia, serif; }
.karte .was { color: var(--leise); font-size: .85rem; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--papier); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-weight: 600; color: var(--leise); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pfad { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; }
.diagramm { background: var(--papier); border: 1px solid var(--linie); border-radius: 12px; padding: .8rem 1rem .4rem; }
.diagramm svg { width: 100%; height: auto; display: block; }
.auswahl a { display: inline-block; margin-right: .6rem; padding: .2rem .7rem; border: 1px solid var(--linie); border-radius: 99px; text-decoration: none; font-size: .85rem; color: var(--leise); background: var(--papier); }
.auswahl a.aktiv { color: var(--akzent); border-color: var(--akzent); }
form.feld { background: var(--papier); border: 1px solid var(--linie); border-radius: 12px; padding: 1.2rem 1.3rem; max-width: 28rem; }
label { display: block; font-size: .85rem; font-weight: 600; margin: .8rem 0 .3rem; }
input[type=password], input[type=text] { width: 100%; padding: .55rem .7rem; font: inherit; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
button, .knopf { font: inherit; font-weight: 600; color: #fff; background: var(--akzent); border: 0; border-radius: 8px; padding: .55rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-block; }
button.leise, .knopf.leise { color: var(--tinte); background: var(--papier); border: 1px solid var(--linie); font-weight: 500; }
.meldung { margin: .8rem 0; padding: .6rem .9rem; border-radius: 8px; background: #E3F1EE; color: var(--gut); }
.meldung.fehler { background: #FBE9E3; color: var(--warn); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Anmeldung */
.tor { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.tor form { width: 100%; max-width: 22rem; }

/* Editor */
.werkzeuge { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; background: var(--papier); border: 1px solid var(--linie); border-radius: 12px; padding: .5rem .6rem; margin: 0 0 1rem; }
.werkzeuge button { color: var(--tinte); background: #fff; border: 1px solid var(--linie); font-weight: 500; padding: .35rem .6rem; font-size: .85rem; }
.werkzeuge button:hover { border-color: var(--akzent); color: var(--akzent); }
.werkzeuge .trenn { width: 1px; height: 1.4rem; background: var(--linie); margin: 0 .3rem; }
.werkzeuge .speichern { color: #fff; background: var(--akzent); border-color: var(--akzent); margin-left: auto; }
.werkzeuge .stand { font-size: .82rem; color: var(--leise); margin-left: .4rem; }
.blatt { max-width: 21cm; margin: 0 auto 2rem; background-color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 30px rgba(0,0,0,.12); padding: 2.2cm 2.4cm 2.4cm; min-height: 29.7cm; outline: none; }
.blatt:focus-within { box-shadow: 0 0 0 3px rgba(47, 95, 143, .25), 0 12px 30px rgba(0,0,0,.12); }
.versionen li { margin: .2rem 0; }

/* Eingabefeld mit Auge (PIN/Kennwort anzeigen) */
span.feld { flex: 1; min-width: 0; position: relative; display: flex; }
span.feld input { padding-right: 2.6rem; }
.auge {
  position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  width: 2.1rem; height: 2.1rem; padding: 0; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--leise); cursor: pointer;
}
.auge:hover { color: var(--akzent); background: var(--bg); }
