:root{
  --bg:#1E1E1E;
  --line:rgba(230,230,230,.10);
  --text:#E6E6E6;
  --muted:#B0B0B0;
  --accent:#C49A6C;
  --shadow: 0 10px 35px rgba(0,0,0,.35);
  --max: 980px;
  --r2:22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(196,154,108,.12), transparent 55%),
              radial-gradient(900px 450px at 85% 0%, rgba(196,154,108,.08), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.9}

.app{min-height:100%; display:flex; flex-direction:column;}

.topbar{
  position:sticky; top:0; z-index:10;
  padding:16px 14px;
  background: rgba(30,30,30,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.brand__title{font-weight:750; font-size:16px;}
.brand__subtitle{margin-top:4px; font-size:12px; color:var(--muted);}

.topbar__row{
  margin-top:12px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.yearSwitch{display:flex; gap:8px; flex-wrap:wrap;}
.yearBtn{
  height:40px; padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(230,230,230,.12);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
}
.yearBtn.is-active{
  border-color: rgba(196,154,108,.55);
  background: rgba(196,154,108,.16);
}

.stats{display:flex; gap:10px; flex-wrap:wrap;}
.stat{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(255,255,255,.02);
  border-radius:16px;
  padding:8px 10px;
  min-width:74px;
  text-align:center;
}
.stat__num{font-size:16px; font-weight:750;}
.stat__label{font-size:11px; color:var(--muted); margin-top:2px;}

.topbar__actions{margin-top:10px; display:flex; gap:10px; flex-wrap:wrap;}

.tabs{
  position:sticky; top:160px; z-index:9;
  display:flex; gap:8px;
  padding:12px 14px;
  background: rgba(30,30,30,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

@media (min-width:700px){
  .topbar{padding:18px 22px}
  .tabs{top:168px; padding:12px 22px}
}

.tab{
  height:40px; padding:0 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  font-size:13px;
  cursor:pointer;
  white-space:nowrap;
}
.tab.is-active{
  border-color: rgba(196,154,108,.55);
  background: rgba(196,154,108,.12);
}

.main{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:14px;
  flex:1;
}

.panel{display:none}
.panel.is-active{display:block}

.panel__header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px; margin:10px 0 12px;
}
.h1{margin:0; font-size:18px;}
@media (min-width:700px){ .h1{font-size:20px} }

.panel__meta{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--r2);
  padding:14px;
  box-shadow: var(--shadow);
}
@media (min-width:700px){ .card{padding:18px} }

.grid{display:grid; grid-template-columns:1fr; gap:12px;}
@media (min-width:700px){ .grid{grid-template-columns:1fr 1fr} }

.field label{display:block; font-size:12px; color:var(--muted); margin:0 0 6px;}
input,select,textarea{
  width:100%;
  background:rgba(0,0,0,.28);
  border:1px solid rgba(230,230,230,.12);
  color:var(--text);
  border-radius:14px;
  padding:12px 12px;
  font-size:14px;
  outline:none;
}
textarea{resize:vertical;}
input:focus,select:focus,textarea:focus{
  border-color: rgba(196,154,108,.55);
  box-shadow: 0 0 0 3px rgba(196,154,108,.12);
}

.divider{height:1px; background:var(--line); margin:14px 0;}
.help{font-size:12px; color:var(--muted); margin-top:8px; line-height:1.35;}
.row{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.muted{color:var(--muted); font-size:12px;}

.pill{
  min-width:38px; height:26px; padding:0 10px;
  border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(196,154,108,.35);
  background: rgba(196,154,108,.10);
  font-size:12px;
}

.range-hints{display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-top:6px;}

.checks{display:flex; flex-wrap:wrap; gap:10px 12px;}
.check{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 12px;
  border:1px solid rgba(230,230,230,.10);
  border-radius:999px;
  background:rgba(255,255,255,.02);
  cursor:pointer; user-select:none;
}
.check input{width:18px; height:18px; margin:0; accent-color: var(--accent);}

.btn{
  height:40px; padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(230,230,230,.12);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
}
.btn--primary{
  border-color: rgba(196,154,108,.55);
  background: rgba(196,154,108,.18);
}
.btn--ghost{background:transparent;}

.filebtn{position:relative; overflow:hidden;}
.filebtn input{position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%;}

.list-head{
  margin-top:14px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.sort{display:flex; align-items:center; gap:8px;}

.entries{margin-top:12px; display:grid; gap:10px;}
.entry{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(0,0,0,.20);
  border-radius:18px;
  padding:12px;
}
.entry__top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
}
.entry__title{font-weight:700; font-size:14px;}
.entry__meta{margin-top:4px; color:var(--muted); font-size:12px;}
.entry__body{margin-top:10px; font-size:13px; line-height:1.45; color:rgba(230,230,230,.92);}

.kv{
  display:grid;
  grid-template-columns: 130px 1fr;
  gap:8px 10px;
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}
.kv div strong{color:rgba(230,230,230,.92); font-weight:650;}

.entry__actions{display:flex; gap:8px;}
.iconbtn{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(230,230,230,.12);
  background:rgba(255,255,255,.02);
  color:var(--text);
  cursor:pointer;
}

.footer{
  padding:16px 14px 20px;
  border-top:1px solid var(--line);
  background: rgba(30,30,30,.60);
}
.footer__wrap{max-width:var(--max); margin:0 auto;}
.footer__note{color:rgba(230,230,230,.9); font-size:12px;}
.footer__sub{margin-top:6px; color:var(--muted); font-size:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.footer__sub .dot{opacity:.6}

.p{margin:0 0 10px; line-height:1.5;}
.ul{margin:0; padding-left:18px;}
.ul li{margin:6px 0;}

.toast{
  position:fixed; left:50%; bottom:18px;
  transform:translateX(-50%);
  background: rgba(0,0,0,.70);
  border:1px solid rgba(196,154,108,.35);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  font-size:13px;
  opacity:0; pointer-events:none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-show{opacity:1; transform:translateX(-50%) translateY(-4px);}

/* Calendar */
.calWeekdays{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
  color:var(--muted);
  font-size:12px;
}
.calendarGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}
.calCell{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(0,0,0,.18);
  border-radius:16px;
  min-height:58px;
  padding:10px 10px;
  cursor:pointer;
  position:relative;
  overflow:hidden;
}
.calCell.is-muted{opacity:.45; cursor:default;}
.calCell.is-today{
  border-color: rgba(196,154,108,.55);
  box-shadow: 0 0 0 3px rgba(196,154,108,.10) inset;
}
.calCell.has-entry::after{
  content:"";
  position:absolute;
  right:10px; bottom:10px;
  width:10px; height:10px;
  border-radius:999px;
  background: rgba(196,154,108,.75);
}
.calDayNum{font-weight:800; font-size:14px;}
.calSmall{margin-top:6px; font-size:11px; color:var(--muted); line-height:1.2;}

/* Wissen layout */
.wissenWrap{display:grid; grid-template-columns: 1fr; gap:12px;}
@media (min-width:900px){
  .wissenWrap{grid-template-columns: 320px 1fr;}
}
.wissenNav{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(0,0,0,.18);
  border-radius:18px;
  padding:12px;
}
.wissenNav__title{font-weight:750; font-size:13px; margin-bottom:10px;}
.wissenNav__items{display:grid; gap:8px;}
.wissenNav__btn{
  text-align:left;
  width:100%;
  border:1px solid rgba(230,230,230,.10);
  background:rgba(255,255,255,.02);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  font-size:13px;
}
.wissenNav__btn.is-active{
  border-color: rgba(196,154,108,.55);
  background: rgba(196,154,108,.12);
}
.wissenContent{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(0,0,0,.18);
  border-radius:18px;
  padding:14px;
}

.wiModule h2{margin:0 0 10px; font-size:18px;}
.wiModule .lead{color:var(--muted); font-size:13px; line-height:1.45; margin:0 0 12px;}
.wiSection{margin:14px 0 0;}
.wiSection h3{margin:0 0 8px; font-size:14px;}
.wiSection p{margin:0 0 10px; line-height:1.5; font-size:13px; color:rgba(230,230,230,.94);}
.wiList{margin:0; padding-left:18px;}
.wiList li{margin:6px 0; line-height:1.45; font-size:13px; color:rgba(230,230,230,.94);}
.wiCallout{
  border:1px solid rgba(196,154,108,.35);
  background: rgba(196,154,108,.10);
  border-radius:16px;
  padding:12px;
  margin-top:12px;
}
.wiCallout strong{display:block; margin-bottom:6px;}

/* Glossar */
.glossarList{display:grid; gap:10px;}
.glossCard{
  border:1px solid rgba(230,230,230,.10);
  background:rgba(0,0,0,.20);
  border-radius:18px;
  padding:12px;
}
.glossTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.glossTerm{font-weight:800;}
.glossYear{color:var(--muted); font-size:12px;}
.glossBody{margin-top:10px; font-size:13px; line-height:1.5;}
.glossBody .k{color:var(--muted); font-size:12px; margin-top:8px;}
.legalLinks{display:flex; gap:10px; flex-wrap:wrap;}
.legalLink{
  border:1px solid rgba(230,230,230,.12);
  background:rgba(255,255,255,.03);
  padding:10px 12px;
  border-radius:999px;
  font-size:13px;
}
