:root{
  --bg:#fafaf9;--surface:#ffffff;--ink:#1c1c1a;--muted:#6f6f6a;--faint:#a3a39c;
  --border:#e6e6e2;--border-strong:#d4d4cf;--hover:#f2f2ef;
  --good:#1f7a4d;--good-bg:#e9f4ee;--due:#9a6b13;--due-bg:#faf1dd;
  --accent:#1c1c1a;--accent-ink:#ffffff;--track:#ecece8;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#161615;--surface:#1e1e1c;--ink:#ececea;--muted:#9c9c95;--faint:#6d6d66;
    --border:#2c2c29;--border-strong:#3a3a36;--hover:#262623;
    --good:#5bbd8a;--good-bg:#1c2f25;--due:#d4a24a;--due-bg:#33290f;
    --accent:#ececea;--accent-ink:#1c1c1a;--track:#2c2c29;
  }
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased}
.view{display:none}
.view.on{display:block}
#papa.on{display:flex}

/* ---------- schmale Ansicht (Musab) ---------- */
.narrow{max-width:640px;margin:0 auto;padding:28px 20px 60px}
.ntop{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.mark{width:34px;height:34px;border-radius:9px;background:var(--accent);color:var(--accent-ink);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;flex-shrink:0}
.ntop .t{font-weight:650;font-size:17px}
.date{color:var(--muted);font-size:13.5px;margin:0 0 16px}
.mseg{display:flex;gap:6px;margin-bottom:16px}
.mseg button{flex:1;border:1px solid var(--border-strong);background:var(--surface);color:var(--muted);
  padding:9px;border-radius:12px;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.mseg button.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.mseg button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.mpane{display:none}.mpane.on{display:block}
.tlCard{margin-bottom:16px;border-radius:18px}

/* yönetim-Pille (unauffällig, ganz unten) */
.yonetimSatir{margin-top:56px;text-align:center}
.yonetimPil{border:1px solid var(--border);background:none;color:var(--faint);
  padding:4px 14px;border-radius:999px;font:inherit;font-size:11.5px;cursor:pointer}
.yonetimPil:hover{color:var(--muted);background:var(--hover)}
#yonetimForm{margin-top:12px;display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap}
#yonetimForm[hidden]{display:none}
#yonetimSifre{border:1px solid var(--border-strong);border-radius:10px;background:var(--surface);
  color:var(--ink);padding:9px 12px;font:inherit;font-size:14px;text-align:center;width:150px}
#yonetimSifre:focus{outline:2px solid var(--ink);outline-offset:1px}
.pwgo{border:0;background:var(--accent);color:var(--accent-ink);border-radius:10px;
  padding:9px 16px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.pwerr{font-size:12.5px;color:var(--due);width:100%;text-align:center}

/* ---------- Aufgaben ---------- */
.task{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--border);
  border-radius:14px;padding:16px 18px;margin-bottom:10px;cursor:pointer;user-select:none}
.task:hover{background:var(--hover)}
.task .box{width:26px;height:26px;border-radius:8px;border:2px solid var(--border-strong);flex-shrink:0;
  display:flex;align-items:center;justify-content:center}
.task .box svg{width:14px;height:14px;stroke:#fff;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.task.done .box{background:var(--good);border-color:var(--good)}
.task.done .box svg{opacity:1}
.task .n{font-size:15.5px;font-weight:600}
.task.done .n{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border-strong)}
.task .d{font-size:12.5px;color:var(--muted);margin-top:1px}
.big .task{padding:22px 20px;border-radius:18px;margin-bottom:12px}
.big .task .box{width:34px;height:34px;border-radius:10px}
.big .task .box svg{width:18px;height:18px}
.big .task .n{font-size:19px}
.big .task .d{font-size:14px;margin-top:2px}
.task.sm{padding:10px 14px;border-radius:12px;margin-bottom:8px}
.task.sm:last-child{margin-bottom:0}
.task.sm .box{width:20px;height:20px;border-radius:6px;border-width:1.5px}
.task.sm .box svg{width:11px;height:11px}
.task.sm .n{font-size:13.5px}
.task.sm .d{font-size:11.5px}
.doneMsg{display:none;background:var(--good-bg);color:var(--good);border-radius:18px;
  padding:22px 20px;font-size:17px;font-weight:600;text-align:center;margin-top:18px}
.doneMsg.on{display:block}
.lrow{display:flex;align-items:baseline;gap:12px;padding:5px 0;font-size:16px}

/* ---------- Tages-Zeitleiste ---------- */
.dtl{position:relative}
.dtl .hr{position:absolute;left:48px;right:0;border-top:1px solid var(--border)}
.dtl .hlbl{position:absolute;left:0;width:40px;text-align:right;font-size:10px;color:var(--faint);
  transform:translateY(-50%);font-variant-numeric:tabular-nums}
.dtl .blk{position:absolute;left:56px;right:2px;border-radius:8px;background:var(--hover);
  border-left:3px solid var(--ink);padding:6px 10px;overflow:hidden}
.dtl .blk .bn{font-weight:650;font-size:13px;line-height:1.15}
.dtl .blk .bw{font-size:11px;color:var(--muted);margin-top:1px}
.dtl .blk .bwin{font-weight:400;font-size:11px;color:var(--muted)}
.dtlbig .blk{border-radius:10px;padding:8px 12px}
.dtlbig .blk .bwin{font-size:12px}
.dtlbig .blk .bn{font-size:16px}
.dtlbig .blk .bw{font-size:12.5px}
.tlempty{padding:26px 0;text-align:center;color:var(--faint);font-size:13.5px}

/* ---------- gemeinsame Bausteine ---------- */
h2{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--faint);
  font-weight:650;margin:26px 0 10px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:18px 20px}
