:root{
  /* beruhigendes "Therapie"-Theme: mint + hellblau */
  --bgA:#eefbf7;
  --bgB:#eef7ff;
  --card: rgba(255,255,255,.80);
  --card2: rgba(255,255,255,.92);
  --text:#0b2a23;
  --muted:#47665c;
  --line: rgba(11,42,35,.12);

  --accent:#1ea88f;
  --accent2:#2bb9a0;
  --danger:#d93a3a;

  --shadow: 0 18px 42px rgba(5, 24, 20, .10);
  --radius: 18px;
}

*{box-sizing:border-box}
html, body{ height:100% }

body{
  margin:0;
  padding:16px;
  color:var(--text);
  font: 15.5px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1100px 700px at 20% 10%, var(--bgB), transparent 55%),
    radial-gradient(1100px 700px at 90% 20%, var(--bgA), transparent 55%),
    linear-gradient(180deg, #f7fffd, #eefbf7 55%, #f0f7ff);
}

.wrap{max-width:760px;margin:0 auto}

header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

h1{font-size:20px;margin:0}
.sub{color:var(--muted); font-size:13px; margin-top:4px}

.headerRight{ display:flex; align-items:center; gap:10px; }

.nowChip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.60);
  box-shadow: 0 10px 22px rgba(6, 28, 22, .08);
  font-size:13px;
  white-space:nowrap;
}

.dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--accent);
  box-shadow: 0 0 0 3px rgba(30,168,143,.15);
  flex:0 0 auto;
}

.iconBtn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 10px;
  cursor:pointer;
  box-shadow: 0 10px 20px rgba(6,28,22,.08);
}
.iconBtn:active{ transform: translateY(1px); }

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
  backdrop-filter: blur(8px);
  margin-bottom:14px;
}

label{display:block; font-size:13px; color:var(--muted); margin:8px 0 6px}

select, input, textarea{
  width:100%;
  background: var(--card2);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 11px;
  outline:none;
}
select:focus, input:focus, textarea:focus{
  border-color: rgba(30,168,143,.45);
  box-shadow: 0 0 0 4px rgba(30,168,143,.12);
}

/* Auffällige Haupt-Felder (Zustand & Intensität) */
.primarySelect{
  border-radius:999px;
  border:2px solid rgba(30,168,143,.95);
  background: linear-gradient(180deg, #f6fffb, #e4fbf4);
  font-weight:600;
  padding:11px 14px;
  box-shadow: 0 8px 18px rgba(30,168,143,.18);
}

/* Fokuszustand noch etwas klarer */
.primarySelect:focus{
  border-color: rgba(30,168,143,1);
  box-shadow: 0 0 0 4px rgba(30,168,143,.22);
}


/* Fokus für Primary-Select */
.primarySelect:focus{
  border-color: rgba(30,168,143,.9);
  box-shadow: 0 0 0 4px rgba(30,168,143,.18);
}

textarea{min-height:82px; resize:vertical}

.grid2{display:grid; grid-template-columns:1fr; gap:10px}
@media(min-width:720px){ .grid2{grid-template-columns:1fr 1fr} }

.btns{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}

button{
  border:0; border-radius:14px; padding:10px 13px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color:#ffffff; font-weight:800;
  cursor:pointer;
  box-shadow: 0 14px 26px rgba(30,168,143,.18);
}
button.secondary{
  background: rgba(255,255,255,.72);
  color: var(--text);
  border:1px solid var(--line);
  box-shadow: 0 10px 20px rgba(6,28,22,.06);
}
button.danger{
  background: rgba(255,255,255,.75);
  color:var(--danger);
  border:1px solid rgba(217,58,58,.25);
  box-shadow: 0 10px 20px rgba(6,28,22,.06);
}
button:active{ transform: translateY(1px); }

/* Badge (KW, Statistik etc.) */
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(30,168,143,.25);
  background: linear-gradient(180deg, #f6fffb, #e7faf7);
  font-size:13px; color:var(--text);
  white-space:nowrap;
}

.hint{ color:var(--muted); font-size:13px; margin-top:10px }
.small{font-size:13px}
.muted{color:var(--muted)}

.list{margin-top:0}
.hr{height:1px;background:var(--line); margin:12px 0}

.stack{ display:flex; flex-direction:column; gap:10px; }

/* Accordion */
details{
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.60);
  overflow:hidden;
}
summary{
  list-style:none;
  cursor:pointer;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  user-select:none;
}
summary::-webkit-details-marker{ display:none; }

.sumLeft{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  min-width:0;
}

