/* Matedu Web – Erscheinungsbild wie Version 9 der Mac-App: heller Verlauf (Eisblau → Creme), weiße Karten mit
   großen Rundungen, Dunkelblau als Hauptfarbe, Gold für „ausgewählt“. Nur heller Modus. */
:root { --verlauf:linear-gradient(180deg, #ecf3f8 0%, #f1f5f9 28%, #f5f6f8 60%, #f7f6f3 84%, #faf7f0 100%);
        --bg:#ffffff; --text:#1b2834; --muted:#6b7886; --line:#e1e7ed; --field:#f2f5f8; --hover:#edf2f6;
        --accent:#173a52; --on-accent:#ffffff; --gold:#94711a; --gold-bg:#fcf3d6; --gold-line:#f0da92; --err:#c4362c; --ok:#2f8a57;
        --schatten:0 1px 2px rgba(23,58,82,.05), 0 10px 30px rgba(23,58,82,.07); --rund:22px; color-scheme:light; }
* { box-sizing:border-box; margin:0; }
html, body { min-height:100%; }
body { background:var(--verlauf); background-attachment:fixed; color:var(--text); font:14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button { font:inherit; color:inherit; background:none; border:0; cursor:pointer; padding:0; }
input, select { font:inherit; color:inherit; background:var(--bg); border:0; border-radius:12px; padding:8px 12px; outline:none; box-shadow:inset 0 0 0 1px var(--line); }
input:focus, select:focus { box-shadow:inset 0 0 0 1px #b9c7d3, 0 0 0 3px rgba(23,58,82,.08); }
[hidden] { display:none !important; }
.muted { color:var(--muted); } .err { color:var(--err); } .ok { color:var(--ok); }

/* Schriftzug „Matedu.“ mit goldenem Punkt, darunter „by Nachhilfe Hoppe“ */
.marke { display:flex; flex-direction:column; line-height:1.1; padding:2px 10px 26px; }
.marke .name { font-size:25px; font-weight:800; letter-spacing:-.045em; line-height:1;
  background:linear-gradient(135deg, #0f2c40 0%, #1f4e6b 60%, #2f6a8a 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.marke .name::after { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:#d4a72c; margin-left:2px; -webkit-text-fill-color:initial; }
.marke .by { display:flex; align-items:center; gap:4px; margin-top:6px; font-size:10px; font-weight:500; color:var(--muted); }
.marke .hoppe { display:inline-block; width:66px; height:24px; background:var(--muted);
  -webkit-mask:url(nachhilfe-hoppe.png) left center / contain no-repeat; mask:url(nachhilfe-hoppe.png) left center / contain no-repeat; }

/* Knöpfe */
.los { height:40px; padding:0 20px; background:var(--accent); color:var(--on-accent); border-radius:16px; font-weight:600; box-shadow:0 4px 14px rgba(23,58,82,.18); }
.los:hover { filter:brightness(1.08); } .los:disabled { box-shadow:none; opacity:.45; cursor:default; }
.knopf { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 14px; font-size:12px; border:1px solid var(--line); border-radius:999px; background:var(--bg); color:var(--text); text-decoration:none; }
.knopf:hover { border-color:#c9d3dc; } .knopf.an { background:var(--gold-bg); border-color:var(--gold-line); color:var(--gold); font-weight:600; }
.knopf:disabled { opacity:.5; cursor:default; }
.karte { background:var(--bg); border:1px solid var(--line); border-radius:var(--rund); box-shadow:var(--schatten); }

/* Anmelden */
.anmelden { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.anmelden .karte { width:100%; max-width:380px; padding:32px 28px 28px; }
.anmelden .marke { padding:0 0 24px; align-items:center; }
.anmelden label { display:block; font-size:12px; color:var(--muted); margin:12px 0 4px; }
.anmelden input { width:100%; height:42px; }
.anmelden .los { width:100%; margin-top:20px; }
.anmelden .meldung { min-height:20px; margin-top:12px; font-size:13px; text-align:center; }

/* Grundaufbau */
.app { display:flex; min-height:100vh; }
aside { width:200px; flex-shrink:0; padding:24px 10px; display:flex; flex-direction:column; gap:2px; position:sticky; top:0; height:100vh; }
aside nav { display:flex; flex-direction:column; gap:2px; }
aside nav button { display:flex; align-items:center; gap:10px; text-align:left; padding:9px 12px; border-radius:14px; color:var(--muted); }
aside nav button svg { width:16px; height:16px; opacity:.8; flex-shrink:0; }
aside nav button:hover:not(.an):not(:disabled) { background:rgba(255,255,255,.55); color:var(--text); }
aside nav button.an { background:var(--bg); color:var(--accent); font-weight:600; box-shadow:var(--schatten); }
aside nav button:disabled { cursor:default; opacity:.55; }
aside nav .bald { margin-left:auto; font-size:10px; border:1px solid var(--line); border-radius:999px; padding:0 6px; }
aside .unten { margin-top:auto; padding:0 12px; font-size:12px; color:var(--muted); display:flex; flex-direction:column; gap:6px; }
aside .unten button { text-align:left; color:var(--muted); } aside .unten button:hover { color:var(--text); }
main { flex:1; min-width:0; padding:24px 24px 40px; }
.titel { font-size:24px; font-weight:700; letter-spacing:-.03em; margin-bottom:14px; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.titel .klein { font-size:12px; font-weight:400; letter-spacing:0; color:var(--muted); }

/* Aufgaben: Werkzeugleiste, Liste, Vorschau */
.werkzeug { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:12px; }
.suchfeld { display:inline-flex; align-items:center; height:32px; background:var(--bg); border:1px solid var(--line); border-radius:999px; padding:0 6px 0 12px; }
.suchfeld:focus-within { border-color:#b9c7d3; }
.suchfeld input { box-shadow:none !important; background:none; padding:0 4px; width:170px; font-size:13px; }
.suchfeld svg { width:13px; height:13px; color:var(--muted); }
.pille { position:relative; display:inline-flex; align-items:center; gap:5px; height:32px; font-size:12px; color:var(--text);
         background:var(--bg); border:1px solid var(--line); border-radius:999px; padding:0 12px; white-space:nowrap; }
.pille:hover { border-color:#c9d3dc; }
.pille.aktiv { background:var(--gold-bg); border-color:var(--gold-line); color:var(--gold); font-weight:600; }
.pille > span { overflow:hidden; text-overflow:ellipsis; max-width:170px; }
.pille select { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.pille .weg { position:relative; z-index:2; opacity:.8; } .pille .weg:hover { opacity:1; }
.pfeil { width:9px; height:9px; opacity:.6; }
.zwei { display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:20px; align-items:start; }
.liste { padding:6px; }
.reihe { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; border-radius:14px; text-align:left; }
.reihe + .reihe { margin-top:1px; }
.reihe:hover { background:var(--hover); }
.reihe.an { background:#e8f0f6; }
.reihe .symbol { width:30px; height:30px; border-radius:10px; background:var(--field); color:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.reihe .symbol svg { width:15px; height:15px; }
.reihe .haupt { flex:1; min-width:0; }
.reihe .t1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reihe .t2 { font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reihe .code { font-variant-numeric:tabular-nums; font-weight:600; margin-right:6px; }
.marker { font-size:10px; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:0 6px; margin-left:4px; white-space:nowrap; }
.gruppe { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:14px 12px 6px; }
.leer { text-align:center; color:var(--muted); padding:48px 16px; line-height:1.6; }
.detail { position:sticky; top:24px; padding:16px; max-height:calc(100vh - 48px); overflow:auto; }
.detail .bild { background:#fff; border-radius:8px; box-shadow:0 1px 4px rgba(0,0,0,.16); min-height:200px; display:flex; align-items:center; justify-content:center; color:#999; font-size:12px; cursor:zoom-in; overflow:hidden; }
.detail .bild:has(img) { display:block; min-height:0; }
.detail .bild img { width:100%; display:block; }
.detail h3 { font-size:16px; font-weight:600; margin:16px 0 4px; }
.detail .daten { display:grid; grid-template-columns:96px 1fr; gap:4px 10px; font-size:13px; margin-top:10px; }
.detail .daten dt { color:var(--muted); font-size:12px; padding-top:1px; }
.detail .knoepfe { display:flex; flex-wrap:wrap; gap:6px; margin-top:16px; }
.detail .zu { display:none; }

/* Arbeitsblatt zusammenstellen */
aside nav .zahl { margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--accent); color:var(--on-accent);
                  font-size:10px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; }
aside nav button.an .zahl { background:var(--gold); }
.haken { width:20px; height:20px; border-radius:6px; border:1.5px solid #b7c3cf; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; margin:0 5px; }
.reihe.gewaehlt .haken { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.hinweis { font-size:13px; color:var(--muted); padding:4px 0 8px; line-height:1.5; }
.auswahl .posten { padding:10px 0; border-bottom:1px solid var(--line); }
.auswahl .zeile2 { display:flex; align-items:center; gap:6px; font-size:13px; }
.auswahl .zeile2 .t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.auswahl .zeile2 button { color:var(--muted); width:22px; height:22px; border-radius:6px; } .auswahl .zeile2 button:hover { color:var(--text); background:var(--hover); }
.blattbild { margin-top:6px; background:#fff; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04); overflow:hidden; }
.blattbild img { width:100%; display:block; }
.blattbild span { display:block; padding:16px 8px; text-align:center; font-size:11px; color:#999; }
.blattfelder { margin-top:14px; }
.blattfelder .feld { display:grid; grid-template-columns:84px 1fr; gap:10px; align-items:center; margin:6px 0; }
.blattfelder label { font-size:12px; color:var(--muted); }
.blattfelder input { width:100%; height:36px; font-size:13px; }
.detail .los { width:100%; margin-top:14px; }
.detail .meldung { min-height:18px; margin-top:8px; font-size:13px; text-align:center; }
.detail .klein { display:block; margin:6px auto 0; font-size:12px; color:var(--muted); } .detail .klein:hover { color:var(--text); }

/* Lehrbücher: Regal mit Umschlägen im Buch-Look (wie Version 9) */
:root { --canvas:#eef2f6; --weich:cubic-bezier(.2,.8,.2,1); }
.regal { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:38px 30px; padding:32px 34px 36px; }
.buch { display:flex; flex-direction:column; gap:12px; text-align:left; min-width:0; }
.umschlag { position:relative; width:100%; aspect-ratio:1 / 1.38; border-radius:3px 7px 7px 3px; background:var(--field);
            box-shadow:2px 2px 0 0 #fbfaf6, 3px 3px 0 0 rgba(0,0,0,.09), 5px 5px 0 0 #f4f2ec, 6px 6px 0 0 rgba(0,0,0,.09), 0 16px 26px -10px rgba(0,0,0,.38);
            transition:transform .28s var(--weich), box-shadow .28s var(--weich); }
.umschlag img { display:block; width:100%; height:100%; object-fit:cover; object-position:center top; border-radius:inherit; }
.umschlag::before { content:''; position:absolute; left:0; top:0; bottom:0; width:13px; border-radius:3px 0 0 3px; pointer-events:none;
                    background:linear-gradient(90deg, rgba(0,0,0,.30), rgba(255,255,255,.28) 2.5px, rgba(0,0,0,.20) 5px, rgba(0,0,0,.06) 8px, rgba(0,0,0,0) 13px); }
.umschlag::after { content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none; background:linear-gradient(115deg, rgba(255,255,255,.20), rgba(255,255,255,0) 38%); }
.umschlag .platzhalter { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--muted); }
.buch:hover .umschlag { transform:translateY(-5px) rotate(-.4deg);
  box-shadow:2px 2px 0 0 #fbfaf6, 3px 3px 0 0 rgba(0,0,0,.09), 5px 5px 0 0 #f4f2ec, 6px 6px 0 0 rgba(0,0,0,.09), 0 24px 34px -12px rgba(0,0,0,.42); }
.buch .btitel { font-size:13px; font-weight:500; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.buch .bmeta { font-size:12px; color:var(--muted); margin-top:-8px; }

/* Leser */
#leser { position:fixed; inset:0; z-index:50; background:var(--verlauf); display:flex; flex-direction:column; }
#leser[hidden] { display:none; }
.lkopf { display:flex; align-items:center; gap:12px; padding:14px 18px 8px; flex-shrink:0; }
.lkopf .ltitel { flex:1; min-width:0; font-size:14px; font-weight:600; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lkopf .lzu { min-width:120px; display:flex; }
.lnackt { padding:4px; color:var(--muted); display:inline-flex; align-items:center; justify-content:center; font-size:18px; line-height:1; }
.lnackt:hover { color:var(--text); }
.lnackt svg { width:18px; height:18px; }
.lkopf #lZu svg { width:20px; height:20px; }
.lkopf .lzoom { min-width:120px; display:flex; justify-content:flex-end; align-items:center; gap:4px; font-size:12px; color:var(--muted); }
.lkopf .lzoom span { min-width:42px; text-align:center; font-variant-numeric:tabular-nums; }
.lrahmen { flex:1; min-height:0; position:relative; display:flex; }
.lbuehne { flex:1; min-width:0; overflow:auto; display:flex; }
.lbuehne.gross { cursor:grab; }
.lbuch { margin:auto; position:relative; display:flex; width:calc(var(--w) * 2); height:var(--h); flex-shrink:0; perspective:2600px; }
.lbuch.einzeln { width:var(--w); }
.lbuch.einzeln .links { display:none; }
.lbuch.einzeln .lseite.rechts { border-radius:4px; box-shadow:0 10px 28px -10px rgba(0,0,0,.35); }
.lseite { width:var(--w); height:100%; position:relative; background:#fff; overflow:hidden; cursor:pointer; }
.lseite.leer { background:none; cursor:default; box-shadow:none !important; }
.lseite img, .lblatt img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; user-select:none; -webkit-user-drag:none; }
.lseite.links { border-radius:4px 0 0 4px; box-shadow:-6px 10px 28px -10px rgba(0,0,0,.35); }
.lseite.rechts { border-radius:0 4px 4px 0; box-shadow:6px 10px 28px -10px rgba(0,0,0,.35); }
.lseite.cover { border-radius:3px 6px 6px 3px; }
.lbuch::before, .lbuch::after { content:''; position:absolute; top:0; bottom:0; width:42px; pointer-events:none; z-index:4; opacity:0; }
.lbuch::before { left:calc(var(--w) - 42px); background:linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.10) 70%, rgba(0,0,0,.22)); }
.lbuch::after { left:var(--w); background:linear-gradient(270deg, rgba(0,0,0,0), rgba(0,0,0,.08) 70%, rgba(0,0,0,.18)); }
.lbuch.ruecken-l::before, .lbuch.ruecken-r::after { opacity:1; }
.lbuch.einzeln::before, .lbuch.einzeln::after { display:none; }
.lblatt { position:absolute; top:0; width:var(--w); height:100%; transform-style:preserve-3d; z-index:3; pointer-events:none; will-change:transform; }
.lblatt.vor { left:var(--w); transform-origin:left center; }
.lblatt.zurueck { left:0; transform-origin:right center; }
.lblatt > div { position:absolute; inset:0; background:#fff; backface-visibility:hidden; -webkit-backface-visibility:hidden; overflow:hidden; }
.lblatt > div.leer { background:none; }
.lblatt .hinten { transform:rotateY(180deg); }
.lpfeil { position:absolute; top:50%; transform:translateY(-50%); width:44px; height:64px; border-radius:12px; font-size:28px; color:var(--muted); z-index:4; }
.lpfeil:hover { color:var(--text); background:rgba(128,128,128,.12); }
.lpfeil:disabled { opacity:0; pointer-events:none; }
.lpfeil.zurueck { left:10px; } .lpfeil.vor { right:10px; }
.lfuss { position:relative; display:flex; align-items:center; gap:16px; padding:8px 24px 16px; flex-shrink:0; font-size:12px; color:var(--muted); }
.lfuss #lSeiten { min-width:150px; font-variant-numeric:tabular-nums; }
.lgehebox { display:flex; align-items:center; gap:2px; }
.lfuss .lgehe { width:0; padding:0; opacity:0; height:26px; border-radius:999px; font-size:12px; transition:width .2s var(--weich), opacity .2s, padding .2s; }
.lgehebox.offen .lgehe { width:64px; padding:0 10px; opacity:1; }
.lfuss input[type=range] { flex:1; -webkit-appearance:none; appearance:none; height:4px; border-radius:2px; padding:0; box-shadow:none; cursor:pointer;
  background:linear-gradient(to right, var(--accent) calc(8px + (100% - 16px) * var(--p, 0)), var(--line) calc(8px + (100% - 16px) * var(--p, 0))); }
.lfuss input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.25); }
.lfuss input[type=range]::-moz-range-thumb { width:16px; height:16px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.25); }

/* Großansicht der Vorschau */
#gross { position:fixed; inset:0; z-index:30; background:rgba(16,32,44,.55); overflow:auto; padding:32px 16px; cursor:zoom-out; }
#gross img { display:block; max-width:900px; width:100%; margin:0 auto; background:#fff; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.3); }

/* Konten */
.tabelle { width:100%; border-collapse:collapse; font-size:13px; }
.tabelle th { text-align:left; font-weight:500; font-size:12px; color:var(--muted); padding:10px 12px; border-bottom:1px solid var(--line); }
.tabelle td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.tabelle tr:last-child td { border-bottom:0; }
.tabelle tr.gesperrt td { color:var(--muted); }
.formular { padding:20px; max-width:560px; }
.formular h3 { font-size:15px; margin-bottom:12px; }
.formular .feld { display:grid; grid-template-columns:130px 1fr; gap:10px; align-items:center; margin:8px 0; }
.formular .feld label { font-size:12px; color:var(--muted); }
.formular .meldung { min-height:20px; margin-top:10px; font-size:13px; }
.abstand { margin-top:18px; }

@media (max-width: 900px) {
  .app { flex-direction:column; }
  aside { width:auto; height:auto; position:static; flex-direction:row; align-items:center; padding:14px 16px 4px; gap:8px; flex-wrap:wrap; }
  aside .marke { padding:0 8px 0 0; }
  aside nav { flex-direction:row; flex-wrap:wrap; }
  aside nav .bald { display:none; }
  aside .unten { margin:0 0 0 auto; flex-direction:row; gap:12px; }
  aside .unten .wer { display:none; }
  main { padding:12px 16px 32px; }
  .zwei { grid-template-columns:minmax(0,1fr); }
  .detail { position:fixed; inset:auto 0 0 0; top:10vh; max-height:none; border-radius:var(--rund) var(--rund) 0 0; z-index:20; }
  .detail .zu { display:inline-flex; }
  .blattmodus .detail { position:static; max-height:none; border-radius:var(--rund); }   /* Handy: Blatt unter der Liste */
  .blattmodus .detail .zu { display:none; }
  .suchfeld input { width:120px; }
  .formular .feld { grid-template-columns:1fr; gap:4px; }
  .tabelle .weg-mobil { display:none; }
  .regal { grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:28px 20px; padding:22px 18px 28px; }
  .lkopf { padding:10px 10px 4px; } .lkopf .lzu, .lkopf .lzoom { min-width:0; }
  .lkopf .lzoom span { display:none; }
  .lpfeil { display:none; }
  .lfuss { padding:6px 16px 14px; gap:10px; } .lfuss #lSeiten { min-width:0; }
}