.yhead{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:12px}
.yhead .t{font-size:15.5px;font-weight:650}
.yhead .m{font-size:12.5px;color:var(--muted)}
.notebox{width:100%;border:1px solid var(--border);border-radius:12px;background:var(--surface);
  padding:12px 14px;font:inherit;font-size:13.5px;color:var(--ink);resize:none;min-height:52px}
.notebox::placeholder{color:var(--faint)}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);
  font-weight:600;padding:0 10px 8px;border-bottom:1px solid var(--border)}
td{padding:11px 10px;border-bottom:1px solid var(--border);vertical-align:top}
tr:last-child td{border-bottom:0}
.tmut{color:var(--muted)}
.mini{display:inline-flex;gap:4px;vertical-align:middle}
.mini .dt{width:8px;height:8px;border-radius:50%;background:var(--track);display:inline-block}
.mini .dt.on{background:var(--good)}
footer.note{margin-top:22px;font-size:12.5px;color:var(--faint);line-height:1.6;max-width:760px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--accent);
  color:var(--accent-ink);padding:8px 18px;border-radius:999px;font-size:13px;font-weight:600;z-index:50}
.toast[hidden]{display:none}

/* ---------- Baba: Desktop-Layout ---------- */
#papa{min-height:100vh}
.side{width:216px;flex-shrink:0;border-right:1px solid var(--border);padding:20px 12px;
  display:flex;flex-direction:column;gap:2px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;padding:6px 10px 18px}
.brand .bt{font-weight:650;font-size:16px}
.brand .bs{font-size:11.5px;color:var(--muted)}
.nav{border:0;background:none;text-align:left;width:100%;display:flex;align-items:center;gap:9px;
  padding:8px 10px;border-radius:7px;color:var(--muted);font:inherit;font-size:13.5px;cursor:pointer}
.nav:hover{background:var(--hover);color:var(--ink)}
.nav.on{background:var(--hover);color:var(--ink);font-weight:600}
.nav:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.side .foot{margin-top:auto;padding:6px 4px 0;display:flex;align-items:center;gap:8px}
.side .foot .wn{font-size:12.5px;color:var(--muted);font-weight:600}
.switchbtn{border:1px solid var(--border-strong);background:var(--surface);color:var(--muted);
  padding:5px 12px;border-radius:999px;font:inherit;font-size:12px;font-weight:550;cursor:pointer}
