/* Consistent, mobile-friendly editing sheets */
/* Registro de comidas: composición compacta y acciones siempre accesibles */
#editServingModal{position:fixed!important;inset:0!important;z-index:99999!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;background:rgba(35,29,24,.48)!important}
#editServingModal .serving-edit-sheet{position:relative!important;max-height:calc(100dvh - env(safe-area-inset-top) - 12px)!important;overflow-y:auto!important;padding:24px 22px calc(32px + env(safe-area-inset-bottom))!important;scroll-padding-bottom:110px;overscroll-behavior:contain}
#editServingModal .serving-edit-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:12px}
#editServingModal .serving-edit-grid>div{min-width:0}
#editServingModal .serving-edit-grid input,#editServingModal .serving-edit-grid select{min-width:0;font-size:15px}
#editServingModal .serving-edit-actions{margin-top:12px;padding-bottom:8px}
#editServingModal .serving-edit-sheet .recipe-meta{margin-bottom:12px}
#editServingModal .serving-edit-sheet label{margin-top:12px}
@media(max-width:360px){#editServingModal .serving-edit-grid{grid-template-columns:1fr}}
.modal.show:has(#editServingDate) .sheet,.modal.show:has(#servingDate) .sheet{box-sizing:border-box;width:min(100%,540px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:24px clamp(18px,5vw,30px) max(28px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#f8f5ef;box-shadow:0 -10px 40px #34281b26}
.modal.show:has(#editServingDate) .sheet h2,.modal.show:has(#servingDate) .sheet h2{margin:8px 48px 5px 0;font-size:25px;line-height:1.2;letter-spacing:-.5px;color:#403831}
.modal.show:has(#editServingDate) .sheet .recipe-meta,.modal.show:has(#servingDate) .sheet .recipe-meta{font-size:13px;line-height:1.45;margin:0 0 20px;color:#82786d}
.modal.show:has(#editServingDate) .sheet label,.modal.show:has(#servingDate) .sheet label{display:block;margin:15px 0 6px;font-size:13px;font-weight:650;color:#4b423a}
.modal.show:has(#editServingDate) .sheet input,.modal.show:has(#editServingDate) .sheet select,.modal.show:has(#editServingDate) .sheet textarea,.modal.show:has(#servingDate) .sheet input,.modal.show:has(#servingDate) .sheet select,.modal.show:has(#servingDate) .sheet textarea{box-sizing:border-box;width:100%;min-height:46px;border:1px solid #ddd5ca;border-radius:12px;background:white;padding:11px 13px;font-size:16px;color:#403831;box-shadow:none}
.modal.show:has(#editServingDate) .sheet textarea,.modal.show:has(#servingDate) .sheet textarea{min-height:90px;resize:vertical}
.modal.show:has(#editServingDate) .sheet .close,.modal.show:has(#servingDate) .sheet .close{color:#765746;background:#eee7de;border-radius:50%;width:34px;height:34px;font-size:24px}
.modal.show:has(#editServingDate) .sheet button.primary,.modal.show:has(#servingDate) .sheet button.primary{width:100%;margin-top:20px;min-height:48px;border-radius:12px;background:#648f75;color:white;font-weight:700}
.modal.show:has(#editServingDate) .sheet button.secondary{width:100%;min-height:42px;margin-top:10px!important;border:0;background:transparent;color:#697d6b;border-radius:10px;font-size:14px}
.modal.show:has(#editServingDate) .sheet button.secondary:last-child{border-top:1px solid #e4ddd3!important;border-radius:0;margin-top:16px!important;padding-top:16px;color:#b25f52!important}
@media(max-width:600px){.modal.show:has(#editServingDate),.modal.show:has(#servingDate){align-items:flex-end}.modal.show:has(#editServingDate) .sheet,.modal.show:has(#servingDate) .sheet{margin:0;max-height:calc(100dvh - 12px)}}
/* iPhone: fecha y momento sin desbordamiento ni solapamiento */
#editServingModal .serving-edit-grid{grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;column-gap:16px!important;align-items:end}
#editServingModal .serving-edit-grid>div,#editServingModal .serving-edit-grid input,#editServingModal .serving-edit-grid select{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important}
#editServingModal .serving-edit-grid label{white-space:nowrap;margin:12px 0 7px!important}
#editServingModal .serving-edit-grid input[type=date]{padding-left:8px!important;padding-right:5px!important;font-size:16px!important;min-height:48px!important}
#editServingModal .serving-edit-grid select{padding-left:10px!important;padding-right:5px!important;font-size:16px!important;min-height:48px!important}
@media(max-width:390px){#editServingModal .serving-edit-grid{grid-template-columns:minmax(0,1fr)!important;row-gap:4px!important}}