/* Rete — eine Spalte auf dem Handy, Netz links und Angaben rechts ab 900 px */
:root {
  --bg: #f4f6f8; --flaeche: #ffffff; --fg: #1b2230; --muted: #5e6878; --line: #dde2e9; --chip: #eef1f5;
  --it: #0e7a6d;        /* italienische Wörter */
  --de: #5b4bb3;        /* deutsche Wörter */
  --zeit: #b06a12;      /* Zeiten */
  --gram: #b8324f;      /* Grammatik */
  --bez: #2f7fb8;       /* verwandte Wörter */
  --mark: #fff1b8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d; --flaeche: #1a2029; --fg: #e6eaf0; --muted: #98a2b3; --line: #2b3340; --chip: #232b36;
    --it: #4fd1bd; --de: #a99cf2; --zeit: #f0a54a; --gram: #f27d97; --bez: #6cb6ec; --mark: #5a4a10;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--it); outline-offset: 2px; }

.marke { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; text-decoration: none; letter-spacing: .01em; }

/* Anmeldung */
.anmeldung { max-width: 360px; margin: 18vh auto 0; padding: 0 16px; display: grid; gap: 10px; }
.anmeldung .marke { font-size: 2.6rem; margin: 0; }
.anmeldung p { margin: 0 0 12px; color: var(--muted); }
.anmeldung input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--flaeche); }
.anmeldung button { padding: 12px; border: 0; border-radius: 10px; background: var(--it); color: #fff; font-weight: 600; cursor: pointer; }
.fehler { color: var(--gram); }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.suche { flex: 1; min-width: 0; }
.suche input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--flaeche); }
.sprache { border: 1px solid var(--line); background: var(--flaeche); border-radius: 999px; padding: 8px 12px; cursor: pointer; font-size: .85rem; font-weight: 600; }

.weg { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; }
.weg a { flex: none; font-size: .8rem; color: var(--muted); text-decoration: none; padding: 2px 10px; border-radius: 999px; background: var(--chip); white-space: nowrap; }
.weg a[aria-current] { color: var(--fg); font-weight: 600; }

/* Bühne */
.buehne { display: grid; grid-template-columns: 1fr; }
.netz-rahmen { position: relative; height: 44vh; min-height: 280px; border-bottom: 1px solid var(--line); }
#netz { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; }
.legende { position: absolute; left: 16px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .72rem; color: var(--muted); pointer-events: none; }
.legende span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--c); }
.inhalt { padding: 20px 16px 64px; min-width: 0; }
@media (min-width: 900px) {
  .buehne { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); height: calc(100vh - 100px); }
  .netz-rahmen { height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
  .inhalt { overflow-y: auto; padding: 24px 28px 64px; }
}

/* Inhalt */
.titel { font-family: var(--serif); font-size: 2.2rem; line-height: 1.15; margin: 0; text-wrap: balance; }
.titel.it { color: var(--it); }
.titel.de { color: var(--de); }
.titel.zeit { color: var(--zeit); }
.titel.grammatik { color: var(--gram); font-size: 1.8rem; }
.zusatz { font-family: var(--serif); font-size: 1.15rem; color: var(--muted); margin-left: .4em; }
.unter { color: var(--muted); margin: 6px 0 0; }
.abschnitt { margin-top: 26px; }
.abschnitt > h2 { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.pillen { display: flex; flex-wrap: wrap; gap: 6px; }
.pille { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; text-decoration: none; padding: 5px 12px; border-radius: 12px;
  background: var(--chip); border: 1px solid transparent; line-height: 1.3; max-width: 100%; }
.pille:hover { border-color: var(--c, var(--line)); }
.pille b { font-weight: 600; color: var(--c, var(--fg)); }
.pille small { color: var(--muted); font-size: .75rem; }
.pille.wort { --c: var(--it); } .pille.de { --c: var(--de); } .pille.zeit { --c: var(--zeit); } .pille.grammatik { --c: var(--gram); } .pille.beziehung { --c: var(--bez); }

table { border-collapse: collapse; font-size: .95rem; }
.tafel { overflow-x: auto; }
td, th { padding: 6px 10px 6px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); font-size: .8rem; }
.it-text { font-family: var(--serif); font-size: 1.05em; }

.konj { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.konj-zeit { background: var(--flaeche); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.konj-zeit > a { font-weight: 600; color: var(--zeit); text-decoration: none; }
.konj-zeit > small { color: var(--muted); margin-left: 6px; font-size: .75rem; }
.konj-zeit dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 6px 0 0; font-size: .92rem; }
.konj-zeit dt { color: var(--muted); font-size: .8rem; padding-top: 2px; }
.konj-zeit dd { margin: 0; font-family: var(--serif); }
.quelle { color: var(--muted); font-size: .75rem; margin-top: 8px; }

.saetze { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.saetze li { border-left: 2px solid var(--line); padding-left: 12px; }
.saetze .it-text { display: block; }
.saetze .de-text { color: var(--muted); font-size: .92rem; }
.w { cursor: pointer; border-radius: 3px; }
.w:hover { background: var(--chip); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.hinweis { color: var(--muted); font-size: .9rem; }

.bloecke { display: grid; gap: 12px; max-width: 68ch; }
.bloecke h3 { font-family: var(--serif); font-size: 1.25rem; margin: 10px 0 0; }
.bloecke h3 small { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-left: 8px; font-weight: 400; }
.bloecke p { margin: 0; }
.bsp { background: var(--flaeche); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.bsp .de-text { color: var(--muted); font-size: .92rem; display: block; }
.tipp { border-left: 3px solid var(--zeit); padding: 4px 0 4px 12px; color: var(--fg); }
.bild { overflow-x: auto; } .bild svg { max-width: 100%; height: auto; }
.bloecke caption { text-align: left; font-weight: 600; padding-bottom: 6px; }

.treffer { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.treffer a { display: block; padding: 10px 12px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--line); text-decoration: none; }
.treffer b { color: var(--c); } .treffer small { color: var(--muted); display: block; }
.leer { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