.chev{
  flex:0 0 auto;
  width:30px;height:30px;
  display:grid;place-items:center;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  transition: transform .15s ease;
}
details[open] .chev{ transform: rotate(180deg); }
.chev svg{ width:16px;height:16px; fill: var(--muted); }

.detailsBody{ padding: 0 12px 12px 12px; }
.entryInner{
  margin-top:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.65);
}

.rowBetween{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* Toast */
.toast{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:16px; padding:10px 12px; border-radius:14px;
  background: rgba(255,255,255,.85);
  border:1px solid var(--line);
  color:var(--text); box-shadow:var(--shadow);
  display:none;
  max-width:92vw;
  z-index:999;
}
.toast.show{display:block}

/* Stats / Chart */
.chartWrap{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.65);
  padding:10px;
}
#statsCanvas{ width:100%; display:block; }
.legend{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-top:10px;
}
.pill{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--line);
  padding:4px 8px;
  border-radius:999px;
  background: rgba(255,255,255,.70);
}

/* Nachträglicher Eintrag Block */
.retroCard{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.62);
}

/* Vollbreiter Button für Nachträglicher Eintrag */
.retroBtnFull{
  width:100%;
  justify-content:center;
  text-align:center;
  display:flex;
  align-items:center;
  gap:6px;
}

/* Switch */
.switch{
  position:relative;
  width:46px;
  height:28px;
  display:inline-block;
  flex:0 0 auto;
}
.switch input{ opacity:0; width:0; height:0; }
.slider{
  position:absolute; inset:0;
  background: rgba(11,42,35,.12);
  border:1px solid var(--line);
  border-radius:999px;
  transition: .15s ease;
}
.slider:before{
  content:"";
  position:absolute;
  width:22px; height:22px;
  left:3px; top:2px;
  background: rgba(255,255,255,.95);
  border-radius:50%;
  box-shadow: 0 10px 18px rgba(6,28,22,.12);
  transition: .15s ease;
}
.switch input:checked + .slider{
  background: rgba(30,168,143,.35);
  border-color: rgba(30,168,143,.35);
}
.switch input:checked + .slider:before{
  transform: translateX(18px);
}

/* Modal Overlay */
.modalOverlay{
  position:fixed; inset:0;
  background: rgba(6, 22, 18, .22);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:1000;
}
.modalOverlay.show{ display:flex; }

.modal{
  width:min(560px, 100%);
  background: rgba(255,255,255,.94);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow: var(--shadow);
  padding:14px;
  max-height:80vh;
  overflow:auto;
}

/* Kompakt-Modal (z.B. Datenschutz) */
.modal--compact{
  width:min(420px, 94%);
  padding:12px 14px;
}

.modalTop{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom:10px;
}
.modal h2{ margin:0; font-size:16px; }

.menuGrid{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.menuGrid > button{ flex:1 1 180px; }

.menuRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 4px;
}

/* Text-/Label-Spalte im Menü & Datenschutz-Schalter */
.menuRow > div{
  flex:1 1 auto;
  min-width:0;
}

.menuLabel{ font-weight:800; color: var(--text); }
.menuHint{ font-size:12px; color: var(--muted); margin-top:3px; }

/* Privacy text */
.privacyText{
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
}
.privacyText p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
}

/* (alt) Checkbox-Layout – kann bleiben oder entfernt werden */
.checkRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
}
.checkLabel{ margin:0; font-size:13px; color: var(--muted); }

/* Kopf der KW-Zeilen */
.weekHeaderLine{
  display:flex;
  align-items:center;
  justify-content:space-between; /* Badge links, Anzahl rechts */
  gap:8px;
}

/* "3 Einträge" schlicht rechts */
.countPill{
  font-size:12px;
  color:var(--muted);
  margin-top:0;
  padding:0;
  border-radius:0;
  background:transparent;
}


/* Statistische & KW-Summaries leicht einfärben */
details > summary{
  background: rgba(255,255,255,.9);
  border-radius:16px;
}
details.stats > summary{
  background: rgba(255,255,255,.9); /* gleich wie die anderen */
}


/* Mobile */
@media (max-width: 520px){
  body{ padding: 12px; font-size: 15px; }
  h1{ font-size: 18px; }
  .sub{ font-size: 12.5px; }
  .card{ padding: 12px; }
  select, input, textarea{ padding: 10px 11px; }
  textarea{ min-height: 78px; }
  button{ padding: 10px 12px; }
  .nowChip{ font-size:12px; padding:7px 9px; }
}
