.day-closure{position:relative;overflow:hidden;margin-top:28px;padding:28px;border:1px solid rgba(226,170,180,.48);border-radius:30px;background:linear-gradient(135deg,rgba(255,250,248,.98),rgba(255,243,245,.96) 48%,rgba(241,250,251,.98));box-shadow:0 18px 45px rgba(75,56,72,.12)}
.day-closure::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 15% 20%,rgba(247,184,199,.18),transparent 25%),radial-gradient(circle at 88% 8%,rgba(128,197,204,.16),transparent 22%);pointer-events:none}
.day-closure-cloud{position:absolute;width:88px;height:35px;border-radius:40px;background:rgba(220,242,246,.75);filter:drop-shadow(0 8px 12px rgba(74,105,115,.1));opacity:.8}.day-closure-cloud::before,.day-closure-cloud::after{content:"";position:absolute;border-radius:50%;background:inherit}.day-closure-cloud::before{width:40px;height:40px;left:13px;top:-18px}.day-closure-cloud::after{width:48px;height:48px;right:7px;top:-25px}.cloud-one{right:30px;top:35px}.cloud-two{left:-25px;bottom:85px;transform:scale(.7)}
.day-closure-head{position:relative;z-index:1;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px}.day-closure-kicker{display:inline-block;font-family:"Comic Sans MS","Bradley Hand",cursive;font-weight:700;color:#d76082;letter-spacing:.02em}.day-closure-head h2{margin:2px 0 5px;font-family:Georgia,serif;font-size:clamp(30px,4vw,46px);color:#304b61}.day-closure-head p{margin:0;color:#6f7f8e}.day-closure-head-actions{display:grid;justify-items:end;gap:8px}.day-closure-sync{display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid rgba(80,174,164,.25);border-radius:999px;background:rgba(234,250,247,.85);font-size:13px;font-weight:700;color:#3c817b;white-space:nowrap}.day-closure-sync span{width:8px;height:8px;border-radius:50%;background:#3fc2a8;box-shadow:0 0 0 5px rgba(63,194,168,.12)}
.day-closure-stats{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.closure-stat{position:relative;display:flex;align-items:center;gap:12px;min-height:118px;padding:16px;border:1px solid rgba(218,188,190,.42);border-radius:22px;background:rgba(255,255,255,.78);box-shadow:0 9px 25px rgba(73,56,70,.07)}.closure-art{width:72px;min-width:72px}.closure-art svg{display:block;width:100%;height:auto}.closure-stat small,.closure-stat span{display:block}.closure-stat small{font-weight:700;color:#687786}.closure-stat strong{display:block;margin:2px 0;font-family:Georgia,serif;font-size:28px;color:#b45e79}.closure-stat span{font-size:12px;color:#87929d}.closure-mini-button{position:absolute;right:12px;bottom:10px;border:0;background:transparent;color:#c45f7e;font-size:11px;font-weight:800;cursor:pointer}.closure-stars{display:flex;gap:2px}.closure-star{border:0;background:transparent;padding:0 1px;color:#d8c9b4;font-size:25px;cursor:pointer;line-height:1}.closure-star.is-active{color:#edae3a;text-shadow:0 2px 8px rgba(237,174,58,.25)}
.day-closure-journal{position:relative;z-index:1;display:grid;grid-template-columns:1.05fr 1fr 1.1fr 1fr;gap:14px;margin-top:14px}.closure-editor{position:relative;display:flex;flex-direction:column;min-height:230px;padding:16px;border:1px solid rgba(229,165,178,.42);border-radius:22px;background:rgba(255,250,249,.82)}.closure-label{font-family:"Comic Sans MS","Bradley Hand",cursive;font-size:18px;font-weight:800;color:#3d566b}.closure-label i{color:#ee7898}.closure-editor>small{margin:3px 0 11px;color:#87919c}.closure-editor textarea,.day-closure-extra input{width:100%;box-sizing:border-box;border:1px solid #d9e0e4;border-radius:14px;background:rgba(255,255,255,.88);font:inherit;color:#314c61;outline:none}.closure-editor textarea{flex:1;min-height:104px;padding:12px;resize:vertical}.closure-editor textarea:focus,.day-closure-extra input:focus{border-color:#e5839e;box-shadow:0 0 0 4px rgba(229,131,158,.12)}.closure-byline{display:block;margin-top:9px;min-height:16px;font-size:11px;color:#7b8792}.closure-byline::before{content:"♡ ";color:#df7894}.closure-photo-preview{flex:1;display:grid;place-items:center;min-height:110px;border:1px dashed rgba(220,126,151,.45);border-radius:16px;background:linear-gradient(145deg,#fff,#fff3f5);overflow:hidden;text-align:center;color:#aa7283}.closure-photo-preview>span{font-size:35px}.closure-photo-preview p{margin:0 10px 8px;font-size:12px}.closure-photo-preview img{width:100%;height:150px;object-fit:cover}.closure-photo-button{margin-top:9px;border:0;border-radius:13px;padding:10px 14px;background:linear-gradient(135deg,#ef7898,#d95e83);color:#fff;font-weight:800;cursor:pointer}.food-rating{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:auto 0}.food-choice{display:grid;place-items:center;gap:5px;border:0;background:transparent;color:#788692;font-size:10px;cursor:pointer}.food-choice span{display:grid;place-items:center;width:43px;height:43px;border:1px solid #d3e0e5;border-radius:50%;background:#f4fbfc;font-size:21px}.food-choice.is-active span{border-color:#ef7898;background:#fff0f4;box-shadow:0 7px 18px rgba(218,91,127,.15)}
.day-closure-extra{position:relative;z-index:1;display:grid;grid-template-columns:1fr auto;align-items:end;gap:12px;margin-top:14px;padding:14px 16px;border:1px dashed rgba(217,120,148,.42);border-radius:18px;background:rgba(255,255,255,.55)}.day-closure-extra label span{display:block;margin-bottom:6px;font-family:"Comic Sans MS","Bradley Hand",cursive;font-weight:800;color:#40596d}.day-closure-extra input{padding:12px 14px}.day-closure-footer{position:relative;z-index:1;display:flex;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(169,144,151,.16);font-size:11px;color:#87919c}
.closure-modal[hidden]{display:none}.closure-modal{position:fixed;z-index:10000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(34,46,59,.58);backdrop-filter:blur(8px)}.closure-modal-card{position:relative;width:min(850px,100%);max-height:min(84vh,780px);overflow:auto;padding:25px;border-radius:28px;background:#fffaf9;box-shadow:0 24px 70px rgba(23,35,48,.28)}.closure-modal-card h2{margin:4px 0 5px;font-family:Georgia,serif;color:#304b61}.closure-modal-card>p{color:#71808d}.closure-modal-close{position:absolute;right:16px;top:14px;width:38px;height:38px;border:0;border-radius:50%;background:#f8e8eb;color:#8b5365;font-size:25px;cursor:pointer}.closure-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.closure-photo-option{position:relative;overflow:hidden;border:3px solid transparent;border-radius:18px;background:#fff;cursor:pointer;padding:0}.closure-photo-option img{display:block;width:100%;aspect-ratio:1.2;object-fit:cover}.closure-photo-option span{display:block;padding:8px;font-size:11px;color:#5f7080}.closure-photo-option.is-selected{border-color:#ef7898}.closure-photo-empty{grid-column:1/-1;padding:35px;text-align:center;border:1px dashed #e5c7cf;border-radius:18px;color:#7b8792}.device-owner{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:18px 0}.device-owner span{font-weight:800;color:#40596d}.device-owner button{border:1px solid #d9e1e5;border-radius:999px;padding:9px 16px;background:#fff;color:#456074;font-weight:800;cursor:pointer}.device-owner button.is-active{border-color:#e77796;background:#fff0f4;color:#bb5774}.health-step-input{display:grid;grid-template-columns:1fr 180px auto;gap:10px;align-items:center}.health-step-input span{font-weight:800;color:#40596d}.health-step-input input{min-width:0;padding:12px;border:1px solid #d9e0e4;border-radius:12px;font:inherit}.health-step-input button{border:0;border-radius:12px;padding:13px 18px;background:#df6e8e;color:#fff;font-weight:800}.health-values{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.health-values div{padding:15px;border-radius:16px;background:#f6fafb;text-align:center}.health-values span,.health-values strong{display:block}.health-values strong{margin-top:4px;font-family:Georgia,serif;font-size:25px;color:#b45e79}
@media(max-width:1180px){.day-closure-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.day-closure-journal{grid-template-columns:repeat(2,minmax(0,1fr))}.closure-editor{min-height:215px}.food-rating{max-width:360px;margin:auto}.closure-stars{flex-wrap:wrap}}
@media(max-width:650px){.day-closure{margin:20px -2px 0;padding:18px 14px;border-radius:24px}.day-closure-head{display:block}.day-closure-sync{width:max-content;margin-top:12px}.cloud-one{right:5px;top:22px;transform:scale(.65)}.day-closure-stats,.day-closure-journal{grid-template-columns:1fr}.closure-stat{min-height:102px}.closure-editor{min-height:205px}.day-closure-extra{grid-template-columns:1fr}.day-closure-footer{display:block}.day-closure-footer span{display:block;margin-top:5px}.closure-photo-grid{grid-template-columns:repeat(2,1fr)}.health-step-input{grid-template-columns:1fr}.health-values{grid-template-columns:1fr}.closure-modal{padding:10px}.closure-modal-card{padding:22px 15px;border-radius:22px}}

.closure-person-switch{display:flex;align-items:center;gap:5px;padding:5px 7px;border-radius:999px;background:rgba(255,255,255,.7);border:1px solid rgba(211,184,190,.35)}.closure-person-switch small{padding-left:5px;color:#7b8792}.closure-person-switch button{border:0;border-radius:999px;padding:6px 10px;background:transparent;color:#627586;font-size:11px;font-weight:800;cursor:pointer}.closure-person-switch button.is-active{background:#f4dce3;color:#a74f6a}.closure-save-error{color:#b33f58!important}
@media(max-width:650px){.day-closure-head-actions{justify-items:start}.closure-person-switch{margin-top:2px}}


/* Tagesabschluss – stabilere Kartenbreiten und bessere Lesbarkeit */
.closure-stat>div:last-child{min-width:0;flex:1}
.closure-stat small,.closure-stat span,.closure-label,.closure-editor>small{overflow-wrap:normal;word-break:normal;hyphens:none}
.closure-stars{max-width:100%}
.food-choice{min-width:0;line-height:1.2;white-space:normal}
.food-choice span{flex:none}
@media(min-width:1181px) and (max-width:1380px){
  .day-closure{padding:24px}
  .closure-stat{padding:14px;gap:9px}
  .closure-art{width:58px;min-width:58px}
  .closure-stat strong{font-size:24px}
  .closure-star{font-size:21px}
  .food-choice span{width:38px;height:38px}
}
@media(max-width:760px){
  .day-closure-head h2{font-size:36px;line-height:1.05}
  .day-closure-head-actions{width:100%;justify-items:stretch}
  .day-closure-sync{width:100%;box-sizing:border-box;justify-content:center}
  .closure-person-switch{width:100%;box-sizing:border-box;justify-content:center}
  .day-closure-stats{gap:10px}
  .closure-stat{min-height:96px;padding:13px}
  .closure-art{width:58px;min-width:58px}
  .closure-stat strong{font-size:24px}
  .day-closure-journal{gap:10px}
  .closure-editor{min-height:auto;padding:14px}
  .closure-editor textarea{min-height:120px}
  .food-rating{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;width:100%}
  .food-choice{font-size:9px}
  .food-choice span{width:38px;height:38px;font-size:19px}
}
@media(max-width:420px){
  .day-closure{padding:16px 11px}
  .day-closure-stats{grid-template-columns:1fr}
  .closure-stat{min-height:88px}
  .closure-person-switch small{width:100%;text-align:center;padding:0 0 2px}
  .closure-person-switch button{flex:1}
  .food-choice span{width:34px;height:34px}
}

/* Tagesabschluss – flexible Kennzahlen und luftige Bewertungen */
.day-closure-stats{
  grid-template-columns:minmax(0,1fr) minmax(0,1.18fr) minmax(0,1fr) minmax(0,1.32fr);
}
.day-closure-journal{
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr) minmax(0,1.08fr) minmax(245px,1.28fr);
}
.steps-stat strong{
  font-size:clamp(20px,2vw,28px);
  line-height:1;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.steps-stat [data-steps-detail]{
  line-height:1.35;
  padding-right:2px;
}
.steps-stat{padding-bottom:34px}
.rating-stat .closure-art{width:58px;min-width:58px}
.rating-stat>div:last-child{overflow:hidden}
.closure-stars{
  flex-wrap:nowrap;
  gap:0;
  white-space:nowrap;
}
.closure-star{
  flex:0 1 auto;
  min-width:0;
  font-size:clamp(19px,1.75vw,25px);
  padding:0;
}
.food-editor{min-width:0}
.food-rating{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  width:100%;
  max-width:none;
  margin:auto 0;
}
.food-choice{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-width:0;
  padding:7px 9px;
  border:1px solid rgba(205,220,226,.9);
  border-radius:999px;
  background:rgba(246,251,252,.9);
  font-size:10px;
  line-height:1.1;
  text-align:left;
  white-space:nowrap;
}
.food-choice:last-child{grid-column:1/-1;justify-content:center}
.food-choice span{
  width:30px;
  height:30px;
  min-width:30px;
  border:0;
  background:rgba(255,255,255,.8);
  font-size:17px;
}
.food-choice.is-active{
  border-color:#ef7898;
  background:#fff0f4;
  color:#a8506b;
  box-shadow:0 7px 18px rgba(218,91,127,.12);
}
.food-choice.is-active span{border:0;background:#fff}

@media(max-width:1320px){
  .day-closure-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .day-closure-journal{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rating-stat .closure-art{width:64px;min-width:64px}
  .closure-star{font-size:24px}
  .food-rating{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
  .food-choice,.food-choice:last-child{
    grid-column:auto;
    display:grid;
    place-items:center;
    gap:5px;
    padding:6px 2px;
    border:0;
    border-radius:14px;
    background:transparent;
    text-align:center;
    white-space:normal;
  }
  .food-choice span{width:38px;height:38px;min-width:38px;border:1px solid #d3e0e5}
  .food-choice.is-active{border:0;background:transparent;box-shadow:none}
  .food-choice.is-active span{border:1px solid #ef7898;background:#fff0f4}
}
@media(max-width:720px){
  .food-rating{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .food-choice,.food-choice:last-child{
    grid-column:auto;
    display:flex;
    justify-content:flex-start;
    gap:7px;
    padding:8px 10px;
    border:1px solid rgba(205,220,226,.9);
    border-radius:999px;
    background:rgba(246,251,252,.9);
    white-space:nowrap;
  }
  .food-choice:last-child{grid-column:1/-1;justify-content:center}
  .food-choice span{width:30px;height:30px;min-width:30px;border:0}
  .food-choice.is-active{border-color:#ef7898;background:#fff0f4;box-shadow:0 7px 18px rgba(218,91,127,.12)}
  .food-choice.is-active span{border:0;background:#fff}
  .steps-stat strong{font-size:24px}
}
