.resource-photo{border:1px solid #c8e5df;border-radius:12px;padding:14px;margin:0 0 14px;background:linear-gradient(120deg,#effbf9,#f3fcf0);color:#1A2E2D}
.resource-photo p{font-size:12px;line-height:1.5;margin:6px 0 10px}
.photo-actions{display:flex;gap:8px;flex-wrap:wrap}
.photo-actions button,.photo-link{font:600 13px Inter,sans-serif;min-height:44px;padding:9px 14px;border:1px solid #138782;border-radius:10px;background:#fff;color:#1A2E2D;cursor:pointer}
.photo-actions .photo-primary{background:linear-gradient(100deg,#31D9D4,#7BE17C);border-color:transparent}
.photo-actions button:disabled{opacity:.55;cursor:wait}
#photo-preview{display:block;max-width:100%;max-height:230px;object-fit:contain;margin:12px auto;border-radius:8px}
#photo-status{white-space:pre-line;font-size:13px;overflow-wrap:anywhere}
#photo-status.photo-error{color:#a12920}
#photo-choice{width:100%;min-height:44px;font:inherit;margin:8px 0;background:#fff;border:1px solid #138782;border-radius:8px;padding:8px}
.resource-photo [hidden]{display:none!important}
.private-resource-photo{margin-top:18px;border-top:1px solid #d8e5e3;padding-top:14px}
.private-resource-photo img{max-width:100%;max-height:320px;display:block;object-fit:contain;margin:10px auto}
.private-resource-photo p{font-size:12px;color:#5F6368;line-height:1.5}
@media(max-width:600px){.photo-actions>button{flex:1;font-size:13px;padding:9px 10px}.resource-photo{padding:12px}#modal input,#modal textarea,#modal select{font-size:16px}}

/* Keep all variable-height content in the same scroll area, including the photo. */
#modal .m-body{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
#modal .m-head,#modal .m-foot,#modal .m-accent{flex-shrink:0}
#modal .modal{max-height:92vh;max-height:92dvh}
@media(max-width:640px){
  #modal .modal{max-height:90vh;max-height:90dvh}
  #modal .m-body{padding:14px 16px}
  #modal .m-foot{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