.switchbtn:hover{background:var(--hover)}
.main{flex:1;min-width:0;padding:28px 36px 60px;max-width:1160px}
.pagehead{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.pagehead h1{font-size:20px;font-weight:650;margin:0;letter-spacing:-.01em}
.pagehead .sub{color:var(--muted);font-size:13px}
.tab{display:none}.tab.on{display:block}
.bugrid{display:grid;grid-template-columns:340px 1fr;gap:14px;align-items:start}
@media(max-width:900px){.bugrid{grid-template-columns:1fr}}

/* Wochenkalender */
.calwrap{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px 12px 12px;overflow-x:auto}
.cal{display:grid;grid-template-columns:48px repeat(7,1fr);min-width:640px}
.cal .h{font-size:11.5px;color:var(--faint);text-align:center;padding:0 0 10px;font-weight:650;text-transform:uppercase;letter-spacing:.04em}
.cal .h.today{color:var(--ink)}
.ctime{position:relative;height:512px}
.ctime div{position:absolute;right:10px;font-size:10px;color:var(--faint);transform:translateY(-50%);font-variant-numeric:tabular-nums}
.ccol{position:relative;border-left:1px solid var(--border);height:512px;
  background:repeating-linear-gradient(to bottom,var(--border) 0,var(--border) 1px,transparent 1px,transparent 32px)}
.ccol.today{background-color:var(--hover)}
.cblk{position:absolute;left:4px;right:4px;border-radius:7px;background:var(--hover);
  border-left:3px solid var(--ink);padding:5px 8px;overflow:hidden}
.ccol.today .cblk{background:var(--bg)}
.cblk .bn{font-size:12px;font-weight:650;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cblk .bw{font-size:10px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.ccol .cblk{cursor:pointer}
.ccol .cblk:hover{background:var(--track)}
.cols2{display:grid;grid-template-columns:3fr 2fr;gap:14px;align-items:start}
@media(max-width:900px){.cols2{grid-template-columns:1fr}}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin-bottom:10px}
.kpi{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px 16px}
.kpi .n{font-size:22px;font-weight:650;font-variant-numeric:tabular-nums}
.kpi .l{font-size:12px;color:var(--muted)}
/* Wort-Blasen */
.bubblewrap{position:relative;height:360px;overflow:hidden}
.bub{position:absolute;border-radius:50%;display:flex;align-items:center;justify-content:center;
  text-align:center;line-height:1.05;font-weight:600;transform:translate(-50%,-50%);
  padding:2px;overflow:hidden}
.bub.s0{background:var(--surface);border:1.5px solid var(--border-strong);color:var(--muted)}
.bub.s1{background:var(--due-bg);border:1.5px solid var(--due);color:var(--due)}
.bub.s2{background:var(--good-bg);border:1.5px solid var(--good);color:var(--good)}
.legend{display:flex;gap:18px;margin-top:10px;font-size:12px;color:var(--muted);justify-content:center;flex-wrap:wrap}
.legend span{display:flex;align-items:center;gap:6px}
.lc{width:12px;height:12px;border-radius:50%;flex-shrink:0}
/* Ne-Demek-Aktivität (14 Tage) */
.akt{display:flex;gap:5px}
.akt .ag{flex:1;text-align:center;min-width:0}
.akt .ag .n{font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--good)}
.akt .ag .n.bos{color:var(--border-strong);font-weight:400}
.akt .ag .l{font-size:9.5px;color:var(--faint);margin-top:2px;white-space:nowrap}
.akt .ag.bugun .l{color:var(--ink);font-weight:650}
.zrow{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:5px 0;font-size:13.5px}
.zrow .zi{font-size:11.5px;color:var(--muted);white-space:nowrap}
/* Kitaplık */
.shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;max-width:900px}
.book{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:12px;position:relative;cursor:pointer}
.book:hover{background:var(--hover)}
.cover{aspect-ratio:3/4;border-radius:8px;margin-bottom:10px;padding:14px 12px;position:relative;
  display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;color:#fff;
  background:linear-gradient(135deg,#4a4a4a,#2b2b2b)}
.cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cover .ct{font-size:13px;font-weight:650;line-height:1.3;position:relative}
.cover .cs{font-size:10px;opacity:.75;margin-top:4px;letter-spacing:.05em;text-transform:uppercase;position:relative}
.book .bt{font-size:13px;font-weight:600;line-height:1.35}
.book .bm{font-size:11.5px;color:var(--muted);margin-top:3px}
.book .bl{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.kbtn{font-size:11px;padding:3px 10px;border-radius:999px;border:1px solid var(--border-strong);
  background:none;color:var(--muted);cursor:pointer;font-family:inherit;text-decoration:none;display:inline-block}
.kbtn:hover{background:var(--hover);color:var(--ink)}
/* Knöpfe + Dialoge */
.btn{border:1px solid var(--border-strong);background:var(--surface);color:var(--ink);
  padding:8px 14px;border-radius:10px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.btn:hover{background:var(--hover)}
.btn.birincil{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.tehlike{color:#b3382c;border-color:#c58179;background:none}
.perde{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:40;padding:20px}
.perde[hidden]{display:none}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:20px;width:100%;max-width:380px}
.modal h3{margin:0 0 14px;font-size:15.5px}
.alan{margin-bottom:10px}
.alan label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.alan input,.alan select{width:100%;border:1px solid var(--border-strong);border-radius:10px;
  background:var(--surface);color:var(--ink);padding:9px 12px;font:inherit;font-size:14px}
.alan input:focus,.alan select:focus{outline:2px solid var(--ink);outline-offset:1px}
.mrow{display:flex;gap:8px;margin-top:14px}

/* Baba auf schmalem Bildschirm (Notlösung) */
@media(max-width:760px){
  #papa.on{flex-direction:column}
  .side{width:100%;height:auto;position:static;flex-direction:row;align-items:center;
    overflow-x:auto;border-right:0;border-bottom:1px solid var(--border);padding:10px 12px}
  .brand{padding:0 10px 0 0}
  .side .foot{margin-top:0;margin-left:auto}
  .main{padding:20px 16px 60px}
}
