:root{
  --green:#5f8f68;
  --dark:#234034;
  --light:#f4fbf5;
  --cream:#fffdf3;
  --yellow:#fff3a6;
  --blue:#e8f3ff;
  --red:#b34a4a;
  --shadow:0 14px 35px rgba(31,57,44,.14);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial, "Comic Sans MS", sans-serif;
  background:linear-gradient(135deg,#eef8ef,#fff9df);
  color:#20382d;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 26px;
  background:white;
  box-shadow:var(--shadow);
  position:sticky;
  top:0;
  z-index:10;
}
.brand{display:flex;align-items:center;gap:14px}
.logo{
  width:58px;height:58px;border-radius:18px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#79b783,#f7d86c);
  color:white;font-weight:900;font-size:20px;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
}
h1{margin:0;color:var(--dark);font-size:30px}
header p{margin:4px 0 0;color:#557164}
.layout{
  display:grid;
  grid-template-columns:360px minmax(430px,1fr) 310px;
  gap:18px;
  padding:22px;
}
.card{
  background:rgba(255,255,255,.9);
  border:1px solid rgba(95,143,104,.22);
  border-radius:24px;
  padding:18px;
  box-shadow:var(--shadow);
}
h2{
  color:var(--green);
  margin:12px 0 8px;
  font-size:20px;
}
button, input, select, textarea{
  font:inherit;
}
button{
  border:0;
  padding:11px 14px;
  border-radius:14px;
  background:#e7f2e9;
  color:var(--dark);
  cursor:pointer;
  font-weight:700;
  box-shadow:0 5px 12px rgba(0,0,0,.08);
}
button:hover{filter:brightness(.97);transform:translateY(-1px)}
.primary{
  background:linear-gradient(135deg,#5f9e6c,#8ccf8c);
  color:white;
}
.danger{background:#ffe5e5;color:#8d2929}
.ghost{background:#f5f5f5}
input[type=file], select, textarea{
  width:100%;
  border:2px solid #d7eadb;
  border-radius:15px;
  background:white;
  padding:10px;
  margin:6px 0 12px;
}
input[type=range]{width:100%;accent-color:var(--green)}
textarea{
  min-height:110px;
  resize:vertical;
  line-height:1.55;
}
#pageText{min-height:170px;background:#fbfffb}
.hint{font-size:13px;color:#617467;line-height:1.45}
.status{
  padding:11px;
  border-left:6px solid var(--green);
  background:#eef8f1;
  border-radius:14px;
  margin:10px 0;
  line-height:1.45;
}
.buttonGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:8px 0 12px;
}
.readingBox{
  background:#f5fbf6;
  border:1px solid #d9ecdd;
  border-radius:18px;
  padding:12px;
  margin-top:10px;
}
progress{width:100%;height:18px;accent-color:var(--green)}
#currentChunk{
  margin-top:9px;
  background:#fff9cc;
  border-radius:12px;
  padding:9px;
  line-height:1.45;
  max-height:120px;
  overflow:auto;
  font-size:14px;
}
.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.pdfWrap{
  position:relative;
  display:inline-block;
  max-width:100%;
  overflow:auto;
  border-radius:18px;
  background:#f8f8f8;
  border:1px solid #e0e0e0;
}
#pdfCanvas{display:block;max-width:100%}
#markLayer{
  position:absolute;
  left:0;top:0;
  pointer-events:auto;
}
.highlight{
  position:absolute;
  background:rgba(255,229,76,.48);
  border:2px solid rgba(244,186,0,.7);
  border-radius:6px;
  pointer-events:none;
}
.selection{
  position:absolute;
  background:rgba(120,190,130,.20);
  border:2px dashed #4f915e;
  border-radius:6px;
  pointer-events:none;
}
.noteItem{
  padding:10px;
  margin:8px 0;
  border-radius:15px;
  background:#f3faf4;
  border-left:5px solid var(--green);
  line-height:1.45;
}
.noteItem small{
  display:block;
  color:#66806d;
  margin-bottom:4px;
}
footer{
  text-align:center;
  padding:18px;
  color:#617467;
}
@media(max-width:1100px){
  .layout{grid-template-columns:1fr}
  .topbar{position:static;flex-direction:column;align-items:flex-start;gap:10px}
}
@media print{
  .tools,.notes,.topbar button,footer{display:none}
  body{background:white}
  .layout{display:block;padding:0}
  .card{box-shadow:none;border:0}
}

/* Sicherheitsleiste */
.securitybar{position:sticky;top:0;z-index:9999;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 18px;background:#244a38;color:#fff;box-shadow:0 4px 18px rgba(0,0,0,.16);font-size:14px}.security-actions{display:flex;gap:8px;align-items:center}.security-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.14);color:#fff;text-decoration:none;font-weight:700}.security-btn:hover{background:rgba(255,255,255,.24)}.danger-link{background:#8d2b2b}@media(max-width:700px){.securitybar{align-items:flex-start;flex-direction:column}.security-actions{width:100%;justify-content:space-between}.security-btn{flex:1;justify-content:center}}@media print{.no-print,.securitybar{display:none!important}}
